generated-configure.sh revision 1077:bfd9a3e1aeb5
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_NORM
696CXX_O_FLAG_HI
697CXX_O_FLAG_HIGHEST
698C_O_FLAG_NONE
699C_O_FLAG_NORM
700C_O_FLAG_HI
701C_O_FLAG_HIGHEST
702CXXFLAGS_DEBUG_SYMBOLS
703CFLAGS_DEBUG_SYMBOLS
704CXX_FLAG_DEPS
705C_FLAG_DEPS
706SET_SHARED_LIBRARY_MAPFILE
707SET_SHARED_LIBRARY_NAME
708SET_SHARED_LIBRARY_ORIGIN
709SET_EXECUTABLE_ORIGIN
710SHARED_LIBRARY_FLAGS
711CXX_FLAG_REORDER
712C_FLAG_REORDER
713SYSROOT_LDFLAGS
714SYSROOT_CFLAGS
715RC_FLAGS
716AR_OUT_OPTION
717LD_OUT_OPTION
718EXE_OUT_OPTION
719CC_OUT_OPTION
720POST_MCS_CMD
721POST_STRIP_CMD
722ARFLAGS
723COMPILER_TARGET_BITS_FLAG
724JT_HOME
725JTREGEXE
726USING_BROKEN_SUSE_LD
727PACKAGE_PATH
728LDEXECXX
729LDEXE
730USE_CLANG
731HOTSPOT_LD
732HOTSPOT_CXX
733HOTSPOT_RC
734HOTSPOT_MT
735BUILD_LD
736BUILD_CXX
737BUILD_CC
738ac_ct_OBJDUMP
739OBJDUMP
740ac_ct_OBJCOPY
741OBJCOPY
742ac_ct_NM
743ac_ct_STRIP
744MCS
745GNM
746NM
747STRIP
748DUMPBIN
749RC
750MT
751LIPO
752ac_ct_OBJC
753OBJCFLAGS
754OBJC
755ac_ct_AR
756AR
757AS
758LDCXX
759LD
760CXXCPP
761CPP
762ac_ct_CXX
763CXXFLAGS
764CXX
765ac_ct_PROPER_COMPILER_CXX
766PROPER_COMPILER_CXX
767TOOLCHAIN_PATH_CXX
768POTENTIAL_CXX
769OBJEXT
770EXEEXT
771ac_ct_CC
772CPPFLAGS
773LDFLAGS
774CFLAGS
775CC
776ac_ct_PROPER_COMPILER_CC
777PROPER_COMPILER_CC
778TOOLCHAIN_PATH_CC
779POTENTIAL_CC
780VS_LIB
781VS_INCLUDE
782VS_PATH
783CYGWIN_LINK
784EXE_SUFFIX
785OBJ_SUFFIX
786STATIC_LIBRARY
787SHARED_LIBRARY
788STATIC_LIBRARY_SUFFIX
789SHARED_LIBRARY_SUFFIX
790LIBRARY_PREFIX
791TOOLCHAIN_TYPE
792BUILD_HOTSPOT
793HOTSPOT_DIST
794BUILD_OUTPUT
795OVERRIDE_SRC_ROOT
796ADD_SRC_ROOT
797JDK_TOPDIR
798NASHORN_TOPDIR
799HOTSPOT_TOPDIR
800JAXWS_TOPDIR
801JAXP_TOPDIR
802CORBA_TOPDIR
803LANGTOOLS_TOPDIR
804JAVA_FLAGS_SMALL
805JAVA_FLAGS_BIG
806JAVA_FLAGS
807JAVAC_FLAGS
808BOOT_JDK_SOURCETARGET
809JARSIGNER
810NATIVE2ASCII
811JAR
812JAVAH
813JAVAC
814JAVA
815BOOT_JDK
816BOOT_TOOLSJAR
817BOOT_RTJAR
818JAVA_CHECK
819JAVAC_CHECK
820COOKED_BUILD_NUMBER
821JDK_VERSION
822COPYRIGHT_YEAR
823MACOSX_BUNDLE_ID_BASE
824MACOSX_BUNDLE_NAME_BASE
825COMPANY_NAME
826JDK_RC_PLATFORM_NAME
827PRODUCT_SUFFIX
828PRODUCT_NAME
829LAUNCHER_NAME
830MILESTONE
831JDK_BUILD_NUMBER
832JDK_UPDATE_VERSION
833JDK_MICRO_VERSION
834JDK_MINOR_VERSION
835JDK_MAJOR_VERSION
836USER_RELEASE_SUFFIX
837COMPRESS_JARS
838RMICONNECTOR_IIOP
839UNLIMITED_CRYPTO
840CACERTS_FILE
841TEST_IN_BUILD
842BUILD_HEADLESS
843SUPPORT_HEADFUL
844SUPPORT_HEADLESS
845BDEPS_FTP
846BDEPS_UNZIP
847OS_VERSION_MICRO
848OS_VERSION_MINOR
849OS_VERSION_MAJOR
850PKG_CONFIG
851CODESIGN
852XATTR
853DSYMUTIL
854IS_GNU_TIME
855TIME
856STAT
857HG
858READELF
859OTOOL
860LDD
861ZIP
862UNZIP
863FIND_DELETE
864MAKE
865CHECK_TOOLSDIR_MAKE
866CHECK_TOOLSDIR_GMAKE
867CHECK_MAKE
868CHECK_GMAKE
869PKGHANDLER
870OUTPUT_ROOT
871CONF_NAME
872SPEC
873BUILD_VARIANT_RELEASE
874DEBUG_CLASSFILES
875FASTDEBUG
876VARIANT
877DEBUG_LEVEL
878MACOSX_UNIVERSAL
879INCLUDE_SA
880JVM_VARIANT_CORE
881JVM_VARIANT_ZEROSHARK
882JVM_VARIANT_ZERO
883JVM_VARIANT_KERNEL
884JVM_VARIANT_MINIMAL1
885JVM_VARIANT_CLIENT
886JVM_VARIANT_SERVER
887JVM_VARIANTS
888JVM_INTERPRETER
889JDK_VARIANT
890SET_OPENJDK
891BUILD_LOG_WRAPPER
892BUILD_LOG_PREVIOUS
893BUILD_LOG
894TOPDIR
895PATH_SEP
896ZERO_ARCHDEF
897DEFINE_CROSS_COMPILE_ARCH
898LP64
899OPENJDK_TARGET_OS_EXPORT_DIR
900OPENJDK_TARGET_OS_API_DIR
901OPENJDK_TARGET_CPU_JLI_CFLAGS
902OPENJDK_TARGET_CPU_OSARCH
903OPENJDK_TARGET_CPU_ISADIR
904OPENJDK_TARGET_CPU_LIBDIR
905OPENJDK_TARGET_CPU_LEGACY_LIB
906OPENJDK_TARGET_CPU_LEGACY
907REQUIRED_OS_VERSION
908REQUIRED_OS_NAME
909COMPILE_TYPE
910OPENJDK_TARGET_CPU_ENDIAN
911OPENJDK_TARGET_CPU_BITS
912OPENJDK_TARGET_CPU_ARCH
913OPENJDK_TARGET_CPU
914OPENJDK_TARGET_OS_API
915OPENJDK_TARGET_OS
916OPENJDK_BUILD_CPU_ENDIAN
917OPENJDK_BUILD_CPU_BITS
918OPENJDK_BUILD_CPU_ARCH
919OPENJDK_BUILD_CPU
920OPENJDK_BUILD_OS_API
921OPENJDK_BUILD_OS
922OPENJDK_BUILD_AUTOCONF_NAME
923OPENJDK_TARGET_AUTOCONF_NAME
924target_os
925target_vendor
926target_cpu
927target
928host_os
929host_vendor
930host_cpu
931host
932build_os
933build_vendor
934build_cpu
935build
936SETFILE
937DF
938READLINK
939CYGPATH
940SED
941FGREP
942EGREP
943GREP
944AWK
945XARGS
946WHICH
947WC
948UNIQ
949UNAME
950TR
951TOUCH
952TEE
953TAR
954TAIL
955SORT
956SH
957RM
958PRINTF
959NAWK
960MV
961MKTEMP
962MKDIR
963LS
964LN
965HEAD
966FIND
967FILE
968EXPR
969ECHO
970DIRNAME
971DIFF
972DATE
973CUT
974CPIO
975CP
976COMM
977CMP
978CHMOD
979CAT
980BASH
981BASENAME
982DATE_WHEN_CONFIGURED
983CONFIGURE_COMMAND_LINE
984target_alias
985host_alias
986build_alias
987LIBS
988ECHO_T
989ECHO_N
990ECHO_C
991DEFS
992mandir
993localedir
994libdir
995psdir
996pdfdir
997dvidir
998htmldir
999infodir
1000docdir
1001oldincludedir
1002includedir
1003localstatedir
1004sharedstatedir
1005sysconfdir
1006datadir
1007datarootdir
1008libexecdir
1009sbindir
1010bindir
1011program_transform_name
1012prefix
1013exec_prefix
1014PACKAGE_URL
1015PACKAGE_BUGREPORT
1016PACKAGE_STRING
1017PACKAGE_VERSION
1018PACKAGE_TARNAME
1019PACKAGE_NAME
1020PATH_SEPARATOR
1021SHELL'
1022ac_subst_files=''
1023ac_user_opts='
1024enable_option_checking
1025with_target_bits
1026enable_openjdk_only
1027with_custom_make_dir
1028with_jdk_variant
1029with_jvm_interpreter
1030with_jvm_variants
1031enable_debug
1032with_debug_level
1033with_devkit
1034with_sys_root
1035with_sysroot
1036with_tools_dir
1037with_toolchain_path
1038with_extra_path
1039with_conf_name
1040with_builddeps_conf
1041with_builddeps_server
1042with_builddeps_dir
1043with_builddeps_group
1044enable_headful
1045enable_hotspot_test_in_build
1046with_cacerts_file
1047enable_unlimited_crypto
1048enable_rmiconnector_iiop
1049with_milestone
1050with_update_version
1051with_user_release_suffix
1052with_build_number
1053with_boot_jdk
1054with_boot_jdk_jvmargs
1055with_add_source_root
1056with_override_source_root
1057with_adds_and_overrides
1058with_override_langtools
1059with_override_corba
1060with_override_jaxp
1061with_override_jaxws
1062with_override_hotspot
1063with_override_nashorn
1064with_override_jdk
1065with_import_hotspot
1066with_toolchain_type
1067with_jtreg
1068with_extra_cflags
1069with_extra_cxxflags
1070with_extra_ldflags
1071enable_debug_symbols
1072enable_zip_debug_info
1073enable_macosx_runtime_support
1074with_x
1075with_cups
1076with_cups_include
1077with_freetype
1078with_freetype_include
1079with_freetype_lib
1080enable_freetype_bundling
1081with_alsa
1082with_alsa_include
1083with_alsa_lib
1084with_libjpeg
1085with_giflib
1086with_lcms
1087with_libpng
1088with_zlib
1089with_stdc__lib
1090with_msvcr_dll
1091with_dxsdk
1092with_dxsdk_lib
1093with_dxsdk_include
1094with_num_cores
1095with_memory_size
1096with_jobs
1097with_sjavac_server_java
1098enable_sjavac
1099enable_precompiled_headers
1100enable_ccache
1101with_ccache_dir
1102'
1103      ac_precious_vars='build_alias
1104host_alias
1105target_alias
1106BASENAME
1107BASH
1108CAT
1109CHMOD
1110CMP
1111COMM
1112CP
1113CPIO
1114CUT
1115DATE
1116DIFF
1117DIRNAME
1118ECHO
1119EXPR
1120FILE
1121FIND
1122HEAD
1123LN
1124LS
1125MKDIR
1126MKTEMP
1127MV
1128NAWK
1129PRINTF
1130RM
1131SH
1132SORT
1133TAIL
1134TAR
1135TEE
1136TOUCH
1137TR
1138UNAME
1139UNIQ
1140WC
1141WHICH
1142XARGS
1143AWK
1144GREP
1145EGREP
1146FGREP
1147SED
1148CYGPATH
1149READLINK
1150DF
1151SETFILE
1152UNZIP
1153ZIP
1154LDD
1155OTOOL
1156READELF
1157HG
1158STAT
1159TIME
1160DSYMUTIL
1161XATTR
1162CODESIGN
1163PKG_CONFIG
1164JAVA
1165JAVAC
1166JAVAH
1167JAR
1168NATIVE2ASCII
1169JARSIGNER
1170CC
1171CFLAGS
1172LDFLAGS
1173LIBS
1174CPPFLAGS
1175CXX
1176CXXFLAGS
1177CCC
1178CPP
1179CXXCPP
1180AS
1181AR
1182OBJC
1183OBJCFLAGS
1184LIPO
1185STRIP
1186NM
1187GNM
1188MCS
1189OBJCOPY
1190OBJDUMP
1191BUILD_CC
1192BUILD_CXX
1193BUILD_LD
1194JTREGEXE
1195XMKMF
1196FREETYPE_CFLAGS
1197FREETYPE_LIBS
1198ALSA_CFLAGS
1199ALSA_LIBS
1200LCMS_CFLAGS
1201LCMS_LIBS
1202PNG_CFLAGS
1203PNG_LIBS
1204LIBFFI_CFLAGS
1205LIBFFI_LIBS
1206CCACHE'
1207
1208
1209# Initialize some variables set by options.
1210ac_init_help=
1211ac_init_version=false
1212ac_unrecognized_opts=
1213ac_unrecognized_sep=
1214# The variables have the same names as the options, with
1215# dashes changed to underlines.
1216cache_file=/dev/null
1217exec_prefix=NONE
1218no_create=
1219no_recursion=
1220prefix=NONE
1221program_prefix=NONE
1222program_suffix=NONE
1223program_transform_name=s,x,x,
1224silent=
1225site=
1226srcdir=
1227verbose=
1228x_includes=NONE
1229x_libraries=NONE
1230
1231# Installation directory options.
1232# These are left unexpanded so users can "make install exec_prefix=/foo"
1233# and all the variables that are supposed to be based on exec_prefix
1234# by default will actually change.
1235# Use braces instead of parens because sh, perl, etc. also accept them.
1236# (The list follows the same order as the GNU Coding Standards.)
1237bindir='${exec_prefix}/bin'
1238sbindir='${exec_prefix}/sbin'
1239libexecdir='${exec_prefix}/libexec'
1240datarootdir='${prefix}/share'
1241datadir='${datarootdir}'
1242sysconfdir='${prefix}/etc'
1243sharedstatedir='${prefix}/com'
1244localstatedir='${prefix}/var'
1245includedir='${prefix}/include'
1246oldincludedir='/usr/include'
1247docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1248infodir='${datarootdir}/info'
1249htmldir='${docdir}'
1250dvidir='${docdir}'
1251pdfdir='${docdir}'
1252psdir='${docdir}'
1253libdir='${exec_prefix}/lib'
1254localedir='${datarootdir}/locale'
1255mandir='${datarootdir}/man'
1256
1257ac_prev=
1258ac_dashdash=
1259for ac_option
1260do
1261  # If the previous option needs an argument, assign it.
1262  if test -n "$ac_prev"; then
1263    eval $ac_prev=\$ac_option
1264    ac_prev=
1265    continue
1266  fi
1267
1268  case $ac_option in
1269  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1270  *=)   ac_optarg= ;;
1271  *)    ac_optarg=yes ;;
1272  esac
1273
1274  # Accept the important Cygnus configure options, so we can diagnose typos.
1275
1276  case $ac_dashdash$ac_option in
1277  --)
1278    ac_dashdash=yes ;;
1279
1280  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1281    ac_prev=bindir ;;
1282  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1283    bindir=$ac_optarg ;;
1284
1285  -build | --build | --buil | --bui | --bu)
1286    ac_prev=build_alias ;;
1287  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1288    build_alias=$ac_optarg ;;
1289
1290  -cache-file | --cache-file | --cache-fil | --cache-fi \
1291  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1292    ac_prev=cache_file ;;
1293  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1294  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1295    cache_file=$ac_optarg ;;
1296
1297  --config-cache | -C)
1298    cache_file=config.cache ;;
1299
1300  -datadir | --datadir | --datadi | --datad)
1301    ac_prev=datadir ;;
1302  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1303    datadir=$ac_optarg ;;
1304
1305  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1306  | --dataroo | --dataro | --datar)
1307    ac_prev=datarootdir ;;
1308  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1309  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1310    datarootdir=$ac_optarg ;;
1311
1312  -disable-* | --disable-*)
1313    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1314    # Reject names that are not valid shell variable names.
1315    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1316      as_fn_error $? "invalid feature name: $ac_useropt"
1317    ac_useropt_orig=$ac_useropt
1318    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1319    case $ac_user_opts in
1320      *"
1321"enable_$ac_useropt"
1322"*) ;;
1323      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1324	 ac_unrecognized_sep=', ';;
1325    esac
1326    eval enable_$ac_useropt=no ;;
1327
1328  -docdir | --docdir | --docdi | --doc | --do)
1329    ac_prev=docdir ;;
1330  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1331    docdir=$ac_optarg ;;
1332
1333  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1334    ac_prev=dvidir ;;
1335  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1336    dvidir=$ac_optarg ;;
1337
1338  -enable-* | --enable-*)
1339    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1340    # Reject names that are not valid shell variable names.
1341    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1342      as_fn_error $? "invalid feature name: $ac_useropt"
1343    ac_useropt_orig=$ac_useropt
1344    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1345    case $ac_user_opts in
1346      *"
1347"enable_$ac_useropt"
1348"*) ;;
1349      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1350	 ac_unrecognized_sep=', ';;
1351    esac
1352    eval enable_$ac_useropt=\$ac_optarg ;;
1353
1354  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1355  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1356  | --exec | --exe | --ex)
1357    ac_prev=exec_prefix ;;
1358  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1359  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1360  | --exec=* | --exe=* | --ex=*)
1361    exec_prefix=$ac_optarg ;;
1362
1363  -gas | --gas | --ga | --g)
1364    # Obsolete; use --with-gas.
1365    with_gas=yes ;;
1366
1367  -help | --help | --hel | --he | -h)
1368    ac_init_help=long ;;
1369  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1370    ac_init_help=recursive ;;
1371  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1372    ac_init_help=short ;;
1373
1374  -host | --host | --hos | --ho)
1375    ac_prev=host_alias ;;
1376  -host=* | --host=* | --hos=* | --ho=*)
1377    host_alias=$ac_optarg ;;
1378
1379  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1380    ac_prev=htmldir ;;
1381  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1382  | --ht=*)
1383    htmldir=$ac_optarg ;;
1384
1385  -includedir | --includedir | --includedi | --included | --include \
1386  | --includ | --inclu | --incl | --inc)
1387    ac_prev=includedir ;;
1388  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1389  | --includ=* | --inclu=* | --incl=* | --inc=*)
1390    includedir=$ac_optarg ;;
1391
1392  -infodir | --infodir | --infodi | --infod | --info | --inf)
1393    ac_prev=infodir ;;
1394  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1395    infodir=$ac_optarg ;;
1396
1397  -libdir | --libdir | --libdi | --libd)
1398    ac_prev=libdir ;;
1399  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1400    libdir=$ac_optarg ;;
1401
1402  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1403  | --libexe | --libex | --libe)
1404    ac_prev=libexecdir ;;
1405  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1406  | --libexe=* | --libex=* | --libe=*)
1407    libexecdir=$ac_optarg ;;
1408
1409  -localedir | --localedir | --localedi | --localed | --locale)
1410    ac_prev=localedir ;;
1411  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1412    localedir=$ac_optarg ;;
1413
1414  -localstatedir | --localstatedir | --localstatedi | --localstated \
1415  | --localstate | --localstat | --localsta | --localst | --locals)
1416    ac_prev=localstatedir ;;
1417  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1418  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1419    localstatedir=$ac_optarg ;;
1420
1421  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1422    ac_prev=mandir ;;
1423  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1424    mandir=$ac_optarg ;;
1425
1426  -nfp | --nfp | --nf)
1427    # Obsolete; use --without-fp.
1428    with_fp=no ;;
1429
1430  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1431  | --no-cr | --no-c | -n)
1432    no_create=yes ;;
1433
1434  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1435  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1436    no_recursion=yes ;;
1437
1438  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1439  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1440  | --oldin | --oldi | --old | --ol | --o)
1441    ac_prev=oldincludedir ;;
1442  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1443  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1444  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1445    oldincludedir=$ac_optarg ;;
1446
1447  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1448    ac_prev=prefix ;;
1449  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1450    prefix=$ac_optarg ;;
1451
1452  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1453  | --program-pre | --program-pr | --program-p)
1454    ac_prev=program_prefix ;;
1455  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1456  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1457    program_prefix=$ac_optarg ;;
1458
1459  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1460  | --program-suf | --program-su | --program-s)
1461    ac_prev=program_suffix ;;
1462  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1463  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1464    program_suffix=$ac_optarg ;;
1465
1466  -program-transform-name | --program-transform-name \
1467  | --program-transform-nam | --program-transform-na \
1468  | --program-transform-n | --program-transform- \
1469  | --program-transform | --program-transfor \
1470  | --program-transfo | --program-transf \
1471  | --program-trans | --program-tran \
1472  | --progr-tra | --program-tr | --program-t)
1473    ac_prev=program_transform_name ;;
1474  -program-transform-name=* | --program-transform-name=* \
1475  | --program-transform-nam=* | --program-transform-na=* \
1476  | --program-transform-n=* | --program-transform-=* \
1477  | --program-transform=* | --program-transfor=* \
1478  | --program-transfo=* | --program-transf=* \
1479  | --program-trans=* | --program-tran=* \
1480  | --progr-tra=* | --program-tr=* | --program-t=*)
1481    program_transform_name=$ac_optarg ;;
1482
1483  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1484    ac_prev=pdfdir ;;
1485  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1486    pdfdir=$ac_optarg ;;
1487
1488  -psdir | --psdir | --psdi | --psd | --ps)
1489    ac_prev=psdir ;;
1490  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1491    psdir=$ac_optarg ;;
1492
1493  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1494  | -silent | --silent | --silen | --sile | --sil)
1495    silent=yes ;;
1496
1497  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1498    ac_prev=sbindir ;;
1499  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1500  | --sbi=* | --sb=*)
1501    sbindir=$ac_optarg ;;
1502
1503  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1504  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1505  | --sharedst | --shareds | --shared | --share | --shar \
1506  | --sha | --sh)
1507    ac_prev=sharedstatedir ;;
1508  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1509  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1510  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1511  | --sha=* | --sh=*)
1512    sharedstatedir=$ac_optarg ;;
1513
1514  -site | --site | --sit)
1515    ac_prev=site ;;
1516  -site=* | --site=* | --sit=*)
1517    site=$ac_optarg ;;
1518
1519  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1520    ac_prev=srcdir ;;
1521  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1522    srcdir=$ac_optarg ;;
1523
1524  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1525  | --syscon | --sysco | --sysc | --sys | --sy)
1526    ac_prev=sysconfdir ;;
1527  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1528  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1529    sysconfdir=$ac_optarg ;;
1530
1531  -target | --target | --targe | --targ | --tar | --ta | --t)
1532    ac_prev=target_alias ;;
1533  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1534    target_alias=$ac_optarg ;;
1535
1536  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1537    verbose=yes ;;
1538
1539  -version | --version | --versio | --versi | --vers | -V)
1540    ac_init_version=: ;;
1541
1542  -with-* | --with-*)
1543    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1544    # Reject names that are not valid shell variable names.
1545    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1546      as_fn_error $? "invalid package name: $ac_useropt"
1547    ac_useropt_orig=$ac_useropt
1548    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1549    case $ac_user_opts in
1550      *"
1551"with_$ac_useropt"
1552"*) ;;
1553      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1554	 ac_unrecognized_sep=', ';;
1555    esac
1556    eval with_$ac_useropt=\$ac_optarg ;;
1557
1558  -without-* | --without-*)
1559    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1560    # Reject names that are not valid shell variable names.
1561    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1562      as_fn_error $? "invalid package name: $ac_useropt"
1563    ac_useropt_orig=$ac_useropt
1564    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1565    case $ac_user_opts in
1566      *"
1567"with_$ac_useropt"
1568"*) ;;
1569      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1570	 ac_unrecognized_sep=', ';;
1571    esac
1572    eval with_$ac_useropt=no ;;
1573
1574  --x)
1575    # Obsolete; use --with-x.
1576    with_x=yes ;;
1577
1578  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1579  | --x-incl | --x-inc | --x-in | --x-i)
1580    ac_prev=x_includes ;;
1581  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1582  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1583    x_includes=$ac_optarg ;;
1584
1585  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1586  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1587    ac_prev=x_libraries ;;
1588  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1589  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1590    x_libraries=$ac_optarg ;;
1591
1592  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1593Try \`$0 --help' for more information"
1594    ;;
1595
1596  *=*)
1597    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1598    # Reject names that are not valid shell variable names.
1599    case $ac_envvar in #(
1600      '' | [0-9]* | *[!_$as_cr_alnum]* )
1601      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1602    esac
1603    eval $ac_envvar=\$ac_optarg
1604    export $ac_envvar ;;
1605
1606  *)
1607    # FIXME: should be removed in autoconf 3.0.
1608    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1609    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1610      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1611    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1612    ;;
1613
1614  esac
1615done
1616
1617if test -n "$ac_prev"; then
1618  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1619  as_fn_error $? "missing argument to $ac_option"
1620fi
1621
1622if test -n "$ac_unrecognized_opts"; then
1623  case $enable_option_checking in
1624    no) ;;
1625    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1626    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1627  esac
1628fi
1629
1630# Check all directory arguments for consistency.
1631for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1632		datadir sysconfdir sharedstatedir localstatedir includedir \
1633		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1634		libdir localedir mandir
1635do
1636  eval ac_val=\$$ac_var
1637  # Remove trailing slashes.
1638  case $ac_val in
1639    */ )
1640      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1641      eval $ac_var=\$ac_val;;
1642  esac
1643  # Be sure to have absolute directory names.
1644  case $ac_val in
1645    [\\/$]* | ?:[\\/]* )  continue;;
1646    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1647  esac
1648  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1649done
1650
1651# There might be people who depend on the old broken behavior: `$host'
1652# used to hold the argument of --host etc.
1653# FIXME: To remove some day.
1654build=$build_alias
1655host=$host_alias
1656target=$target_alias
1657
1658# FIXME: To remove some day.
1659if test "x$host_alias" != x; then
1660  if test "x$build_alias" = x; then
1661    cross_compiling=maybe
1662  elif test "x$build_alias" != "x$host_alias"; then
1663    cross_compiling=yes
1664  fi
1665fi
1666
1667ac_tool_prefix=
1668test -n "$host_alias" && ac_tool_prefix=$host_alias-
1669
1670test "$silent" = yes && exec 6>/dev/null
1671
1672
1673ac_pwd=`pwd` && test -n "$ac_pwd" &&
1674ac_ls_di=`ls -di .` &&
1675ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1676  as_fn_error $? "working directory cannot be determined"
1677test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1678  as_fn_error $? "pwd does not report name of working directory"
1679
1680
1681# Find the source files, if location was not specified.
1682if test -z "$srcdir"; then
1683  ac_srcdir_defaulted=yes
1684  # Try the directory containing this script, then the parent directory.
1685  ac_confdir=`$as_dirname -- "$as_myself" ||
1686$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1687	 X"$as_myself" : 'X\(//\)[^/]' \| \
1688	 X"$as_myself" : 'X\(//\)$' \| \
1689	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1690$as_echo X"$as_myself" |
1691    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1692	    s//\1/
1693	    q
1694	  }
1695	  /^X\(\/\/\)[^/].*/{
1696	    s//\1/
1697	    q
1698	  }
1699	  /^X\(\/\/\)$/{
1700	    s//\1/
1701	    q
1702	  }
1703	  /^X\(\/\).*/{
1704	    s//\1/
1705	    q
1706	  }
1707	  s/.*/./; q'`
1708  srcdir=$ac_confdir
1709  if test ! -r "$srcdir/$ac_unique_file"; then
1710    srcdir=..
1711  fi
1712else
1713  ac_srcdir_defaulted=no
1714fi
1715if test ! -r "$srcdir/$ac_unique_file"; then
1716  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1717  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1718fi
1719ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1720ac_abs_confdir=`(
1721	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1722	pwd)`
1723# When building in place, set srcdir=.
1724if test "$ac_abs_confdir" = "$ac_pwd"; then
1725  srcdir=.
1726fi
1727# Remove unnecessary trailing slashes from srcdir.
1728# Double slashes in file names in object file debugging info
1729# mess up M-x gdb in Emacs.
1730case $srcdir in
1731*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1732esac
1733for ac_var in $ac_precious_vars; do
1734  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1735  eval ac_env_${ac_var}_value=\$${ac_var}
1736  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1737  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1738done
1739
1740#
1741# Report the --help message.
1742#
1743if test "$ac_init_help" = "long"; then
1744  # Omit some internal or obsolete options to make the list less imposing.
1745  # This message is too long to be a string in the A/UX 3.1 sh.
1746  cat <<_ACEOF
1747\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1748
1749Usage: $0 [OPTION]... [VAR=VALUE]...
1750
1751To assign environment variables (e.g., CC, CFLAGS...), specify them as
1752VAR=VALUE.  See below for descriptions of some of the useful variables.
1753
1754Defaults for the options are specified in brackets.
1755
1756Configuration:
1757  -h, --help              display this help and exit
1758      --help=short        display options specific to this package
1759      --help=recursive    display the short help of all the included packages
1760  -V, --version           display version information and exit
1761  -q, --quiet, --silent   do not print \`checking ...' messages
1762      --cache-file=FILE   cache test results in FILE [disabled]
1763  -C, --config-cache      alias for \`--cache-file=config.cache'
1764  -n, --no-create         do not create output files
1765      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1766
1767Installation directories:
1768  --prefix=PREFIX         install architecture-independent files in PREFIX
1769                          [$ac_default_prefix]
1770  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1771                          [PREFIX]
1772
1773By default, \`make install' will install all the files in
1774\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1775an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1776for instance \`--prefix=\$HOME'.
1777
1778For better control, use the options below.
1779
1780Fine tuning of the installation directories:
1781  --bindir=DIR            user executables [EPREFIX/bin]
1782  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1783  --libexecdir=DIR        program executables [EPREFIX/libexec]
1784  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1785  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1786  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1787  --libdir=DIR            object code libraries [EPREFIX/lib]
1788  --includedir=DIR        C header files [PREFIX/include]
1789  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1790  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1791  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1792  --infodir=DIR           info documentation [DATAROOTDIR/info]
1793  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1794  --mandir=DIR            man documentation [DATAROOTDIR/man]
1795  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1796  --htmldir=DIR           html documentation [DOCDIR]
1797  --dvidir=DIR            dvi documentation [DOCDIR]
1798  --pdfdir=DIR            pdf documentation [DOCDIR]
1799  --psdir=DIR             ps documentation [DOCDIR]
1800_ACEOF
1801
1802  cat <<\_ACEOF
1803
1804X features:
1805  --x-includes=DIR    X include files are in DIR
1806  --x-libraries=DIR   X library files are in DIR
1807
1808System types:
1809  --build=BUILD     configure for building on BUILD [guessed]
1810  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1811  --target=TARGET   configure for building compilers for TARGET [HOST]
1812_ACEOF
1813fi
1814
1815if test -n "$ac_init_help"; then
1816  case $ac_init_help in
1817     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1818   esac
1819  cat <<\_ACEOF
1820
1821Optional Features:
1822  --disable-option-checking  ignore unrecognized --enable/--with options
1823  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1824  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1825  --enable-openjdk-only   suppress building custom source even if present
1826                          [disabled]
1827  --enable-debug          set the debug level to fastdebug (shorthand for
1828                          --with-debug-level=fastdebug) [disabled]
1829  --disable-headful       disable building headful support (graphical UI
1830                          support) [enabled]
1831  --enable-hotspot-test-in-build
1832                          run the Queens test after Hotspot build [disabled]
1833  --enable-unlimited-crypto
1834                          Enable unlimited crypto policy [disabled]
1835  --enable-rmiconnector-iiop
1836                          enable the JMX RMIConnector iiop transport
1837                          [disabled]
1838  --disable-debug-symbols disable generation of debug symbols [enabled]
1839  --disable-zip-debug-info
1840                          disable zipping of debug-info files [enabled]
1841  --enable-macosx-runtime-support
1842                          Deprecated. Option is kept for backwards
1843                          compatibility and is ignored
1844  --disable-freetype-bundling
1845                          disable bundling of the freetype library with the
1846                          build result [enabled on Windows or when using
1847                          --with-freetype, disabled otherwise]
1848  --enable-sjavac         use sjavac to do fast incremental compiles
1849                          [disabled]
1850  --disable-precompiled-headers
1851                          disable using precompiled headers when compiling C++
1852                          [enabled]
1853  --enable-ccache         enable using ccache to speed up recompilations
1854                          [disabled]
1855
1856Optional Packages:
1857  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1858  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1859  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1860                          support it), e.g. --with-target-bits=32 [guessed]
1861  --with-custom-make-dir  Deprecated. Option is kept for backwards
1862                          compatibility and is ignored
1863  --with-jdk-variant      JDK variant to build (normal) [normal]
1864  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1865  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1866                          client, minimal1, kernel, zero, zeroshark, core)
1867                          [server]
1868  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1869                          optimized (HotSpot build only)) [release]
1870  --with-devkit           use this devkit for compilers, tools and resources
1871  --with-sys-root         alias for --with-sysroot for backwards compatability
1872  --with-sysroot          use this directory as sysroot)
1873  --with-tools-dir        alias for --with-toolchain-path for backwards
1874                          compatibility
1875  --with-toolchain-path   prepend these directories when searching for
1876                          toolchain binaries (compilers etc)
1877  --with-extra-path       prepend these directories to the default path
1878  --with-conf-name        use this as the name of the configuration [generated
1879                          from important configuration options]
1880  --with-builddeps-conf   use this configuration file for the builddeps
1881  --with-builddeps-server download and use build dependencies from this server
1882                          url
1883  --with-builddeps-dir    store downloaded build dependencies here
1884                          [/localhome/builddeps]
1885  --with-builddeps-group  chgrp the downloaded build dependencies to this
1886                          group
1887  --with-cacerts-file     specify alternative cacerts file
1888  --with-milestone        Set milestone value for build [internal]
1889  --with-update-version   Set update version value for build [b00]
1890  --with-user-release-suffix
1891                          Add a custom string to the version string if build
1892                          number is not set.[username_builddateb00]
1893  --with-build-number     Set build number value for build [b00]
1894  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1895  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
1896                          invocations of boot JDK, overriding the default
1897                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1898                          -enableassertions"
1899  --with-add-source-root  for each and every source directory, look in this
1900                          additional source root for the same directory; if it
1901                          exists and have files in it, include it in the build
1902  --with-override-source-root
1903                          for each and every source directory, look in this
1904                          override source root for the same directory; if it
1905                          exists, use that directory instead and ignore the
1906                          directory in the original source root
1907  --with-adds-and-overrides
1908                          use the subdirs 'adds' and 'overrides' in the
1909                          specified directory as add-source-root and
1910                          override-source-root
1911  --with-override-langtools
1912                          use this langtools dir for the build
1913  --with-override-corba   use this corba dir for the build
1914  --with-override-jaxp    use this jaxp dir for the build
1915  --with-override-jaxws   use this jaxws dir for the build
1916  --with-override-hotspot use this hotspot dir for the build
1917  --with-override-nashorn use this nashorn dir for the build
1918  --with-override-jdk     use this jdk dir for the build
1919  --with-import-hotspot   import hotspot binaries from this jdk image or
1920                          hotspot build dist dir instead of building from
1921                          source
1922  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1923                          to show possible values [platform dependent]
1924  --with-jtreg            Regression Test Harness [probed]
1925  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1926  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1927  --with-extra-ldflags    extra flags to be used when linking jdk
1928  --with-x                use the X Window System
1929  --with-cups             specify prefix directory for the cups package
1930                          (expecting the headers under PATH/include)
1931  --with-cups-include     specify directory for the cups include files
1932  --with-freetype         specify prefix directory for the freetype package
1933                          (expecting the libraries under PATH/lib and the
1934                          headers under PATH/include)
1935  --with-freetype-include specify directory for the freetype include files
1936  --with-freetype-lib     specify directory for the freetype library
1937  --with-alsa             specify prefix directory for the alsa package
1938                          (expecting the libraries under PATH/lib and the
1939                          headers under PATH/include)
1940  --with-alsa-include     specify directory for the alsa include files
1941  --with-alsa-lib         specify directory for the alsa library
1942  --with-libjpeg          use libjpeg from build system or OpenJDK source
1943                          (system, bundled) [bundled]
1944  --with-giflib           use giflib from build system or OpenJDK source
1945                          (system, bundled) [bundled]
1946  --with-lcms             use lcms2 from build system or OpenJDK source
1947                          (system, bundled) [bundled]
1948  --with-libpng           use libpng from build system or OpenJDK source
1949                          (system, bundled) [bundled]
1950  --with-zlib             use zlib from build system or OpenJDK source
1951                          (system, bundled) [bundled]
1952  --with-stdc++lib=<static>,<dynamic>,<default>
1953                          force linking of the C++ runtime on Linux to either
1954                          static or dynamic, default is static with dynamic as
1955                          fallback
1956  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1957                          only) [probed]
1958  --with-dxsdk            Deprecated. Option is kept for backwards
1959                          compatibility and is ignored
1960  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1961                          compatibility and is ignored
1962  --with-dxsdk-include    Deprecated. Option is kept for backwards
1963                          compatibility and is ignored
1964  --with-num-cores        number of cores in the build system, e.g.
1965                          --with-num-cores=8 [probed]
1966  --with-memory-size      memory (in MB) available in the build system, e.g.
1967                          --with-memory-size=1024 [probed]
1968  --with-jobs             number of parallel jobs to let make run [calculated
1969                          based on cores and memory]
1970  --with-sjavac-server-java
1971                          use this java binary for running the sjavac
1972                          background server [Boot JDK java]
1973  --with-ccache-dir       where to store ccache files [~/.ccache]
1974
1975Some influential environment variables:
1976  BASENAME    Override default value for BASENAME
1977  BASH        Override default value for BASH
1978  CAT         Override default value for CAT
1979  CHMOD       Override default value for CHMOD
1980  CMP         Override default value for CMP
1981  COMM        Override default value for COMM
1982  CP          Override default value for CP
1983  CPIO        Override default value for CPIO
1984  CUT         Override default value for CUT
1985  DATE        Override default value for DATE
1986  DIFF        Override default value for DIFF
1987  DIRNAME     Override default value for DIRNAME
1988  ECHO        Override default value for ECHO
1989  EXPR        Override default value for EXPR
1990  FILE        Override default value for FILE
1991  FIND        Override default value for FIND
1992  HEAD        Override default value for HEAD
1993  LN          Override default value for LN
1994  LS          Override default value for LS
1995  MKDIR       Override default value for MKDIR
1996  MKTEMP      Override default value for MKTEMP
1997  MV          Override default value for MV
1998  NAWK        Override default value for NAWK
1999  PRINTF      Override default value for PRINTF
2000  RM          Override default value for RM
2001  SH          Override default value for SH
2002  SORT        Override default value for SORT
2003  TAIL        Override default value for TAIL
2004  TAR         Override default value for TAR
2005  TEE         Override default value for TEE
2006  TOUCH       Override default value for TOUCH
2007  TR          Override default value for TR
2008  UNAME       Override default value for UNAME
2009  UNIQ        Override default value for UNIQ
2010  WC          Override default value for WC
2011  WHICH       Override default value for WHICH
2012  XARGS       Override default value for XARGS
2013  AWK         Override default value for AWK
2014  GREP        Override default value for GREP
2015  EGREP       Override default value for EGREP
2016  FGREP       Override default value for FGREP
2017  SED         Override default value for SED
2018  CYGPATH     Override default value for CYGPATH
2019  READLINK    Override default value for READLINK
2020  DF          Override default value for DF
2021  SETFILE     Override default value for SETFILE
2022  UNZIP       Override default value for UNZIP
2023  ZIP         Override default value for ZIP
2024  LDD         Override default value for LDD
2025  OTOOL       Override default value for OTOOL
2026  READELF     Override default value for READELF
2027  HG          Override default value for HG
2028  STAT        Override default value for STAT
2029  TIME        Override default value for TIME
2030  DSYMUTIL    Override default value for DSYMUTIL
2031  XATTR       Override default value for XATTR
2032  CODESIGN    Override default value for CODESIGN
2033  PKG_CONFIG  path to pkg-config utility
2034  JAVA        Override default value for JAVA
2035  JAVAC       Override default value for JAVAC
2036  JAVAH       Override default value for JAVAH
2037  JAR         Override default value for JAR
2038  NATIVE2ASCII
2039              Override default value for NATIVE2ASCII
2040  JARSIGNER   Override default value for JARSIGNER
2041  CC          C compiler command
2042  CFLAGS      C compiler flags
2043  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2044              nonstandard directory <lib dir>
2045  LIBS        libraries to pass to the linker, e.g. -l<library>
2046  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2047              you have headers in a nonstandard directory <include dir>
2048  CXX         C++ compiler command
2049  CXXFLAGS    C++ compiler flags
2050  CPP         C preprocessor
2051  CXXCPP      C++ preprocessor
2052  AS          Override default value for AS
2053  AR          Override default value for AR
2054  OBJC        Objective C compiler command
2055  OBJCFLAGS   Objective C compiler flags
2056  LIPO        Override default value for LIPO
2057  STRIP       Override default value for STRIP
2058  NM          Override default value for NM
2059  GNM         Override default value for GNM
2060  MCS         Override default value for MCS
2061  OBJCOPY     Override default value for OBJCOPY
2062  OBJDUMP     Override default value for OBJDUMP
2063  BUILD_CC    Override default value for BUILD_CC
2064  BUILD_CXX   Override default value for BUILD_CXX
2065  BUILD_LD    Override default value for BUILD_LD
2066  JTREGEXE    Override default value for JTREGEXE
2067  XMKMF       Path to xmkmf, Makefile generator for X Window System
2068  FREETYPE_CFLAGS
2069              C compiler flags for FREETYPE, overriding pkg-config
2070  FREETYPE_LIBS
2071              linker flags for FREETYPE, overriding pkg-config
2072  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2073  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2074  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2075  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2076  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2077  PNG_LIBS    linker flags for PNG, overriding pkg-config
2078  LIBFFI_CFLAGS
2079              C compiler flags for LIBFFI, overriding pkg-config
2080  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2081  CCACHE      Override default value for CCACHE
2082
2083Use these variables to override the choices made by `configure' or to help
2084it to find libraries and programs with nonstandard names/locations.
2085
2086Report bugs to <build-dev@openjdk.java.net>.
2087OpenJDK home page: <http://openjdk.java.net>.
2088_ACEOF
2089ac_status=$?
2090fi
2091
2092if test "$ac_init_help" = "recursive"; then
2093  # If there are subdirs, report their specific --help.
2094  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2095    test -d "$ac_dir" ||
2096      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2097      continue
2098    ac_builddir=.
2099
2100case "$ac_dir" in
2101.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2102*)
2103  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2104  # A ".." for each directory in $ac_dir_suffix.
2105  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2106  case $ac_top_builddir_sub in
2107  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2108  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2109  esac ;;
2110esac
2111ac_abs_top_builddir=$ac_pwd
2112ac_abs_builddir=$ac_pwd$ac_dir_suffix
2113# for backward compatibility:
2114ac_top_builddir=$ac_top_build_prefix
2115
2116case $srcdir in
2117  .)  # We are building in place.
2118    ac_srcdir=.
2119    ac_top_srcdir=$ac_top_builddir_sub
2120    ac_abs_top_srcdir=$ac_pwd ;;
2121  [\\/]* | ?:[\\/]* )  # Absolute name.
2122    ac_srcdir=$srcdir$ac_dir_suffix;
2123    ac_top_srcdir=$srcdir
2124    ac_abs_top_srcdir=$srcdir ;;
2125  *) # Relative name.
2126    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2127    ac_top_srcdir=$ac_top_build_prefix$srcdir
2128    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2129esac
2130ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2131
2132    cd "$ac_dir" || { ac_status=$?; continue; }
2133    # Check for guested configure.
2134    if test -f "$ac_srcdir/configure.gnu"; then
2135      echo &&
2136      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2137    elif test -f "$ac_srcdir/configure"; then
2138      echo &&
2139      $SHELL "$ac_srcdir/configure" --help=recursive
2140    else
2141      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2142    fi || ac_status=$?
2143    cd "$ac_pwd" || { ac_status=$?; break; }
2144  done
2145fi
2146
2147test -n "$ac_init_help" && exit $ac_status
2148if $ac_init_version; then
2149  cat <<\_ACEOF
2150OpenJDK configure jdk9
2151generated by GNU Autoconf 2.69
2152
2153Copyright (C) 2012 Free Software Foundation, Inc.
2154This configure script is free software; the Free Software Foundation
2155gives unlimited permission to copy, distribute and modify it.
2156_ACEOF
2157  exit
2158fi
2159
2160## ------------------------ ##
2161## Autoconf initialization. ##
2162## ------------------------ ##
2163
2164# ac_fn_c_try_compile LINENO
2165# --------------------------
2166# Try to compile conftest.$ac_ext, and return whether this succeeded.
2167ac_fn_c_try_compile ()
2168{
2169  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2170  rm -f conftest.$ac_objext
2171  if { { ac_try="$ac_compile"
2172case "(($ac_try" in
2173  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2174  *) ac_try_echo=$ac_try;;
2175esac
2176eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2177$as_echo "$ac_try_echo"; } >&5
2178  (eval "$ac_compile") 2>conftest.err
2179  ac_status=$?
2180  if test -s conftest.err; then
2181    grep -v '^ *+' conftest.err >conftest.er1
2182    cat conftest.er1 >&5
2183    mv -f conftest.er1 conftest.err
2184  fi
2185  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2186  test $ac_status = 0; } && {
2187	 test -z "$ac_c_werror_flag" ||
2188	 test ! -s conftest.err
2189       } && test -s conftest.$ac_objext; then :
2190  ac_retval=0
2191else
2192  $as_echo "$as_me: failed program was:" >&5
2193sed 's/^/| /' conftest.$ac_ext >&5
2194
2195	ac_retval=1
2196fi
2197  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2198  as_fn_set_status $ac_retval
2199
2200} # ac_fn_c_try_compile
2201
2202# ac_fn_cxx_try_compile LINENO
2203# ----------------------------
2204# Try to compile conftest.$ac_ext, and return whether this succeeded.
2205ac_fn_cxx_try_compile ()
2206{
2207  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2208  rm -f conftest.$ac_objext
2209  if { { ac_try="$ac_compile"
2210case "(($ac_try" in
2211  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2212  *) ac_try_echo=$ac_try;;
2213esac
2214eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2215$as_echo "$ac_try_echo"; } >&5
2216  (eval "$ac_compile") 2>conftest.err
2217  ac_status=$?
2218  if test -s conftest.err; then
2219    grep -v '^ *+' conftest.err >conftest.er1
2220    cat conftest.er1 >&5
2221    mv -f conftest.er1 conftest.err
2222  fi
2223  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2224  test $ac_status = 0; } && {
2225	 test -z "$ac_cxx_werror_flag" ||
2226	 test ! -s conftest.err
2227       } && test -s conftest.$ac_objext; then :
2228  ac_retval=0
2229else
2230  $as_echo "$as_me: failed program was:" >&5
2231sed 's/^/| /' conftest.$ac_ext >&5
2232
2233	ac_retval=1
2234fi
2235  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2236  as_fn_set_status $ac_retval
2237
2238} # ac_fn_cxx_try_compile
2239
2240# ac_fn_c_try_cpp LINENO
2241# ----------------------
2242# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2243ac_fn_c_try_cpp ()
2244{
2245  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2246  if { { ac_try="$ac_cpp conftest.$ac_ext"
2247case "(($ac_try" in
2248  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2249  *) ac_try_echo=$ac_try;;
2250esac
2251eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2252$as_echo "$ac_try_echo"; } >&5
2253  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2254  ac_status=$?
2255  if test -s conftest.err; then
2256    grep -v '^ *+' conftest.err >conftest.er1
2257    cat conftest.er1 >&5
2258    mv -f conftest.er1 conftest.err
2259  fi
2260  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2261  test $ac_status = 0; } > conftest.i && {
2262	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2263	 test ! -s conftest.err
2264       }; then :
2265  ac_retval=0
2266else
2267  $as_echo "$as_me: failed program was:" >&5
2268sed 's/^/| /' conftest.$ac_ext >&5
2269
2270    ac_retval=1
2271fi
2272  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2273  as_fn_set_status $ac_retval
2274
2275} # ac_fn_c_try_cpp
2276
2277# ac_fn_cxx_try_cpp LINENO
2278# ------------------------
2279# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2280ac_fn_cxx_try_cpp ()
2281{
2282  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2283  if { { ac_try="$ac_cpp conftest.$ac_ext"
2284case "(($ac_try" in
2285  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2286  *) ac_try_echo=$ac_try;;
2287esac
2288eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2289$as_echo "$ac_try_echo"; } >&5
2290  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2291  ac_status=$?
2292  if test -s conftest.err; then
2293    grep -v '^ *+' conftest.err >conftest.er1
2294    cat conftest.er1 >&5
2295    mv -f conftest.er1 conftest.err
2296  fi
2297  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2298  test $ac_status = 0; } > conftest.i && {
2299	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2300	 test ! -s conftest.err
2301       }; then :
2302  ac_retval=0
2303else
2304  $as_echo "$as_me: failed program was:" >&5
2305sed 's/^/| /' conftest.$ac_ext >&5
2306
2307    ac_retval=1
2308fi
2309  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2310  as_fn_set_status $ac_retval
2311
2312} # ac_fn_cxx_try_cpp
2313
2314# ac_fn_objc_try_compile LINENO
2315# -----------------------------
2316# Try to compile conftest.$ac_ext, and return whether this succeeded.
2317ac_fn_objc_try_compile ()
2318{
2319  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2320  rm -f conftest.$ac_objext
2321  if { { ac_try="$ac_compile"
2322case "(($ac_try" in
2323  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2324  *) ac_try_echo=$ac_try;;
2325esac
2326eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2327$as_echo "$ac_try_echo"; } >&5
2328  (eval "$ac_compile") 2>conftest.err
2329  ac_status=$?
2330  if test -s conftest.err; then
2331    grep -v '^ *+' conftest.err >conftest.er1
2332    cat conftest.er1 >&5
2333    mv -f conftest.er1 conftest.err
2334  fi
2335  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2336  test $ac_status = 0; } && {
2337	 test -z "$ac_objc_werror_flag" ||
2338	 test ! -s conftest.err
2339       } && test -s conftest.$ac_objext; then :
2340  ac_retval=0
2341else
2342  $as_echo "$as_me: failed program was:" >&5
2343sed 's/^/| /' conftest.$ac_ext >&5
2344
2345	ac_retval=1
2346fi
2347  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2348  as_fn_set_status $ac_retval
2349
2350} # ac_fn_objc_try_compile
2351
2352# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2353# ---------------------------------------------------------
2354# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2355# the include files in INCLUDES and setting the cache variable VAR
2356# accordingly.
2357ac_fn_cxx_check_header_mongrel ()
2358{
2359  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2360  if eval \${$3+:} false; then :
2361  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2362$as_echo_n "checking for $2... " >&6; }
2363if eval \${$3+:} false; then :
2364  $as_echo_n "(cached) " >&6
2365fi
2366eval ac_res=\$$3
2367	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2368$as_echo "$ac_res" >&6; }
2369else
2370  # Is the header compilable?
2371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2372$as_echo_n "checking $2 usability... " >&6; }
2373cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2374/* end confdefs.h.  */
2375$4
2376#include <$2>
2377_ACEOF
2378if ac_fn_cxx_try_compile "$LINENO"; then :
2379  ac_header_compiler=yes
2380else
2381  ac_header_compiler=no
2382fi
2383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2385$as_echo "$ac_header_compiler" >&6; }
2386
2387# Is the header present?
2388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2389$as_echo_n "checking $2 presence... " >&6; }
2390cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2391/* end confdefs.h.  */
2392#include <$2>
2393_ACEOF
2394if ac_fn_cxx_try_cpp "$LINENO"; then :
2395  ac_header_preproc=yes
2396else
2397  ac_header_preproc=no
2398fi
2399rm -f conftest.err conftest.i conftest.$ac_ext
2400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2401$as_echo "$ac_header_preproc" >&6; }
2402
2403# So?  What about this header?
2404case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2405  yes:no: )
2406    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2407$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2408    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2409$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2410    ;;
2411  no:yes:* )
2412    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2413$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2414    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2415$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2416    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2417$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2418    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2419$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2420    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2421$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2422( $as_echo "## ----------------------------------------- ##
2423## Report this to build-dev@openjdk.java.net ##
2424## ----------------------------------------- ##"
2425     ) | sed "s/^/$as_me: WARNING:     /" >&2
2426    ;;
2427esac
2428  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2429$as_echo_n "checking for $2... " >&6; }
2430if eval \${$3+:} false; then :
2431  $as_echo_n "(cached) " >&6
2432else
2433  eval "$3=\$ac_header_compiler"
2434fi
2435eval ac_res=\$$3
2436	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2437$as_echo "$ac_res" >&6; }
2438fi
2439  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2440
2441} # ac_fn_cxx_check_header_mongrel
2442
2443# ac_fn_cxx_try_run LINENO
2444# ------------------------
2445# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2446# that executables *can* be run.
2447ac_fn_cxx_try_run ()
2448{
2449  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2450  if { { ac_try="$ac_link"
2451case "(($ac_try" in
2452  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2453  *) ac_try_echo=$ac_try;;
2454esac
2455eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2456$as_echo "$ac_try_echo"; } >&5
2457  (eval "$ac_link") 2>&5
2458  ac_status=$?
2459  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2460  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2461  { { case "(($ac_try" in
2462  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2463  *) ac_try_echo=$ac_try;;
2464esac
2465eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2466$as_echo "$ac_try_echo"; } >&5
2467  (eval "$ac_try") 2>&5
2468  ac_status=$?
2469  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2470  test $ac_status = 0; }; }; then :
2471  ac_retval=0
2472else
2473  $as_echo "$as_me: program exited with status $ac_status" >&5
2474       $as_echo "$as_me: failed program was:" >&5
2475sed 's/^/| /' conftest.$ac_ext >&5
2476
2477       ac_retval=$ac_status
2478fi
2479  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2480  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2481  as_fn_set_status $ac_retval
2482
2483} # ac_fn_cxx_try_run
2484
2485# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2486# ---------------------------------------------------------
2487# Tests whether HEADER exists and can be compiled using the include files in
2488# INCLUDES, setting the cache variable VAR accordingly.
2489ac_fn_cxx_check_header_compile ()
2490{
2491  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2492  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2493$as_echo_n "checking for $2... " >&6; }
2494if eval \${$3+:} false; then :
2495  $as_echo_n "(cached) " >&6
2496else
2497  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2498/* end confdefs.h.  */
2499$4
2500#include <$2>
2501_ACEOF
2502if ac_fn_cxx_try_compile "$LINENO"; then :
2503  eval "$3=yes"
2504else
2505  eval "$3=no"
2506fi
2507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2508fi
2509eval ac_res=\$$3
2510	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2511$as_echo "$ac_res" >&6; }
2512  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2513
2514} # ac_fn_cxx_check_header_compile
2515
2516# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2517# ----------------------------------------------
2518# Tries to find the compile-time value of EXPR in a program that includes
2519# INCLUDES, setting VAR accordingly. Returns whether the value could be
2520# computed
2521ac_fn_cxx_compute_int ()
2522{
2523  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2524  if test "$cross_compiling" = yes; then
2525    # Depending upon the size, compute the lo and hi bounds.
2526cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2527/* end confdefs.h.  */
2528$4
2529int
2530main ()
2531{
2532static int test_array [1 - 2 * !(($2) >= 0)];
2533test_array [0] = 0;
2534return test_array [0];
2535
2536  ;
2537  return 0;
2538}
2539_ACEOF
2540if ac_fn_cxx_try_compile "$LINENO"; then :
2541  ac_lo=0 ac_mid=0
2542  while :; do
2543    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2544/* end confdefs.h.  */
2545$4
2546int
2547main ()
2548{
2549static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2550test_array [0] = 0;
2551return test_array [0];
2552
2553  ;
2554  return 0;
2555}
2556_ACEOF
2557if ac_fn_cxx_try_compile "$LINENO"; then :
2558  ac_hi=$ac_mid; break
2559else
2560  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2561			if test $ac_lo -le $ac_mid; then
2562			  ac_lo= ac_hi=
2563			  break
2564			fi
2565			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2566fi
2567rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2568  done
2569else
2570  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2571/* end confdefs.h.  */
2572$4
2573int
2574main ()
2575{
2576static int test_array [1 - 2 * !(($2) < 0)];
2577test_array [0] = 0;
2578return test_array [0];
2579
2580  ;
2581  return 0;
2582}
2583_ACEOF
2584if ac_fn_cxx_try_compile "$LINENO"; then :
2585  ac_hi=-1 ac_mid=-1
2586  while :; do
2587    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2588/* end confdefs.h.  */
2589$4
2590int
2591main ()
2592{
2593static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2594test_array [0] = 0;
2595return test_array [0];
2596
2597  ;
2598  return 0;
2599}
2600_ACEOF
2601if ac_fn_cxx_try_compile "$LINENO"; then :
2602  ac_lo=$ac_mid; break
2603else
2604  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2605			if test $ac_mid -le $ac_hi; then
2606			  ac_lo= ac_hi=
2607			  break
2608			fi
2609			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2610fi
2611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2612  done
2613else
2614  ac_lo= ac_hi=
2615fi
2616rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2617fi
2618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2619# Binary search between lo and hi bounds.
2620while test "x$ac_lo" != "x$ac_hi"; do
2621  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2622  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2623/* end confdefs.h.  */
2624$4
2625int
2626main ()
2627{
2628static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2629test_array [0] = 0;
2630return test_array [0];
2631
2632  ;
2633  return 0;
2634}
2635_ACEOF
2636if ac_fn_cxx_try_compile "$LINENO"; then :
2637  ac_hi=$ac_mid
2638else
2639  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2640fi
2641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2642done
2643case $ac_lo in #((
2644?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2645'') ac_retval=1 ;;
2646esac
2647  else
2648    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2649/* end confdefs.h.  */
2650$4
2651static long int longval () { return $2; }
2652static unsigned long int ulongval () { return $2; }
2653#include <stdio.h>
2654#include <stdlib.h>
2655int
2656main ()
2657{
2658
2659  FILE *f = fopen ("conftest.val", "w");
2660  if (! f)
2661    return 1;
2662  if (($2) < 0)
2663    {
2664      long int i = longval ();
2665      if (i != ($2))
2666	return 1;
2667      fprintf (f, "%ld", i);
2668    }
2669  else
2670    {
2671      unsigned long int i = ulongval ();
2672      if (i != ($2))
2673	return 1;
2674      fprintf (f, "%lu", i);
2675    }
2676  /* Do not output a trailing newline, as this causes \r\n confusion
2677     on some platforms.  */
2678  return ferror (f) || fclose (f) != 0;
2679
2680  ;
2681  return 0;
2682}
2683_ACEOF
2684if ac_fn_cxx_try_run "$LINENO"; then :
2685  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2686else
2687  ac_retval=1
2688fi
2689rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2690  conftest.$ac_objext conftest.beam conftest.$ac_ext
2691rm -f conftest.val
2692
2693  fi
2694  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2695  as_fn_set_status $ac_retval
2696
2697} # ac_fn_cxx_compute_int
2698
2699# ac_fn_cxx_try_link LINENO
2700# -------------------------
2701# Try to link conftest.$ac_ext, and return whether this succeeded.
2702ac_fn_cxx_try_link ()
2703{
2704  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2705  rm -f conftest.$ac_objext conftest$ac_exeext
2706  if { { ac_try="$ac_link"
2707case "(($ac_try" in
2708  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2709  *) ac_try_echo=$ac_try;;
2710esac
2711eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2712$as_echo "$ac_try_echo"; } >&5
2713  (eval "$ac_link") 2>conftest.err
2714  ac_status=$?
2715  if test -s conftest.err; then
2716    grep -v '^ *+' conftest.err >conftest.er1
2717    cat conftest.er1 >&5
2718    mv -f conftest.er1 conftest.err
2719  fi
2720  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2721  test $ac_status = 0; } && {
2722	 test -z "$ac_cxx_werror_flag" ||
2723	 test ! -s conftest.err
2724       } && test -s conftest$ac_exeext && {
2725	 test "$cross_compiling" = yes ||
2726	 test -x conftest$ac_exeext
2727       }; then :
2728  ac_retval=0
2729else
2730  $as_echo "$as_me: failed program was:" >&5
2731sed 's/^/| /' conftest.$ac_ext >&5
2732
2733	ac_retval=1
2734fi
2735  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2736  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2737  # interfere with the next link command; also delete a directory that is
2738  # left behind by Apple's compiler.  We do this before executing the actions.
2739  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2740  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2741  as_fn_set_status $ac_retval
2742
2743} # ac_fn_cxx_try_link
2744
2745# ac_fn_cxx_check_func LINENO FUNC VAR
2746# ------------------------------------
2747# Tests whether FUNC exists, setting the cache variable VAR accordingly
2748ac_fn_cxx_check_func ()
2749{
2750  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2751  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2752$as_echo_n "checking for $2... " >&6; }
2753if eval \${$3+:} false; then :
2754  $as_echo_n "(cached) " >&6
2755else
2756  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2757/* end confdefs.h.  */
2758/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2759   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2760#define $2 innocuous_$2
2761
2762/* System header to define __stub macros and hopefully few prototypes,
2763    which can conflict with char $2 (); below.
2764    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2765    <limits.h> exists even on freestanding compilers.  */
2766
2767#ifdef __STDC__
2768# include <limits.h>
2769#else
2770# include <assert.h>
2771#endif
2772
2773#undef $2
2774
2775/* Override any GCC internal prototype to avoid an error.
2776   Use char because int might match the return type of a GCC
2777   builtin and then its argument prototype would still apply.  */
2778#ifdef __cplusplus
2779extern "C"
2780#endif
2781char $2 ();
2782/* The GNU C library defines this for functions which it implements
2783    to always fail with ENOSYS.  Some functions are actually named
2784    something starting with __ and the normal name is an alias.  */
2785#if defined __stub_$2 || defined __stub___$2
2786choke me
2787#endif
2788
2789int
2790main ()
2791{
2792return $2 ();
2793  ;
2794  return 0;
2795}
2796_ACEOF
2797if ac_fn_cxx_try_link "$LINENO"; then :
2798  eval "$3=yes"
2799else
2800  eval "$3=no"
2801fi
2802rm -f core conftest.err conftest.$ac_objext \
2803    conftest$ac_exeext conftest.$ac_ext
2804fi
2805eval ac_res=\$$3
2806	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2807$as_echo "$ac_res" >&6; }
2808  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2809
2810} # ac_fn_cxx_check_func
2811
2812# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2813# -------------------------------------------------------
2814# Tests whether HEADER exists and can be compiled using the include files in
2815# INCLUDES, setting the cache variable VAR accordingly.
2816ac_fn_c_check_header_compile ()
2817{
2818  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2819  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2820$as_echo_n "checking for $2... " >&6; }
2821if eval \${$3+:} false; then :
2822  $as_echo_n "(cached) " >&6
2823else
2824  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2825/* end confdefs.h.  */
2826$4
2827#include <$2>
2828_ACEOF
2829if ac_fn_c_try_compile "$LINENO"; then :
2830  eval "$3=yes"
2831else
2832  eval "$3=no"
2833fi
2834rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2835fi
2836eval ac_res=\$$3
2837	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2838$as_echo "$ac_res" >&6; }
2839  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2840
2841} # ac_fn_c_check_header_compile
2842cat >config.log <<_ACEOF
2843This file contains any messages produced by compilers while
2844running configure, to aid debugging if configure makes a mistake.
2845
2846It was created by OpenJDK $as_me jdk9, which was
2847generated by GNU Autoconf 2.69.  Invocation command line was
2848
2849  $ $0 $@
2850
2851_ACEOF
2852exec 5>>config.log
2853{
2854cat <<_ASUNAME
2855## --------- ##
2856## Platform. ##
2857## --------- ##
2858
2859hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2860uname -m = `(uname -m) 2>/dev/null || echo unknown`
2861uname -r = `(uname -r) 2>/dev/null || echo unknown`
2862uname -s = `(uname -s) 2>/dev/null || echo unknown`
2863uname -v = `(uname -v) 2>/dev/null || echo unknown`
2864
2865/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2866/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2867
2868/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2869/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2870/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2871/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2872/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2873/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2874/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2875
2876_ASUNAME
2877
2878as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2879for as_dir in $PATH
2880do
2881  IFS=$as_save_IFS
2882  test -z "$as_dir" && as_dir=.
2883    $as_echo "PATH: $as_dir"
2884  done
2885IFS=$as_save_IFS
2886
2887} >&5
2888
2889cat >&5 <<_ACEOF
2890
2891
2892## ----------- ##
2893## Core tests. ##
2894## ----------- ##
2895
2896_ACEOF
2897
2898
2899# Keep a trace of the command line.
2900# Strip out --no-create and --no-recursion so they do not pile up.
2901# Strip out --silent because we don't want to record it for future runs.
2902# Also quote any args containing shell meta-characters.
2903# Make two passes to allow for proper duplicate-argument suppression.
2904ac_configure_args=
2905ac_configure_args0=
2906ac_configure_args1=
2907ac_must_keep_next=false
2908for ac_pass in 1 2
2909do
2910  for ac_arg
2911  do
2912    case $ac_arg in
2913    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2914    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2915    | -silent | --silent | --silen | --sile | --sil)
2916      continue ;;
2917    *\'*)
2918      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2919    esac
2920    case $ac_pass in
2921    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2922    2)
2923      as_fn_append ac_configure_args1 " '$ac_arg'"
2924      if test $ac_must_keep_next = true; then
2925	ac_must_keep_next=false # Got value, back to normal.
2926      else
2927	case $ac_arg in
2928	  *=* | --config-cache | -C | -disable-* | --disable-* \
2929	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2930	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2931	  | -with-* | --with-* | -without-* | --without-* | --x)
2932	    case "$ac_configure_args0 " in
2933	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2934	    esac
2935	    ;;
2936	  -* ) ac_must_keep_next=true ;;
2937	esac
2938      fi
2939      as_fn_append ac_configure_args " '$ac_arg'"
2940      ;;
2941    esac
2942  done
2943done
2944{ ac_configure_args0=; unset ac_configure_args0;}
2945{ ac_configure_args1=; unset ac_configure_args1;}
2946
2947# When interrupted or exit'd, cleanup temporary files, and complete
2948# config.log.  We remove comments because anyway the quotes in there
2949# would cause problems or look ugly.
2950# WARNING: Use '\'' to represent an apostrophe within the trap.
2951# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2952trap 'exit_status=$?
2953  # Save into config.log some information that might help in debugging.
2954  {
2955    echo
2956
2957    $as_echo "## ---------------- ##
2958## Cache variables. ##
2959## ---------------- ##"
2960    echo
2961    # The following way of writing the cache mishandles newlines in values,
2962(
2963  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2964    eval ac_val=\$$ac_var
2965    case $ac_val in #(
2966    *${as_nl}*)
2967      case $ac_var in #(
2968      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2969$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2970      esac
2971      case $ac_var in #(
2972      _ | IFS | as_nl) ;; #(
2973      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2974      *) { eval $ac_var=; unset $ac_var;} ;;
2975      esac ;;
2976    esac
2977  done
2978  (set) 2>&1 |
2979    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2980    *${as_nl}ac_space=\ *)
2981      sed -n \
2982	"s/'\''/'\''\\\\'\'''\''/g;
2983	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2984      ;; #(
2985    *)
2986      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2987      ;;
2988    esac |
2989    sort
2990)
2991    echo
2992
2993    $as_echo "## ----------------- ##
2994## Output variables. ##
2995## ----------------- ##"
2996    echo
2997    for ac_var in $ac_subst_vars
2998    do
2999      eval ac_val=\$$ac_var
3000      case $ac_val in
3001      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3002      esac
3003      $as_echo "$ac_var='\''$ac_val'\''"
3004    done | sort
3005    echo
3006
3007    if test -n "$ac_subst_files"; then
3008      $as_echo "## ------------------- ##
3009## File substitutions. ##
3010## ------------------- ##"
3011      echo
3012      for ac_var in $ac_subst_files
3013      do
3014	eval ac_val=\$$ac_var
3015	case $ac_val in
3016	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3017	esac
3018	$as_echo "$ac_var='\''$ac_val'\''"
3019      done | sort
3020      echo
3021    fi
3022
3023    if test -s confdefs.h; then
3024      $as_echo "## ----------- ##
3025## confdefs.h. ##
3026## ----------- ##"
3027      echo
3028      cat confdefs.h
3029      echo
3030    fi
3031    test "$ac_signal" != 0 &&
3032      $as_echo "$as_me: caught signal $ac_signal"
3033    $as_echo "$as_me: exit $exit_status"
3034  } >&5
3035  rm -f core *.core core.conftest.* &&
3036    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3037    exit $exit_status
3038' 0
3039for ac_signal in 1 2 13 15; do
3040  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3041done
3042ac_signal=0
3043
3044# confdefs.h avoids OS command line length limits that DEFS can exceed.
3045rm -f -r conftest* confdefs.h
3046
3047$as_echo "/* confdefs.h */" > confdefs.h
3048
3049# Predefined preprocessor variables.
3050
3051cat >>confdefs.h <<_ACEOF
3052#define PACKAGE_NAME "$PACKAGE_NAME"
3053_ACEOF
3054
3055cat >>confdefs.h <<_ACEOF
3056#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3057_ACEOF
3058
3059cat >>confdefs.h <<_ACEOF
3060#define PACKAGE_VERSION "$PACKAGE_VERSION"
3061_ACEOF
3062
3063cat >>confdefs.h <<_ACEOF
3064#define PACKAGE_STRING "$PACKAGE_STRING"
3065_ACEOF
3066
3067cat >>confdefs.h <<_ACEOF
3068#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3069_ACEOF
3070
3071cat >>confdefs.h <<_ACEOF
3072#define PACKAGE_URL "$PACKAGE_URL"
3073_ACEOF
3074
3075
3076# Let the site file select an alternate cache file if it wants to.
3077# Prefer an explicitly selected file to automatically selected ones.
3078ac_site_file1=NONE
3079ac_site_file2=NONE
3080if test -n "$CONFIG_SITE"; then
3081  # We do not want a PATH search for config.site.
3082  case $CONFIG_SITE in #((
3083    -*)  ac_site_file1=./$CONFIG_SITE;;
3084    */*) ac_site_file1=$CONFIG_SITE;;
3085    *)   ac_site_file1=./$CONFIG_SITE;;
3086  esac
3087elif test "x$prefix" != xNONE; then
3088  ac_site_file1=$prefix/share/config.site
3089  ac_site_file2=$prefix/etc/config.site
3090else
3091  ac_site_file1=$ac_default_prefix/share/config.site
3092  ac_site_file2=$ac_default_prefix/etc/config.site
3093fi
3094for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3095do
3096  test "x$ac_site_file" = xNONE && continue
3097  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3098    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3099$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3100    sed 's/^/| /' "$ac_site_file" >&5
3101    . "$ac_site_file" \
3102      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3103$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3104as_fn_error $? "failed to load site script $ac_site_file
3105See \`config.log' for more details" "$LINENO" 5; }
3106  fi
3107done
3108
3109if test -r "$cache_file"; then
3110  # Some versions of bash will fail to source /dev/null (special files
3111  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3112  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3113    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3114$as_echo "$as_me: loading cache $cache_file" >&6;}
3115    case $cache_file in
3116      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3117      *)                      . "./$cache_file";;
3118    esac
3119  fi
3120else
3121  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3122$as_echo "$as_me: creating cache $cache_file" >&6;}
3123  >$cache_file
3124fi
3125
3126# Check that the precious variables saved in the cache have kept the same
3127# value.
3128ac_cache_corrupted=false
3129for ac_var in $ac_precious_vars; do
3130  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3131  eval ac_new_set=\$ac_env_${ac_var}_set
3132  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3133  eval ac_new_val=\$ac_env_${ac_var}_value
3134  case $ac_old_set,$ac_new_set in
3135    set,)
3136      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3137$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3138      ac_cache_corrupted=: ;;
3139    ,set)
3140      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3141$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3142      ac_cache_corrupted=: ;;
3143    ,);;
3144    *)
3145      if test "x$ac_old_val" != "x$ac_new_val"; then
3146	# differences in whitespace do not lead to failure.
3147	ac_old_val_w=`echo x $ac_old_val`
3148	ac_new_val_w=`echo x $ac_new_val`
3149	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3150	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3151$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3152	  ac_cache_corrupted=:
3153	else
3154	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3155$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3156	  eval $ac_var=\$ac_old_val
3157	fi
3158	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3159$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3160	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3161$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3162      fi;;
3163  esac
3164  # Pass precious variables to config.status.
3165  if test "$ac_new_set" = set; then
3166    case $ac_new_val in
3167    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3168    *) ac_arg=$ac_var=$ac_new_val ;;
3169    esac
3170    case " $ac_configure_args " in
3171      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3172      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3173    esac
3174  fi
3175done
3176if $ac_cache_corrupted; then
3177  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3178$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3179  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3180$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3181  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3182fi
3183## -------------------- ##
3184## Main body of script. ##
3185## -------------------- ##
3186
3187ac_ext=c
3188ac_cpp='$CPP $CPPFLAGS'
3189ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3190ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3191ac_compiler_gnu=$ac_cv_c_compiler_gnu
3192
3193
3194
3195ac_aux_dir=
3196for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3197  if test -f "$ac_dir/install-sh"; then
3198    ac_aux_dir=$ac_dir
3199    ac_install_sh="$ac_aux_dir/install-sh -c"
3200    break
3201  elif test -f "$ac_dir/install.sh"; then
3202    ac_aux_dir=$ac_dir
3203    ac_install_sh="$ac_aux_dir/install.sh -c"
3204    break
3205  elif test -f "$ac_dir/shtool"; then
3206    ac_aux_dir=$ac_dir
3207    ac_install_sh="$ac_aux_dir/shtool install -c"
3208    break
3209  fi
3210done
3211if test -z "$ac_aux_dir"; then
3212  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
3213fi
3214
3215# These three variables are undocumented and unsupported,
3216# and are intended to be withdrawn in a future Autoconf release.
3217# They can cause serious problems if a builder's source tree is in a directory
3218# whose full name contains unusual characters.
3219ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3220ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3221ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3222
3223
3224# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3225
3226#
3227# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3228# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3229#
3230# This code is free software; you can redistribute it and/or modify it
3231# under the terms of the GNU General Public License version 2 only, as
3232# published by the Free Software Foundation.  Oracle designates this
3233# particular file as subject to the "Classpath" exception as provided
3234# by Oracle in the LICENSE file that accompanied this code.
3235#
3236# This code is distributed in the hope that it will be useful, but WITHOUT
3237# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3238# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3239# version 2 for more details (a copy is included in the LICENSE file that
3240# accompanied this code).
3241#
3242# You should have received a copy of the GNU General Public License version
3243# 2 along with this work; if not, write to the Free Software Foundation,
3244# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3245#
3246# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3247# or visit www.oracle.com if you need additional information or have any
3248# questions.
3249#
3250
3251#
3252# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3253#
3254# This program is free software; you can redistribute it and/or modify
3255# it under the terms of the GNU General Public License as published by
3256# the Free Software Foundation; either version 2 of the License, or
3257# (at your option) any later version.
3258#
3259# This program is distributed in the hope that it will be useful, but
3260# WITHOUT ANY WARRANTY; without even the implied warranty of
3261# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3262# General Public License for more details.
3263#
3264# You should have received a copy of the GNU General Public License
3265# along with this program; if not, write to the Free Software
3266# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3267#
3268# As a special exception to the GNU General Public License, if you
3269# distribute this file as part of a program that contains a
3270# configuration script generated by Autoconf, you may include it under
3271# the same distribution terms that you use for the rest of that program.
3272
3273# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3274# ----------------------------------
3275# PKG_PROG_PKG_CONFIG
3276
3277# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3278#
3279# Check to see whether a particular set of modules exists.  Similar
3280# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3281#
3282#
3283# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3284# this or PKG_CHECK_MODULES is called, or make sure to call
3285# PKG_CHECK_EXISTS manually
3286# --------------------------------------------------------------
3287
3288
3289
3290# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3291# ---------------------------------------------
3292# _PKG_CONFIG
3293
3294# _PKG_SHORT_ERRORS_SUPPORTED
3295# -----------------------------
3296# _PKG_SHORT_ERRORS_SUPPORTED
3297
3298
3299# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3300# [ACTION-IF-NOT-FOUND])
3301#
3302#
3303# Note that if there is a possibility the first call to
3304# PKG_CHECK_MODULES might not happen, you should be sure to include an
3305# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3306#
3307#
3308# --------------------------------------------------------------
3309# PKG_CHECK_MODULES
3310
3311
3312# Include these first...
3313#
3314# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3315# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3316#
3317# This code is free software; you can redistribute it and/or modify it
3318# under the terms of the GNU General Public License version 2 only, as
3319# published by the Free Software Foundation.  Oracle designates this
3320# particular file as subject to the "Classpath" exception as provided
3321# by Oracle in the LICENSE file that accompanied this code.
3322#
3323# This code is distributed in the hope that it will be useful, but WITHOUT
3324# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3325# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3326# version 2 for more details (a copy is included in the LICENSE file that
3327# accompanied this code).
3328#
3329# You should have received a copy of the GNU General Public License version
3330# 2 along with this work; if not, write to the Free Software Foundation,
3331# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3332#
3333# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3334# or visit www.oracle.com if you need additional information or have any
3335# questions.
3336#
3337
3338# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3339# If so, then append $1 to $2 \
3340# Also set JVM_ARG_OK to true/false depending on outcome.
3341
3342
3343# Appends a string to a path variable, only adding the : when needed.
3344
3345
3346# Prepends a string to a path variable, only adding the : when needed.
3347
3348
3349# This will make sure the given variable points to a full and proper
3350# path. This means:
3351# 1) There will be no spaces in the path. On posix platforms,
3352#    spaces in the path will result in an error. On Windows,
3353#    the path will be rewritten using short-style to be space-free.
3354# 2) The path will be absolute, and it will be in unix-style (on
3355#     cygwin).
3356# $1: The name of the variable to fix
3357
3358
3359# This will make sure the given variable points to a executable
3360# with a full and proper path. This means:
3361# 1) There will be no spaces in the path. On posix platforms,
3362#    spaces in the path will result in an error. On Windows,
3363#    the path will be rewritten using short-style to be space-free.
3364# 2) The path will be absolute, and it will be in unix-style (on
3365#     cygwin).
3366# Any arguments given to the executable is preserved.
3367# If the input variable does not have a directory specification, then
3368# it need to be in the PATH.
3369# $1: The name of the variable to fix
3370
3371
3372
3373
3374# Register a --with argument but mark it as deprecated
3375# $1: The name of the with argument to deprecate, not including --with-
3376
3377
3378# Register a --enable argument but mark it as deprecated
3379# $1: The name of the with argument to deprecate, not including --enable-
3380# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3381
3382
3383
3384
3385# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3386# $1: variable to check
3387
3388
3389# Check that there are no unprocessed overridden variables left.
3390# If so, they are an incorrect argument and we will exit with an error.
3391
3392
3393# Setup a tool for the given variable. If correctly specified by the user,
3394# use that value, otherwise search for the tool using the supplied code snippet.
3395# $1: variable to set
3396# $2: code snippet to call to look for the tool
3397
3398
3399# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3400# $1: variable to set
3401# $2: executable name (or list of names) to look for
3402
3403
3404# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3405# $1: variable to set
3406# $2: executable name (or list of names) to look for
3407
3408
3409# Like BASIC_PATH_PROGS but fails if no tool was found.
3410# $1: variable to set
3411# $2: executable name (or list of names) to look for
3412
3413
3414# Like BASIC_SETUP_TOOL but fails if no tool was found.
3415# $1: variable to set
3416# $2: autoconf macro to call to look for the special tool
3417
3418
3419# Setup the most fundamental tools that relies on not much else to set up,
3420# but is used by much of the early bootstrap code.
3421
3422
3423# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433#%%% Simple tools %%%
3434
3435# Check if we have found a usable version of make
3436# $1: the path to a potential make binary (or empty)
3437# $2: the description on how we found this
3438
3439
3440# Goes looking for a usable version of GNU make.
3441
3442
3443
3444
3445
3446
3447# Check if build directory is on local disk. If not possible to determine,
3448# we prefer to claim it's local.
3449# Argument 1: directory to test
3450# Argument 2: what to do if it is on local disk
3451# Argument 3: what to do otherwise (remote disk or failure)
3452
3453
3454# Check that source files have basic read permissions set. This might
3455# not be the case in cygwin in certain conditions.
3456
3457
3458
3459
3460#
3461# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3462# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3463#
3464# This code is free software; you can redistribute it and/or modify it
3465# under the terms of the GNU General Public License version 2 only, as
3466# published by the Free Software Foundation.  Oracle designates this
3467# particular file as subject to the "Classpath" exception as provided
3468# by Oracle in the LICENSE file that accompanied this code.
3469#
3470# This code is distributed in the hope that it will be useful, but WITHOUT
3471# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3472# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3473# version 2 for more details (a copy is included in the LICENSE file that
3474# accompanied this code).
3475#
3476# You should have received a copy of the GNU General Public License version
3477# 2 along with this work; if not, write to the Free Software Foundation,
3478# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3479#
3480# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3481# or visit www.oracle.com if you need additional information or have any
3482# questions.
3483#
3484
3485
3486
3487
3488
3489# Helper function which possibly converts a path using DOS-style short mode.
3490# If so, the updated path is stored in $new_path.
3491# $1: The path to check
3492
3493
3494# Helper function which possibly converts a path using DOS-style short mode.
3495# If so, the updated path is stored in $new_path.
3496# $1: The path to check
3497
3498
3499# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3500# and could probably be heavily simplified. However, all changes in this
3501# area tend to need lot of testing in different scenarios, and in lack of
3502# proper unit testing, cleaning this up has not been deemed worth the effort
3503# at the moment.
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513# Setup basic configuration paths, and platform-specific stuff related to PATHs.
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
3548
3549
3550
3551
3552
3553# ... then the rest
3554#
3555# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3556# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3557#
3558# This code is free software; you can redistribute it and/or modify it
3559# under the terms of the GNU General Public License version 2 only, as
3560# published by the Free Software Foundation.  Oracle designates this
3561# particular file as subject to the "Classpath" exception as provided
3562# by Oracle in the LICENSE file that accompanied this code.
3563#
3564# This code is distributed in the hope that it will be useful, but WITHOUT
3565# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3566# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3567# version 2 for more details (a copy is included in the LICENSE file that
3568# accompanied this code).
3569#
3570# You should have received a copy of the GNU General Public License version
3571# 2 along with this work; if not, write to the Free Software Foundation,
3572# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3573#
3574# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3575# or visit www.oracle.com if you need additional information or have any
3576# questions.
3577#
3578
3579########################################################################
3580# This file handles detection of the Boot JDK. The Boot JDK detection
3581# process has been developed as a response to solve a complex real-world
3582# problem. Initially, it was simple, but it has grown as platform after
3583# platform, idiosyncracy after idiosyncracy has been supported.
3584#
3585# The basic idea is this:
3586# 1) You need an acceptable *) JDK to use as a Boot JDK
3587# 2) There are several ways to locate a JDK, that are mostly platform
3588#    dependent **)
3589# 3) You can have multiple JDKs installed
3590# 4) If possible, configure should try to dig out an acceptable JDK
3591#    automatically, without having to resort to command-line options
3592#
3593# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3594#     javac) and not a JRE, etc.
3595#
3596# **) On Windows we typically use a well-known path.
3597#     On MacOSX we typically use the tool java_home.
3598#     On Linux we typically find javac in the $PATH, and then follow a
3599#     chain of symlinks that often ends up in a real JDK.
3600#
3601# This leads to the code where we check in different ways to locate a
3602# JDK, and if one is found, check if it is acceptable. If not, we print
3603# our reasons for rejecting it (useful when debugging non-working
3604# configure situations) and continue checking the next one.
3605########################################################################
3606
3607# Execute the check given as argument, and verify the result
3608# If the Boot JDK was previously found, do nothing
3609# $1 A command line (typically autoconf macro) to execute
3610
3611
3612# Test: Is bootjdk explicitely set by command line arguments?
3613
3614
3615# Test: Is bootjdk available from builddeps?
3616
3617
3618# Test: Is $JAVA_HOME set?
3619
3620
3621# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3622
3623
3624# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3625# $1: Argument to the java_home binary (optional)
3626
3627
3628# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3629
3630
3631# Look for a jdk in the given path. If there are multiple, try to select the newest.
3632# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3633# $1 = Path to directory containing jdk installations.
3634# $2 = String to append to the found JDK directory to get the proper JDK home
3635
3636
3637# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3638# environmental variable as base for where to look.
3639# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3640
3641
3642# Test: Is there a JDK installed in default, well-known locations?
3643
3644
3645# Check that a command-line tool in the Boot JDK is correct
3646# $1 = name of variable to assign
3647# $2 = name of binary
3648
3649
3650###############################################################################
3651#
3652# We need a Boot JDK to bootstrap the build.
3653#
3654
3655
3656
3657
3658
3659#
3660# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3661# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3662#
3663# This code is free software; you can redistribute it and/or modify it
3664# under the terms of the GNU General Public License version 2 only, as
3665# published by the Free Software Foundation.  Oracle designates this
3666# particular file as subject to the "Classpath" exception as provided
3667# by Oracle in the LICENSE file that accompanied this code.
3668#
3669# This code is distributed in the hope that it will be useful, but WITHOUT
3670# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3671# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3672# version 2 for more details (a copy is included in the LICENSE file that
3673# accompanied this code).
3674#
3675# You should have received a copy of the GNU General Public License version
3676# 2 along with this work; if not, write to the Free Software Foundation,
3677# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3678#
3679# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3680# or visit www.oracle.com if you need additional information or have any
3681# questions.
3682#
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703#
3704# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3705# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3706#
3707# This code is free software; you can redistribute it and/or modify it
3708# under the terms of the GNU General Public License version 2 only, as
3709# published by the Free Software Foundation.  Oracle designates this
3710# particular file as subject to the "Classpath" exception as provided
3711# by Oracle in the LICENSE file that accompanied this code.
3712#
3713# This code is distributed in the hope that it will be useful, but WITHOUT
3714# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3715# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3716# version 2 for more details (a copy is included in the LICENSE file that
3717# accompanied this code).
3718#
3719# You should have received a copy of the GNU General Public License version
3720# 2 along with this work; if not, write to the Free Software Foundation,
3721# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3722#
3723# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3724# or visit www.oracle.com if you need additional information or have any
3725# questions.
3726#
3727
3728
3729
3730
3731
3732# Documentation on common flags used for solstudio in HIGHEST.
3733#
3734# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3735#          done with care, there are some assumptions below that need to
3736#          be understood about the use of pointers, and IEEE behavior.
3737#
3738# -fns: Use non-standard floating point mode (not IEEE 754)
3739# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3740# -fsingle: Use single precision floating point with 'float'
3741# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3742#   (Source with excessing pointer casting and data access with mixed
3743#    pointer types are not recommended)
3744# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3745#   (If you expect perfect errno behavior, do not use this)
3746# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3747# -xrestrict: Pointer parameters to functions do not overlap
3748#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3749#    If you pass in multiple pointers to the same data, do not use this)
3750# -xlibmil: Inline some library routines
3751#   (If you expect perfect errno behavior, do not use this)
3752# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3753#   (If you expect perfect errno behavior, do not use this)
3754#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3755
3756    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3757    # Bug?
3758    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3759    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3760    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3761    #fi
3762
3763
3764
3765
3766
3767
3768# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3769#                                   [RUN-IF-FALSE])
3770# ------------------------------------------------------------
3771# Check that the c and c++ compilers support an argument
3772
3773
3774
3775
3776#
3777# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3778# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3779#
3780# This code is free software; you can redistribute it and/or modify it
3781# under the terms of the GNU General Public License version 2 only, as
3782# published by the Free Software Foundation.  Oracle designates this
3783# particular file as subject to the "Classpath" exception as provided
3784# by Oracle in the LICENSE file that accompanied this code.
3785#
3786# This code is distributed in the hope that it will be useful, but WITHOUT
3787# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3788# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3789# version 2 for more details (a copy is included in the LICENSE file that
3790# accompanied this code).
3791#
3792# You should have received a copy of the GNU General Public License version
3793# 2 along with this work; if not, write to the Free Software Foundation,
3794# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3795#
3796# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3797# or visit www.oracle.com if you need additional information or have any
3798# questions.
3799#
3800
3801
3802
3803
3804
3805cygwin_help() {
3806  case $1 in
3807    unzip)
3808      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3809      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3810      ;;
3811    zip)
3812      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3813      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3814      ;;
3815    make)
3816      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3817      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3818      ;;
3819    freetype)
3820      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
3821        HELP_MSG="To install freetype, run:
3822wget \"http://gnuwin32.sourceforge.net/downlinks/freetype.php\" -O /tmp/freetype-setup.exe
3823chmod +x /tmp/freetype-setup.exe
3824/tmp/freetype-setup.exe
3825Follow GUI prompts, and install to default directory \"C:\Program Files (x86)\GnuWin32\".
3826After installation, locate lib/libfreetype.dll.a and make a copy with the name freetype.dll."
3827      else
3828        HELP_MSG="You need to build a 64-bit version of freetype.
3829This is not readily available.
3830You can find source code and build instructions on
3831http://www.freetype.org/
3832If you put the resulting build in \"C:\Program Files\GnuWin32\", it will be found automatically."
3833      fi
3834      ;;
3835  esac
3836}
3837
3838msys_help() {
3839  PKGHANDLER_COMMAND=""
3840}
3841
3842apt_help() {
3843  case $1 in
3844    devkit)
3845      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3846    openjdk)
3847      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3848    alsa)
3849      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3850    cups)
3851      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3852    freetype)
3853      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3854    pulse)
3855      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3856    x11)
3857      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3858    ccache)
3859      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3860  esac
3861}
3862
3863yum_help() {
3864  case $1 in
3865    devkit)
3866      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3867    openjdk)
3868      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3869    alsa)
3870      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3871    cups)
3872      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3873    freetype)
3874      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3875    pulse)
3876      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3877    x11)
3878      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
3879    ccache)
3880      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3881  esac
3882}
3883
3884port_help() {
3885  PKGHANDLER_COMMAND=""
3886}
3887
3888pkgutil_help() {
3889  PKGHANDLER_COMMAND=""
3890}
3891
3892pkgadd_help() {
3893  PKGHANDLER_COMMAND=""
3894}
3895
3896# This function will check if we're called from the "configure" wrapper while
3897# printing --help. If so, we will print out additional information that can
3898# only be extracted within the autoconf script, and then exit. This must be
3899# called at the very beginning in configure.ac.
3900
3901
3902
3903
3904#
3905# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3906# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3907#
3908# This code is free software; you can redistribute it and/or modify it
3909# under the terms of the GNU General Public License version 2 only, as
3910# published by the Free Software Foundation.  Oracle designates this
3911# particular file as subject to the "Classpath" exception as provided
3912# by Oracle in the LICENSE file that accompanied this code.
3913#
3914# This code is distributed in the hope that it will be useful, but WITHOUT
3915# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3916# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3917# version 2 for more details (a copy is included in the LICENSE file that
3918# accompanied this code).
3919#
3920# You should have received a copy of the GNU General Public License version
3921# 2 along with this work; if not, write to the Free Software Foundation,
3922# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3923#
3924# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3925# or visit www.oracle.com if you need additional information or have any
3926# questions.
3927#
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938###############################################################################
3939#
3940# Should we build only OpenJDK even if closed sources are present?
3941#
3942
3943
3944
3945
3946###############################################################################
3947#
3948# Setup version numbers
3949#
3950
3951
3952
3953
3954
3955
3956#
3957# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3958# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3959#
3960# This code is free software; you can redistribute it and/or modify it
3961# under the terms of the GNU General Public License version 2 only, as
3962# published by the Free Software Foundation.  Oracle designates this
3963# particular file as subject to the "Classpath" exception as provided
3964# by Oracle in the LICENSE file that accompanied this code.
3965#
3966# This code is distributed in the hope that it will be useful, but WITHOUT
3967# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3968# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3969# version 2 for more details (a copy is included in the LICENSE file that
3970# accompanied this code).
3971#
3972# You should have received a copy of the GNU General Public License version
3973# 2 along with this work; if not, write to the Free Software Foundation,
3974# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3975#
3976# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3977# or visit www.oracle.com if you need additional information or have any
3978# questions.
3979#
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999#
4000# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4001# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4002#
4003# This code is free software; you can redistribute it and/or modify it
4004# under the terms of the GNU General Public License version 2 only, as
4005# published by the Free Software Foundation.  Oracle designates this
4006# particular file as subject to the "Classpath" exception as provided
4007# by Oracle in the LICENSE file that accompanied this code.
4008#
4009# This code is distributed in the hope that it will be useful, but WITHOUT
4010# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4011# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4012# version 2 for more details (a copy is included in the LICENSE file that
4013# accompanied this code).
4014#
4015# You should have received a copy of the GNU General Public License version
4016# 2 along with this work; if not, write to the Free Software Foundation,
4017# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4018#
4019# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4020# or visit www.oracle.com if you need additional information or have any
4021# questions.
4022#
4023
4024# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4025# Converts autoconf style CPU name to OpenJDK style, into
4026# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4027
4028
4029# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4030# Converts autoconf style OS name to OpenJDK style, into
4031# VAR_OS and VAR_OS_API.
4032
4033
4034# Expects $host_os $host_cpu $build_os and $build_cpu
4035# and $with_target_bits to have been setup!
4036#
4037# Translate the standard triplet(quadruplet) definition
4038# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4039# OPENJDK_BUILD_OS, etc.
4040
4041
4042# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4043# accordingly. Must be done after setting up build and target system, but before
4044# doing anything else with these values.
4045
4046
4047# Setup the legacy variables, for controlling the old makefiles.
4048#
4049
4050
4051
4052
4053#%%% Build and target systems %%%
4054
4055
4056
4057
4058# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4059# Add -mX to various FLAGS variables.
4060
4061
4062
4063
4064
4065
4066#
4067# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4068# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4069#
4070# This code is free software; you can redistribute it and/or modify it
4071# under the terms of the GNU General Public License version 2 only, as
4072# published by the Free Software Foundation.  Oracle designates this
4073# particular file as subject to the "Classpath" exception as provided
4074# by Oracle in the LICENSE file that accompanied this code.
4075#
4076# This code is distributed in the hope that it will be useful, but WITHOUT
4077# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4078# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4079# version 2 for more details (a copy is included in the LICENSE file that
4080# accompanied this code).
4081#
4082# You should have received a copy of the GNU General Public License version
4083# 2 along with this work; if not, write to the Free Software Foundation,
4084# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4085#
4086# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4087# or visit www.oracle.com if you need additional information or have any
4088# questions.
4089#
4090
4091
4092
4093
4094
4095
4096
4097
4098#
4099# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4100# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4101#
4102# This code is free software; you can redistribute it and/or modify it
4103# under the terms of the GNU General Public License version 2 only, as
4104# published by the Free Software Foundation.  Oracle designates this
4105# particular file as subject to the "Classpath" exception as provided
4106# by Oracle in the LICENSE file that accompanied this code.
4107#
4108# This code is distributed in the hope that it will be useful, but WITHOUT
4109# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4110# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4111# version 2 for more details (a copy is included in the LICENSE file that
4112# accompanied this code).
4113#
4114# You should have received a copy of the GNU General Public License version
4115# 2 along with this work; if not, write to the Free Software Foundation,
4116# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4117#
4118# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4119# or visit www.oracle.com if you need additional information or have any
4120# questions.
4121#
4122
4123########################################################################
4124# This file is responsible for detecting, verifying and setting up the
4125# toolchain, i.e. the compiler, linker and related utilities. It will setup
4126# proper paths to the binaries, but it will not setup any flags.
4127#
4128# The binaries used is determined by the toolchain type, which is the family of
4129# compilers and related tools that are used.
4130########################################################################
4131
4132
4133# All valid toolchains, regardless of platform (used by help.m4)
4134VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4135
4136# These toolchains are valid on different platforms
4137VALID_TOOLCHAINS_linux="gcc clang"
4138VALID_TOOLCHAINS_solaris="solstudio"
4139VALID_TOOLCHAINS_macosx="gcc clang"
4140VALID_TOOLCHAINS_aix="xlc"
4141VALID_TOOLCHAINS_windows="microsoft"
4142
4143# Toolchain descriptions
4144TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4145TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4146TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4147TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4148TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4149
4150# Setup a number of variables describing how native output files are
4151# named on this platform/toolchain.
4152
4153
4154# Determine which toolchain type to use, and make sure it is valid for this
4155# platform. Setup various information about the selected toolchain.
4156
4157
4158# Before we start detecting the toolchain executables, we might need some
4159# special setup, e.g. additional paths etc.
4160
4161
4162# Restore path, etc
4163
4164
4165# Check if a compiler is of the toolchain type we expect, and save the version
4166# information from it. If the compiler does not match the expected type,
4167# this function will abort using AC_MSG_ERROR. If it matches, the version will
4168# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4169# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4170#
4171# $1 = compiler to test (CC or CXX)
4172# $2 = human readable name of compiler (C or C++)
4173
4174
4175# Try to locate the given C or C++ compiler in the path, or otherwise.
4176#
4177# $1 = compiler to test (CC or CXX)
4178# $2 = human readable name of compiler (C or C++)
4179# $3 = list of compiler names to search for
4180
4181
4182# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4183# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4184# archiver (AR). Verify that the compilers are correct according to the
4185# toolchain type.
4186
4187
4188# Setup additional tools that is considered a part of the toolchain, but not the
4189# core part. Many of these are highly platform-specific and do not exist,
4190# and/or are not needed on all platforms.
4191
4192
4193# Setup the build tools (i.e, the compiler and linker used to build programs
4194# that should be run on the build platform, not the target platform, as a build
4195# helper). Since the non-cross-compile case uses the normal, target compilers
4196# for this, we can only do this after these have been setup.
4197
4198
4199# Setup legacy variables that are still needed as alternative ways to refer to
4200# parts of the toolchain.
4201
4202
4203# Do some additional checks on the detected tools.
4204
4205
4206# Setup the JTReg Regression Test Harness.
4207
4208
4209#
4210# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4211# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4212#
4213# This code is free software; you can redistribute it and/or modify it
4214# under the terms of the GNU General Public License version 2 only, as
4215# published by the Free Software Foundation.  Oracle designates this
4216# particular file as subject to the "Classpath" exception as provided
4217# by Oracle in the LICENSE file that accompanied this code.
4218#
4219# This code is distributed in the hope that it will be useful, but WITHOUT
4220# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4221# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4222# version 2 for more details (a copy is included in the LICENSE file that
4223# accompanied this code).
4224#
4225# You should have received a copy of the GNU General Public License version
4226# 2 along with this work; if not, write to the Free Software Foundation,
4227# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4228#
4229# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4230# or visit www.oracle.com if you need additional information or have any
4231# questions.
4232#
4233
4234
4235
4236
4237
4238
4239
4240# Check if the VS env variables were setup prior to running configure.
4241# If not, then find vcvarsall.bat and run it automatically, and integrate
4242# the set env variables into the spec file.
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253# This line needs to be here, verbatim, after all includes and the dummy hook
4254# definitions. It is replaced with custom functionality when building
4255# custom sources.
4256#CUSTOM_AUTOCONF_INCLUDE
4257
4258# Do not change or remove the following line, it is needed for consistency checks:
4259DATE_WHEN_GENERATED=1400601642
4260
4261###############################################################################
4262#
4263# Initialization / Boot-strapping
4264#
4265# The bootstrapping process needs to solve the "chicken or the egg" problem,
4266# thus it jumps back and forth, each time gaining something needed later on.
4267#
4268###############################################################################
4269
4270# If we are requested to print additional help, do that and then exit.
4271# This must be the very first call.
4272
4273  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4274    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4275    $PRINTF "Which are valid to use depends on the build platform.\n"
4276    for toolchain in $VALID_TOOLCHAINS_all; do
4277      # Use indirect variable referencing
4278      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4279      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4280      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4281    done
4282
4283    # And now exit directly
4284    exit 0
4285  fi
4286
4287
4288# Basic initialization that must happen first of all in the normal process.
4289
4290  # Save the original command line. This is passed to us by the wrapper configure script.
4291
4292  DATE_WHEN_CONFIGURED=`LANG=C date`
4293
4294  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4295$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4296  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4297$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4298
4299
4300  # Start with tools that do not need have cross compilation support
4301  # and can be expected to be found in the default PATH. These tools are
4302  # used by configure. Nor are these tools expected to be found in the
4303  # devkit from the builddeps server either, since they are
4304  # needed to download the devkit.
4305
4306  # First are all the simple required tools.
4307
4308
4309
4310  # Publish this variable in the help.
4311
4312
4313  if test "x$BASENAME" = x; then
4314    # The variable is not set by user, try to locate tool using the code snippet
4315    for ac_prog in basename
4316do
4317  # Extract the first word of "$ac_prog", so it can be a program name with args.
4318set dummy $ac_prog; ac_word=$2
4319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4320$as_echo_n "checking for $ac_word... " >&6; }
4321if ${ac_cv_path_BASENAME+:} false; then :
4322  $as_echo_n "(cached) " >&6
4323else
4324  case $BASENAME in
4325  [\\/]* | ?:[\\/]*)
4326  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4327  ;;
4328  *)
4329  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4330for as_dir in $PATH
4331do
4332  IFS=$as_save_IFS
4333  test -z "$as_dir" && as_dir=.
4334    for ac_exec_ext in '' $ac_executable_extensions; do
4335  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4336    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4337    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4338    break 2
4339  fi
4340done
4341  done
4342IFS=$as_save_IFS
4343
4344  ;;
4345esac
4346fi
4347BASENAME=$ac_cv_path_BASENAME
4348if test -n "$BASENAME"; then
4349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4350$as_echo "$BASENAME" >&6; }
4351else
4352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4353$as_echo "no" >&6; }
4354fi
4355
4356
4357  test -n "$BASENAME" && break
4358done
4359
4360  else
4361    # The variable is set, but is it from the command line or the environment?
4362
4363    # Try to remove the string !BASENAME! from our list.
4364    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4365    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4366      # If it failed, the variable was not from the command line. Ignore it,
4367      # but warn the user (except for BASH, which is always set by the calling BASH).
4368      if test "xBASENAME" != xBASH; then
4369        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4370$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4371      fi
4372      # Try to locate tool using the code snippet
4373      for ac_prog in basename
4374do
4375  # Extract the first word of "$ac_prog", so it can be a program name with args.
4376set dummy $ac_prog; ac_word=$2
4377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4378$as_echo_n "checking for $ac_word... " >&6; }
4379if ${ac_cv_path_BASENAME+:} false; then :
4380  $as_echo_n "(cached) " >&6
4381else
4382  case $BASENAME in
4383  [\\/]* | ?:[\\/]*)
4384  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4385  ;;
4386  *)
4387  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4388for as_dir in $PATH
4389do
4390  IFS=$as_save_IFS
4391  test -z "$as_dir" && as_dir=.
4392    for ac_exec_ext in '' $ac_executable_extensions; do
4393  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4394    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4395    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4396    break 2
4397  fi
4398done
4399  done
4400IFS=$as_save_IFS
4401
4402  ;;
4403esac
4404fi
4405BASENAME=$ac_cv_path_BASENAME
4406if test -n "$BASENAME"; then
4407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4408$as_echo "$BASENAME" >&6; }
4409else
4410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4411$as_echo "no" >&6; }
4412fi
4413
4414
4415  test -n "$BASENAME" && break
4416done
4417
4418    else
4419      # If it succeeded, then it was overridden by the user. We will use it
4420      # for the tool.
4421
4422      # First remove it from the list of overridden variables, so we can test
4423      # for unknown variables in the end.
4424      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4425
4426      # Check if the provided tool contains a complete path.
4427      tool_specified="$BASENAME"
4428      tool_basename="${tool_specified##*/}"
4429      if test "x$tool_basename" = "x$tool_specified"; then
4430        # A command without a complete path is provided, search $PATH.
4431        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4432$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4433        # Extract the first word of "$tool_basename", so it can be a program name with args.
4434set dummy $tool_basename; ac_word=$2
4435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4436$as_echo_n "checking for $ac_word... " >&6; }
4437if ${ac_cv_path_BASENAME+:} false; then :
4438  $as_echo_n "(cached) " >&6
4439else
4440  case $BASENAME in
4441  [\\/]* | ?:[\\/]*)
4442  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4443  ;;
4444  *)
4445  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4446for as_dir in $PATH
4447do
4448  IFS=$as_save_IFS
4449  test -z "$as_dir" && as_dir=.
4450    for ac_exec_ext in '' $ac_executable_extensions; do
4451  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4452    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4453    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4454    break 2
4455  fi
4456done
4457  done
4458IFS=$as_save_IFS
4459
4460  ;;
4461esac
4462fi
4463BASENAME=$ac_cv_path_BASENAME
4464if test -n "$BASENAME"; then
4465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4466$as_echo "$BASENAME" >&6; }
4467else
4468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4469$as_echo "no" >&6; }
4470fi
4471
4472
4473        if test "x$BASENAME" = x; then
4474          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4475        fi
4476      else
4477        # Otherwise we believe it is a complete path. Use it as it is.
4478        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4479$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4480        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4481$as_echo_n "checking for BASENAME... " >&6; }
4482        if test ! -x "$tool_specified"; then
4483          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4484$as_echo "not found" >&6; }
4485          as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4486        fi
4487        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4488$as_echo "$tool_specified" >&6; }
4489      fi
4490    fi
4491  fi
4492
4493
4494
4495  if test "x$BASENAME" = x; then
4496    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4497  fi
4498
4499
4500
4501
4502
4503  # Publish this variable in the help.
4504
4505
4506  if test "x$BASH" = x; then
4507    # The variable is not set by user, try to locate tool using the code snippet
4508    for ac_prog in bash
4509do
4510  # Extract the first word of "$ac_prog", so it can be a program name with args.
4511set dummy $ac_prog; ac_word=$2
4512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4513$as_echo_n "checking for $ac_word... " >&6; }
4514if ${ac_cv_path_BASH+:} false; then :
4515  $as_echo_n "(cached) " >&6
4516else
4517  case $BASH in
4518  [\\/]* | ?:[\\/]*)
4519  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4520  ;;
4521  *)
4522  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4523for as_dir in $PATH
4524do
4525  IFS=$as_save_IFS
4526  test -z "$as_dir" && as_dir=.
4527    for ac_exec_ext in '' $ac_executable_extensions; do
4528  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4529    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4530    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4531    break 2
4532  fi
4533done
4534  done
4535IFS=$as_save_IFS
4536
4537  ;;
4538esac
4539fi
4540BASH=$ac_cv_path_BASH
4541if test -n "$BASH"; then
4542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4543$as_echo "$BASH" >&6; }
4544else
4545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4546$as_echo "no" >&6; }
4547fi
4548
4549
4550  test -n "$BASH" && break
4551done
4552
4553  else
4554    # The variable is set, but is it from the command line or the environment?
4555
4556    # Try to remove the string !BASH! from our list.
4557    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4558    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4559      # If it failed, the variable was not from the command line. Ignore it,
4560      # but warn the user (except for BASH, which is always set by the calling BASH).
4561      if test "xBASH" != xBASH; then
4562        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4563$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4564      fi
4565      # Try to locate tool using the code snippet
4566      for ac_prog in bash
4567do
4568  # Extract the first word of "$ac_prog", so it can be a program name with args.
4569set dummy $ac_prog; ac_word=$2
4570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4571$as_echo_n "checking for $ac_word... " >&6; }
4572if ${ac_cv_path_BASH+:} false; then :
4573  $as_echo_n "(cached) " >&6
4574else
4575  case $BASH in
4576  [\\/]* | ?:[\\/]*)
4577  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4578  ;;
4579  *)
4580  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4581for as_dir in $PATH
4582do
4583  IFS=$as_save_IFS
4584  test -z "$as_dir" && as_dir=.
4585    for ac_exec_ext in '' $ac_executable_extensions; do
4586  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4587    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4588    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4589    break 2
4590  fi
4591done
4592  done
4593IFS=$as_save_IFS
4594
4595  ;;
4596esac
4597fi
4598BASH=$ac_cv_path_BASH
4599if test -n "$BASH"; then
4600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4601$as_echo "$BASH" >&6; }
4602else
4603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4604$as_echo "no" >&6; }
4605fi
4606
4607
4608  test -n "$BASH" && break
4609done
4610
4611    else
4612      # If it succeeded, then it was overridden by the user. We will use it
4613      # for the tool.
4614
4615      # First remove it from the list of overridden variables, so we can test
4616      # for unknown variables in the end.
4617      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4618
4619      # Check if the provided tool contains a complete path.
4620      tool_specified="$BASH"
4621      tool_basename="${tool_specified##*/}"
4622      if test "x$tool_basename" = "x$tool_specified"; then
4623        # A command without a complete path is provided, search $PATH.
4624        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4625$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4626        # Extract the first word of "$tool_basename", so it can be a program name with args.
4627set dummy $tool_basename; ac_word=$2
4628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4629$as_echo_n "checking for $ac_word... " >&6; }
4630if ${ac_cv_path_BASH+:} false; then :
4631  $as_echo_n "(cached) " >&6
4632else
4633  case $BASH in
4634  [\\/]* | ?:[\\/]*)
4635  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4636  ;;
4637  *)
4638  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4639for as_dir in $PATH
4640do
4641  IFS=$as_save_IFS
4642  test -z "$as_dir" && as_dir=.
4643    for ac_exec_ext in '' $ac_executable_extensions; do
4644  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4645    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4646    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4647    break 2
4648  fi
4649done
4650  done
4651IFS=$as_save_IFS
4652
4653  ;;
4654esac
4655fi
4656BASH=$ac_cv_path_BASH
4657if test -n "$BASH"; then
4658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4659$as_echo "$BASH" >&6; }
4660else
4661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4662$as_echo "no" >&6; }
4663fi
4664
4665
4666        if test "x$BASH" = x; then
4667          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4668        fi
4669      else
4670        # Otherwise we believe it is a complete path. Use it as it is.
4671        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4672$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4673        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4674$as_echo_n "checking for BASH... " >&6; }
4675        if test ! -x "$tool_specified"; then
4676          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4677$as_echo "not found" >&6; }
4678          as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4679        fi
4680        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4681$as_echo "$tool_specified" >&6; }
4682      fi
4683    fi
4684  fi
4685
4686
4687
4688  if test "x$BASH" = x; then
4689    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4690  fi
4691
4692
4693
4694
4695
4696  # Publish this variable in the help.
4697
4698
4699  if test "x$CAT" = x; then
4700    # The variable is not set by user, try to locate tool using the code snippet
4701    for ac_prog in cat
4702do
4703  # Extract the first word of "$ac_prog", so it can be a program name with args.
4704set dummy $ac_prog; ac_word=$2
4705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4706$as_echo_n "checking for $ac_word... " >&6; }
4707if ${ac_cv_path_CAT+:} false; then :
4708  $as_echo_n "(cached) " >&6
4709else
4710  case $CAT in
4711  [\\/]* | ?:[\\/]*)
4712  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4713  ;;
4714  *)
4715  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4716for as_dir in $PATH
4717do
4718  IFS=$as_save_IFS
4719  test -z "$as_dir" && as_dir=.
4720    for ac_exec_ext in '' $ac_executable_extensions; do
4721  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4722    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4723    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4724    break 2
4725  fi
4726done
4727  done
4728IFS=$as_save_IFS
4729
4730  ;;
4731esac
4732fi
4733CAT=$ac_cv_path_CAT
4734if test -n "$CAT"; then
4735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4736$as_echo "$CAT" >&6; }
4737else
4738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4739$as_echo "no" >&6; }
4740fi
4741
4742
4743  test -n "$CAT" && break
4744done
4745
4746  else
4747    # The variable is set, but is it from the command line or the environment?
4748
4749    # Try to remove the string !CAT! from our list.
4750    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4751    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4752      # If it failed, the variable was not from the command line. Ignore it,
4753      # but warn the user (except for BASH, which is always set by the calling BASH).
4754      if test "xCAT" != xBASH; then
4755        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4756$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4757      fi
4758      # Try to locate tool using the code snippet
4759      for ac_prog in cat
4760do
4761  # Extract the first word of "$ac_prog", so it can be a program name with args.
4762set dummy $ac_prog; ac_word=$2
4763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4764$as_echo_n "checking for $ac_word... " >&6; }
4765if ${ac_cv_path_CAT+:} false; then :
4766  $as_echo_n "(cached) " >&6
4767else
4768  case $CAT in
4769  [\\/]* | ?:[\\/]*)
4770  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4771  ;;
4772  *)
4773  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4774for as_dir in $PATH
4775do
4776  IFS=$as_save_IFS
4777  test -z "$as_dir" && as_dir=.
4778    for ac_exec_ext in '' $ac_executable_extensions; do
4779  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4780    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4781    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4782    break 2
4783  fi
4784done
4785  done
4786IFS=$as_save_IFS
4787
4788  ;;
4789esac
4790fi
4791CAT=$ac_cv_path_CAT
4792if test -n "$CAT"; then
4793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4794$as_echo "$CAT" >&6; }
4795else
4796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4797$as_echo "no" >&6; }
4798fi
4799
4800
4801  test -n "$CAT" && break
4802done
4803
4804    else
4805      # If it succeeded, then it was overridden by the user. We will use it
4806      # for the tool.
4807
4808      # First remove it from the list of overridden variables, so we can test
4809      # for unknown variables in the end.
4810      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4811
4812      # Check if the provided tool contains a complete path.
4813      tool_specified="$CAT"
4814      tool_basename="${tool_specified##*/}"
4815      if test "x$tool_basename" = "x$tool_specified"; then
4816        # A command without a complete path is provided, search $PATH.
4817        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
4818$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
4819        # Extract the first word of "$tool_basename", so it can be a program name with args.
4820set dummy $tool_basename; ac_word=$2
4821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4822$as_echo_n "checking for $ac_word... " >&6; }
4823if ${ac_cv_path_CAT+:} false; then :
4824  $as_echo_n "(cached) " >&6
4825else
4826  case $CAT in
4827  [\\/]* | ?:[\\/]*)
4828  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4829  ;;
4830  *)
4831  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4832for as_dir in $PATH
4833do
4834  IFS=$as_save_IFS
4835  test -z "$as_dir" && as_dir=.
4836    for ac_exec_ext in '' $ac_executable_extensions; do
4837  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4838    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4839    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4840    break 2
4841  fi
4842done
4843  done
4844IFS=$as_save_IFS
4845
4846  ;;
4847esac
4848fi
4849CAT=$ac_cv_path_CAT
4850if test -n "$CAT"; then
4851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4852$as_echo "$CAT" >&6; }
4853else
4854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4855$as_echo "no" >&6; }
4856fi
4857
4858
4859        if test "x$CAT" = x; then
4860          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4861        fi
4862      else
4863        # Otherwise we believe it is a complete path. Use it as it is.
4864        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
4865$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
4866        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
4867$as_echo_n "checking for CAT... " >&6; }
4868        if test ! -x "$tool_specified"; then
4869          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4870$as_echo "not found" >&6; }
4871          as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
4872        fi
4873        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4874$as_echo "$tool_specified" >&6; }
4875      fi
4876    fi
4877  fi
4878
4879
4880
4881  if test "x$CAT" = x; then
4882    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
4883  fi
4884
4885
4886
4887
4888
4889  # Publish this variable in the help.
4890
4891
4892  if test "x$CHMOD" = x; then
4893    # The variable is not set by user, try to locate tool using the code snippet
4894    for ac_prog in chmod
4895do
4896  # Extract the first word of "$ac_prog", so it can be a program name with args.
4897set dummy $ac_prog; ac_word=$2
4898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4899$as_echo_n "checking for $ac_word... " >&6; }
4900if ${ac_cv_path_CHMOD+:} false; then :
4901  $as_echo_n "(cached) " >&6
4902else
4903  case $CHMOD in
4904  [\\/]* | ?:[\\/]*)
4905  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4906  ;;
4907  *)
4908  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4909for as_dir in $PATH
4910do
4911  IFS=$as_save_IFS
4912  test -z "$as_dir" && as_dir=.
4913    for ac_exec_ext in '' $ac_executable_extensions; do
4914  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4915    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4916    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4917    break 2
4918  fi
4919done
4920  done
4921IFS=$as_save_IFS
4922
4923  ;;
4924esac
4925fi
4926CHMOD=$ac_cv_path_CHMOD
4927if test -n "$CHMOD"; then
4928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4929$as_echo "$CHMOD" >&6; }
4930else
4931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4932$as_echo "no" >&6; }
4933fi
4934
4935
4936  test -n "$CHMOD" && break
4937done
4938
4939  else
4940    # The variable is set, but is it from the command line or the environment?
4941
4942    # Try to remove the string !CHMOD! from our list.
4943    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
4944    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4945      # If it failed, the variable was not from the command line. Ignore it,
4946      # but warn the user (except for BASH, which is always set by the calling BASH).
4947      if test "xCHMOD" != xBASH; then
4948        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
4949$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
4950      fi
4951      # Try to locate tool using the code snippet
4952      for ac_prog in chmod
4953do
4954  # Extract the first word of "$ac_prog", so it can be a program name with args.
4955set dummy $ac_prog; ac_word=$2
4956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4957$as_echo_n "checking for $ac_word... " >&6; }
4958if ${ac_cv_path_CHMOD+:} false; then :
4959  $as_echo_n "(cached) " >&6
4960else
4961  case $CHMOD in
4962  [\\/]* | ?:[\\/]*)
4963  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4964  ;;
4965  *)
4966  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4967for as_dir in $PATH
4968do
4969  IFS=$as_save_IFS
4970  test -z "$as_dir" && as_dir=.
4971    for ac_exec_ext in '' $ac_executable_extensions; do
4972  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4973    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4974    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4975    break 2
4976  fi
4977done
4978  done
4979IFS=$as_save_IFS
4980
4981  ;;
4982esac
4983fi
4984CHMOD=$ac_cv_path_CHMOD
4985if test -n "$CHMOD"; then
4986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4987$as_echo "$CHMOD" >&6; }
4988else
4989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4990$as_echo "no" >&6; }
4991fi
4992
4993
4994  test -n "$CHMOD" && break
4995done
4996
4997    else
4998      # If it succeeded, then it was overridden by the user. We will use it
4999      # for the tool.
5000
5001      # First remove it from the list of overridden variables, so we can test
5002      # for unknown variables in the end.
5003      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5004
5005      # Check if the provided tool contains a complete path.
5006      tool_specified="$CHMOD"
5007      tool_basename="${tool_specified##*/}"
5008      if test "x$tool_basename" = "x$tool_specified"; then
5009        # A command without a complete path is provided, search $PATH.
5010        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5011$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5012        # Extract the first word of "$tool_basename", so it can be a program name with args.
5013set dummy $tool_basename; ac_word=$2
5014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5015$as_echo_n "checking for $ac_word... " >&6; }
5016if ${ac_cv_path_CHMOD+:} false; then :
5017  $as_echo_n "(cached) " >&6
5018else
5019  case $CHMOD in
5020  [\\/]* | ?:[\\/]*)
5021  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5022  ;;
5023  *)
5024  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5025for as_dir in $PATH
5026do
5027  IFS=$as_save_IFS
5028  test -z "$as_dir" && as_dir=.
5029    for ac_exec_ext in '' $ac_executable_extensions; do
5030  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5031    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5032    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5033    break 2
5034  fi
5035done
5036  done
5037IFS=$as_save_IFS
5038
5039  ;;
5040esac
5041fi
5042CHMOD=$ac_cv_path_CHMOD
5043if test -n "$CHMOD"; then
5044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5045$as_echo "$CHMOD" >&6; }
5046else
5047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5048$as_echo "no" >&6; }
5049fi
5050
5051
5052        if test "x$CHMOD" = x; then
5053          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5054        fi
5055      else
5056        # Otherwise we believe it is a complete path. Use it as it is.
5057        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5058$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5059        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5060$as_echo_n "checking for CHMOD... " >&6; }
5061        if test ! -x "$tool_specified"; then
5062          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5063$as_echo "not found" >&6; }
5064          as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5065        fi
5066        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5067$as_echo "$tool_specified" >&6; }
5068      fi
5069    fi
5070  fi
5071
5072
5073
5074  if test "x$CHMOD" = x; then
5075    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5076  fi
5077
5078
5079
5080
5081
5082  # Publish this variable in the help.
5083
5084
5085  if test "x$CMP" = x; then
5086    # The variable is not set by user, try to locate tool using the code snippet
5087    for ac_prog in cmp
5088do
5089  # Extract the first word of "$ac_prog", so it can be a program name with args.
5090set dummy $ac_prog; ac_word=$2
5091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5092$as_echo_n "checking for $ac_word... " >&6; }
5093if ${ac_cv_path_CMP+:} false; then :
5094  $as_echo_n "(cached) " >&6
5095else
5096  case $CMP in
5097  [\\/]* | ?:[\\/]*)
5098  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5099  ;;
5100  *)
5101  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5102for as_dir in $PATH
5103do
5104  IFS=$as_save_IFS
5105  test -z "$as_dir" && as_dir=.
5106    for ac_exec_ext in '' $ac_executable_extensions; do
5107  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5108    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5109    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5110    break 2
5111  fi
5112done
5113  done
5114IFS=$as_save_IFS
5115
5116  ;;
5117esac
5118fi
5119CMP=$ac_cv_path_CMP
5120if test -n "$CMP"; then
5121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5122$as_echo "$CMP" >&6; }
5123else
5124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5125$as_echo "no" >&6; }
5126fi
5127
5128
5129  test -n "$CMP" && break
5130done
5131
5132  else
5133    # The variable is set, but is it from the command line or the environment?
5134
5135    # Try to remove the string !CMP! from our list.
5136    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5137    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5138      # If it failed, the variable was not from the command line. Ignore it,
5139      # but warn the user (except for BASH, which is always set by the calling BASH).
5140      if test "xCMP" != xBASH; then
5141        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5142$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5143      fi
5144      # Try to locate tool using the code snippet
5145      for ac_prog in cmp
5146do
5147  # Extract the first word of "$ac_prog", so it can be a program name with args.
5148set dummy $ac_prog; ac_word=$2
5149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5150$as_echo_n "checking for $ac_word... " >&6; }
5151if ${ac_cv_path_CMP+:} false; then :
5152  $as_echo_n "(cached) " >&6
5153else
5154  case $CMP in
5155  [\\/]* | ?:[\\/]*)
5156  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5157  ;;
5158  *)
5159  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5160for as_dir in $PATH
5161do
5162  IFS=$as_save_IFS
5163  test -z "$as_dir" && as_dir=.
5164    for ac_exec_ext in '' $ac_executable_extensions; do
5165  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5166    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5167    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5168    break 2
5169  fi
5170done
5171  done
5172IFS=$as_save_IFS
5173
5174  ;;
5175esac
5176fi
5177CMP=$ac_cv_path_CMP
5178if test -n "$CMP"; then
5179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5180$as_echo "$CMP" >&6; }
5181else
5182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5183$as_echo "no" >&6; }
5184fi
5185
5186
5187  test -n "$CMP" && break
5188done
5189
5190    else
5191      # If it succeeded, then it was overridden by the user. We will use it
5192      # for the tool.
5193
5194      # First remove it from the list of overridden variables, so we can test
5195      # for unknown variables in the end.
5196      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5197
5198      # Check if the provided tool contains a complete path.
5199      tool_specified="$CMP"
5200      tool_basename="${tool_specified##*/}"
5201      if test "x$tool_basename" = "x$tool_specified"; then
5202        # A command without a complete path is provided, search $PATH.
5203        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5204$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5205        # Extract the first word of "$tool_basename", so it can be a program name with args.
5206set dummy $tool_basename; ac_word=$2
5207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5208$as_echo_n "checking for $ac_word... " >&6; }
5209if ${ac_cv_path_CMP+:} false; then :
5210  $as_echo_n "(cached) " >&6
5211else
5212  case $CMP in
5213  [\\/]* | ?:[\\/]*)
5214  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5215  ;;
5216  *)
5217  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5218for as_dir in $PATH
5219do
5220  IFS=$as_save_IFS
5221  test -z "$as_dir" && as_dir=.
5222    for ac_exec_ext in '' $ac_executable_extensions; do
5223  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5224    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5226    break 2
5227  fi
5228done
5229  done
5230IFS=$as_save_IFS
5231
5232  ;;
5233esac
5234fi
5235CMP=$ac_cv_path_CMP
5236if test -n "$CMP"; then
5237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5238$as_echo "$CMP" >&6; }
5239else
5240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5241$as_echo "no" >&6; }
5242fi
5243
5244
5245        if test "x$CMP" = x; then
5246          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5247        fi
5248      else
5249        # Otherwise we believe it is a complete path. Use it as it is.
5250        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5251$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5252        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5253$as_echo_n "checking for CMP... " >&6; }
5254        if test ! -x "$tool_specified"; then
5255          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5256$as_echo "not found" >&6; }
5257          as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5258        fi
5259        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5260$as_echo "$tool_specified" >&6; }
5261      fi
5262    fi
5263  fi
5264
5265
5266
5267  if test "x$CMP" = x; then
5268    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5269  fi
5270
5271
5272
5273
5274
5275  # Publish this variable in the help.
5276
5277
5278  if test "x$COMM" = x; then
5279    # The variable is not set by user, try to locate tool using the code snippet
5280    for ac_prog in comm
5281do
5282  # Extract the first word of "$ac_prog", so it can be a program name with args.
5283set dummy $ac_prog; ac_word=$2
5284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5285$as_echo_n "checking for $ac_word... " >&6; }
5286if ${ac_cv_path_COMM+:} false; then :
5287  $as_echo_n "(cached) " >&6
5288else
5289  case $COMM in
5290  [\\/]* | ?:[\\/]*)
5291  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5292  ;;
5293  *)
5294  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5295for as_dir in $PATH
5296do
5297  IFS=$as_save_IFS
5298  test -z "$as_dir" && as_dir=.
5299    for ac_exec_ext in '' $ac_executable_extensions; do
5300  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5301    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5302    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5303    break 2
5304  fi
5305done
5306  done
5307IFS=$as_save_IFS
5308
5309  ;;
5310esac
5311fi
5312COMM=$ac_cv_path_COMM
5313if test -n "$COMM"; then
5314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5315$as_echo "$COMM" >&6; }
5316else
5317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5318$as_echo "no" >&6; }
5319fi
5320
5321
5322  test -n "$COMM" && break
5323done
5324
5325  else
5326    # The variable is set, but is it from the command line or the environment?
5327
5328    # Try to remove the string !COMM! from our list.
5329    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5330    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5331      # If it failed, the variable was not from the command line. Ignore it,
5332      # but warn the user (except for BASH, which is always set by the calling BASH).
5333      if test "xCOMM" != xBASH; then
5334        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5335$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5336      fi
5337      # Try to locate tool using the code snippet
5338      for ac_prog in comm
5339do
5340  # Extract the first word of "$ac_prog", so it can be a program name with args.
5341set dummy $ac_prog; ac_word=$2
5342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5343$as_echo_n "checking for $ac_word... " >&6; }
5344if ${ac_cv_path_COMM+:} false; then :
5345  $as_echo_n "(cached) " >&6
5346else
5347  case $COMM in
5348  [\\/]* | ?:[\\/]*)
5349  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5350  ;;
5351  *)
5352  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5353for as_dir in $PATH
5354do
5355  IFS=$as_save_IFS
5356  test -z "$as_dir" && as_dir=.
5357    for ac_exec_ext in '' $ac_executable_extensions; do
5358  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5359    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5360    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5361    break 2
5362  fi
5363done
5364  done
5365IFS=$as_save_IFS
5366
5367  ;;
5368esac
5369fi
5370COMM=$ac_cv_path_COMM
5371if test -n "$COMM"; then
5372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5373$as_echo "$COMM" >&6; }
5374else
5375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5376$as_echo "no" >&6; }
5377fi
5378
5379
5380  test -n "$COMM" && break
5381done
5382
5383    else
5384      # If it succeeded, then it was overridden by the user. We will use it
5385      # for the tool.
5386
5387      # First remove it from the list of overridden variables, so we can test
5388      # for unknown variables in the end.
5389      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5390
5391      # Check if the provided tool contains a complete path.
5392      tool_specified="$COMM"
5393      tool_basename="${tool_specified##*/}"
5394      if test "x$tool_basename" = "x$tool_specified"; then
5395        # A command without a complete path is provided, search $PATH.
5396        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5397$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5398        # Extract the first word of "$tool_basename", so it can be a program name with args.
5399set dummy $tool_basename; ac_word=$2
5400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5401$as_echo_n "checking for $ac_word... " >&6; }
5402if ${ac_cv_path_COMM+:} false; then :
5403  $as_echo_n "(cached) " >&6
5404else
5405  case $COMM in
5406  [\\/]* | ?:[\\/]*)
5407  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5408  ;;
5409  *)
5410  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5411for as_dir in $PATH
5412do
5413  IFS=$as_save_IFS
5414  test -z "$as_dir" && as_dir=.
5415    for ac_exec_ext in '' $ac_executable_extensions; do
5416  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5417    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5418    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5419    break 2
5420  fi
5421done
5422  done
5423IFS=$as_save_IFS
5424
5425  ;;
5426esac
5427fi
5428COMM=$ac_cv_path_COMM
5429if test -n "$COMM"; then
5430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5431$as_echo "$COMM" >&6; }
5432else
5433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5434$as_echo "no" >&6; }
5435fi
5436
5437
5438        if test "x$COMM" = x; then
5439          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5440        fi
5441      else
5442        # Otherwise we believe it is a complete path. Use it as it is.
5443        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5444$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5445        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5446$as_echo_n "checking for COMM... " >&6; }
5447        if test ! -x "$tool_specified"; then
5448          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5449$as_echo "not found" >&6; }
5450          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5451        fi
5452        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5453$as_echo "$tool_specified" >&6; }
5454      fi
5455    fi
5456  fi
5457
5458
5459
5460  if test "x$COMM" = x; then
5461    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5462  fi
5463
5464
5465
5466
5467
5468  # Publish this variable in the help.
5469
5470
5471  if test "x$CP" = x; then
5472    # The variable is not set by user, try to locate tool using the code snippet
5473    for ac_prog in cp
5474do
5475  # Extract the first word of "$ac_prog", so it can be a program name with args.
5476set dummy $ac_prog; ac_word=$2
5477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5478$as_echo_n "checking for $ac_word... " >&6; }
5479if ${ac_cv_path_CP+:} false; then :
5480  $as_echo_n "(cached) " >&6
5481else
5482  case $CP in
5483  [\\/]* | ?:[\\/]*)
5484  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5485  ;;
5486  *)
5487  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5488for as_dir in $PATH
5489do
5490  IFS=$as_save_IFS
5491  test -z "$as_dir" && as_dir=.
5492    for ac_exec_ext in '' $ac_executable_extensions; do
5493  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5494    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5495    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5496    break 2
5497  fi
5498done
5499  done
5500IFS=$as_save_IFS
5501
5502  ;;
5503esac
5504fi
5505CP=$ac_cv_path_CP
5506if test -n "$CP"; then
5507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5508$as_echo "$CP" >&6; }
5509else
5510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5511$as_echo "no" >&6; }
5512fi
5513
5514
5515  test -n "$CP" && break
5516done
5517
5518  else
5519    # The variable is set, but is it from the command line or the environment?
5520
5521    # Try to remove the string !CP! from our list.
5522    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5523    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5524      # If it failed, the variable was not from the command line. Ignore it,
5525      # but warn the user (except for BASH, which is always set by the calling BASH).
5526      if test "xCP" != xBASH; then
5527        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5528$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5529      fi
5530      # Try to locate tool using the code snippet
5531      for ac_prog in cp
5532do
5533  # Extract the first word of "$ac_prog", so it can be a program name with args.
5534set dummy $ac_prog; ac_word=$2
5535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5536$as_echo_n "checking for $ac_word... " >&6; }
5537if ${ac_cv_path_CP+:} false; then :
5538  $as_echo_n "(cached) " >&6
5539else
5540  case $CP in
5541  [\\/]* | ?:[\\/]*)
5542  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5543  ;;
5544  *)
5545  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5546for as_dir in $PATH
5547do
5548  IFS=$as_save_IFS
5549  test -z "$as_dir" && as_dir=.
5550    for ac_exec_ext in '' $ac_executable_extensions; do
5551  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5552    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5554    break 2
5555  fi
5556done
5557  done
5558IFS=$as_save_IFS
5559
5560  ;;
5561esac
5562fi
5563CP=$ac_cv_path_CP
5564if test -n "$CP"; then
5565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5566$as_echo "$CP" >&6; }
5567else
5568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5569$as_echo "no" >&6; }
5570fi
5571
5572
5573  test -n "$CP" && break
5574done
5575
5576    else
5577      # If it succeeded, then it was overridden by the user. We will use it
5578      # for the tool.
5579
5580      # First remove it from the list of overridden variables, so we can test
5581      # for unknown variables in the end.
5582      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5583
5584      # Check if the provided tool contains a complete path.
5585      tool_specified="$CP"
5586      tool_basename="${tool_specified##*/}"
5587      if test "x$tool_basename" = "x$tool_specified"; then
5588        # A command without a complete path is provided, search $PATH.
5589        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5590$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5591        # Extract the first word of "$tool_basename", so it can be a program name with args.
5592set dummy $tool_basename; ac_word=$2
5593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5594$as_echo_n "checking for $ac_word... " >&6; }
5595if ${ac_cv_path_CP+:} false; then :
5596  $as_echo_n "(cached) " >&6
5597else
5598  case $CP in
5599  [\\/]* | ?:[\\/]*)
5600  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5601  ;;
5602  *)
5603  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5604for as_dir in $PATH
5605do
5606  IFS=$as_save_IFS
5607  test -z "$as_dir" && as_dir=.
5608    for ac_exec_ext in '' $ac_executable_extensions; do
5609  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5610    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5611    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5612    break 2
5613  fi
5614done
5615  done
5616IFS=$as_save_IFS
5617
5618  ;;
5619esac
5620fi
5621CP=$ac_cv_path_CP
5622if test -n "$CP"; then
5623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5624$as_echo "$CP" >&6; }
5625else
5626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5627$as_echo "no" >&6; }
5628fi
5629
5630
5631        if test "x$CP" = x; then
5632          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5633        fi
5634      else
5635        # Otherwise we believe it is a complete path. Use it as it is.
5636        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5637$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5638        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5639$as_echo_n "checking for CP... " >&6; }
5640        if test ! -x "$tool_specified"; then
5641          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5642$as_echo "not found" >&6; }
5643          as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5644        fi
5645        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5646$as_echo "$tool_specified" >&6; }
5647      fi
5648    fi
5649  fi
5650
5651
5652
5653  if test "x$CP" = x; then
5654    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5655  fi
5656
5657
5658
5659
5660
5661  # Publish this variable in the help.
5662
5663
5664  if test "x$CPIO" = x; then
5665    # The variable is not set by user, try to locate tool using the code snippet
5666    for ac_prog in cpio
5667do
5668  # Extract the first word of "$ac_prog", so it can be a program name with args.
5669set dummy $ac_prog; ac_word=$2
5670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5671$as_echo_n "checking for $ac_word... " >&6; }
5672if ${ac_cv_path_CPIO+:} false; then :
5673  $as_echo_n "(cached) " >&6
5674else
5675  case $CPIO in
5676  [\\/]* | ?:[\\/]*)
5677  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5678  ;;
5679  *)
5680  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5681for as_dir in $PATH
5682do
5683  IFS=$as_save_IFS
5684  test -z "$as_dir" && as_dir=.
5685    for ac_exec_ext in '' $ac_executable_extensions; do
5686  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5687    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5688    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5689    break 2
5690  fi
5691done
5692  done
5693IFS=$as_save_IFS
5694
5695  ;;
5696esac
5697fi
5698CPIO=$ac_cv_path_CPIO
5699if test -n "$CPIO"; then
5700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5701$as_echo "$CPIO" >&6; }
5702else
5703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5704$as_echo "no" >&6; }
5705fi
5706
5707
5708  test -n "$CPIO" && break
5709done
5710
5711  else
5712    # The variable is set, but is it from the command line or the environment?
5713
5714    # Try to remove the string !CPIO! from our list.
5715    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
5716    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5717      # If it failed, the variable was not from the command line. Ignore it,
5718      # but warn the user (except for BASH, which is always set by the calling BASH).
5719      if test "xCPIO" != xBASH; then
5720        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
5721$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
5722      fi
5723      # Try to locate tool using the code snippet
5724      for ac_prog in cpio
5725do
5726  # Extract the first word of "$ac_prog", so it can be a program name with args.
5727set dummy $ac_prog; ac_word=$2
5728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5729$as_echo_n "checking for $ac_word... " >&6; }
5730if ${ac_cv_path_CPIO+:} false; then :
5731  $as_echo_n "(cached) " >&6
5732else
5733  case $CPIO in
5734  [\\/]* | ?:[\\/]*)
5735  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5736  ;;
5737  *)
5738  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5739for as_dir in $PATH
5740do
5741  IFS=$as_save_IFS
5742  test -z "$as_dir" && as_dir=.
5743    for ac_exec_ext in '' $ac_executable_extensions; do
5744  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5745    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5746    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5747    break 2
5748  fi
5749done
5750  done
5751IFS=$as_save_IFS
5752
5753  ;;
5754esac
5755fi
5756CPIO=$ac_cv_path_CPIO
5757if test -n "$CPIO"; then
5758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5759$as_echo "$CPIO" >&6; }
5760else
5761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5762$as_echo "no" >&6; }
5763fi
5764
5765
5766  test -n "$CPIO" && break
5767done
5768
5769    else
5770      # If it succeeded, then it was overridden by the user. We will use it
5771      # for the tool.
5772
5773      # First remove it from the list of overridden variables, so we can test
5774      # for unknown variables in the end.
5775      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5776
5777      # Check if the provided tool contains a complete path.
5778      tool_specified="$CPIO"
5779      tool_basename="${tool_specified##*/}"
5780      if test "x$tool_basename" = "x$tool_specified"; then
5781        # A command without a complete path is provided, search $PATH.
5782        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
5783$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
5784        # Extract the first word of "$tool_basename", so it can be a program name with args.
5785set dummy $tool_basename; ac_word=$2
5786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5787$as_echo_n "checking for $ac_word... " >&6; }
5788if ${ac_cv_path_CPIO+:} false; then :
5789  $as_echo_n "(cached) " >&6
5790else
5791  case $CPIO in
5792  [\\/]* | ?:[\\/]*)
5793  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5794  ;;
5795  *)
5796  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5797for as_dir in $PATH
5798do
5799  IFS=$as_save_IFS
5800  test -z "$as_dir" && as_dir=.
5801    for ac_exec_ext in '' $ac_executable_extensions; do
5802  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5803    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5804    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5805    break 2
5806  fi
5807done
5808  done
5809IFS=$as_save_IFS
5810
5811  ;;
5812esac
5813fi
5814CPIO=$ac_cv_path_CPIO
5815if test -n "$CPIO"; then
5816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5817$as_echo "$CPIO" >&6; }
5818else
5819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5820$as_echo "no" >&6; }
5821fi
5822
5823
5824        if test "x$CPIO" = x; then
5825          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5826        fi
5827      else
5828        # Otherwise we believe it is a complete path. Use it as it is.
5829        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
5830$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
5831        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
5832$as_echo_n "checking for CPIO... " >&6; }
5833        if test ! -x "$tool_specified"; then
5834          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5835$as_echo "not found" >&6; }
5836          as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
5837        fi
5838        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5839$as_echo "$tool_specified" >&6; }
5840      fi
5841    fi
5842  fi
5843
5844
5845
5846  if test "x$CPIO" = x; then
5847    as_fn_error $? "Could not find required tool for CPIO" "$LINENO" 5
5848  fi
5849
5850
5851
5852
5853
5854  # Publish this variable in the help.
5855
5856
5857  if test "x$CUT" = x; then
5858    # The variable is not set by user, try to locate tool using the code snippet
5859    for ac_prog in cut
5860do
5861  # Extract the first word of "$ac_prog", so it can be a program name with args.
5862set dummy $ac_prog; ac_word=$2
5863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5864$as_echo_n "checking for $ac_word... " >&6; }
5865if ${ac_cv_path_CUT+:} false; then :
5866  $as_echo_n "(cached) " >&6
5867else
5868  case $CUT in
5869  [\\/]* | ?:[\\/]*)
5870  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5871  ;;
5872  *)
5873  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5874for as_dir in $PATH
5875do
5876  IFS=$as_save_IFS
5877  test -z "$as_dir" && as_dir=.
5878    for ac_exec_ext in '' $ac_executable_extensions; do
5879  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5880    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5881    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5882    break 2
5883  fi
5884done
5885  done
5886IFS=$as_save_IFS
5887
5888  ;;
5889esac
5890fi
5891CUT=$ac_cv_path_CUT
5892if test -n "$CUT"; then
5893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5894$as_echo "$CUT" >&6; }
5895else
5896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5897$as_echo "no" >&6; }
5898fi
5899
5900
5901  test -n "$CUT" && break
5902done
5903
5904  else
5905    # The variable is set, but is it from the command line or the environment?
5906
5907    # Try to remove the string !CUT! from our list.
5908    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5909    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5910      # If it failed, the variable was not from the command line. Ignore it,
5911      # but warn the user (except for BASH, which is always set by the calling BASH).
5912      if test "xCUT" != xBASH; then
5913        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5914$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5915      fi
5916      # Try to locate tool using the code snippet
5917      for ac_prog in cut
5918do
5919  # Extract the first word of "$ac_prog", so it can be a program name with args.
5920set dummy $ac_prog; ac_word=$2
5921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5922$as_echo_n "checking for $ac_word... " >&6; }
5923if ${ac_cv_path_CUT+:} false; then :
5924  $as_echo_n "(cached) " >&6
5925else
5926  case $CUT in
5927  [\\/]* | ?:[\\/]*)
5928  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5929  ;;
5930  *)
5931  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5932for as_dir in $PATH
5933do
5934  IFS=$as_save_IFS
5935  test -z "$as_dir" && as_dir=.
5936    for ac_exec_ext in '' $ac_executable_extensions; do
5937  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5938    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5939    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5940    break 2
5941  fi
5942done
5943  done
5944IFS=$as_save_IFS
5945
5946  ;;
5947esac
5948fi
5949CUT=$ac_cv_path_CUT
5950if test -n "$CUT"; then
5951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5952$as_echo "$CUT" >&6; }
5953else
5954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5955$as_echo "no" >&6; }
5956fi
5957
5958
5959  test -n "$CUT" && break
5960done
5961
5962    else
5963      # If it succeeded, then it was overridden by the user. We will use it
5964      # for the tool.
5965
5966      # First remove it from the list of overridden variables, so we can test
5967      # for unknown variables in the end.
5968      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5969
5970      # Check if the provided tool contains a complete path.
5971      tool_specified="$CUT"
5972      tool_basename="${tool_specified##*/}"
5973      if test "x$tool_basename" = "x$tool_specified"; then
5974        # A command without a complete path is provided, search $PATH.
5975        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5976$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5977        # Extract the first word of "$tool_basename", so it can be a program name with args.
5978set dummy $tool_basename; ac_word=$2
5979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5980$as_echo_n "checking for $ac_word... " >&6; }
5981if ${ac_cv_path_CUT+:} false; then :
5982  $as_echo_n "(cached) " >&6
5983else
5984  case $CUT in
5985  [\\/]* | ?:[\\/]*)
5986  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5987  ;;
5988  *)
5989  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5990for as_dir in $PATH
5991do
5992  IFS=$as_save_IFS
5993  test -z "$as_dir" && as_dir=.
5994    for ac_exec_ext in '' $ac_executable_extensions; do
5995  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5996    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5997    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5998    break 2
5999  fi
6000done
6001  done
6002IFS=$as_save_IFS
6003
6004  ;;
6005esac
6006fi
6007CUT=$ac_cv_path_CUT
6008if test -n "$CUT"; then
6009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6010$as_echo "$CUT" >&6; }
6011else
6012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6013$as_echo "no" >&6; }
6014fi
6015
6016
6017        if test "x$CUT" = x; then
6018          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6019        fi
6020      else
6021        # Otherwise we believe it is a complete path. Use it as it is.
6022        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6023$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6024        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6025$as_echo_n "checking for CUT... " >&6; }
6026        if test ! -x "$tool_specified"; then
6027          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6028$as_echo "not found" >&6; }
6029          as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6030        fi
6031        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6032$as_echo "$tool_specified" >&6; }
6033      fi
6034    fi
6035  fi
6036
6037
6038
6039  if test "x$CUT" = x; then
6040    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6041  fi
6042
6043
6044
6045
6046
6047  # Publish this variable in the help.
6048
6049
6050  if test "x$DATE" = x; then
6051    # The variable is not set by user, try to locate tool using the code snippet
6052    for ac_prog in date
6053do
6054  # Extract the first word of "$ac_prog", so it can be a program name with args.
6055set dummy $ac_prog; ac_word=$2
6056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6057$as_echo_n "checking for $ac_word... " >&6; }
6058if ${ac_cv_path_DATE+:} false; then :
6059  $as_echo_n "(cached) " >&6
6060else
6061  case $DATE in
6062  [\\/]* | ?:[\\/]*)
6063  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6064  ;;
6065  *)
6066  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6067for as_dir in $PATH
6068do
6069  IFS=$as_save_IFS
6070  test -z "$as_dir" && as_dir=.
6071    for ac_exec_ext in '' $ac_executable_extensions; do
6072  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6073    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6074    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6075    break 2
6076  fi
6077done
6078  done
6079IFS=$as_save_IFS
6080
6081  ;;
6082esac
6083fi
6084DATE=$ac_cv_path_DATE
6085if test -n "$DATE"; then
6086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6087$as_echo "$DATE" >&6; }
6088else
6089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6090$as_echo "no" >&6; }
6091fi
6092
6093
6094  test -n "$DATE" && break
6095done
6096
6097  else
6098    # The variable is set, but is it from the command line or the environment?
6099
6100    # Try to remove the string !DATE! from our list.
6101    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6102    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6103      # If it failed, the variable was not from the command line. Ignore it,
6104      # but warn the user (except for BASH, which is always set by the calling BASH).
6105      if test "xDATE" != xBASH; then
6106        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6107$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6108      fi
6109      # Try to locate tool using the code snippet
6110      for ac_prog in date
6111do
6112  # Extract the first word of "$ac_prog", so it can be a program name with args.
6113set dummy $ac_prog; ac_word=$2
6114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6115$as_echo_n "checking for $ac_word... " >&6; }
6116if ${ac_cv_path_DATE+:} false; then :
6117  $as_echo_n "(cached) " >&6
6118else
6119  case $DATE in
6120  [\\/]* | ?:[\\/]*)
6121  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6122  ;;
6123  *)
6124  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6125for as_dir in $PATH
6126do
6127  IFS=$as_save_IFS
6128  test -z "$as_dir" && as_dir=.
6129    for ac_exec_ext in '' $ac_executable_extensions; do
6130  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6131    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6132    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6133    break 2
6134  fi
6135done
6136  done
6137IFS=$as_save_IFS
6138
6139  ;;
6140esac
6141fi
6142DATE=$ac_cv_path_DATE
6143if test -n "$DATE"; then
6144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6145$as_echo "$DATE" >&6; }
6146else
6147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6148$as_echo "no" >&6; }
6149fi
6150
6151
6152  test -n "$DATE" && break
6153done
6154
6155    else
6156      # If it succeeded, then it was overridden by the user. We will use it
6157      # for the tool.
6158
6159      # First remove it from the list of overridden variables, so we can test
6160      # for unknown variables in the end.
6161      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6162
6163      # Check if the provided tool contains a complete path.
6164      tool_specified="$DATE"
6165      tool_basename="${tool_specified##*/}"
6166      if test "x$tool_basename" = "x$tool_specified"; then
6167        # A command without a complete path is provided, search $PATH.
6168        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6169$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6170        # Extract the first word of "$tool_basename", so it can be a program name with args.
6171set dummy $tool_basename; ac_word=$2
6172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6173$as_echo_n "checking for $ac_word... " >&6; }
6174if ${ac_cv_path_DATE+:} false; then :
6175  $as_echo_n "(cached) " >&6
6176else
6177  case $DATE in
6178  [\\/]* | ?:[\\/]*)
6179  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6180  ;;
6181  *)
6182  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6183for as_dir in $PATH
6184do
6185  IFS=$as_save_IFS
6186  test -z "$as_dir" && as_dir=.
6187    for ac_exec_ext in '' $ac_executable_extensions; do
6188  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6189    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6190    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6191    break 2
6192  fi
6193done
6194  done
6195IFS=$as_save_IFS
6196
6197  ;;
6198esac
6199fi
6200DATE=$ac_cv_path_DATE
6201if test -n "$DATE"; then
6202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6203$as_echo "$DATE" >&6; }
6204else
6205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6206$as_echo "no" >&6; }
6207fi
6208
6209
6210        if test "x$DATE" = x; then
6211          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6212        fi
6213      else
6214        # Otherwise we believe it is a complete path. Use it as it is.
6215        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6216$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6217        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6218$as_echo_n "checking for DATE... " >&6; }
6219        if test ! -x "$tool_specified"; then
6220          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6221$as_echo "not found" >&6; }
6222          as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6223        fi
6224        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6225$as_echo "$tool_specified" >&6; }
6226      fi
6227    fi
6228  fi
6229
6230
6231
6232  if test "x$DATE" = x; then
6233    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6234  fi
6235
6236
6237
6238
6239
6240  # Publish this variable in the help.
6241
6242
6243  if test "x$DIFF" = x; then
6244    # The variable is not set by user, try to locate tool using the code snippet
6245    for ac_prog in gdiff diff
6246do
6247  # Extract the first word of "$ac_prog", so it can be a program name with args.
6248set dummy $ac_prog; ac_word=$2
6249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6250$as_echo_n "checking for $ac_word... " >&6; }
6251if ${ac_cv_path_DIFF+:} false; then :
6252  $as_echo_n "(cached) " >&6
6253else
6254  case $DIFF in
6255  [\\/]* | ?:[\\/]*)
6256  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6257  ;;
6258  *)
6259  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6260for as_dir in $PATH
6261do
6262  IFS=$as_save_IFS
6263  test -z "$as_dir" && as_dir=.
6264    for ac_exec_ext in '' $ac_executable_extensions; do
6265  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6266    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6267    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6268    break 2
6269  fi
6270done
6271  done
6272IFS=$as_save_IFS
6273
6274  ;;
6275esac
6276fi
6277DIFF=$ac_cv_path_DIFF
6278if test -n "$DIFF"; then
6279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6280$as_echo "$DIFF" >&6; }
6281else
6282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6283$as_echo "no" >&6; }
6284fi
6285
6286
6287  test -n "$DIFF" && break
6288done
6289
6290  else
6291    # The variable is set, but is it from the command line or the environment?
6292
6293    # Try to remove the string !DIFF! from our list.
6294    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6295    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6296      # If it failed, the variable was not from the command line. Ignore it,
6297      # but warn the user (except for BASH, which is always set by the calling BASH).
6298      if test "xDIFF" != xBASH; then
6299        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6300$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6301      fi
6302      # Try to locate tool using the code snippet
6303      for ac_prog in gdiff diff
6304do
6305  # Extract the first word of "$ac_prog", so it can be a program name with args.
6306set dummy $ac_prog; ac_word=$2
6307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6308$as_echo_n "checking for $ac_word... " >&6; }
6309if ${ac_cv_path_DIFF+:} false; then :
6310  $as_echo_n "(cached) " >&6
6311else
6312  case $DIFF in
6313  [\\/]* | ?:[\\/]*)
6314  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6315  ;;
6316  *)
6317  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6318for as_dir in $PATH
6319do
6320  IFS=$as_save_IFS
6321  test -z "$as_dir" && as_dir=.
6322    for ac_exec_ext in '' $ac_executable_extensions; do
6323  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6324    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6325    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6326    break 2
6327  fi
6328done
6329  done
6330IFS=$as_save_IFS
6331
6332  ;;
6333esac
6334fi
6335DIFF=$ac_cv_path_DIFF
6336if test -n "$DIFF"; then
6337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6338$as_echo "$DIFF" >&6; }
6339else
6340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6341$as_echo "no" >&6; }
6342fi
6343
6344
6345  test -n "$DIFF" && break
6346done
6347
6348    else
6349      # If it succeeded, then it was overridden by the user. We will use it
6350      # for the tool.
6351
6352      # First remove it from the list of overridden variables, so we can test
6353      # for unknown variables in the end.
6354      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6355
6356      # Check if the provided tool contains a complete path.
6357      tool_specified="$DIFF"
6358      tool_basename="${tool_specified##*/}"
6359      if test "x$tool_basename" = "x$tool_specified"; then
6360        # A command without a complete path is provided, search $PATH.
6361        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6362$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6363        # Extract the first word of "$tool_basename", so it can be a program name with args.
6364set dummy $tool_basename; ac_word=$2
6365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6366$as_echo_n "checking for $ac_word... " >&6; }
6367if ${ac_cv_path_DIFF+:} false; then :
6368  $as_echo_n "(cached) " >&6
6369else
6370  case $DIFF in
6371  [\\/]* | ?:[\\/]*)
6372  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6373  ;;
6374  *)
6375  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6376for as_dir in $PATH
6377do
6378  IFS=$as_save_IFS
6379  test -z "$as_dir" && as_dir=.
6380    for ac_exec_ext in '' $ac_executable_extensions; do
6381  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6382    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6383    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6384    break 2
6385  fi
6386done
6387  done
6388IFS=$as_save_IFS
6389
6390  ;;
6391esac
6392fi
6393DIFF=$ac_cv_path_DIFF
6394if test -n "$DIFF"; then
6395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6396$as_echo "$DIFF" >&6; }
6397else
6398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6399$as_echo "no" >&6; }
6400fi
6401
6402
6403        if test "x$DIFF" = x; then
6404          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6405        fi
6406      else
6407        # Otherwise we believe it is a complete path. Use it as it is.
6408        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6409$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6410        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6411$as_echo_n "checking for DIFF... " >&6; }
6412        if test ! -x "$tool_specified"; then
6413          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6414$as_echo "not found" >&6; }
6415          as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6416        fi
6417        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6418$as_echo "$tool_specified" >&6; }
6419      fi
6420    fi
6421  fi
6422
6423
6424
6425  if test "x$DIFF" = x; then
6426    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6427  fi
6428
6429
6430
6431
6432
6433  # Publish this variable in the help.
6434
6435
6436  if test "x$DIRNAME" = x; then
6437    # The variable is not set by user, try to locate tool using the code snippet
6438    for ac_prog in dirname
6439do
6440  # Extract the first word of "$ac_prog", so it can be a program name with args.
6441set dummy $ac_prog; ac_word=$2
6442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6443$as_echo_n "checking for $ac_word... " >&6; }
6444if ${ac_cv_path_DIRNAME+:} false; then :
6445  $as_echo_n "(cached) " >&6
6446else
6447  case $DIRNAME in
6448  [\\/]* | ?:[\\/]*)
6449  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6450  ;;
6451  *)
6452  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6453for as_dir in $PATH
6454do
6455  IFS=$as_save_IFS
6456  test -z "$as_dir" && as_dir=.
6457    for ac_exec_ext in '' $ac_executable_extensions; do
6458  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6459    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6460    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6461    break 2
6462  fi
6463done
6464  done
6465IFS=$as_save_IFS
6466
6467  ;;
6468esac
6469fi
6470DIRNAME=$ac_cv_path_DIRNAME
6471if test -n "$DIRNAME"; then
6472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6473$as_echo "$DIRNAME" >&6; }
6474else
6475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6476$as_echo "no" >&6; }
6477fi
6478
6479
6480  test -n "$DIRNAME" && break
6481done
6482
6483  else
6484    # The variable is set, but is it from the command line or the environment?
6485
6486    # Try to remove the string !DIRNAME! from our list.
6487    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6488    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6489      # If it failed, the variable was not from the command line. Ignore it,
6490      # but warn the user (except for BASH, which is always set by the calling BASH).
6491      if test "xDIRNAME" != xBASH; then
6492        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6493$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6494      fi
6495      # Try to locate tool using the code snippet
6496      for ac_prog in dirname
6497do
6498  # Extract the first word of "$ac_prog", so it can be a program name with args.
6499set dummy $ac_prog; ac_word=$2
6500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6501$as_echo_n "checking for $ac_word... " >&6; }
6502if ${ac_cv_path_DIRNAME+:} false; then :
6503  $as_echo_n "(cached) " >&6
6504else
6505  case $DIRNAME in
6506  [\\/]* | ?:[\\/]*)
6507  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6508  ;;
6509  *)
6510  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6511for as_dir in $PATH
6512do
6513  IFS=$as_save_IFS
6514  test -z "$as_dir" && as_dir=.
6515    for ac_exec_ext in '' $ac_executable_extensions; do
6516  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6517    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6518    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6519    break 2
6520  fi
6521done
6522  done
6523IFS=$as_save_IFS
6524
6525  ;;
6526esac
6527fi
6528DIRNAME=$ac_cv_path_DIRNAME
6529if test -n "$DIRNAME"; then
6530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6531$as_echo "$DIRNAME" >&6; }
6532else
6533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6534$as_echo "no" >&6; }
6535fi
6536
6537
6538  test -n "$DIRNAME" && break
6539done
6540
6541    else
6542      # If it succeeded, then it was overridden by the user. We will use it
6543      # for the tool.
6544
6545      # First remove it from the list of overridden variables, so we can test
6546      # for unknown variables in the end.
6547      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6548
6549      # Check if the provided tool contains a complete path.
6550      tool_specified="$DIRNAME"
6551      tool_basename="${tool_specified##*/}"
6552      if test "x$tool_basename" = "x$tool_specified"; then
6553        # A command without a complete path is provided, search $PATH.
6554        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6555$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6556        # Extract the first word of "$tool_basename", so it can be a program name with args.
6557set dummy $tool_basename; ac_word=$2
6558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6559$as_echo_n "checking for $ac_word... " >&6; }
6560if ${ac_cv_path_DIRNAME+:} false; then :
6561  $as_echo_n "(cached) " >&6
6562else
6563  case $DIRNAME in
6564  [\\/]* | ?:[\\/]*)
6565  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6566  ;;
6567  *)
6568  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6569for as_dir in $PATH
6570do
6571  IFS=$as_save_IFS
6572  test -z "$as_dir" && as_dir=.
6573    for ac_exec_ext in '' $ac_executable_extensions; do
6574  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6575    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6576    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6577    break 2
6578  fi
6579done
6580  done
6581IFS=$as_save_IFS
6582
6583  ;;
6584esac
6585fi
6586DIRNAME=$ac_cv_path_DIRNAME
6587if test -n "$DIRNAME"; then
6588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6589$as_echo "$DIRNAME" >&6; }
6590else
6591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6592$as_echo "no" >&6; }
6593fi
6594
6595
6596        if test "x$DIRNAME" = x; then
6597          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6598        fi
6599      else
6600        # Otherwise we believe it is a complete path. Use it as it is.
6601        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6602$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6603        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6604$as_echo_n "checking for DIRNAME... " >&6; }
6605        if test ! -x "$tool_specified"; then
6606          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6607$as_echo "not found" >&6; }
6608          as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6609        fi
6610        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6611$as_echo "$tool_specified" >&6; }
6612      fi
6613    fi
6614  fi
6615
6616
6617
6618  if test "x$DIRNAME" = x; then
6619    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6620  fi
6621
6622
6623
6624
6625
6626  # Publish this variable in the help.
6627
6628
6629  if test "x$ECHO" = x; then
6630    # The variable is not set by user, try to locate tool using the code snippet
6631    for ac_prog in echo
6632do
6633  # Extract the first word of "$ac_prog", so it can be a program name with args.
6634set dummy $ac_prog; ac_word=$2
6635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6636$as_echo_n "checking for $ac_word... " >&6; }
6637if ${ac_cv_path_ECHO+:} false; then :
6638  $as_echo_n "(cached) " >&6
6639else
6640  case $ECHO in
6641  [\\/]* | ?:[\\/]*)
6642  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6643  ;;
6644  *)
6645  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6646for as_dir in $PATH
6647do
6648  IFS=$as_save_IFS
6649  test -z "$as_dir" && as_dir=.
6650    for ac_exec_ext in '' $ac_executable_extensions; do
6651  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6652    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6653    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6654    break 2
6655  fi
6656done
6657  done
6658IFS=$as_save_IFS
6659
6660  ;;
6661esac
6662fi
6663ECHO=$ac_cv_path_ECHO
6664if test -n "$ECHO"; then
6665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6666$as_echo "$ECHO" >&6; }
6667else
6668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6669$as_echo "no" >&6; }
6670fi
6671
6672
6673  test -n "$ECHO" && break
6674done
6675
6676  else
6677    # The variable is set, but is it from the command line or the environment?
6678
6679    # Try to remove the string !ECHO! from our list.
6680    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6681    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6682      # If it failed, the variable was not from the command line. Ignore it,
6683      # but warn the user (except for BASH, which is always set by the calling BASH).
6684      if test "xECHO" != xBASH; then
6685        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6686$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6687      fi
6688      # Try to locate tool using the code snippet
6689      for ac_prog in echo
6690do
6691  # Extract the first word of "$ac_prog", so it can be a program name with args.
6692set dummy $ac_prog; ac_word=$2
6693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6694$as_echo_n "checking for $ac_word... " >&6; }
6695if ${ac_cv_path_ECHO+:} false; then :
6696  $as_echo_n "(cached) " >&6
6697else
6698  case $ECHO in
6699  [\\/]* | ?:[\\/]*)
6700  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6701  ;;
6702  *)
6703  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6704for as_dir in $PATH
6705do
6706  IFS=$as_save_IFS
6707  test -z "$as_dir" && as_dir=.
6708    for ac_exec_ext in '' $ac_executable_extensions; do
6709  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6710    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6711    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6712    break 2
6713  fi
6714done
6715  done
6716IFS=$as_save_IFS
6717
6718  ;;
6719esac
6720fi
6721ECHO=$ac_cv_path_ECHO
6722if test -n "$ECHO"; then
6723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6724$as_echo "$ECHO" >&6; }
6725else
6726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6727$as_echo "no" >&6; }
6728fi
6729
6730
6731  test -n "$ECHO" && break
6732done
6733
6734    else
6735      # If it succeeded, then it was overridden by the user. We will use it
6736      # for the tool.
6737
6738      # First remove it from the list of overridden variables, so we can test
6739      # for unknown variables in the end.
6740      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6741
6742      # Check if the provided tool contains a complete path.
6743      tool_specified="$ECHO"
6744      tool_basename="${tool_specified##*/}"
6745      if test "x$tool_basename" = "x$tool_specified"; then
6746        # A command without a complete path is provided, search $PATH.
6747        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6748$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6749        # Extract the first word of "$tool_basename", so it can be a program name with args.
6750set dummy $tool_basename; ac_word=$2
6751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6752$as_echo_n "checking for $ac_word... " >&6; }
6753if ${ac_cv_path_ECHO+:} false; then :
6754  $as_echo_n "(cached) " >&6
6755else
6756  case $ECHO in
6757  [\\/]* | ?:[\\/]*)
6758  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6759  ;;
6760  *)
6761  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6762for as_dir in $PATH
6763do
6764  IFS=$as_save_IFS
6765  test -z "$as_dir" && as_dir=.
6766    for ac_exec_ext in '' $ac_executable_extensions; do
6767  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6768    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6769    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6770    break 2
6771  fi
6772done
6773  done
6774IFS=$as_save_IFS
6775
6776  ;;
6777esac
6778fi
6779ECHO=$ac_cv_path_ECHO
6780if test -n "$ECHO"; then
6781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6782$as_echo "$ECHO" >&6; }
6783else
6784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6785$as_echo "no" >&6; }
6786fi
6787
6788
6789        if test "x$ECHO" = x; then
6790          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6791        fi
6792      else
6793        # Otherwise we believe it is a complete path. Use it as it is.
6794        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6795$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6796        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6797$as_echo_n "checking for ECHO... " >&6; }
6798        if test ! -x "$tool_specified"; then
6799          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6800$as_echo "not found" >&6; }
6801          as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6802        fi
6803        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6804$as_echo "$tool_specified" >&6; }
6805      fi
6806    fi
6807  fi
6808
6809
6810
6811  if test "x$ECHO" = x; then
6812    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6813  fi
6814
6815
6816
6817
6818
6819  # Publish this variable in the help.
6820
6821
6822  if test "x$EXPR" = x; then
6823    # The variable is not set by user, try to locate tool using the code snippet
6824    for ac_prog in expr
6825do
6826  # Extract the first word of "$ac_prog", so it can be a program name with args.
6827set dummy $ac_prog; ac_word=$2
6828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6829$as_echo_n "checking for $ac_word... " >&6; }
6830if ${ac_cv_path_EXPR+:} false; then :
6831  $as_echo_n "(cached) " >&6
6832else
6833  case $EXPR in
6834  [\\/]* | ?:[\\/]*)
6835  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6836  ;;
6837  *)
6838  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6839for as_dir in $PATH
6840do
6841  IFS=$as_save_IFS
6842  test -z "$as_dir" && as_dir=.
6843    for ac_exec_ext in '' $ac_executable_extensions; do
6844  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6845    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6846    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6847    break 2
6848  fi
6849done
6850  done
6851IFS=$as_save_IFS
6852
6853  ;;
6854esac
6855fi
6856EXPR=$ac_cv_path_EXPR
6857if test -n "$EXPR"; then
6858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6859$as_echo "$EXPR" >&6; }
6860else
6861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6862$as_echo "no" >&6; }
6863fi
6864
6865
6866  test -n "$EXPR" && break
6867done
6868
6869  else
6870    # The variable is set, but is it from the command line or the environment?
6871
6872    # Try to remove the string !EXPR! from our list.
6873    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6874    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6875      # If it failed, the variable was not from the command line. Ignore it,
6876      # but warn the user (except for BASH, which is always set by the calling BASH).
6877      if test "xEXPR" != xBASH; then
6878        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6879$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6880      fi
6881      # Try to locate tool using the code snippet
6882      for ac_prog in expr
6883do
6884  # Extract the first word of "$ac_prog", so it can be a program name with args.
6885set dummy $ac_prog; ac_word=$2
6886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6887$as_echo_n "checking for $ac_word... " >&6; }
6888if ${ac_cv_path_EXPR+:} false; then :
6889  $as_echo_n "(cached) " >&6
6890else
6891  case $EXPR in
6892  [\\/]* | ?:[\\/]*)
6893  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6894  ;;
6895  *)
6896  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6897for as_dir in $PATH
6898do
6899  IFS=$as_save_IFS
6900  test -z "$as_dir" && as_dir=.
6901    for ac_exec_ext in '' $ac_executable_extensions; do
6902  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6903    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6904    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6905    break 2
6906  fi
6907done
6908  done
6909IFS=$as_save_IFS
6910
6911  ;;
6912esac
6913fi
6914EXPR=$ac_cv_path_EXPR
6915if test -n "$EXPR"; then
6916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6917$as_echo "$EXPR" >&6; }
6918else
6919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6920$as_echo "no" >&6; }
6921fi
6922
6923
6924  test -n "$EXPR" && break
6925done
6926
6927    else
6928      # If it succeeded, then it was overridden by the user. We will use it
6929      # for the tool.
6930
6931      # First remove it from the list of overridden variables, so we can test
6932      # for unknown variables in the end.
6933      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6934
6935      # Check if the provided tool contains a complete path.
6936      tool_specified="$EXPR"
6937      tool_basename="${tool_specified##*/}"
6938      if test "x$tool_basename" = "x$tool_specified"; then
6939        # A command without a complete path is provided, search $PATH.
6940        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6941$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6942        # Extract the first word of "$tool_basename", so it can be a program name with args.
6943set dummy $tool_basename; ac_word=$2
6944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6945$as_echo_n "checking for $ac_word... " >&6; }
6946if ${ac_cv_path_EXPR+:} false; then :
6947  $as_echo_n "(cached) " >&6
6948else
6949  case $EXPR in
6950  [\\/]* | ?:[\\/]*)
6951  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6952  ;;
6953  *)
6954  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6955for as_dir in $PATH
6956do
6957  IFS=$as_save_IFS
6958  test -z "$as_dir" && as_dir=.
6959    for ac_exec_ext in '' $ac_executable_extensions; do
6960  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6961    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6962    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6963    break 2
6964  fi
6965done
6966  done
6967IFS=$as_save_IFS
6968
6969  ;;
6970esac
6971fi
6972EXPR=$ac_cv_path_EXPR
6973if test -n "$EXPR"; then
6974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6975$as_echo "$EXPR" >&6; }
6976else
6977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6978$as_echo "no" >&6; }
6979fi
6980
6981
6982        if test "x$EXPR" = x; then
6983          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6984        fi
6985      else
6986        # Otherwise we believe it is a complete path. Use it as it is.
6987        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6988$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6989        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6990$as_echo_n "checking for EXPR... " >&6; }
6991        if test ! -x "$tool_specified"; then
6992          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6993$as_echo "not found" >&6; }
6994          as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6995        fi
6996        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6997$as_echo "$tool_specified" >&6; }
6998      fi
6999    fi
7000  fi
7001
7002
7003
7004  if test "x$EXPR" = x; then
7005    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7006  fi
7007
7008
7009
7010
7011
7012  # Publish this variable in the help.
7013
7014
7015  if test "x$FILE" = x; then
7016    # The variable is not set by user, try to locate tool using the code snippet
7017    for ac_prog in file
7018do
7019  # Extract the first word of "$ac_prog", so it can be a program name with args.
7020set dummy $ac_prog; ac_word=$2
7021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7022$as_echo_n "checking for $ac_word... " >&6; }
7023if ${ac_cv_path_FILE+:} false; then :
7024  $as_echo_n "(cached) " >&6
7025else
7026  case $FILE in
7027  [\\/]* | ?:[\\/]*)
7028  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7029  ;;
7030  *)
7031  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7032for as_dir in $PATH
7033do
7034  IFS=$as_save_IFS
7035  test -z "$as_dir" && as_dir=.
7036    for ac_exec_ext in '' $ac_executable_extensions; do
7037  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7038    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7039    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7040    break 2
7041  fi
7042done
7043  done
7044IFS=$as_save_IFS
7045
7046  ;;
7047esac
7048fi
7049FILE=$ac_cv_path_FILE
7050if test -n "$FILE"; then
7051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7052$as_echo "$FILE" >&6; }
7053else
7054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7055$as_echo "no" >&6; }
7056fi
7057
7058
7059  test -n "$FILE" && break
7060done
7061
7062  else
7063    # The variable is set, but is it from the command line or the environment?
7064
7065    # Try to remove the string !FILE! from our list.
7066    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7067    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7068      # If it failed, the variable was not from the command line. Ignore it,
7069      # but warn the user (except for BASH, which is always set by the calling BASH).
7070      if test "xFILE" != xBASH; then
7071        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7072$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7073      fi
7074      # Try to locate tool using the code snippet
7075      for ac_prog in file
7076do
7077  # Extract the first word of "$ac_prog", so it can be a program name with args.
7078set dummy $ac_prog; ac_word=$2
7079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7080$as_echo_n "checking for $ac_word... " >&6; }
7081if ${ac_cv_path_FILE+:} false; then :
7082  $as_echo_n "(cached) " >&6
7083else
7084  case $FILE in
7085  [\\/]* | ?:[\\/]*)
7086  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7087  ;;
7088  *)
7089  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7090for as_dir in $PATH
7091do
7092  IFS=$as_save_IFS
7093  test -z "$as_dir" && as_dir=.
7094    for ac_exec_ext in '' $ac_executable_extensions; do
7095  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7096    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7097    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7098    break 2
7099  fi
7100done
7101  done
7102IFS=$as_save_IFS
7103
7104  ;;
7105esac
7106fi
7107FILE=$ac_cv_path_FILE
7108if test -n "$FILE"; then
7109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7110$as_echo "$FILE" >&6; }
7111else
7112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7113$as_echo "no" >&6; }
7114fi
7115
7116
7117  test -n "$FILE" && break
7118done
7119
7120    else
7121      # If it succeeded, then it was overridden by the user. We will use it
7122      # for the tool.
7123
7124      # First remove it from the list of overridden variables, so we can test
7125      # for unknown variables in the end.
7126      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7127
7128      # Check if the provided tool contains a complete path.
7129      tool_specified="$FILE"
7130      tool_basename="${tool_specified##*/}"
7131      if test "x$tool_basename" = "x$tool_specified"; then
7132        # A command without a complete path is provided, search $PATH.
7133        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7134$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7135        # Extract the first word of "$tool_basename", so it can be a program name with args.
7136set dummy $tool_basename; ac_word=$2
7137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7138$as_echo_n "checking for $ac_word... " >&6; }
7139if ${ac_cv_path_FILE+:} false; then :
7140  $as_echo_n "(cached) " >&6
7141else
7142  case $FILE in
7143  [\\/]* | ?:[\\/]*)
7144  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7145  ;;
7146  *)
7147  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7148for as_dir in $PATH
7149do
7150  IFS=$as_save_IFS
7151  test -z "$as_dir" && as_dir=.
7152    for ac_exec_ext in '' $ac_executable_extensions; do
7153  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7154    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7155    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7156    break 2
7157  fi
7158done
7159  done
7160IFS=$as_save_IFS
7161
7162  ;;
7163esac
7164fi
7165FILE=$ac_cv_path_FILE
7166if test -n "$FILE"; then
7167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7168$as_echo "$FILE" >&6; }
7169else
7170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7171$as_echo "no" >&6; }
7172fi
7173
7174
7175        if test "x$FILE" = x; then
7176          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7177        fi
7178      else
7179        # Otherwise we believe it is a complete path. Use it as it is.
7180        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7181$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7182        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7183$as_echo_n "checking for FILE... " >&6; }
7184        if test ! -x "$tool_specified"; then
7185          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7186$as_echo "not found" >&6; }
7187          as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7188        fi
7189        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7190$as_echo "$tool_specified" >&6; }
7191      fi
7192    fi
7193  fi
7194
7195
7196
7197  if test "x$FILE" = x; then
7198    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7199  fi
7200
7201
7202
7203
7204
7205  # Publish this variable in the help.
7206
7207
7208  if test "x$FIND" = x; then
7209    # The variable is not set by user, try to locate tool using the code snippet
7210    for ac_prog in find
7211do
7212  # Extract the first word of "$ac_prog", so it can be a program name with args.
7213set dummy $ac_prog; ac_word=$2
7214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7215$as_echo_n "checking for $ac_word... " >&6; }
7216if ${ac_cv_path_FIND+:} false; then :
7217  $as_echo_n "(cached) " >&6
7218else
7219  case $FIND in
7220  [\\/]* | ?:[\\/]*)
7221  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7222  ;;
7223  *)
7224  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7225for as_dir in $PATH
7226do
7227  IFS=$as_save_IFS
7228  test -z "$as_dir" && as_dir=.
7229    for ac_exec_ext in '' $ac_executable_extensions; do
7230  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7231    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7232    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7233    break 2
7234  fi
7235done
7236  done
7237IFS=$as_save_IFS
7238
7239  ;;
7240esac
7241fi
7242FIND=$ac_cv_path_FIND
7243if test -n "$FIND"; then
7244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7245$as_echo "$FIND" >&6; }
7246else
7247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7248$as_echo "no" >&6; }
7249fi
7250
7251
7252  test -n "$FIND" && break
7253done
7254
7255  else
7256    # The variable is set, but is it from the command line or the environment?
7257
7258    # Try to remove the string !FIND! from our list.
7259    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7260    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7261      # If it failed, the variable was not from the command line. Ignore it,
7262      # but warn the user (except for BASH, which is always set by the calling BASH).
7263      if test "xFIND" != xBASH; then
7264        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7265$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7266      fi
7267      # Try to locate tool using the code snippet
7268      for ac_prog in find
7269do
7270  # Extract the first word of "$ac_prog", so it can be a program name with args.
7271set dummy $ac_prog; ac_word=$2
7272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7273$as_echo_n "checking for $ac_word... " >&6; }
7274if ${ac_cv_path_FIND+:} false; then :
7275  $as_echo_n "(cached) " >&6
7276else
7277  case $FIND in
7278  [\\/]* | ?:[\\/]*)
7279  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7280  ;;
7281  *)
7282  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7283for as_dir in $PATH
7284do
7285  IFS=$as_save_IFS
7286  test -z "$as_dir" && as_dir=.
7287    for ac_exec_ext in '' $ac_executable_extensions; do
7288  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7289    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7290    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7291    break 2
7292  fi
7293done
7294  done
7295IFS=$as_save_IFS
7296
7297  ;;
7298esac
7299fi
7300FIND=$ac_cv_path_FIND
7301if test -n "$FIND"; then
7302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7303$as_echo "$FIND" >&6; }
7304else
7305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7306$as_echo "no" >&6; }
7307fi
7308
7309
7310  test -n "$FIND" && break
7311done
7312
7313    else
7314      # If it succeeded, then it was overridden by the user. We will use it
7315      # for the tool.
7316
7317      # First remove it from the list of overridden variables, so we can test
7318      # for unknown variables in the end.
7319      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7320
7321      # Check if the provided tool contains a complete path.
7322      tool_specified="$FIND"
7323      tool_basename="${tool_specified##*/}"
7324      if test "x$tool_basename" = "x$tool_specified"; then
7325        # A command without a complete path is provided, search $PATH.
7326        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7327$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7328        # Extract the first word of "$tool_basename", so it can be a program name with args.
7329set dummy $tool_basename; ac_word=$2
7330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7331$as_echo_n "checking for $ac_word... " >&6; }
7332if ${ac_cv_path_FIND+:} false; then :
7333  $as_echo_n "(cached) " >&6
7334else
7335  case $FIND in
7336  [\\/]* | ?:[\\/]*)
7337  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7338  ;;
7339  *)
7340  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7341for as_dir in $PATH
7342do
7343  IFS=$as_save_IFS
7344  test -z "$as_dir" && as_dir=.
7345    for ac_exec_ext in '' $ac_executable_extensions; do
7346  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7347    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7348    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7349    break 2
7350  fi
7351done
7352  done
7353IFS=$as_save_IFS
7354
7355  ;;
7356esac
7357fi
7358FIND=$ac_cv_path_FIND
7359if test -n "$FIND"; then
7360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7361$as_echo "$FIND" >&6; }
7362else
7363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7364$as_echo "no" >&6; }
7365fi
7366
7367
7368        if test "x$FIND" = x; then
7369          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7370        fi
7371      else
7372        # Otherwise we believe it is a complete path. Use it as it is.
7373        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7374$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7375        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7376$as_echo_n "checking for FIND... " >&6; }
7377        if test ! -x "$tool_specified"; then
7378          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7379$as_echo "not found" >&6; }
7380          as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7381        fi
7382        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7383$as_echo "$tool_specified" >&6; }
7384      fi
7385    fi
7386  fi
7387
7388
7389
7390  if test "x$FIND" = x; then
7391    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7392  fi
7393
7394
7395
7396
7397
7398  # Publish this variable in the help.
7399
7400
7401  if test "x$HEAD" = x; then
7402    # The variable is not set by user, try to locate tool using the code snippet
7403    for ac_prog in head
7404do
7405  # Extract the first word of "$ac_prog", so it can be a program name with args.
7406set dummy $ac_prog; ac_word=$2
7407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7408$as_echo_n "checking for $ac_word... " >&6; }
7409if ${ac_cv_path_HEAD+:} false; then :
7410  $as_echo_n "(cached) " >&6
7411else
7412  case $HEAD in
7413  [\\/]* | ?:[\\/]*)
7414  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7415  ;;
7416  *)
7417  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7418for as_dir in $PATH
7419do
7420  IFS=$as_save_IFS
7421  test -z "$as_dir" && as_dir=.
7422    for ac_exec_ext in '' $ac_executable_extensions; do
7423  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7424    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7425    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7426    break 2
7427  fi
7428done
7429  done
7430IFS=$as_save_IFS
7431
7432  ;;
7433esac
7434fi
7435HEAD=$ac_cv_path_HEAD
7436if test -n "$HEAD"; then
7437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7438$as_echo "$HEAD" >&6; }
7439else
7440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7441$as_echo "no" >&6; }
7442fi
7443
7444
7445  test -n "$HEAD" && break
7446done
7447
7448  else
7449    # The variable is set, but is it from the command line or the environment?
7450
7451    # Try to remove the string !HEAD! from our list.
7452    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7453    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7454      # If it failed, the variable was not from the command line. Ignore it,
7455      # but warn the user (except for BASH, which is always set by the calling BASH).
7456      if test "xHEAD" != xBASH; then
7457        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7458$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7459      fi
7460      # Try to locate tool using the code snippet
7461      for ac_prog in head
7462do
7463  # Extract the first word of "$ac_prog", so it can be a program name with args.
7464set dummy $ac_prog; ac_word=$2
7465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7466$as_echo_n "checking for $ac_word... " >&6; }
7467if ${ac_cv_path_HEAD+:} false; then :
7468  $as_echo_n "(cached) " >&6
7469else
7470  case $HEAD in
7471  [\\/]* | ?:[\\/]*)
7472  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7473  ;;
7474  *)
7475  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7476for as_dir in $PATH
7477do
7478  IFS=$as_save_IFS
7479  test -z "$as_dir" && as_dir=.
7480    for ac_exec_ext in '' $ac_executable_extensions; do
7481  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7482    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7483    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7484    break 2
7485  fi
7486done
7487  done
7488IFS=$as_save_IFS
7489
7490  ;;
7491esac
7492fi
7493HEAD=$ac_cv_path_HEAD
7494if test -n "$HEAD"; then
7495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7496$as_echo "$HEAD" >&6; }
7497else
7498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7499$as_echo "no" >&6; }
7500fi
7501
7502
7503  test -n "$HEAD" && break
7504done
7505
7506    else
7507      # If it succeeded, then it was overridden by the user. We will use it
7508      # for the tool.
7509
7510      # First remove it from the list of overridden variables, so we can test
7511      # for unknown variables in the end.
7512      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7513
7514      # Check if the provided tool contains a complete path.
7515      tool_specified="$HEAD"
7516      tool_basename="${tool_specified##*/}"
7517      if test "x$tool_basename" = "x$tool_specified"; then
7518        # A command without a complete path is provided, search $PATH.
7519        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7520$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7521        # Extract the first word of "$tool_basename", so it can be a program name with args.
7522set dummy $tool_basename; ac_word=$2
7523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7524$as_echo_n "checking for $ac_word... " >&6; }
7525if ${ac_cv_path_HEAD+:} false; then :
7526  $as_echo_n "(cached) " >&6
7527else
7528  case $HEAD in
7529  [\\/]* | ?:[\\/]*)
7530  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7531  ;;
7532  *)
7533  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7534for as_dir in $PATH
7535do
7536  IFS=$as_save_IFS
7537  test -z "$as_dir" && as_dir=.
7538    for ac_exec_ext in '' $ac_executable_extensions; do
7539  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7540    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7541    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7542    break 2
7543  fi
7544done
7545  done
7546IFS=$as_save_IFS
7547
7548  ;;
7549esac
7550fi
7551HEAD=$ac_cv_path_HEAD
7552if test -n "$HEAD"; then
7553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7554$as_echo "$HEAD" >&6; }
7555else
7556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7557$as_echo "no" >&6; }
7558fi
7559
7560
7561        if test "x$HEAD" = x; then
7562          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7563        fi
7564      else
7565        # Otherwise we believe it is a complete path. Use it as it is.
7566        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7567$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7568        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7569$as_echo_n "checking for HEAD... " >&6; }
7570        if test ! -x "$tool_specified"; then
7571          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7572$as_echo "not found" >&6; }
7573          as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7574        fi
7575        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7576$as_echo "$tool_specified" >&6; }
7577      fi
7578    fi
7579  fi
7580
7581
7582
7583  if test "x$HEAD" = x; then
7584    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7585  fi
7586
7587
7588
7589
7590
7591  # Publish this variable in the help.
7592
7593
7594  if test "x$LN" = x; then
7595    # The variable is not set by user, try to locate tool using the code snippet
7596    for ac_prog in ln
7597do
7598  # Extract the first word of "$ac_prog", so it can be a program name with args.
7599set dummy $ac_prog; ac_word=$2
7600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7601$as_echo_n "checking for $ac_word... " >&6; }
7602if ${ac_cv_path_LN+:} false; then :
7603  $as_echo_n "(cached) " >&6
7604else
7605  case $LN in
7606  [\\/]* | ?:[\\/]*)
7607  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7608  ;;
7609  *)
7610  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7611for as_dir in $PATH
7612do
7613  IFS=$as_save_IFS
7614  test -z "$as_dir" && as_dir=.
7615    for ac_exec_ext in '' $ac_executable_extensions; do
7616  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7617    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7619    break 2
7620  fi
7621done
7622  done
7623IFS=$as_save_IFS
7624
7625  ;;
7626esac
7627fi
7628LN=$ac_cv_path_LN
7629if test -n "$LN"; then
7630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7631$as_echo "$LN" >&6; }
7632else
7633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7634$as_echo "no" >&6; }
7635fi
7636
7637
7638  test -n "$LN" && break
7639done
7640
7641  else
7642    # The variable is set, but is it from the command line or the environment?
7643
7644    # Try to remove the string !LN! from our list.
7645    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7646    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7647      # If it failed, the variable was not from the command line. Ignore it,
7648      # but warn the user (except for BASH, which is always set by the calling BASH).
7649      if test "xLN" != xBASH; then
7650        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7651$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7652      fi
7653      # Try to locate tool using the code snippet
7654      for ac_prog in ln
7655do
7656  # Extract the first word of "$ac_prog", so it can be a program name with args.
7657set dummy $ac_prog; ac_word=$2
7658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7659$as_echo_n "checking for $ac_word... " >&6; }
7660if ${ac_cv_path_LN+:} false; then :
7661  $as_echo_n "(cached) " >&6
7662else
7663  case $LN in
7664  [\\/]* | ?:[\\/]*)
7665  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7666  ;;
7667  *)
7668  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7669for as_dir in $PATH
7670do
7671  IFS=$as_save_IFS
7672  test -z "$as_dir" && as_dir=.
7673    for ac_exec_ext in '' $ac_executable_extensions; do
7674  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7675    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7676    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7677    break 2
7678  fi
7679done
7680  done
7681IFS=$as_save_IFS
7682
7683  ;;
7684esac
7685fi
7686LN=$ac_cv_path_LN
7687if test -n "$LN"; then
7688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7689$as_echo "$LN" >&6; }
7690else
7691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7692$as_echo "no" >&6; }
7693fi
7694
7695
7696  test -n "$LN" && break
7697done
7698
7699    else
7700      # If it succeeded, then it was overridden by the user. We will use it
7701      # for the tool.
7702
7703      # First remove it from the list of overridden variables, so we can test
7704      # for unknown variables in the end.
7705      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7706
7707      # Check if the provided tool contains a complete path.
7708      tool_specified="$LN"
7709      tool_basename="${tool_specified##*/}"
7710      if test "x$tool_basename" = "x$tool_specified"; then
7711        # A command without a complete path is provided, search $PATH.
7712        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7713$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7714        # Extract the first word of "$tool_basename", so it can be a program name with args.
7715set dummy $tool_basename; ac_word=$2
7716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7717$as_echo_n "checking for $ac_word... " >&6; }
7718if ${ac_cv_path_LN+:} false; then :
7719  $as_echo_n "(cached) " >&6
7720else
7721  case $LN in
7722  [\\/]* | ?:[\\/]*)
7723  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7724  ;;
7725  *)
7726  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7727for as_dir in $PATH
7728do
7729  IFS=$as_save_IFS
7730  test -z "$as_dir" && as_dir=.
7731    for ac_exec_ext in '' $ac_executable_extensions; do
7732  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7733    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7734    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7735    break 2
7736  fi
7737done
7738  done
7739IFS=$as_save_IFS
7740
7741  ;;
7742esac
7743fi
7744LN=$ac_cv_path_LN
7745if test -n "$LN"; then
7746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7747$as_echo "$LN" >&6; }
7748else
7749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7750$as_echo "no" >&6; }
7751fi
7752
7753
7754        if test "x$LN" = x; then
7755          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7756        fi
7757      else
7758        # Otherwise we believe it is a complete path. Use it as it is.
7759        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7760$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7761        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7762$as_echo_n "checking for LN... " >&6; }
7763        if test ! -x "$tool_specified"; then
7764          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7765$as_echo "not found" >&6; }
7766          as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7767        fi
7768        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7769$as_echo "$tool_specified" >&6; }
7770      fi
7771    fi
7772  fi
7773
7774
7775
7776  if test "x$LN" = x; then
7777    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7778  fi
7779
7780
7781
7782
7783
7784  # Publish this variable in the help.
7785
7786
7787  if test "x$LS" = x; then
7788    # The variable is not set by user, try to locate tool using the code snippet
7789    for ac_prog in ls
7790do
7791  # Extract the first word of "$ac_prog", so it can be a program name with args.
7792set dummy $ac_prog; ac_word=$2
7793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7794$as_echo_n "checking for $ac_word... " >&6; }
7795if ${ac_cv_path_LS+:} false; then :
7796  $as_echo_n "(cached) " >&6
7797else
7798  case $LS in
7799  [\\/]* | ?:[\\/]*)
7800  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7801  ;;
7802  *)
7803  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7804for as_dir in $PATH
7805do
7806  IFS=$as_save_IFS
7807  test -z "$as_dir" && as_dir=.
7808    for ac_exec_ext in '' $ac_executable_extensions; do
7809  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7810    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7811    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7812    break 2
7813  fi
7814done
7815  done
7816IFS=$as_save_IFS
7817
7818  ;;
7819esac
7820fi
7821LS=$ac_cv_path_LS
7822if test -n "$LS"; then
7823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7824$as_echo "$LS" >&6; }
7825else
7826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7827$as_echo "no" >&6; }
7828fi
7829
7830
7831  test -n "$LS" && break
7832done
7833
7834  else
7835    # The variable is set, but is it from the command line or the environment?
7836
7837    # Try to remove the string !LS! from our list.
7838    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7839    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7840      # If it failed, the variable was not from the command line. Ignore it,
7841      # but warn the user (except for BASH, which is always set by the calling BASH).
7842      if test "xLS" != xBASH; then
7843        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7844$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7845      fi
7846      # Try to locate tool using the code snippet
7847      for ac_prog in ls
7848do
7849  # Extract the first word of "$ac_prog", so it can be a program name with args.
7850set dummy $ac_prog; ac_word=$2
7851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7852$as_echo_n "checking for $ac_word... " >&6; }
7853if ${ac_cv_path_LS+:} false; then :
7854  $as_echo_n "(cached) " >&6
7855else
7856  case $LS in
7857  [\\/]* | ?:[\\/]*)
7858  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7859  ;;
7860  *)
7861  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7862for as_dir in $PATH
7863do
7864  IFS=$as_save_IFS
7865  test -z "$as_dir" && as_dir=.
7866    for ac_exec_ext in '' $ac_executable_extensions; do
7867  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7868    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7869    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7870    break 2
7871  fi
7872done
7873  done
7874IFS=$as_save_IFS
7875
7876  ;;
7877esac
7878fi
7879LS=$ac_cv_path_LS
7880if test -n "$LS"; then
7881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7882$as_echo "$LS" >&6; }
7883else
7884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7885$as_echo "no" >&6; }
7886fi
7887
7888
7889  test -n "$LS" && break
7890done
7891
7892    else
7893      # If it succeeded, then it was overridden by the user. We will use it
7894      # for the tool.
7895
7896      # First remove it from the list of overridden variables, so we can test
7897      # for unknown variables in the end.
7898      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7899
7900      # Check if the provided tool contains a complete path.
7901      tool_specified="$LS"
7902      tool_basename="${tool_specified##*/}"
7903      if test "x$tool_basename" = "x$tool_specified"; then
7904        # A command without a complete path is provided, search $PATH.
7905        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7906$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7907        # Extract the first word of "$tool_basename", so it can be a program name with args.
7908set dummy $tool_basename; ac_word=$2
7909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7910$as_echo_n "checking for $ac_word... " >&6; }
7911if ${ac_cv_path_LS+:} false; then :
7912  $as_echo_n "(cached) " >&6
7913else
7914  case $LS in
7915  [\\/]* | ?:[\\/]*)
7916  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7917  ;;
7918  *)
7919  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7920for as_dir in $PATH
7921do
7922  IFS=$as_save_IFS
7923  test -z "$as_dir" && as_dir=.
7924    for ac_exec_ext in '' $ac_executable_extensions; do
7925  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7926    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7927    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7928    break 2
7929  fi
7930done
7931  done
7932IFS=$as_save_IFS
7933
7934  ;;
7935esac
7936fi
7937LS=$ac_cv_path_LS
7938if test -n "$LS"; then
7939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7940$as_echo "$LS" >&6; }
7941else
7942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7943$as_echo "no" >&6; }
7944fi
7945
7946
7947        if test "x$LS" = x; then
7948          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7949        fi
7950      else
7951        # Otherwise we believe it is a complete path. Use it as it is.
7952        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7953$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7954        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7955$as_echo_n "checking for LS... " >&6; }
7956        if test ! -x "$tool_specified"; then
7957          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7958$as_echo "not found" >&6; }
7959          as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7960        fi
7961        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7962$as_echo "$tool_specified" >&6; }
7963      fi
7964    fi
7965  fi
7966
7967
7968
7969  if test "x$LS" = x; then
7970    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7971  fi
7972
7973
7974
7975
7976
7977  # Publish this variable in the help.
7978
7979
7980  if test "x$MKDIR" = x; then
7981    # The variable is not set by user, try to locate tool using the code snippet
7982    for ac_prog in mkdir
7983do
7984  # Extract the first word of "$ac_prog", so it can be a program name with args.
7985set dummy $ac_prog; ac_word=$2
7986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7987$as_echo_n "checking for $ac_word... " >&6; }
7988if ${ac_cv_path_MKDIR+:} false; then :
7989  $as_echo_n "(cached) " >&6
7990else
7991  case $MKDIR in
7992  [\\/]* | ?:[\\/]*)
7993  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7994  ;;
7995  *)
7996  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7997for as_dir in $PATH
7998do
7999  IFS=$as_save_IFS
8000  test -z "$as_dir" && as_dir=.
8001    for ac_exec_ext in '' $ac_executable_extensions; do
8002  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8003    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8004    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8005    break 2
8006  fi
8007done
8008  done
8009IFS=$as_save_IFS
8010
8011  ;;
8012esac
8013fi
8014MKDIR=$ac_cv_path_MKDIR
8015if test -n "$MKDIR"; then
8016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8017$as_echo "$MKDIR" >&6; }
8018else
8019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8020$as_echo "no" >&6; }
8021fi
8022
8023
8024  test -n "$MKDIR" && break
8025done
8026
8027  else
8028    # The variable is set, but is it from the command line or the environment?
8029
8030    # Try to remove the string !MKDIR! from our list.
8031    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8032    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8033      # If it failed, the variable was not from the command line. Ignore it,
8034      # but warn the user (except for BASH, which is always set by the calling BASH).
8035      if test "xMKDIR" != xBASH; then
8036        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8037$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8038      fi
8039      # Try to locate tool using the code snippet
8040      for ac_prog in mkdir
8041do
8042  # Extract the first word of "$ac_prog", so it can be a program name with args.
8043set dummy $ac_prog; ac_word=$2
8044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8045$as_echo_n "checking for $ac_word... " >&6; }
8046if ${ac_cv_path_MKDIR+:} false; then :
8047  $as_echo_n "(cached) " >&6
8048else
8049  case $MKDIR in
8050  [\\/]* | ?:[\\/]*)
8051  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8052  ;;
8053  *)
8054  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8055for as_dir in $PATH
8056do
8057  IFS=$as_save_IFS
8058  test -z "$as_dir" && as_dir=.
8059    for ac_exec_ext in '' $ac_executable_extensions; do
8060  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8061    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8063    break 2
8064  fi
8065done
8066  done
8067IFS=$as_save_IFS
8068
8069  ;;
8070esac
8071fi
8072MKDIR=$ac_cv_path_MKDIR
8073if test -n "$MKDIR"; then
8074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8075$as_echo "$MKDIR" >&6; }
8076else
8077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8078$as_echo "no" >&6; }
8079fi
8080
8081
8082  test -n "$MKDIR" && break
8083done
8084
8085    else
8086      # If it succeeded, then it was overridden by the user. We will use it
8087      # for the tool.
8088
8089      # First remove it from the list of overridden variables, so we can test
8090      # for unknown variables in the end.
8091      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8092
8093      # Check if the provided tool contains a complete path.
8094      tool_specified="$MKDIR"
8095      tool_basename="${tool_specified##*/}"
8096      if test "x$tool_basename" = "x$tool_specified"; then
8097        # A command without a complete path is provided, search $PATH.
8098        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8099$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8100        # Extract the first word of "$tool_basename", so it can be a program name with args.
8101set dummy $tool_basename; ac_word=$2
8102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8103$as_echo_n "checking for $ac_word... " >&6; }
8104if ${ac_cv_path_MKDIR+:} false; then :
8105  $as_echo_n "(cached) " >&6
8106else
8107  case $MKDIR in
8108  [\\/]* | ?:[\\/]*)
8109  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8110  ;;
8111  *)
8112  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8113for as_dir in $PATH
8114do
8115  IFS=$as_save_IFS
8116  test -z "$as_dir" && as_dir=.
8117    for ac_exec_ext in '' $ac_executable_extensions; do
8118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8119    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8121    break 2
8122  fi
8123done
8124  done
8125IFS=$as_save_IFS
8126
8127  ;;
8128esac
8129fi
8130MKDIR=$ac_cv_path_MKDIR
8131if test -n "$MKDIR"; then
8132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8133$as_echo "$MKDIR" >&6; }
8134else
8135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8136$as_echo "no" >&6; }
8137fi
8138
8139
8140        if test "x$MKDIR" = x; then
8141          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8142        fi
8143      else
8144        # Otherwise we believe it is a complete path. Use it as it is.
8145        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8146$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8147        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8148$as_echo_n "checking for MKDIR... " >&6; }
8149        if test ! -x "$tool_specified"; then
8150          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8151$as_echo "not found" >&6; }
8152          as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8153        fi
8154        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8155$as_echo "$tool_specified" >&6; }
8156      fi
8157    fi
8158  fi
8159
8160
8161
8162  if test "x$MKDIR" = x; then
8163    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8164  fi
8165
8166
8167
8168
8169
8170  # Publish this variable in the help.
8171
8172
8173  if test "x$MKTEMP" = x; then
8174    # The variable is not set by user, try to locate tool using the code snippet
8175    for ac_prog in mktemp
8176do
8177  # Extract the first word of "$ac_prog", so it can be a program name with args.
8178set dummy $ac_prog; ac_word=$2
8179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8180$as_echo_n "checking for $ac_word... " >&6; }
8181if ${ac_cv_path_MKTEMP+:} false; then :
8182  $as_echo_n "(cached) " >&6
8183else
8184  case $MKTEMP in
8185  [\\/]* | ?:[\\/]*)
8186  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8187  ;;
8188  *)
8189  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8190for as_dir in $PATH
8191do
8192  IFS=$as_save_IFS
8193  test -z "$as_dir" && as_dir=.
8194    for ac_exec_ext in '' $ac_executable_extensions; do
8195  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8196    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8197    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8198    break 2
8199  fi
8200done
8201  done
8202IFS=$as_save_IFS
8203
8204  ;;
8205esac
8206fi
8207MKTEMP=$ac_cv_path_MKTEMP
8208if test -n "$MKTEMP"; then
8209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8210$as_echo "$MKTEMP" >&6; }
8211else
8212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8213$as_echo "no" >&6; }
8214fi
8215
8216
8217  test -n "$MKTEMP" && break
8218done
8219
8220  else
8221    # The variable is set, but is it from the command line or the environment?
8222
8223    # Try to remove the string !MKTEMP! from our list.
8224    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8225    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8226      # If it failed, the variable was not from the command line. Ignore it,
8227      # but warn the user (except for BASH, which is always set by the calling BASH).
8228      if test "xMKTEMP" != xBASH; then
8229        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8230$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8231      fi
8232      # Try to locate tool using the code snippet
8233      for ac_prog in mktemp
8234do
8235  # Extract the first word of "$ac_prog", so it can be a program name with args.
8236set dummy $ac_prog; ac_word=$2
8237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8238$as_echo_n "checking for $ac_word... " >&6; }
8239if ${ac_cv_path_MKTEMP+:} false; then :
8240  $as_echo_n "(cached) " >&6
8241else
8242  case $MKTEMP in
8243  [\\/]* | ?:[\\/]*)
8244  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8245  ;;
8246  *)
8247  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8248for as_dir in $PATH
8249do
8250  IFS=$as_save_IFS
8251  test -z "$as_dir" && as_dir=.
8252    for ac_exec_ext in '' $ac_executable_extensions; do
8253  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8254    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8255    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8256    break 2
8257  fi
8258done
8259  done
8260IFS=$as_save_IFS
8261
8262  ;;
8263esac
8264fi
8265MKTEMP=$ac_cv_path_MKTEMP
8266if test -n "$MKTEMP"; then
8267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8268$as_echo "$MKTEMP" >&6; }
8269else
8270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8271$as_echo "no" >&6; }
8272fi
8273
8274
8275  test -n "$MKTEMP" && break
8276done
8277
8278    else
8279      # If it succeeded, then it was overridden by the user. We will use it
8280      # for the tool.
8281
8282      # First remove it from the list of overridden variables, so we can test
8283      # for unknown variables in the end.
8284      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8285
8286      # Check if the provided tool contains a complete path.
8287      tool_specified="$MKTEMP"
8288      tool_basename="${tool_specified##*/}"
8289      if test "x$tool_basename" = "x$tool_specified"; then
8290        # A command without a complete path is provided, search $PATH.
8291        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8292$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8293        # Extract the first word of "$tool_basename", so it can be a program name with args.
8294set dummy $tool_basename; ac_word=$2
8295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8296$as_echo_n "checking for $ac_word... " >&6; }
8297if ${ac_cv_path_MKTEMP+:} false; then :
8298  $as_echo_n "(cached) " >&6
8299else
8300  case $MKTEMP in
8301  [\\/]* | ?:[\\/]*)
8302  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8303  ;;
8304  *)
8305  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8306for as_dir in $PATH
8307do
8308  IFS=$as_save_IFS
8309  test -z "$as_dir" && as_dir=.
8310    for ac_exec_ext in '' $ac_executable_extensions; do
8311  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8312    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8313    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8314    break 2
8315  fi
8316done
8317  done
8318IFS=$as_save_IFS
8319
8320  ;;
8321esac
8322fi
8323MKTEMP=$ac_cv_path_MKTEMP
8324if test -n "$MKTEMP"; then
8325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8326$as_echo "$MKTEMP" >&6; }
8327else
8328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8329$as_echo "no" >&6; }
8330fi
8331
8332
8333        if test "x$MKTEMP" = x; then
8334          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8335        fi
8336      else
8337        # Otherwise we believe it is a complete path. Use it as it is.
8338        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8339$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8340        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8341$as_echo_n "checking for MKTEMP... " >&6; }
8342        if test ! -x "$tool_specified"; then
8343          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8344$as_echo "not found" >&6; }
8345          as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8346        fi
8347        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8348$as_echo "$tool_specified" >&6; }
8349      fi
8350    fi
8351  fi
8352
8353
8354
8355  if test "x$MKTEMP" = x; then
8356    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8357  fi
8358
8359
8360
8361
8362
8363  # Publish this variable in the help.
8364
8365
8366  if test "x$MV" = x; then
8367    # The variable is not set by user, try to locate tool using the code snippet
8368    for ac_prog in mv
8369do
8370  # Extract the first word of "$ac_prog", so it can be a program name with args.
8371set dummy $ac_prog; ac_word=$2
8372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8373$as_echo_n "checking for $ac_word... " >&6; }
8374if ${ac_cv_path_MV+:} false; then :
8375  $as_echo_n "(cached) " >&6
8376else
8377  case $MV in
8378  [\\/]* | ?:[\\/]*)
8379  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8380  ;;
8381  *)
8382  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8383for as_dir in $PATH
8384do
8385  IFS=$as_save_IFS
8386  test -z "$as_dir" && as_dir=.
8387    for ac_exec_ext in '' $ac_executable_extensions; do
8388  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8389    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8390    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8391    break 2
8392  fi
8393done
8394  done
8395IFS=$as_save_IFS
8396
8397  ;;
8398esac
8399fi
8400MV=$ac_cv_path_MV
8401if test -n "$MV"; then
8402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8403$as_echo "$MV" >&6; }
8404else
8405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8406$as_echo "no" >&6; }
8407fi
8408
8409
8410  test -n "$MV" && break
8411done
8412
8413  else
8414    # The variable is set, but is it from the command line or the environment?
8415
8416    # Try to remove the string !MV! from our list.
8417    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8418    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8419      # If it failed, the variable was not from the command line. Ignore it,
8420      # but warn the user (except for BASH, which is always set by the calling BASH).
8421      if test "xMV" != xBASH; then
8422        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8423$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8424      fi
8425      # Try to locate tool using the code snippet
8426      for ac_prog in mv
8427do
8428  # Extract the first word of "$ac_prog", so it can be a program name with args.
8429set dummy $ac_prog; ac_word=$2
8430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8431$as_echo_n "checking for $ac_word... " >&6; }
8432if ${ac_cv_path_MV+:} false; then :
8433  $as_echo_n "(cached) " >&6
8434else
8435  case $MV in
8436  [\\/]* | ?:[\\/]*)
8437  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8438  ;;
8439  *)
8440  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8441for as_dir in $PATH
8442do
8443  IFS=$as_save_IFS
8444  test -z "$as_dir" && as_dir=.
8445    for ac_exec_ext in '' $ac_executable_extensions; do
8446  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8447    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8448    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8449    break 2
8450  fi
8451done
8452  done
8453IFS=$as_save_IFS
8454
8455  ;;
8456esac
8457fi
8458MV=$ac_cv_path_MV
8459if test -n "$MV"; then
8460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8461$as_echo "$MV" >&6; }
8462else
8463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8464$as_echo "no" >&6; }
8465fi
8466
8467
8468  test -n "$MV" && break
8469done
8470
8471    else
8472      # If it succeeded, then it was overridden by the user. We will use it
8473      # for the tool.
8474
8475      # First remove it from the list of overridden variables, so we can test
8476      # for unknown variables in the end.
8477      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8478
8479      # Check if the provided tool contains a complete path.
8480      tool_specified="$MV"
8481      tool_basename="${tool_specified##*/}"
8482      if test "x$tool_basename" = "x$tool_specified"; then
8483        # A command without a complete path is provided, search $PATH.
8484        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8485$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8486        # Extract the first word of "$tool_basename", so it can be a program name with args.
8487set dummy $tool_basename; ac_word=$2
8488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8489$as_echo_n "checking for $ac_word... " >&6; }
8490if ${ac_cv_path_MV+:} false; then :
8491  $as_echo_n "(cached) " >&6
8492else
8493  case $MV in
8494  [\\/]* | ?:[\\/]*)
8495  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8496  ;;
8497  *)
8498  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8499for as_dir in $PATH
8500do
8501  IFS=$as_save_IFS
8502  test -z "$as_dir" && as_dir=.
8503    for ac_exec_ext in '' $ac_executable_extensions; do
8504  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8505    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8507    break 2
8508  fi
8509done
8510  done
8511IFS=$as_save_IFS
8512
8513  ;;
8514esac
8515fi
8516MV=$ac_cv_path_MV
8517if test -n "$MV"; then
8518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8519$as_echo "$MV" >&6; }
8520else
8521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8522$as_echo "no" >&6; }
8523fi
8524
8525
8526        if test "x$MV" = x; then
8527          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8528        fi
8529      else
8530        # Otherwise we believe it is a complete path. Use it as it is.
8531        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8532$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8533        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8534$as_echo_n "checking for MV... " >&6; }
8535        if test ! -x "$tool_specified"; then
8536          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8537$as_echo "not found" >&6; }
8538          as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8539        fi
8540        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8541$as_echo "$tool_specified" >&6; }
8542      fi
8543    fi
8544  fi
8545
8546
8547
8548  if test "x$MV" = x; then
8549    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8550  fi
8551
8552
8553
8554
8555
8556  # Publish this variable in the help.
8557
8558
8559  if test "x$NAWK" = x; then
8560    # The variable is not set by user, try to locate tool using the code snippet
8561    for ac_prog in nawk gawk awk
8562do
8563  # Extract the first word of "$ac_prog", so it can be a program name with args.
8564set dummy $ac_prog; ac_word=$2
8565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8566$as_echo_n "checking for $ac_word... " >&6; }
8567if ${ac_cv_path_NAWK+:} false; then :
8568  $as_echo_n "(cached) " >&6
8569else
8570  case $NAWK in
8571  [\\/]* | ?:[\\/]*)
8572  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8573  ;;
8574  *)
8575  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8576for as_dir in $PATH
8577do
8578  IFS=$as_save_IFS
8579  test -z "$as_dir" && as_dir=.
8580    for ac_exec_ext in '' $ac_executable_extensions; do
8581  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8582    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8583    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8584    break 2
8585  fi
8586done
8587  done
8588IFS=$as_save_IFS
8589
8590  ;;
8591esac
8592fi
8593NAWK=$ac_cv_path_NAWK
8594if test -n "$NAWK"; then
8595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8596$as_echo "$NAWK" >&6; }
8597else
8598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8599$as_echo "no" >&6; }
8600fi
8601
8602
8603  test -n "$NAWK" && break
8604done
8605
8606  else
8607    # The variable is set, but is it from the command line or the environment?
8608
8609    # Try to remove the string !NAWK! from our list.
8610    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8611    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8612      # If it failed, the variable was not from the command line. Ignore it,
8613      # but warn the user (except for BASH, which is always set by the calling BASH).
8614      if test "xNAWK" != xBASH; then
8615        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8616$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8617      fi
8618      # Try to locate tool using the code snippet
8619      for ac_prog in nawk gawk awk
8620do
8621  # Extract the first word of "$ac_prog", so it can be a program name with args.
8622set dummy $ac_prog; ac_word=$2
8623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8624$as_echo_n "checking for $ac_word... " >&6; }
8625if ${ac_cv_path_NAWK+:} false; then :
8626  $as_echo_n "(cached) " >&6
8627else
8628  case $NAWK in
8629  [\\/]* | ?:[\\/]*)
8630  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8631  ;;
8632  *)
8633  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8634for as_dir in $PATH
8635do
8636  IFS=$as_save_IFS
8637  test -z "$as_dir" && as_dir=.
8638    for ac_exec_ext in '' $ac_executable_extensions; do
8639  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8640    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8642    break 2
8643  fi
8644done
8645  done
8646IFS=$as_save_IFS
8647
8648  ;;
8649esac
8650fi
8651NAWK=$ac_cv_path_NAWK
8652if test -n "$NAWK"; then
8653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8654$as_echo "$NAWK" >&6; }
8655else
8656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8657$as_echo "no" >&6; }
8658fi
8659
8660
8661  test -n "$NAWK" && break
8662done
8663
8664    else
8665      # If it succeeded, then it was overridden by the user. We will use it
8666      # for the tool.
8667
8668      # First remove it from the list of overridden variables, so we can test
8669      # for unknown variables in the end.
8670      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8671
8672      # Check if the provided tool contains a complete path.
8673      tool_specified="$NAWK"
8674      tool_basename="${tool_specified##*/}"
8675      if test "x$tool_basename" = "x$tool_specified"; then
8676        # A command without a complete path is provided, search $PATH.
8677        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8678$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8679        # Extract the first word of "$tool_basename", so it can be a program name with args.
8680set dummy $tool_basename; ac_word=$2
8681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8682$as_echo_n "checking for $ac_word... " >&6; }
8683if ${ac_cv_path_NAWK+:} false; then :
8684  $as_echo_n "(cached) " >&6
8685else
8686  case $NAWK in
8687  [\\/]* | ?:[\\/]*)
8688  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8689  ;;
8690  *)
8691  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8692for as_dir in $PATH
8693do
8694  IFS=$as_save_IFS
8695  test -z "$as_dir" && as_dir=.
8696    for ac_exec_ext in '' $ac_executable_extensions; do
8697  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8698    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8699    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8700    break 2
8701  fi
8702done
8703  done
8704IFS=$as_save_IFS
8705
8706  ;;
8707esac
8708fi
8709NAWK=$ac_cv_path_NAWK
8710if test -n "$NAWK"; then
8711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8712$as_echo "$NAWK" >&6; }
8713else
8714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8715$as_echo "no" >&6; }
8716fi
8717
8718
8719        if test "x$NAWK" = x; then
8720          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8721        fi
8722      else
8723        # Otherwise we believe it is a complete path. Use it as it is.
8724        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8725$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8726        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8727$as_echo_n "checking for NAWK... " >&6; }
8728        if test ! -x "$tool_specified"; then
8729          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8730$as_echo "not found" >&6; }
8731          as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8732        fi
8733        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8734$as_echo "$tool_specified" >&6; }
8735      fi
8736    fi
8737  fi
8738
8739
8740
8741  if test "x$NAWK" = x; then
8742    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8743  fi
8744
8745
8746
8747
8748
8749  # Publish this variable in the help.
8750
8751
8752  if test "x$PRINTF" = x; then
8753    # The variable is not set by user, try to locate tool using the code snippet
8754    for ac_prog in printf
8755do
8756  # Extract the first word of "$ac_prog", so it can be a program name with args.
8757set dummy $ac_prog; ac_word=$2
8758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8759$as_echo_n "checking for $ac_word... " >&6; }
8760if ${ac_cv_path_PRINTF+:} false; then :
8761  $as_echo_n "(cached) " >&6
8762else
8763  case $PRINTF in
8764  [\\/]* | ?:[\\/]*)
8765  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8766  ;;
8767  *)
8768  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8769for as_dir in $PATH
8770do
8771  IFS=$as_save_IFS
8772  test -z "$as_dir" && as_dir=.
8773    for ac_exec_ext in '' $ac_executable_extensions; do
8774  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8775    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8776    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8777    break 2
8778  fi
8779done
8780  done
8781IFS=$as_save_IFS
8782
8783  ;;
8784esac
8785fi
8786PRINTF=$ac_cv_path_PRINTF
8787if test -n "$PRINTF"; then
8788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8789$as_echo "$PRINTF" >&6; }
8790else
8791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8792$as_echo "no" >&6; }
8793fi
8794
8795
8796  test -n "$PRINTF" && break
8797done
8798
8799  else
8800    # The variable is set, but is it from the command line or the environment?
8801
8802    # Try to remove the string !PRINTF! from our list.
8803    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8804    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8805      # If it failed, the variable was not from the command line. Ignore it,
8806      # but warn the user (except for BASH, which is always set by the calling BASH).
8807      if test "xPRINTF" != xBASH; then
8808        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8809$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8810      fi
8811      # Try to locate tool using the code snippet
8812      for ac_prog in printf
8813do
8814  # Extract the first word of "$ac_prog", so it can be a program name with args.
8815set dummy $ac_prog; ac_word=$2
8816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8817$as_echo_n "checking for $ac_word... " >&6; }
8818if ${ac_cv_path_PRINTF+:} false; then :
8819  $as_echo_n "(cached) " >&6
8820else
8821  case $PRINTF in
8822  [\\/]* | ?:[\\/]*)
8823  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8824  ;;
8825  *)
8826  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8827for as_dir in $PATH
8828do
8829  IFS=$as_save_IFS
8830  test -z "$as_dir" && as_dir=.
8831    for ac_exec_ext in '' $ac_executable_extensions; do
8832  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8833    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8835    break 2
8836  fi
8837done
8838  done
8839IFS=$as_save_IFS
8840
8841  ;;
8842esac
8843fi
8844PRINTF=$ac_cv_path_PRINTF
8845if test -n "$PRINTF"; then
8846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8847$as_echo "$PRINTF" >&6; }
8848else
8849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8850$as_echo "no" >&6; }
8851fi
8852
8853
8854  test -n "$PRINTF" && break
8855done
8856
8857    else
8858      # If it succeeded, then it was overridden by the user. We will use it
8859      # for the tool.
8860
8861      # First remove it from the list of overridden variables, so we can test
8862      # for unknown variables in the end.
8863      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8864
8865      # Check if the provided tool contains a complete path.
8866      tool_specified="$PRINTF"
8867      tool_basename="${tool_specified##*/}"
8868      if test "x$tool_basename" = "x$tool_specified"; then
8869        # A command without a complete path is provided, search $PATH.
8870        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8871$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8872        # Extract the first word of "$tool_basename", so it can be a program name with args.
8873set dummy $tool_basename; ac_word=$2
8874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8875$as_echo_n "checking for $ac_word... " >&6; }
8876if ${ac_cv_path_PRINTF+:} false; then :
8877  $as_echo_n "(cached) " >&6
8878else
8879  case $PRINTF in
8880  [\\/]* | ?:[\\/]*)
8881  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8882  ;;
8883  *)
8884  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8885for as_dir in $PATH
8886do
8887  IFS=$as_save_IFS
8888  test -z "$as_dir" && as_dir=.
8889    for ac_exec_ext in '' $ac_executable_extensions; do
8890  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8891    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8892    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8893    break 2
8894  fi
8895done
8896  done
8897IFS=$as_save_IFS
8898
8899  ;;
8900esac
8901fi
8902PRINTF=$ac_cv_path_PRINTF
8903if test -n "$PRINTF"; then
8904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8905$as_echo "$PRINTF" >&6; }
8906else
8907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8908$as_echo "no" >&6; }
8909fi
8910
8911
8912        if test "x$PRINTF" = x; then
8913          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8914        fi
8915      else
8916        # Otherwise we believe it is a complete path. Use it as it is.
8917        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8918$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8919        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8920$as_echo_n "checking for PRINTF... " >&6; }
8921        if test ! -x "$tool_specified"; then
8922          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8923$as_echo "not found" >&6; }
8924          as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8925        fi
8926        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8927$as_echo "$tool_specified" >&6; }
8928      fi
8929    fi
8930  fi
8931
8932
8933
8934  if test "x$PRINTF" = x; then
8935    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8936  fi
8937
8938
8939
8940
8941
8942  # Publish this variable in the help.
8943
8944
8945  if test "x$RM" = x; then
8946    # The variable is not set by user, try to locate tool using the code snippet
8947    for ac_prog in rm
8948do
8949  # Extract the first word of "$ac_prog", so it can be a program name with args.
8950set dummy $ac_prog; ac_word=$2
8951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8952$as_echo_n "checking for $ac_word... " >&6; }
8953if ${ac_cv_path_RM+:} false; then :
8954  $as_echo_n "(cached) " >&6
8955else
8956  case $RM in
8957  [\\/]* | ?:[\\/]*)
8958  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8959  ;;
8960  *)
8961  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8962for as_dir in $PATH
8963do
8964  IFS=$as_save_IFS
8965  test -z "$as_dir" && as_dir=.
8966    for ac_exec_ext in '' $ac_executable_extensions; do
8967  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8968    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8969    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8970    break 2
8971  fi
8972done
8973  done
8974IFS=$as_save_IFS
8975
8976  ;;
8977esac
8978fi
8979RM=$ac_cv_path_RM
8980if test -n "$RM"; then
8981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8982$as_echo "$RM" >&6; }
8983else
8984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8985$as_echo "no" >&6; }
8986fi
8987
8988
8989  test -n "$RM" && break
8990done
8991
8992  else
8993    # The variable is set, but is it from the command line or the environment?
8994
8995    # Try to remove the string !RM! from our list.
8996    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8997    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8998      # If it failed, the variable was not from the command line. Ignore it,
8999      # but warn the user (except for BASH, which is always set by the calling BASH).
9000      if test "xRM" != xBASH; then
9001        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
9002$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
9003      fi
9004      # Try to locate tool using the code snippet
9005      for ac_prog in rm
9006do
9007  # Extract the first word of "$ac_prog", so it can be a program name with args.
9008set dummy $ac_prog; ac_word=$2
9009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9010$as_echo_n "checking for $ac_word... " >&6; }
9011if ${ac_cv_path_RM+:} false; then :
9012  $as_echo_n "(cached) " >&6
9013else
9014  case $RM in
9015  [\\/]* | ?:[\\/]*)
9016  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9017  ;;
9018  *)
9019  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9020for as_dir in $PATH
9021do
9022  IFS=$as_save_IFS
9023  test -z "$as_dir" && as_dir=.
9024    for ac_exec_ext in '' $ac_executable_extensions; do
9025  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9026    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9027    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9028    break 2
9029  fi
9030done
9031  done
9032IFS=$as_save_IFS
9033
9034  ;;
9035esac
9036fi
9037RM=$ac_cv_path_RM
9038if test -n "$RM"; then
9039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9040$as_echo "$RM" >&6; }
9041else
9042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9043$as_echo "no" >&6; }
9044fi
9045
9046
9047  test -n "$RM" && break
9048done
9049
9050    else
9051      # If it succeeded, then it was overridden by the user. We will use it
9052      # for the tool.
9053
9054      # First remove it from the list of overridden variables, so we can test
9055      # for unknown variables in the end.
9056      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9057
9058      # Check if the provided tool contains a complete path.
9059      tool_specified="$RM"
9060      tool_basename="${tool_specified##*/}"
9061      if test "x$tool_basename" = "x$tool_specified"; then
9062        # A command without a complete path is provided, search $PATH.
9063        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9064$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9065        # Extract the first word of "$tool_basename", so it can be a program name with args.
9066set dummy $tool_basename; ac_word=$2
9067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9068$as_echo_n "checking for $ac_word... " >&6; }
9069if ${ac_cv_path_RM+:} false; then :
9070  $as_echo_n "(cached) " >&6
9071else
9072  case $RM in
9073  [\\/]* | ?:[\\/]*)
9074  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9075  ;;
9076  *)
9077  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9078for as_dir in $PATH
9079do
9080  IFS=$as_save_IFS
9081  test -z "$as_dir" && as_dir=.
9082    for ac_exec_ext in '' $ac_executable_extensions; do
9083  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9084    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9085    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9086    break 2
9087  fi
9088done
9089  done
9090IFS=$as_save_IFS
9091
9092  ;;
9093esac
9094fi
9095RM=$ac_cv_path_RM
9096if test -n "$RM"; then
9097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9098$as_echo "$RM" >&6; }
9099else
9100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9101$as_echo "no" >&6; }
9102fi
9103
9104
9105        if test "x$RM" = x; then
9106          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9107        fi
9108      else
9109        # Otherwise we believe it is a complete path. Use it as it is.
9110        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9111$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9112        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9113$as_echo_n "checking for RM... " >&6; }
9114        if test ! -x "$tool_specified"; then
9115          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9116$as_echo "not found" >&6; }
9117          as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9118        fi
9119        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9120$as_echo "$tool_specified" >&6; }
9121      fi
9122    fi
9123  fi
9124
9125
9126
9127  if test "x$RM" = x; then
9128    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9129  fi
9130
9131
9132
9133
9134
9135  # Publish this variable in the help.
9136
9137
9138  if test "x$SH" = x; then
9139    # The variable is not set by user, try to locate tool using the code snippet
9140    for ac_prog in sh
9141do
9142  # Extract the first word of "$ac_prog", so it can be a program name with args.
9143set dummy $ac_prog; ac_word=$2
9144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9145$as_echo_n "checking for $ac_word... " >&6; }
9146if ${ac_cv_path_SH+:} false; then :
9147  $as_echo_n "(cached) " >&6
9148else
9149  case $SH in
9150  [\\/]* | ?:[\\/]*)
9151  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9152  ;;
9153  *)
9154  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9155for as_dir in $PATH
9156do
9157  IFS=$as_save_IFS
9158  test -z "$as_dir" && as_dir=.
9159    for ac_exec_ext in '' $ac_executable_extensions; do
9160  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9161    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9162    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9163    break 2
9164  fi
9165done
9166  done
9167IFS=$as_save_IFS
9168
9169  ;;
9170esac
9171fi
9172SH=$ac_cv_path_SH
9173if test -n "$SH"; then
9174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9175$as_echo "$SH" >&6; }
9176else
9177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9178$as_echo "no" >&6; }
9179fi
9180
9181
9182  test -n "$SH" && break
9183done
9184
9185  else
9186    # The variable is set, but is it from the command line or the environment?
9187
9188    # Try to remove the string !SH! from our list.
9189    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9190    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9191      # If it failed, the variable was not from the command line. Ignore it,
9192      # but warn the user (except for BASH, which is always set by the calling BASH).
9193      if test "xSH" != xBASH; then
9194        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9195$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9196      fi
9197      # Try to locate tool using the code snippet
9198      for ac_prog in sh
9199do
9200  # Extract the first word of "$ac_prog", so it can be a program name with args.
9201set dummy $ac_prog; ac_word=$2
9202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9203$as_echo_n "checking for $ac_word... " >&6; }
9204if ${ac_cv_path_SH+:} false; then :
9205  $as_echo_n "(cached) " >&6
9206else
9207  case $SH in
9208  [\\/]* | ?:[\\/]*)
9209  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9210  ;;
9211  *)
9212  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9213for as_dir in $PATH
9214do
9215  IFS=$as_save_IFS
9216  test -z "$as_dir" && as_dir=.
9217    for ac_exec_ext in '' $ac_executable_extensions; do
9218  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9219    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9220    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9221    break 2
9222  fi
9223done
9224  done
9225IFS=$as_save_IFS
9226
9227  ;;
9228esac
9229fi
9230SH=$ac_cv_path_SH
9231if test -n "$SH"; then
9232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9233$as_echo "$SH" >&6; }
9234else
9235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9236$as_echo "no" >&6; }
9237fi
9238
9239
9240  test -n "$SH" && break
9241done
9242
9243    else
9244      # If it succeeded, then it was overridden by the user. We will use it
9245      # for the tool.
9246
9247      # First remove it from the list of overridden variables, so we can test
9248      # for unknown variables in the end.
9249      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9250
9251      # Check if the provided tool contains a complete path.
9252      tool_specified="$SH"
9253      tool_basename="${tool_specified##*/}"
9254      if test "x$tool_basename" = "x$tool_specified"; then
9255        # A command without a complete path is provided, search $PATH.
9256        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9257$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9258        # Extract the first word of "$tool_basename", so it can be a program name with args.
9259set dummy $tool_basename; ac_word=$2
9260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9261$as_echo_n "checking for $ac_word... " >&6; }
9262if ${ac_cv_path_SH+:} false; then :
9263  $as_echo_n "(cached) " >&6
9264else
9265  case $SH in
9266  [\\/]* | ?:[\\/]*)
9267  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9268  ;;
9269  *)
9270  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9271for as_dir in $PATH
9272do
9273  IFS=$as_save_IFS
9274  test -z "$as_dir" && as_dir=.
9275    for ac_exec_ext in '' $ac_executable_extensions; do
9276  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9277    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9278    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9279    break 2
9280  fi
9281done
9282  done
9283IFS=$as_save_IFS
9284
9285  ;;
9286esac
9287fi
9288SH=$ac_cv_path_SH
9289if test -n "$SH"; then
9290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9291$as_echo "$SH" >&6; }
9292else
9293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9294$as_echo "no" >&6; }
9295fi
9296
9297
9298        if test "x$SH" = x; then
9299          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9300        fi
9301      else
9302        # Otherwise we believe it is a complete path. Use it as it is.
9303        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9304$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9305        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9306$as_echo_n "checking for SH... " >&6; }
9307        if test ! -x "$tool_specified"; then
9308          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9309$as_echo "not found" >&6; }
9310          as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9311        fi
9312        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9313$as_echo "$tool_specified" >&6; }
9314      fi
9315    fi
9316  fi
9317
9318
9319
9320  if test "x$SH" = x; then
9321    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9322  fi
9323
9324
9325
9326
9327
9328  # Publish this variable in the help.
9329
9330
9331  if test "x$SORT" = x; then
9332    # The variable is not set by user, try to locate tool using the code snippet
9333    for ac_prog in sort
9334do
9335  # Extract the first word of "$ac_prog", so it can be a program name with args.
9336set dummy $ac_prog; ac_word=$2
9337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9338$as_echo_n "checking for $ac_word... " >&6; }
9339if ${ac_cv_path_SORT+:} false; then :
9340  $as_echo_n "(cached) " >&6
9341else
9342  case $SORT in
9343  [\\/]* | ?:[\\/]*)
9344  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9345  ;;
9346  *)
9347  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9348for as_dir in $PATH
9349do
9350  IFS=$as_save_IFS
9351  test -z "$as_dir" && as_dir=.
9352    for ac_exec_ext in '' $ac_executable_extensions; do
9353  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9354    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9355    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9356    break 2
9357  fi
9358done
9359  done
9360IFS=$as_save_IFS
9361
9362  ;;
9363esac
9364fi
9365SORT=$ac_cv_path_SORT
9366if test -n "$SORT"; then
9367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9368$as_echo "$SORT" >&6; }
9369else
9370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9371$as_echo "no" >&6; }
9372fi
9373
9374
9375  test -n "$SORT" && break
9376done
9377
9378  else
9379    # The variable is set, but is it from the command line or the environment?
9380
9381    # Try to remove the string !SORT! from our list.
9382    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9383    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9384      # If it failed, the variable was not from the command line. Ignore it,
9385      # but warn the user (except for BASH, which is always set by the calling BASH).
9386      if test "xSORT" != xBASH; then
9387        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9388$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9389      fi
9390      # Try to locate tool using the code snippet
9391      for ac_prog in sort
9392do
9393  # Extract the first word of "$ac_prog", so it can be a program name with args.
9394set dummy $ac_prog; ac_word=$2
9395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9396$as_echo_n "checking for $ac_word... " >&6; }
9397if ${ac_cv_path_SORT+:} false; then :
9398  $as_echo_n "(cached) " >&6
9399else
9400  case $SORT in
9401  [\\/]* | ?:[\\/]*)
9402  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9403  ;;
9404  *)
9405  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9406for as_dir in $PATH
9407do
9408  IFS=$as_save_IFS
9409  test -z "$as_dir" && as_dir=.
9410    for ac_exec_ext in '' $ac_executable_extensions; do
9411  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9412    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9413    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9414    break 2
9415  fi
9416done
9417  done
9418IFS=$as_save_IFS
9419
9420  ;;
9421esac
9422fi
9423SORT=$ac_cv_path_SORT
9424if test -n "$SORT"; then
9425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9426$as_echo "$SORT" >&6; }
9427else
9428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9429$as_echo "no" >&6; }
9430fi
9431
9432
9433  test -n "$SORT" && break
9434done
9435
9436    else
9437      # If it succeeded, then it was overridden by the user. We will use it
9438      # for the tool.
9439
9440      # First remove it from the list of overridden variables, so we can test
9441      # for unknown variables in the end.
9442      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9443
9444      # Check if the provided tool contains a complete path.
9445      tool_specified="$SORT"
9446      tool_basename="${tool_specified##*/}"
9447      if test "x$tool_basename" = "x$tool_specified"; then
9448        # A command without a complete path is provided, search $PATH.
9449        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9450$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9451        # Extract the first word of "$tool_basename", so it can be a program name with args.
9452set dummy $tool_basename; ac_word=$2
9453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9454$as_echo_n "checking for $ac_word... " >&6; }
9455if ${ac_cv_path_SORT+:} false; then :
9456  $as_echo_n "(cached) " >&6
9457else
9458  case $SORT in
9459  [\\/]* | ?:[\\/]*)
9460  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9461  ;;
9462  *)
9463  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9464for as_dir in $PATH
9465do
9466  IFS=$as_save_IFS
9467  test -z "$as_dir" && as_dir=.
9468    for ac_exec_ext in '' $ac_executable_extensions; do
9469  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9470    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9471    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9472    break 2
9473  fi
9474done
9475  done
9476IFS=$as_save_IFS
9477
9478  ;;
9479esac
9480fi
9481SORT=$ac_cv_path_SORT
9482if test -n "$SORT"; then
9483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9484$as_echo "$SORT" >&6; }
9485else
9486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9487$as_echo "no" >&6; }
9488fi
9489
9490
9491        if test "x$SORT" = x; then
9492          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9493        fi
9494      else
9495        # Otherwise we believe it is a complete path. Use it as it is.
9496        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9497$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9498        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9499$as_echo_n "checking for SORT... " >&6; }
9500        if test ! -x "$tool_specified"; then
9501          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9502$as_echo "not found" >&6; }
9503          as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9504        fi
9505        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9506$as_echo "$tool_specified" >&6; }
9507      fi
9508    fi
9509  fi
9510
9511
9512
9513  if test "x$SORT" = x; then
9514    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9515  fi
9516
9517
9518
9519
9520
9521  # Publish this variable in the help.
9522
9523
9524  if test "x$TAIL" = x; then
9525    # The variable is not set by user, try to locate tool using the code snippet
9526    for ac_prog in tail
9527do
9528  # Extract the first word of "$ac_prog", so it can be a program name with args.
9529set dummy $ac_prog; ac_word=$2
9530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9531$as_echo_n "checking for $ac_word... " >&6; }
9532if ${ac_cv_path_TAIL+:} false; then :
9533  $as_echo_n "(cached) " >&6
9534else
9535  case $TAIL in
9536  [\\/]* | ?:[\\/]*)
9537  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9538  ;;
9539  *)
9540  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9541for as_dir in $PATH
9542do
9543  IFS=$as_save_IFS
9544  test -z "$as_dir" && as_dir=.
9545    for ac_exec_ext in '' $ac_executable_extensions; do
9546  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9547    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9548    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9549    break 2
9550  fi
9551done
9552  done
9553IFS=$as_save_IFS
9554
9555  ;;
9556esac
9557fi
9558TAIL=$ac_cv_path_TAIL
9559if test -n "$TAIL"; then
9560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9561$as_echo "$TAIL" >&6; }
9562else
9563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9564$as_echo "no" >&6; }
9565fi
9566
9567
9568  test -n "$TAIL" && break
9569done
9570
9571  else
9572    # The variable is set, but is it from the command line or the environment?
9573
9574    # Try to remove the string !TAIL! from our list.
9575    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9576    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9577      # If it failed, the variable was not from the command line. Ignore it,
9578      # but warn the user (except for BASH, which is always set by the calling BASH).
9579      if test "xTAIL" != xBASH; then
9580        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9581$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9582      fi
9583      # Try to locate tool using the code snippet
9584      for ac_prog in tail
9585do
9586  # Extract the first word of "$ac_prog", so it can be a program name with args.
9587set dummy $ac_prog; ac_word=$2
9588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9589$as_echo_n "checking for $ac_word... " >&6; }
9590if ${ac_cv_path_TAIL+:} false; then :
9591  $as_echo_n "(cached) " >&6
9592else
9593  case $TAIL in
9594  [\\/]* | ?:[\\/]*)
9595  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9596  ;;
9597  *)
9598  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9599for as_dir in $PATH
9600do
9601  IFS=$as_save_IFS
9602  test -z "$as_dir" && as_dir=.
9603    for ac_exec_ext in '' $ac_executable_extensions; do
9604  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9605    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9606    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9607    break 2
9608  fi
9609done
9610  done
9611IFS=$as_save_IFS
9612
9613  ;;
9614esac
9615fi
9616TAIL=$ac_cv_path_TAIL
9617if test -n "$TAIL"; then
9618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9619$as_echo "$TAIL" >&6; }
9620else
9621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9622$as_echo "no" >&6; }
9623fi
9624
9625
9626  test -n "$TAIL" && break
9627done
9628
9629    else
9630      # If it succeeded, then it was overridden by the user. We will use it
9631      # for the tool.
9632
9633      # First remove it from the list of overridden variables, so we can test
9634      # for unknown variables in the end.
9635      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9636
9637      # Check if the provided tool contains a complete path.
9638      tool_specified="$TAIL"
9639      tool_basename="${tool_specified##*/}"
9640      if test "x$tool_basename" = "x$tool_specified"; then
9641        # A command without a complete path is provided, search $PATH.
9642        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9643$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9644        # Extract the first word of "$tool_basename", so it can be a program name with args.
9645set dummy $tool_basename; ac_word=$2
9646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9647$as_echo_n "checking for $ac_word... " >&6; }
9648if ${ac_cv_path_TAIL+:} false; then :
9649  $as_echo_n "(cached) " >&6
9650else
9651  case $TAIL in
9652  [\\/]* | ?:[\\/]*)
9653  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9654  ;;
9655  *)
9656  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9657for as_dir in $PATH
9658do
9659  IFS=$as_save_IFS
9660  test -z "$as_dir" && as_dir=.
9661    for ac_exec_ext in '' $ac_executable_extensions; do
9662  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9663    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9664    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9665    break 2
9666  fi
9667done
9668  done
9669IFS=$as_save_IFS
9670
9671  ;;
9672esac
9673fi
9674TAIL=$ac_cv_path_TAIL
9675if test -n "$TAIL"; then
9676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9677$as_echo "$TAIL" >&6; }
9678else
9679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9680$as_echo "no" >&6; }
9681fi
9682
9683
9684        if test "x$TAIL" = x; then
9685          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9686        fi
9687      else
9688        # Otherwise we believe it is a complete path. Use it as it is.
9689        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9690$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9691        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9692$as_echo_n "checking for TAIL... " >&6; }
9693        if test ! -x "$tool_specified"; then
9694          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9695$as_echo "not found" >&6; }
9696          as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9697        fi
9698        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9699$as_echo "$tool_specified" >&6; }
9700      fi
9701    fi
9702  fi
9703
9704
9705
9706  if test "x$TAIL" = x; then
9707    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9708  fi
9709
9710
9711
9712
9713
9714  # Publish this variable in the help.
9715
9716
9717  if test "x$TAR" = x; then
9718    # The variable is not set by user, try to locate tool using the code snippet
9719    for ac_prog in tar
9720do
9721  # Extract the first word of "$ac_prog", so it can be a program name with args.
9722set dummy $ac_prog; ac_word=$2
9723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9724$as_echo_n "checking for $ac_word... " >&6; }
9725if ${ac_cv_path_TAR+:} false; then :
9726  $as_echo_n "(cached) " >&6
9727else
9728  case $TAR in
9729  [\\/]* | ?:[\\/]*)
9730  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9731  ;;
9732  *)
9733  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9734for as_dir in $PATH
9735do
9736  IFS=$as_save_IFS
9737  test -z "$as_dir" && as_dir=.
9738    for ac_exec_ext in '' $ac_executable_extensions; do
9739  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9740    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9741    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9742    break 2
9743  fi
9744done
9745  done
9746IFS=$as_save_IFS
9747
9748  ;;
9749esac
9750fi
9751TAR=$ac_cv_path_TAR
9752if test -n "$TAR"; then
9753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9754$as_echo "$TAR" >&6; }
9755else
9756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9757$as_echo "no" >&6; }
9758fi
9759
9760
9761  test -n "$TAR" && break
9762done
9763
9764  else
9765    # The variable is set, but is it from the command line or the environment?
9766
9767    # Try to remove the string !TAR! from our list.
9768    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9769    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9770      # If it failed, the variable was not from the command line. Ignore it,
9771      # but warn the user (except for BASH, which is always set by the calling BASH).
9772      if test "xTAR" != xBASH; then
9773        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9774$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9775      fi
9776      # Try to locate tool using the code snippet
9777      for ac_prog in tar
9778do
9779  # Extract the first word of "$ac_prog", so it can be a program name with args.
9780set dummy $ac_prog; ac_word=$2
9781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9782$as_echo_n "checking for $ac_word... " >&6; }
9783if ${ac_cv_path_TAR+:} false; then :
9784  $as_echo_n "(cached) " >&6
9785else
9786  case $TAR in
9787  [\\/]* | ?:[\\/]*)
9788  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9789  ;;
9790  *)
9791  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9792for as_dir in $PATH
9793do
9794  IFS=$as_save_IFS
9795  test -z "$as_dir" && as_dir=.
9796    for ac_exec_ext in '' $ac_executable_extensions; do
9797  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9798    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9799    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9800    break 2
9801  fi
9802done
9803  done
9804IFS=$as_save_IFS
9805
9806  ;;
9807esac
9808fi
9809TAR=$ac_cv_path_TAR
9810if test -n "$TAR"; then
9811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9812$as_echo "$TAR" >&6; }
9813else
9814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9815$as_echo "no" >&6; }
9816fi
9817
9818
9819  test -n "$TAR" && break
9820done
9821
9822    else
9823      # If it succeeded, then it was overridden by the user. We will use it
9824      # for the tool.
9825
9826      # First remove it from the list of overridden variables, so we can test
9827      # for unknown variables in the end.
9828      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9829
9830      # Check if the provided tool contains a complete path.
9831      tool_specified="$TAR"
9832      tool_basename="${tool_specified##*/}"
9833      if test "x$tool_basename" = "x$tool_specified"; then
9834        # A command without a complete path is provided, search $PATH.
9835        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9836$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9837        # Extract the first word of "$tool_basename", so it can be a program name with args.
9838set dummy $tool_basename; ac_word=$2
9839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9840$as_echo_n "checking for $ac_word... " >&6; }
9841if ${ac_cv_path_TAR+:} false; then :
9842  $as_echo_n "(cached) " >&6
9843else
9844  case $TAR in
9845  [\\/]* | ?:[\\/]*)
9846  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9847  ;;
9848  *)
9849  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9850for as_dir in $PATH
9851do
9852  IFS=$as_save_IFS
9853  test -z "$as_dir" && as_dir=.
9854    for ac_exec_ext in '' $ac_executable_extensions; do
9855  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9856    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9857    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9858    break 2
9859  fi
9860done
9861  done
9862IFS=$as_save_IFS
9863
9864  ;;
9865esac
9866fi
9867TAR=$ac_cv_path_TAR
9868if test -n "$TAR"; then
9869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9870$as_echo "$TAR" >&6; }
9871else
9872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9873$as_echo "no" >&6; }
9874fi
9875
9876
9877        if test "x$TAR" = x; then
9878          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9879        fi
9880      else
9881        # Otherwise we believe it is a complete path. Use it as it is.
9882        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9883$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9884        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9885$as_echo_n "checking for TAR... " >&6; }
9886        if test ! -x "$tool_specified"; then
9887          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9888$as_echo "not found" >&6; }
9889          as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9890        fi
9891        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9892$as_echo "$tool_specified" >&6; }
9893      fi
9894    fi
9895  fi
9896
9897
9898
9899  if test "x$TAR" = x; then
9900    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9901  fi
9902
9903
9904
9905
9906
9907  # Publish this variable in the help.
9908
9909
9910  if test "x$TEE" = x; then
9911    # The variable is not set by user, try to locate tool using the code snippet
9912    for ac_prog in tee
9913do
9914  # Extract the first word of "$ac_prog", so it can be a program name with args.
9915set dummy $ac_prog; ac_word=$2
9916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9917$as_echo_n "checking for $ac_word... " >&6; }
9918if ${ac_cv_path_TEE+:} false; then :
9919  $as_echo_n "(cached) " >&6
9920else
9921  case $TEE in
9922  [\\/]* | ?:[\\/]*)
9923  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9924  ;;
9925  *)
9926  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9927for as_dir in $PATH
9928do
9929  IFS=$as_save_IFS
9930  test -z "$as_dir" && as_dir=.
9931    for ac_exec_ext in '' $ac_executable_extensions; do
9932  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9933    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9934    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9935    break 2
9936  fi
9937done
9938  done
9939IFS=$as_save_IFS
9940
9941  ;;
9942esac
9943fi
9944TEE=$ac_cv_path_TEE
9945if test -n "$TEE"; then
9946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9947$as_echo "$TEE" >&6; }
9948else
9949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9950$as_echo "no" >&6; }
9951fi
9952
9953
9954  test -n "$TEE" && break
9955done
9956
9957  else
9958    # The variable is set, but is it from the command line or the environment?
9959
9960    # Try to remove the string !TEE! from our list.
9961    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9962    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9963      # If it failed, the variable was not from the command line. Ignore it,
9964      # but warn the user (except for BASH, which is always set by the calling BASH).
9965      if test "xTEE" != xBASH; then
9966        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9967$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9968      fi
9969      # Try to locate tool using the code snippet
9970      for ac_prog in tee
9971do
9972  # Extract the first word of "$ac_prog", so it can be a program name with args.
9973set dummy $ac_prog; ac_word=$2
9974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9975$as_echo_n "checking for $ac_word... " >&6; }
9976if ${ac_cv_path_TEE+:} false; then :
9977  $as_echo_n "(cached) " >&6
9978else
9979  case $TEE in
9980  [\\/]* | ?:[\\/]*)
9981  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9982  ;;
9983  *)
9984  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9985for as_dir in $PATH
9986do
9987  IFS=$as_save_IFS
9988  test -z "$as_dir" && as_dir=.
9989    for ac_exec_ext in '' $ac_executable_extensions; do
9990  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9991    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9992    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9993    break 2
9994  fi
9995done
9996  done
9997IFS=$as_save_IFS
9998
9999  ;;
10000esac
10001fi
10002TEE=$ac_cv_path_TEE
10003if test -n "$TEE"; then
10004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10005$as_echo "$TEE" >&6; }
10006else
10007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10008$as_echo "no" >&6; }
10009fi
10010
10011
10012  test -n "$TEE" && break
10013done
10014
10015    else
10016      # If it succeeded, then it was overridden by the user. We will use it
10017      # for the tool.
10018
10019      # First remove it from the list of overridden variables, so we can test
10020      # for unknown variables in the end.
10021      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10022
10023      # Check if the provided tool contains a complete path.
10024      tool_specified="$TEE"
10025      tool_basename="${tool_specified##*/}"
10026      if test "x$tool_basename" = "x$tool_specified"; then
10027        # A command without a complete path is provided, search $PATH.
10028        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
10029$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
10030        # Extract the first word of "$tool_basename", so it can be a program name with args.
10031set dummy $tool_basename; ac_word=$2
10032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10033$as_echo_n "checking for $ac_word... " >&6; }
10034if ${ac_cv_path_TEE+:} false; then :
10035  $as_echo_n "(cached) " >&6
10036else
10037  case $TEE in
10038  [\\/]* | ?:[\\/]*)
10039  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10040  ;;
10041  *)
10042  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10043for as_dir in $PATH
10044do
10045  IFS=$as_save_IFS
10046  test -z "$as_dir" && as_dir=.
10047    for ac_exec_ext in '' $ac_executable_extensions; do
10048  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10049    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10050    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10051    break 2
10052  fi
10053done
10054  done
10055IFS=$as_save_IFS
10056
10057  ;;
10058esac
10059fi
10060TEE=$ac_cv_path_TEE
10061if test -n "$TEE"; then
10062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10063$as_echo "$TEE" >&6; }
10064else
10065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10066$as_echo "no" >&6; }
10067fi
10068
10069
10070        if test "x$TEE" = x; then
10071          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10072        fi
10073      else
10074        # Otherwise we believe it is a complete path. Use it as it is.
10075        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
10076$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10077        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10078$as_echo_n "checking for TEE... " >&6; }
10079        if test ! -x "$tool_specified"; then
10080          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10081$as_echo "not found" >&6; }
10082          as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10083        fi
10084        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10085$as_echo "$tool_specified" >&6; }
10086      fi
10087    fi
10088  fi
10089
10090
10091
10092  if test "x$TEE" = x; then
10093    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10094  fi
10095
10096
10097
10098
10099
10100  # Publish this variable in the help.
10101
10102
10103  if test "x$TOUCH" = x; then
10104    # The variable is not set by user, try to locate tool using the code snippet
10105    for ac_prog in touch
10106do
10107  # Extract the first word of "$ac_prog", so it can be a program name with args.
10108set dummy $ac_prog; ac_word=$2
10109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10110$as_echo_n "checking for $ac_word... " >&6; }
10111if ${ac_cv_path_TOUCH+:} false; then :
10112  $as_echo_n "(cached) " >&6
10113else
10114  case $TOUCH in
10115  [\\/]* | ?:[\\/]*)
10116  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10117  ;;
10118  *)
10119  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10120for as_dir in $PATH
10121do
10122  IFS=$as_save_IFS
10123  test -z "$as_dir" && as_dir=.
10124    for ac_exec_ext in '' $ac_executable_extensions; do
10125  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10126    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10127    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10128    break 2
10129  fi
10130done
10131  done
10132IFS=$as_save_IFS
10133
10134  ;;
10135esac
10136fi
10137TOUCH=$ac_cv_path_TOUCH
10138if test -n "$TOUCH"; then
10139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10140$as_echo "$TOUCH" >&6; }
10141else
10142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10143$as_echo "no" >&6; }
10144fi
10145
10146
10147  test -n "$TOUCH" && break
10148done
10149
10150  else
10151    # The variable is set, but is it from the command line or the environment?
10152
10153    # Try to remove the string !TOUCH! from our list.
10154    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10155    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10156      # If it failed, the variable was not from the command line. Ignore it,
10157      # but warn the user (except for BASH, which is always set by the calling BASH).
10158      if test "xTOUCH" != xBASH; then
10159        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10160$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10161      fi
10162      # Try to locate tool using the code snippet
10163      for ac_prog in touch
10164do
10165  # Extract the first word of "$ac_prog", so it can be a program name with args.
10166set dummy $ac_prog; ac_word=$2
10167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10168$as_echo_n "checking for $ac_word... " >&6; }
10169if ${ac_cv_path_TOUCH+:} false; then :
10170  $as_echo_n "(cached) " >&6
10171else
10172  case $TOUCH in
10173  [\\/]* | ?:[\\/]*)
10174  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10175  ;;
10176  *)
10177  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10178for as_dir in $PATH
10179do
10180  IFS=$as_save_IFS
10181  test -z "$as_dir" && as_dir=.
10182    for ac_exec_ext in '' $ac_executable_extensions; do
10183  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10184    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10185    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10186    break 2
10187  fi
10188done
10189  done
10190IFS=$as_save_IFS
10191
10192  ;;
10193esac
10194fi
10195TOUCH=$ac_cv_path_TOUCH
10196if test -n "$TOUCH"; then
10197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10198$as_echo "$TOUCH" >&6; }
10199else
10200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10201$as_echo "no" >&6; }
10202fi
10203
10204
10205  test -n "$TOUCH" && break
10206done
10207
10208    else
10209      # If it succeeded, then it was overridden by the user. We will use it
10210      # for the tool.
10211
10212      # First remove it from the list of overridden variables, so we can test
10213      # for unknown variables in the end.
10214      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10215
10216      # Check if the provided tool contains a complete path.
10217      tool_specified="$TOUCH"
10218      tool_basename="${tool_specified##*/}"
10219      if test "x$tool_basename" = "x$tool_specified"; then
10220        # A command without a complete path is provided, search $PATH.
10221        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10222$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10223        # Extract the first word of "$tool_basename", so it can be a program name with args.
10224set dummy $tool_basename; ac_word=$2
10225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10226$as_echo_n "checking for $ac_word... " >&6; }
10227if ${ac_cv_path_TOUCH+:} false; then :
10228  $as_echo_n "(cached) " >&6
10229else
10230  case $TOUCH in
10231  [\\/]* | ?:[\\/]*)
10232  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10233  ;;
10234  *)
10235  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10236for as_dir in $PATH
10237do
10238  IFS=$as_save_IFS
10239  test -z "$as_dir" && as_dir=.
10240    for ac_exec_ext in '' $ac_executable_extensions; do
10241  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10242    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10243    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10244    break 2
10245  fi
10246done
10247  done
10248IFS=$as_save_IFS
10249
10250  ;;
10251esac
10252fi
10253TOUCH=$ac_cv_path_TOUCH
10254if test -n "$TOUCH"; then
10255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10256$as_echo "$TOUCH" >&6; }
10257else
10258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10259$as_echo "no" >&6; }
10260fi
10261
10262
10263        if test "x$TOUCH" = x; then
10264          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10265        fi
10266      else
10267        # Otherwise we believe it is a complete path. Use it as it is.
10268        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10269$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10270        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10271$as_echo_n "checking for TOUCH... " >&6; }
10272        if test ! -x "$tool_specified"; then
10273          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10274$as_echo "not found" >&6; }
10275          as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10276        fi
10277        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10278$as_echo "$tool_specified" >&6; }
10279      fi
10280    fi
10281  fi
10282
10283
10284
10285  if test "x$TOUCH" = x; then
10286    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10287  fi
10288
10289
10290
10291
10292
10293  # Publish this variable in the help.
10294
10295
10296  if test "x$TR" = x; then
10297    # The variable is not set by user, try to locate tool using the code snippet
10298    for ac_prog in tr
10299do
10300  # Extract the first word of "$ac_prog", so it can be a program name with args.
10301set dummy $ac_prog; ac_word=$2
10302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10303$as_echo_n "checking for $ac_word... " >&6; }
10304if ${ac_cv_path_TR+:} false; then :
10305  $as_echo_n "(cached) " >&6
10306else
10307  case $TR in
10308  [\\/]* | ?:[\\/]*)
10309  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10310  ;;
10311  *)
10312  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10313for as_dir in $PATH
10314do
10315  IFS=$as_save_IFS
10316  test -z "$as_dir" && as_dir=.
10317    for ac_exec_ext in '' $ac_executable_extensions; do
10318  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10319    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10320    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10321    break 2
10322  fi
10323done
10324  done
10325IFS=$as_save_IFS
10326
10327  ;;
10328esac
10329fi
10330TR=$ac_cv_path_TR
10331if test -n "$TR"; then
10332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10333$as_echo "$TR" >&6; }
10334else
10335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10336$as_echo "no" >&6; }
10337fi
10338
10339
10340  test -n "$TR" && break
10341done
10342
10343  else
10344    # The variable is set, but is it from the command line or the environment?
10345
10346    # Try to remove the string !TR! from our list.
10347    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10348    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10349      # If it failed, the variable was not from the command line. Ignore it,
10350      # but warn the user (except for BASH, which is always set by the calling BASH).
10351      if test "xTR" != xBASH; then
10352        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10353$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10354      fi
10355      # Try to locate tool using the code snippet
10356      for ac_prog in tr
10357do
10358  # Extract the first word of "$ac_prog", so it can be a program name with args.
10359set dummy $ac_prog; ac_word=$2
10360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10361$as_echo_n "checking for $ac_word... " >&6; }
10362if ${ac_cv_path_TR+:} false; then :
10363  $as_echo_n "(cached) " >&6
10364else
10365  case $TR in
10366  [\\/]* | ?:[\\/]*)
10367  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10368  ;;
10369  *)
10370  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10371for as_dir in $PATH
10372do
10373  IFS=$as_save_IFS
10374  test -z "$as_dir" && as_dir=.
10375    for ac_exec_ext in '' $ac_executable_extensions; do
10376  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10377    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10378    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10379    break 2
10380  fi
10381done
10382  done
10383IFS=$as_save_IFS
10384
10385  ;;
10386esac
10387fi
10388TR=$ac_cv_path_TR
10389if test -n "$TR"; then
10390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10391$as_echo "$TR" >&6; }
10392else
10393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10394$as_echo "no" >&6; }
10395fi
10396
10397
10398  test -n "$TR" && break
10399done
10400
10401    else
10402      # If it succeeded, then it was overridden by the user. We will use it
10403      # for the tool.
10404
10405      # First remove it from the list of overridden variables, so we can test
10406      # for unknown variables in the end.
10407      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10408
10409      # Check if the provided tool contains a complete path.
10410      tool_specified="$TR"
10411      tool_basename="${tool_specified##*/}"
10412      if test "x$tool_basename" = "x$tool_specified"; then
10413        # A command without a complete path is provided, search $PATH.
10414        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10415$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10416        # Extract the first word of "$tool_basename", so it can be a program name with args.
10417set dummy $tool_basename; ac_word=$2
10418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10419$as_echo_n "checking for $ac_word... " >&6; }
10420if ${ac_cv_path_TR+:} false; then :
10421  $as_echo_n "(cached) " >&6
10422else
10423  case $TR in
10424  [\\/]* | ?:[\\/]*)
10425  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10426  ;;
10427  *)
10428  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10429for as_dir in $PATH
10430do
10431  IFS=$as_save_IFS
10432  test -z "$as_dir" && as_dir=.
10433    for ac_exec_ext in '' $ac_executable_extensions; do
10434  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10435    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10436    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10437    break 2
10438  fi
10439done
10440  done
10441IFS=$as_save_IFS
10442
10443  ;;
10444esac
10445fi
10446TR=$ac_cv_path_TR
10447if test -n "$TR"; then
10448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10449$as_echo "$TR" >&6; }
10450else
10451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10452$as_echo "no" >&6; }
10453fi
10454
10455
10456        if test "x$TR" = x; then
10457          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10458        fi
10459      else
10460        # Otherwise we believe it is a complete path. Use it as it is.
10461        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10462$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10463        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10464$as_echo_n "checking for TR... " >&6; }
10465        if test ! -x "$tool_specified"; then
10466          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10467$as_echo "not found" >&6; }
10468          as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10469        fi
10470        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10471$as_echo "$tool_specified" >&6; }
10472      fi
10473    fi
10474  fi
10475
10476
10477
10478  if test "x$TR" = x; then
10479    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10480  fi
10481
10482
10483
10484
10485
10486  # Publish this variable in the help.
10487
10488
10489  if test "x$UNAME" = x; then
10490    # The variable is not set by user, try to locate tool using the code snippet
10491    for ac_prog in uname
10492do
10493  # Extract the first word of "$ac_prog", so it can be a program name with args.
10494set dummy $ac_prog; ac_word=$2
10495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10496$as_echo_n "checking for $ac_word... " >&6; }
10497if ${ac_cv_path_UNAME+:} false; then :
10498  $as_echo_n "(cached) " >&6
10499else
10500  case $UNAME in
10501  [\\/]* | ?:[\\/]*)
10502  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10503  ;;
10504  *)
10505  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10506for as_dir in $PATH
10507do
10508  IFS=$as_save_IFS
10509  test -z "$as_dir" && as_dir=.
10510    for ac_exec_ext in '' $ac_executable_extensions; do
10511  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10512    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10513    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10514    break 2
10515  fi
10516done
10517  done
10518IFS=$as_save_IFS
10519
10520  ;;
10521esac
10522fi
10523UNAME=$ac_cv_path_UNAME
10524if test -n "$UNAME"; then
10525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10526$as_echo "$UNAME" >&6; }
10527else
10528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10529$as_echo "no" >&6; }
10530fi
10531
10532
10533  test -n "$UNAME" && break
10534done
10535
10536  else
10537    # The variable is set, but is it from the command line or the environment?
10538
10539    # Try to remove the string !UNAME! from our list.
10540    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10541    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10542      # If it failed, the variable was not from the command line. Ignore it,
10543      # but warn the user (except for BASH, which is always set by the calling BASH).
10544      if test "xUNAME" != xBASH; then
10545        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10546$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10547      fi
10548      # Try to locate tool using the code snippet
10549      for ac_prog in uname
10550do
10551  # Extract the first word of "$ac_prog", so it can be a program name with args.
10552set dummy $ac_prog; ac_word=$2
10553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10554$as_echo_n "checking for $ac_word... " >&6; }
10555if ${ac_cv_path_UNAME+:} false; then :
10556  $as_echo_n "(cached) " >&6
10557else
10558  case $UNAME in
10559  [\\/]* | ?:[\\/]*)
10560  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10561  ;;
10562  *)
10563  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10564for as_dir in $PATH
10565do
10566  IFS=$as_save_IFS
10567  test -z "$as_dir" && as_dir=.
10568    for ac_exec_ext in '' $ac_executable_extensions; do
10569  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10570    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10571    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10572    break 2
10573  fi
10574done
10575  done
10576IFS=$as_save_IFS
10577
10578  ;;
10579esac
10580fi
10581UNAME=$ac_cv_path_UNAME
10582if test -n "$UNAME"; then
10583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10584$as_echo "$UNAME" >&6; }
10585else
10586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10587$as_echo "no" >&6; }
10588fi
10589
10590
10591  test -n "$UNAME" && break
10592done
10593
10594    else
10595      # If it succeeded, then it was overridden by the user. We will use it
10596      # for the tool.
10597
10598      # First remove it from the list of overridden variables, so we can test
10599      # for unknown variables in the end.
10600      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10601
10602      # Check if the provided tool contains a complete path.
10603      tool_specified="$UNAME"
10604      tool_basename="${tool_specified##*/}"
10605      if test "x$tool_basename" = "x$tool_specified"; then
10606        # A command without a complete path is provided, search $PATH.
10607        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10608$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10609        # Extract the first word of "$tool_basename", so it can be a program name with args.
10610set dummy $tool_basename; ac_word=$2
10611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10612$as_echo_n "checking for $ac_word... " >&6; }
10613if ${ac_cv_path_UNAME+:} false; then :
10614  $as_echo_n "(cached) " >&6
10615else
10616  case $UNAME in
10617  [\\/]* | ?:[\\/]*)
10618  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10619  ;;
10620  *)
10621  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10622for as_dir in $PATH
10623do
10624  IFS=$as_save_IFS
10625  test -z "$as_dir" && as_dir=.
10626    for ac_exec_ext in '' $ac_executable_extensions; do
10627  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10628    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10629    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10630    break 2
10631  fi
10632done
10633  done
10634IFS=$as_save_IFS
10635
10636  ;;
10637esac
10638fi
10639UNAME=$ac_cv_path_UNAME
10640if test -n "$UNAME"; then
10641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10642$as_echo "$UNAME" >&6; }
10643else
10644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10645$as_echo "no" >&6; }
10646fi
10647
10648
10649        if test "x$UNAME" = x; then
10650          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10651        fi
10652      else
10653        # Otherwise we believe it is a complete path. Use it as it is.
10654        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10655$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10656        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10657$as_echo_n "checking for UNAME... " >&6; }
10658        if test ! -x "$tool_specified"; then
10659          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10660$as_echo "not found" >&6; }
10661          as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10662        fi
10663        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10664$as_echo "$tool_specified" >&6; }
10665      fi
10666    fi
10667  fi
10668
10669
10670
10671  if test "x$UNAME" = x; then
10672    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10673  fi
10674
10675
10676
10677
10678
10679  # Publish this variable in the help.
10680
10681
10682  if test "x$UNIQ" = x; then
10683    # The variable is not set by user, try to locate tool using the code snippet
10684    for ac_prog in uniq
10685do
10686  # Extract the first word of "$ac_prog", so it can be a program name with args.
10687set dummy $ac_prog; ac_word=$2
10688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10689$as_echo_n "checking for $ac_word... " >&6; }
10690if ${ac_cv_path_UNIQ+:} false; then :
10691  $as_echo_n "(cached) " >&6
10692else
10693  case $UNIQ in
10694  [\\/]* | ?:[\\/]*)
10695  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10696  ;;
10697  *)
10698  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10699for as_dir in $PATH
10700do
10701  IFS=$as_save_IFS
10702  test -z "$as_dir" && as_dir=.
10703    for ac_exec_ext in '' $ac_executable_extensions; do
10704  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10705    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10706    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10707    break 2
10708  fi
10709done
10710  done
10711IFS=$as_save_IFS
10712
10713  ;;
10714esac
10715fi
10716UNIQ=$ac_cv_path_UNIQ
10717if test -n "$UNIQ"; then
10718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10719$as_echo "$UNIQ" >&6; }
10720else
10721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10722$as_echo "no" >&6; }
10723fi
10724
10725
10726  test -n "$UNIQ" && break
10727done
10728
10729  else
10730    # The variable is set, but is it from the command line or the environment?
10731
10732    # Try to remove the string !UNIQ! from our list.
10733    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10734    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10735      # If it failed, the variable was not from the command line. Ignore it,
10736      # but warn the user (except for BASH, which is always set by the calling BASH).
10737      if test "xUNIQ" != xBASH; then
10738        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10739$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10740      fi
10741      # Try to locate tool using the code snippet
10742      for ac_prog in uniq
10743do
10744  # Extract the first word of "$ac_prog", so it can be a program name with args.
10745set dummy $ac_prog; ac_word=$2
10746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10747$as_echo_n "checking for $ac_word... " >&6; }
10748if ${ac_cv_path_UNIQ+:} false; then :
10749  $as_echo_n "(cached) " >&6
10750else
10751  case $UNIQ in
10752  [\\/]* | ?:[\\/]*)
10753  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10754  ;;
10755  *)
10756  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10757for as_dir in $PATH
10758do
10759  IFS=$as_save_IFS
10760  test -z "$as_dir" && as_dir=.
10761    for ac_exec_ext in '' $ac_executable_extensions; do
10762  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10763    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10764    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10765    break 2
10766  fi
10767done
10768  done
10769IFS=$as_save_IFS
10770
10771  ;;
10772esac
10773fi
10774UNIQ=$ac_cv_path_UNIQ
10775if test -n "$UNIQ"; then
10776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10777$as_echo "$UNIQ" >&6; }
10778else
10779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10780$as_echo "no" >&6; }
10781fi
10782
10783
10784  test -n "$UNIQ" && break
10785done
10786
10787    else
10788      # If it succeeded, then it was overridden by the user. We will use it
10789      # for the tool.
10790
10791      # First remove it from the list of overridden variables, so we can test
10792      # for unknown variables in the end.
10793      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10794
10795      # Check if the provided tool contains a complete path.
10796      tool_specified="$UNIQ"
10797      tool_basename="${tool_specified##*/}"
10798      if test "x$tool_basename" = "x$tool_specified"; then
10799        # A command without a complete path is provided, search $PATH.
10800        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10801$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10802        # Extract the first word of "$tool_basename", so it can be a program name with args.
10803set dummy $tool_basename; ac_word=$2
10804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10805$as_echo_n "checking for $ac_word... " >&6; }
10806if ${ac_cv_path_UNIQ+:} false; then :
10807  $as_echo_n "(cached) " >&6
10808else
10809  case $UNIQ in
10810  [\\/]* | ?:[\\/]*)
10811  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10812  ;;
10813  *)
10814  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10815for as_dir in $PATH
10816do
10817  IFS=$as_save_IFS
10818  test -z "$as_dir" && as_dir=.
10819    for ac_exec_ext in '' $ac_executable_extensions; do
10820  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10821    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10822    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10823    break 2
10824  fi
10825done
10826  done
10827IFS=$as_save_IFS
10828
10829  ;;
10830esac
10831fi
10832UNIQ=$ac_cv_path_UNIQ
10833if test -n "$UNIQ"; then
10834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10835$as_echo "$UNIQ" >&6; }
10836else
10837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10838$as_echo "no" >&6; }
10839fi
10840
10841
10842        if test "x$UNIQ" = x; then
10843          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10844        fi
10845      else
10846        # Otherwise we believe it is a complete path. Use it as it is.
10847        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10848$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10849        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10850$as_echo_n "checking for UNIQ... " >&6; }
10851        if test ! -x "$tool_specified"; then
10852          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10853$as_echo "not found" >&6; }
10854          as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10855        fi
10856        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10857$as_echo "$tool_specified" >&6; }
10858      fi
10859    fi
10860  fi
10861
10862
10863
10864  if test "x$UNIQ" = x; then
10865    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10866  fi
10867
10868
10869
10870
10871
10872  # Publish this variable in the help.
10873
10874
10875  if test "x$WC" = x; then
10876    # The variable is not set by user, try to locate tool using the code snippet
10877    for ac_prog in wc
10878do
10879  # Extract the first word of "$ac_prog", so it can be a program name with args.
10880set dummy $ac_prog; ac_word=$2
10881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10882$as_echo_n "checking for $ac_word... " >&6; }
10883if ${ac_cv_path_WC+:} false; then :
10884  $as_echo_n "(cached) " >&6
10885else
10886  case $WC in
10887  [\\/]* | ?:[\\/]*)
10888  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10889  ;;
10890  *)
10891  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10892for as_dir in $PATH
10893do
10894  IFS=$as_save_IFS
10895  test -z "$as_dir" && as_dir=.
10896    for ac_exec_ext in '' $ac_executable_extensions; do
10897  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10898    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10899    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10900    break 2
10901  fi
10902done
10903  done
10904IFS=$as_save_IFS
10905
10906  ;;
10907esac
10908fi
10909WC=$ac_cv_path_WC
10910if test -n "$WC"; then
10911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10912$as_echo "$WC" >&6; }
10913else
10914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10915$as_echo "no" >&6; }
10916fi
10917
10918
10919  test -n "$WC" && break
10920done
10921
10922  else
10923    # The variable is set, but is it from the command line or the environment?
10924
10925    # Try to remove the string !WC! from our list.
10926    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10927    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10928      # If it failed, the variable was not from the command line. Ignore it,
10929      # but warn the user (except for BASH, which is always set by the calling BASH).
10930      if test "xWC" != xBASH; then
10931        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10932$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10933      fi
10934      # Try to locate tool using the code snippet
10935      for ac_prog in wc
10936do
10937  # Extract the first word of "$ac_prog", so it can be a program name with args.
10938set dummy $ac_prog; ac_word=$2
10939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10940$as_echo_n "checking for $ac_word... " >&6; }
10941if ${ac_cv_path_WC+:} false; then :
10942  $as_echo_n "(cached) " >&6
10943else
10944  case $WC in
10945  [\\/]* | ?:[\\/]*)
10946  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10947  ;;
10948  *)
10949  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10950for as_dir in $PATH
10951do
10952  IFS=$as_save_IFS
10953  test -z "$as_dir" && as_dir=.
10954    for ac_exec_ext in '' $ac_executable_extensions; do
10955  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10956    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10957    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10958    break 2
10959  fi
10960done
10961  done
10962IFS=$as_save_IFS
10963
10964  ;;
10965esac
10966fi
10967WC=$ac_cv_path_WC
10968if test -n "$WC"; then
10969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10970$as_echo "$WC" >&6; }
10971else
10972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10973$as_echo "no" >&6; }
10974fi
10975
10976
10977  test -n "$WC" && break
10978done
10979
10980    else
10981      # If it succeeded, then it was overridden by the user. We will use it
10982      # for the tool.
10983
10984      # First remove it from the list of overridden variables, so we can test
10985      # for unknown variables in the end.
10986      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10987
10988      # Check if the provided tool contains a complete path.
10989      tool_specified="$WC"
10990      tool_basename="${tool_specified##*/}"
10991      if test "x$tool_basename" = "x$tool_specified"; then
10992        # A command without a complete path is provided, search $PATH.
10993        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10994$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10995        # Extract the first word of "$tool_basename", so it can be a program name with args.
10996set dummy $tool_basename; ac_word=$2
10997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10998$as_echo_n "checking for $ac_word... " >&6; }
10999if ${ac_cv_path_WC+:} false; then :
11000  $as_echo_n "(cached) " >&6
11001else
11002  case $WC in
11003  [\\/]* | ?:[\\/]*)
11004  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11005  ;;
11006  *)
11007  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11008for as_dir in $PATH
11009do
11010  IFS=$as_save_IFS
11011  test -z "$as_dir" && as_dir=.
11012    for ac_exec_ext in '' $ac_executable_extensions; do
11013  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11014    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11015    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11016    break 2
11017  fi
11018done
11019  done
11020IFS=$as_save_IFS
11021
11022  ;;
11023esac
11024fi
11025WC=$ac_cv_path_WC
11026if test -n "$WC"; then
11027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11028$as_echo "$WC" >&6; }
11029else
11030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11031$as_echo "no" >&6; }
11032fi
11033
11034
11035        if test "x$WC" = x; then
11036          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11037        fi
11038      else
11039        # Otherwise we believe it is a complete path. Use it as it is.
11040        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
11041$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
11042        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11043$as_echo_n "checking for WC... " >&6; }
11044        if test ! -x "$tool_specified"; then
11045          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11046$as_echo "not found" >&6; }
11047          as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
11048        fi
11049        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11050$as_echo "$tool_specified" >&6; }
11051      fi
11052    fi
11053  fi
11054
11055
11056
11057  if test "x$WC" = x; then
11058    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
11059  fi
11060
11061
11062
11063
11064
11065  # Publish this variable in the help.
11066
11067
11068  if test "x$WHICH" = x; then
11069    # The variable is not set by user, try to locate tool using the code snippet
11070    for ac_prog in which
11071do
11072  # Extract the first word of "$ac_prog", so it can be a program name with args.
11073set dummy $ac_prog; ac_word=$2
11074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11075$as_echo_n "checking for $ac_word... " >&6; }
11076if ${ac_cv_path_WHICH+:} false; then :
11077  $as_echo_n "(cached) " >&6
11078else
11079  case $WHICH in
11080  [\\/]* | ?:[\\/]*)
11081  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11082  ;;
11083  *)
11084  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11085for as_dir in $PATH
11086do
11087  IFS=$as_save_IFS
11088  test -z "$as_dir" && as_dir=.
11089    for ac_exec_ext in '' $ac_executable_extensions; do
11090  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11091    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11092    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11093    break 2
11094  fi
11095done
11096  done
11097IFS=$as_save_IFS
11098
11099  ;;
11100esac
11101fi
11102WHICH=$ac_cv_path_WHICH
11103if test -n "$WHICH"; then
11104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11105$as_echo "$WHICH" >&6; }
11106else
11107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11108$as_echo "no" >&6; }
11109fi
11110
11111
11112  test -n "$WHICH" && break
11113done
11114
11115  else
11116    # The variable is set, but is it from the command line or the environment?
11117
11118    # Try to remove the string !WHICH! from our list.
11119    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11120    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11121      # If it failed, the variable was not from the command line. Ignore it,
11122      # but warn the user (except for BASH, which is always set by the calling BASH).
11123      if test "xWHICH" != xBASH; then
11124        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11125$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11126      fi
11127      # Try to locate tool using the code snippet
11128      for ac_prog in which
11129do
11130  # Extract the first word of "$ac_prog", so it can be a program name with args.
11131set dummy $ac_prog; ac_word=$2
11132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11133$as_echo_n "checking for $ac_word... " >&6; }
11134if ${ac_cv_path_WHICH+:} false; then :
11135  $as_echo_n "(cached) " >&6
11136else
11137  case $WHICH in
11138  [\\/]* | ?:[\\/]*)
11139  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11140  ;;
11141  *)
11142  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11143for as_dir in $PATH
11144do
11145  IFS=$as_save_IFS
11146  test -z "$as_dir" && as_dir=.
11147    for ac_exec_ext in '' $ac_executable_extensions; do
11148  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11149    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11150    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11151    break 2
11152  fi
11153done
11154  done
11155IFS=$as_save_IFS
11156
11157  ;;
11158esac
11159fi
11160WHICH=$ac_cv_path_WHICH
11161if test -n "$WHICH"; then
11162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11163$as_echo "$WHICH" >&6; }
11164else
11165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11166$as_echo "no" >&6; }
11167fi
11168
11169
11170  test -n "$WHICH" && break
11171done
11172
11173    else
11174      # If it succeeded, then it was overridden by the user. We will use it
11175      # for the tool.
11176
11177      # First remove it from the list of overridden variables, so we can test
11178      # for unknown variables in the end.
11179      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11180
11181      # Check if the provided tool contains a complete path.
11182      tool_specified="$WHICH"
11183      tool_basename="${tool_specified##*/}"
11184      if test "x$tool_basename" = "x$tool_specified"; then
11185        # A command without a complete path is provided, search $PATH.
11186        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11187$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11188        # Extract the first word of "$tool_basename", so it can be a program name with args.
11189set dummy $tool_basename; ac_word=$2
11190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11191$as_echo_n "checking for $ac_word... " >&6; }
11192if ${ac_cv_path_WHICH+:} false; then :
11193  $as_echo_n "(cached) " >&6
11194else
11195  case $WHICH in
11196  [\\/]* | ?:[\\/]*)
11197  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11198  ;;
11199  *)
11200  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11201for as_dir in $PATH
11202do
11203  IFS=$as_save_IFS
11204  test -z "$as_dir" && as_dir=.
11205    for ac_exec_ext in '' $ac_executable_extensions; do
11206  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11207    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11208    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11209    break 2
11210  fi
11211done
11212  done
11213IFS=$as_save_IFS
11214
11215  ;;
11216esac
11217fi
11218WHICH=$ac_cv_path_WHICH
11219if test -n "$WHICH"; then
11220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11221$as_echo "$WHICH" >&6; }
11222else
11223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11224$as_echo "no" >&6; }
11225fi
11226
11227
11228        if test "x$WHICH" = x; then
11229          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11230        fi
11231      else
11232        # Otherwise we believe it is a complete path. Use it as it is.
11233        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11234$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11235        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11236$as_echo_n "checking for WHICH... " >&6; }
11237        if test ! -x "$tool_specified"; then
11238          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11239$as_echo "not found" >&6; }
11240          as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11241        fi
11242        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11243$as_echo "$tool_specified" >&6; }
11244      fi
11245    fi
11246  fi
11247
11248
11249
11250  if test "x$WHICH" = x; then
11251    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11252  fi
11253
11254
11255
11256
11257
11258  # Publish this variable in the help.
11259
11260
11261  if test "x$XARGS" = x; then
11262    # The variable is not set by user, try to locate tool using the code snippet
11263    for ac_prog in xargs
11264do
11265  # Extract the first word of "$ac_prog", so it can be a program name with args.
11266set dummy $ac_prog; ac_word=$2
11267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11268$as_echo_n "checking for $ac_word... " >&6; }
11269if ${ac_cv_path_XARGS+:} false; then :
11270  $as_echo_n "(cached) " >&6
11271else
11272  case $XARGS in
11273  [\\/]* | ?:[\\/]*)
11274  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11275  ;;
11276  *)
11277  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11278for as_dir in $PATH
11279do
11280  IFS=$as_save_IFS
11281  test -z "$as_dir" && as_dir=.
11282    for ac_exec_ext in '' $ac_executable_extensions; do
11283  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11284    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11285    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11286    break 2
11287  fi
11288done
11289  done
11290IFS=$as_save_IFS
11291
11292  ;;
11293esac
11294fi
11295XARGS=$ac_cv_path_XARGS
11296if test -n "$XARGS"; then
11297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11298$as_echo "$XARGS" >&6; }
11299else
11300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11301$as_echo "no" >&6; }
11302fi
11303
11304
11305  test -n "$XARGS" && break
11306done
11307
11308  else
11309    # The variable is set, but is it from the command line or the environment?
11310
11311    # Try to remove the string !XARGS! from our list.
11312    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11313    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11314      # If it failed, the variable was not from the command line. Ignore it,
11315      # but warn the user (except for BASH, which is always set by the calling BASH).
11316      if test "xXARGS" != xBASH; then
11317        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11318$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11319      fi
11320      # Try to locate tool using the code snippet
11321      for ac_prog in xargs
11322do
11323  # Extract the first word of "$ac_prog", so it can be a program name with args.
11324set dummy $ac_prog; ac_word=$2
11325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11326$as_echo_n "checking for $ac_word... " >&6; }
11327if ${ac_cv_path_XARGS+:} false; then :
11328  $as_echo_n "(cached) " >&6
11329else
11330  case $XARGS in
11331  [\\/]* | ?:[\\/]*)
11332  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11333  ;;
11334  *)
11335  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11336for as_dir in $PATH
11337do
11338  IFS=$as_save_IFS
11339  test -z "$as_dir" && as_dir=.
11340    for ac_exec_ext in '' $ac_executable_extensions; do
11341  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11342    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11343    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11344    break 2
11345  fi
11346done
11347  done
11348IFS=$as_save_IFS
11349
11350  ;;
11351esac
11352fi
11353XARGS=$ac_cv_path_XARGS
11354if test -n "$XARGS"; then
11355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11356$as_echo "$XARGS" >&6; }
11357else
11358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11359$as_echo "no" >&6; }
11360fi
11361
11362
11363  test -n "$XARGS" && break
11364done
11365
11366    else
11367      # If it succeeded, then it was overridden by the user. We will use it
11368      # for the tool.
11369
11370      # First remove it from the list of overridden variables, so we can test
11371      # for unknown variables in the end.
11372      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11373
11374      # Check if the provided tool contains a complete path.
11375      tool_specified="$XARGS"
11376      tool_basename="${tool_specified##*/}"
11377      if test "x$tool_basename" = "x$tool_specified"; then
11378        # A command without a complete path is provided, search $PATH.
11379        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11380$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11381        # Extract the first word of "$tool_basename", so it can be a program name with args.
11382set dummy $tool_basename; ac_word=$2
11383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11384$as_echo_n "checking for $ac_word... " >&6; }
11385if ${ac_cv_path_XARGS+:} false; then :
11386  $as_echo_n "(cached) " >&6
11387else
11388  case $XARGS in
11389  [\\/]* | ?:[\\/]*)
11390  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11391  ;;
11392  *)
11393  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11394for as_dir in $PATH
11395do
11396  IFS=$as_save_IFS
11397  test -z "$as_dir" && as_dir=.
11398    for ac_exec_ext in '' $ac_executable_extensions; do
11399  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11400    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11401    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11402    break 2
11403  fi
11404done
11405  done
11406IFS=$as_save_IFS
11407
11408  ;;
11409esac
11410fi
11411XARGS=$ac_cv_path_XARGS
11412if test -n "$XARGS"; then
11413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11414$as_echo "$XARGS" >&6; }
11415else
11416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11417$as_echo "no" >&6; }
11418fi
11419
11420
11421        if test "x$XARGS" = x; then
11422          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11423        fi
11424      else
11425        # Otherwise we believe it is a complete path. Use it as it is.
11426        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11427$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11428        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11429$as_echo_n "checking for XARGS... " >&6; }
11430        if test ! -x "$tool_specified"; then
11431          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11432$as_echo "not found" >&6; }
11433          as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11434        fi
11435        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11436$as_echo "$tool_specified" >&6; }
11437      fi
11438    fi
11439  fi
11440
11441
11442
11443  if test "x$XARGS" = x; then
11444    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11445  fi
11446
11447
11448
11449  # Then required tools that require some special treatment.
11450
11451
11452  # Publish this variable in the help.
11453
11454
11455  if test "x$AWK" = x; then
11456    # The variable is not set by user, try to locate tool using the code snippet
11457    for ac_prog in gawk mawk nawk awk
11458do
11459  # Extract the first word of "$ac_prog", so it can be a program name with args.
11460set dummy $ac_prog; ac_word=$2
11461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11462$as_echo_n "checking for $ac_word... " >&6; }
11463if ${ac_cv_prog_AWK+:} false; then :
11464  $as_echo_n "(cached) " >&6
11465else
11466  if test -n "$AWK"; then
11467  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11468else
11469as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11470for as_dir in $PATH
11471do
11472  IFS=$as_save_IFS
11473  test -z "$as_dir" && as_dir=.
11474    for ac_exec_ext in '' $ac_executable_extensions; do
11475  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11476    ac_cv_prog_AWK="$ac_prog"
11477    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11478    break 2
11479  fi
11480done
11481  done
11482IFS=$as_save_IFS
11483
11484fi
11485fi
11486AWK=$ac_cv_prog_AWK
11487if test -n "$AWK"; then
11488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11489$as_echo "$AWK" >&6; }
11490else
11491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11492$as_echo "no" >&6; }
11493fi
11494
11495
11496  test -n "$AWK" && break
11497done
11498
11499  else
11500    # The variable is set, but is it from the command line or the environment?
11501
11502    # Try to remove the string !AWK! from our list.
11503    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11504    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11505      # If it failed, the variable was not from the command line. Ignore it,
11506      # but warn the user (except for BASH, which is always set by the calling BASH).
11507      if test "xAWK" != xBASH; then
11508        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11509$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11510      fi
11511      # Try to locate tool using the code snippet
11512      for ac_prog in gawk mawk nawk awk
11513do
11514  # Extract the first word of "$ac_prog", so it can be a program name with args.
11515set dummy $ac_prog; ac_word=$2
11516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11517$as_echo_n "checking for $ac_word... " >&6; }
11518if ${ac_cv_prog_AWK+:} false; then :
11519  $as_echo_n "(cached) " >&6
11520else
11521  if test -n "$AWK"; then
11522  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11523else
11524as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11525for as_dir in $PATH
11526do
11527  IFS=$as_save_IFS
11528  test -z "$as_dir" && as_dir=.
11529    for ac_exec_ext in '' $ac_executable_extensions; do
11530  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11531    ac_cv_prog_AWK="$ac_prog"
11532    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11533    break 2
11534  fi
11535done
11536  done
11537IFS=$as_save_IFS
11538
11539fi
11540fi
11541AWK=$ac_cv_prog_AWK
11542if test -n "$AWK"; then
11543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11544$as_echo "$AWK" >&6; }
11545else
11546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11547$as_echo "no" >&6; }
11548fi
11549
11550
11551  test -n "$AWK" && break
11552done
11553
11554    else
11555      # If it succeeded, then it was overridden by the user. We will use it
11556      # for the tool.
11557
11558      # First remove it from the list of overridden variables, so we can test
11559      # for unknown variables in the end.
11560      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11561
11562      # Check if the provided tool contains a complete path.
11563      tool_specified="$AWK"
11564      tool_basename="${tool_specified##*/}"
11565      if test "x$tool_basename" = "x$tool_specified"; then
11566        # A command without a complete path is provided, search $PATH.
11567        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11568$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11569        # Extract the first word of "$tool_basename", so it can be a program name with args.
11570set dummy $tool_basename; ac_word=$2
11571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11572$as_echo_n "checking for $ac_word... " >&6; }
11573if ${ac_cv_path_AWK+:} false; then :
11574  $as_echo_n "(cached) " >&6
11575else
11576  case $AWK in
11577  [\\/]* | ?:[\\/]*)
11578  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11579  ;;
11580  *)
11581  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11582for as_dir in $PATH
11583do
11584  IFS=$as_save_IFS
11585  test -z "$as_dir" && as_dir=.
11586    for ac_exec_ext in '' $ac_executable_extensions; do
11587  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11588    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11589    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11590    break 2
11591  fi
11592done
11593  done
11594IFS=$as_save_IFS
11595
11596  ;;
11597esac
11598fi
11599AWK=$ac_cv_path_AWK
11600if test -n "$AWK"; then
11601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11602$as_echo "$AWK" >&6; }
11603else
11604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11605$as_echo "no" >&6; }
11606fi
11607
11608
11609        if test "x$AWK" = x; then
11610          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11611        fi
11612      else
11613        # Otherwise we believe it is a complete path. Use it as it is.
11614        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11615$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11616        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11617$as_echo_n "checking for AWK... " >&6; }
11618        if test ! -x "$tool_specified"; then
11619          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11620$as_echo "not found" >&6; }
11621          as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11622        fi
11623        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11624$as_echo "$tool_specified" >&6; }
11625      fi
11626    fi
11627  fi
11628
11629
11630  if test "x$AWK" = x; then
11631    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11632  fi
11633
11634
11635
11636
11637  # Publish this variable in the help.
11638
11639
11640  if test "x$GREP" = x; then
11641    # The variable is not set by user, try to locate tool using the code snippet
11642    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11643$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11644if ${ac_cv_path_GREP+:} false; then :
11645  $as_echo_n "(cached) " >&6
11646else
11647  if test -z "$GREP"; then
11648  ac_path_GREP_found=false
11649  # Loop through the user's path and test for each of PROGNAME-LIST
11650  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11651for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11652do
11653  IFS=$as_save_IFS
11654  test -z "$as_dir" && as_dir=.
11655    for ac_prog in grep ggrep; do
11656    for ac_exec_ext in '' $ac_executable_extensions; do
11657      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11658      as_fn_executable_p "$ac_path_GREP" || continue
11659# Check for GNU ac_path_GREP and select it if it is found.
11660  # Check for GNU $ac_path_GREP
11661case `"$ac_path_GREP" --version 2>&1` in
11662*GNU*)
11663  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11664*)
11665  ac_count=0
11666  $as_echo_n 0123456789 >"conftest.in"
11667  while :
11668  do
11669    cat "conftest.in" "conftest.in" >"conftest.tmp"
11670    mv "conftest.tmp" "conftest.in"
11671    cp "conftest.in" "conftest.nl"
11672    $as_echo 'GREP' >> "conftest.nl"
11673    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11674    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11675    as_fn_arith $ac_count + 1 && ac_count=$as_val
11676    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11677      # Best one so far, save it but keep looking for a better one
11678      ac_cv_path_GREP="$ac_path_GREP"
11679      ac_path_GREP_max=$ac_count
11680    fi
11681    # 10*(2^10) chars as input seems more than enough
11682    test $ac_count -gt 10 && break
11683  done
11684  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11685esac
11686
11687      $ac_path_GREP_found && break 3
11688    done
11689  done
11690  done
11691IFS=$as_save_IFS
11692  if test -z "$ac_cv_path_GREP"; then
11693    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11694  fi
11695else
11696  ac_cv_path_GREP=$GREP
11697fi
11698
11699fi
11700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11701$as_echo "$ac_cv_path_GREP" >&6; }
11702 GREP="$ac_cv_path_GREP"
11703
11704
11705  else
11706    # The variable is set, but is it from the command line or the environment?
11707
11708    # Try to remove the string !GREP! from our list.
11709    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11710    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11711      # If it failed, the variable was not from the command line. Ignore it,
11712      # but warn the user (except for BASH, which is always set by the calling BASH).
11713      if test "xGREP" != xBASH; then
11714        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11715$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11716      fi
11717      # Try to locate tool using the code snippet
11718      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11719$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11720if ${ac_cv_path_GREP+:} false; then :
11721  $as_echo_n "(cached) " >&6
11722else
11723  if test -z "$GREP"; then
11724  ac_path_GREP_found=false
11725  # Loop through the user's path and test for each of PROGNAME-LIST
11726  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11727for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11728do
11729  IFS=$as_save_IFS
11730  test -z "$as_dir" && as_dir=.
11731    for ac_prog in grep ggrep; do
11732    for ac_exec_ext in '' $ac_executable_extensions; do
11733      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11734      as_fn_executable_p "$ac_path_GREP" || continue
11735# Check for GNU ac_path_GREP and select it if it is found.
11736  # Check for GNU $ac_path_GREP
11737case `"$ac_path_GREP" --version 2>&1` in
11738*GNU*)
11739  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11740*)
11741  ac_count=0
11742  $as_echo_n 0123456789 >"conftest.in"
11743  while :
11744  do
11745    cat "conftest.in" "conftest.in" >"conftest.tmp"
11746    mv "conftest.tmp" "conftest.in"
11747    cp "conftest.in" "conftest.nl"
11748    $as_echo 'GREP' >> "conftest.nl"
11749    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11750    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11751    as_fn_arith $ac_count + 1 && ac_count=$as_val
11752    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11753      # Best one so far, save it but keep looking for a better one
11754      ac_cv_path_GREP="$ac_path_GREP"
11755      ac_path_GREP_max=$ac_count
11756    fi
11757    # 10*(2^10) chars as input seems more than enough
11758    test $ac_count -gt 10 && break
11759  done
11760  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11761esac
11762
11763      $ac_path_GREP_found && break 3
11764    done
11765  done
11766  done
11767IFS=$as_save_IFS
11768  if test -z "$ac_cv_path_GREP"; then
11769    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11770  fi
11771else
11772  ac_cv_path_GREP=$GREP
11773fi
11774
11775fi
11776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11777$as_echo "$ac_cv_path_GREP" >&6; }
11778 GREP="$ac_cv_path_GREP"
11779
11780
11781    else
11782      # If it succeeded, then it was overridden by the user. We will use it
11783      # for the tool.
11784
11785      # First remove it from the list of overridden variables, so we can test
11786      # for unknown variables in the end.
11787      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11788
11789      # Check if the provided tool contains a complete path.
11790      tool_specified="$GREP"
11791      tool_basename="${tool_specified##*/}"
11792      if test "x$tool_basename" = "x$tool_specified"; then
11793        # A command without a complete path is provided, search $PATH.
11794        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11795$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11796        # Extract the first word of "$tool_basename", so it can be a program name with args.
11797set dummy $tool_basename; ac_word=$2
11798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11799$as_echo_n "checking for $ac_word... " >&6; }
11800if ${ac_cv_path_GREP+:} false; then :
11801  $as_echo_n "(cached) " >&6
11802else
11803  case $GREP in
11804  [\\/]* | ?:[\\/]*)
11805  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11806  ;;
11807  *)
11808  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11809for as_dir in $PATH
11810do
11811  IFS=$as_save_IFS
11812  test -z "$as_dir" && as_dir=.
11813    for ac_exec_ext in '' $ac_executable_extensions; do
11814  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11815    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11816    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11817    break 2
11818  fi
11819done
11820  done
11821IFS=$as_save_IFS
11822
11823  ;;
11824esac
11825fi
11826GREP=$ac_cv_path_GREP
11827if test -n "$GREP"; then
11828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11829$as_echo "$GREP" >&6; }
11830else
11831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11832$as_echo "no" >&6; }
11833fi
11834
11835
11836        if test "x$GREP" = x; then
11837          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11838        fi
11839      else
11840        # Otherwise we believe it is a complete path. Use it as it is.
11841        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11842$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11843        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11844$as_echo_n "checking for GREP... " >&6; }
11845        if test ! -x "$tool_specified"; then
11846          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11847$as_echo "not found" >&6; }
11848          as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11849        fi
11850        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11851$as_echo "$tool_specified" >&6; }
11852      fi
11853    fi
11854  fi
11855
11856
11857  if test "x$GREP" = x; then
11858    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11859  fi
11860
11861
11862
11863
11864  # Publish this variable in the help.
11865
11866
11867  if test "x$EGREP" = x; then
11868    # The variable is not set by user, try to locate tool using the code snippet
11869    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11870$as_echo_n "checking for egrep... " >&6; }
11871if ${ac_cv_path_EGREP+:} false; then :
11872  $as_echo_n "(cached) " >&6
11873else
11874  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11875   then ac_cv_path_EGREP="$GREP -E"
11876   else
11877     if test -z "$EGREP"; then
11878  ac_path_EGREP_found=false
11879  # Loop through the user's path and test for each of PROGNAME-LIST
11880  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11881for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11882do
11883  IFS=$as_save_IFS
11884  test -z "$as_dir" && as_dir=.
11885    for ac_prog in egrep; do
11886    for ac_exec_ext in '' $ac_executable_extensions; do
11887      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11888      as_fn_executable_p "$ac_path_EGREP" || continue
11889# Check for GNU ac_path_EGREP and select it if it is found.
11890  # Check for GNU $ac_path_EGREP
11891case `"$ac_path_EGREP" --version 2>&1` in
11892*GNU*)
11893  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11894*)
11895  ac_count=0
11896  $as_echo_n 0123456789 >"conftest.in"
11897  while :
11898  do
11899    cat "conftest.in" "conftest.in" >"conftest.tmp"
11900    mv "conftest.tmp" "conftest.in"
11901    cp "conftest.in" "conftest.nl"
11902    $as_echo 'EGREP' >> "conftest.nl"
11903    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11904    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11905    as_fn_arith $ac_count + 1 && ac_count=$as_val
11906    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11907      # Best one so far, save it but keep looking for a better one
11908      ac_cv_path_EGREP="$ac_path_EGREP"
11909      ac_path_EGREP_max=$ac_count
11910    fi
11911    # 10*(2^10) chars as input seems more than enough
11912    test $ac_count -gt 10 && break
11913  done
11914  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11915esac
11916
11917      $ac_path_EGREP_found && break 3
11918    done
11919  done
11920  done
11921IFS=$as_save_IFS
11922  if test -z "$ac_cv_path_EGREP"; then
11923    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11924  fi
11925else
11926  ac_cv_path_EGREP=$EGREP
11927fi
11928
11929   fi
11930fi
11931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11932$as_echo "$ac_cv_path_EGREP" >&6; }
11933 EGREP="$ac_cv_path_EGREP"
11934
11935
11936  else
11937    # The variable is set, but is it from the command line or the environment?
11938
11939    # Try to remove the string !EGREP! from our list.
11940    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11941    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11942      # If it failed, the variable was not from the command line. Ignore it,
11943      # but warn the user (except for BASH, which is always set by the calling BASH).
11944      if test "xEGREP" != xBASH; then
11945        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11946$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11947      fi
11948      # Try to locate tool using the code snippet
11949      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11950$as_echo_n "checking for egrep... " >&6; }
11951if ${ac_cv_path_EGREP+:} false; then :
11952  $as_echo_n "(cached) " >&6
11953else
11954  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11955   then ac_cv_path_EGREP="$GREP -E"
11956   else
11957     if test -z "$EGREP"; then
11958  ac_path_EGREP_found=false
11959  # Loop through the user's path and test for each of PROGNAME-LIST
11960  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11961for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11962do
11963  IFS=$as_save_IFS
11964  test -z "$as_dir" && as_dir=.
11965    for ac_prog in egrep; do
11966    for ac_exec_ext in '' $ac_executable_extensions; do
11967      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11968      as_fn_executable_p "$ac_path_EGREP" || continue
11969# Check for GNU ac_path_EGREP and select it if it is found.
11970  # Check for GNU $ac_path_EGREP
11971case `"$ac_path_EGREP" --version 2>&1` in
11972*GNU*)
11973  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11974*)
11975  ac_count=0
11976  $as_echo_n 0123456789 >"conftest.in"
11977  while :
11978  do
11979    cat "conftest.in" "conftest.in" >"conftest.tmp"
11980    mv "conftest.tmp" "conftest.in"
11981    cp "conftest.in" "conftest.nl"
11982    $as_echo 'EGREP' >> "conftest.nl"
11983    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11984    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11985    as_fn_arith $ac_count + 1 && ac_count=$as_val
11986    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11987      # Best one so far, save it but keep looking for a better one
11988      ac_cv_path_EGREP="$ac_path_EGREP"
11989      ac_path_EGREP_max=$ac_count
11990    fi
11991    # 10*(2^10) chars as input seems more than enough
11992    test $ac_count -gt 10 && break
11993  done
11994  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11995esac
11996
11997      $ac_path_EGREP_found && break 3
11998    done
11999  done
12000  done
12001IFS=$as_save_IFS
12002  if test -z "$ac_cv_path_EGREP"; then
12003    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12004  fi
12005else
12006  ac_cv_path_EGREP=$EGREP
12007fi
12008
12009   fi
12010fi
12011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12012$as_echo "$ac_cv_path_EGREP" >&6; }
12013 EGREP="$ac_cv_path_EGREP"
12014
12015
12016    else
12017      # If it succeeded, then it was overridden by the user. We will use it
12018      # for the tool.
12019
12020      # First remove it from the list of overridden variables, so we can test
12021      # for unknown variables in the end.
12022      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12023
12024      # Check if the provided tool contains a complete path.
12025      tool_specified="$EGREP"
12026      tool_basename="${tool_specified##*/}"
12027      if test "x$tool_basename" = "x$tool_specified"; then
12028        # A command without a complete path is provided, search $PATH.
12029        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
12030$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
12031        # Extract the first word of "$tool_basename", so it can be a program name with args.
12032set dummy $tool_basename; ac_word=$2
12033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12034$as_echo_n "checking for $ac_word... " >&6; }
12035if ${ac_cv_path_EGREP+:} false; then :
12036  $as_echo_n "(cached) " >&6
12037else
12038  case $EGREP in
12039  [\\/]* | ?:[\\/]*)
12040  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
12041  ;;
12042  *)
12043  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12044for as_dir in $PATH
12045do
12046  IFS=$as_save_IFS
12047  test -z "$as_dir" && as_dir=.
12048    for ac_exec_ext in '' $ac_executable_extensions; do
12049  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12050    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
12051    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12052    break 2
12053  fi
12054done
12055  done
12056IFS=$as_save_IFS
12057
12058  ;;
12059esac
12060fi
12061EGREP=$ac_cv_path_EGREP
12062if test -n "$EGREP"; then
12063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
12064$as_echo "$EGREP" >&6; }
12065else
12066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12067$as_echo "no" >&6; }
12068fi
12069
12070
12071        if test "x$EGREP" = x; then
12072          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12073        fi
12074      else
12075        # Otherwise we believe it is a complete path. Use it as it is.
12076        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
12077$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
12078        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12079$as_echo_n "checking for EGREP... " >&6; }
12080        if test ! -x "$tool_specified"; then
12081          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12082$as_echo "not found" >&6; }
12083          as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12084        fi
12085        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12086$as_echo "$tool_specified" >&6; }
12087      fi
12088    fi
12089  fi
12090
12091
12092  if test "x$EGREP" = x; then
12093    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12094  fi
12095
12096
12097
12098
12099  # Publish this variable in the help.
12100
12101
12102  if test "x$FGREP" = x; then
12103    # The variable is not set by user, try to locate tool using the code snippet
12104    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12105$as_echo_n "checking for fgrep... " >&6; }
12106if ${ac_cv_path_FGREP+:} false; then :
12107  $as_echo_n "(cached) " >&6
12108else
12109  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12110   then ac_cv_path_FGREP="$GREP -F"
12111   else
12112     if test -z "$FGREP"; then
12113  ac_path_FGREP_found=false
12114  # Loop through the user's path and test for each of PROGNAME-LIST
12115  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12116for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12117do
12118  IFS=$as_save_IFS
12119  test -z "$as_dir" && as_dir=.
12120    for ac_prog in fgrep; do
12121    for ac_exec_ext in '' $ac_executable_extensions; do
12122      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12123      as_fn_executable_p "$ac_path_FGREP" || continue
12124# Check for GNU ac_path_FGREP and select it if it is found.
12125  # Check for GNU $ac_path_FGREP
12126case `"$ac_path_FGREP" --version 2>&1` in
12127*GNU*)
12128  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12129*)
12130  ac_count=0
12131  $as_echo_n 0123456789 >"conftest.in"
12132  while :
12133  do
12134    cat "conftest.in" "conftest.in" >"conftest.tmp"
12135    mv "conftest.tmp" "conftest.in"
12136    cp "conftest.in" "conftest.nl"
12137    $as_echo 'FGREP' >> "conftest.nl"
12138    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12139    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12140    as_fn_arith $ac_count + 1 && ac_count=$as_val
12141    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12142      # Best one so far, save it but keep looking for a better one
12143      ac_cv_path_FGREP="$ac_path_FGREP"
12144      ac_path_FGREP_max=$ac_count
12145    fi
12146    # 10*(2^10) chars as input seems more than enough
12147    test $ac_count -gt 10 && break
12148  done
12149  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12150esac
12151
12152      $ac_path_FGREP_found && break 3
12153    done
12154  done
12155  done
12156IFS=$as_save_IFS
12157  if test -z "$ac_cv_path_FGREP"; then
12158    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12159  fi
12160else
12161  ac_cv_path_FGREP=$FGREP
12162fi
12163
12164   fi
12165fi
12166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12167$as_echo "$ac_cv_path_FGREP" >&6; }
12168 FGREP="$ac_cv_path_FGREP"
12169
12170
12171  else
12172    # The variable is set, but is it from the command line or the environment?
12173
12174    # Try to remove the string !FGREP! from our list.
12175    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12176    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12177      # If it failed, the variable was not from the command line. Ignore it,
12178      # but warn the user (except for BASH, which is always set by the calling BASH).
12179      if test "xFGREP" != xBASH; then
12180        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12181$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12182      fi
12183      # Try to locate tool using the code snippet
12184      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12185$as_echo_n "checking for fgrep... " >&6; }
12186if ${ac_cv_path_FGREP+:} false; then :
12187  $as_echo_n "(cached) " >&6
12188else
12189  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12190   then ac_cv_path_FGREP="$GREP -F"
12191   else
12192     if test -z "$FGREP"; then
12193  ac_path_FGREP_found=false
12194  # Loop through the user's path and test for each of PROGNAME-LIST
12195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12196for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12197do
12198  IFS=$as_save_IFS
12199  test -z "$as_dir" && as_dir=.
12200    for ac_prog in fgrep; do
12201    for ac_exec_ext in '' $ac_executable_extensions; do
12202      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12203      as_fn_executable_p "$ac_path_FGREP" || continue
12204# Check for GNU ac_path_FGREP and select it if it is found.
12205  # Check for GNU $ac_path_FGREP
12206case `"$ac_path_FGREP" --version 2>&1` in
12207*GNU*)
12208  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12209*)
12210  ac_count=0
12211  $as_echo_n 0123456789 >"conftest.in"
12212  while :
12213  do
12214    cat "conftest.in" "conftest.in" >"conftest.tmp"
12215    mv "conftest.tmp" "conftest.in"
12216    cp "conftest.in" "conftest.nl"
12217    $as_echo 'FGREP' >> "conftest.nl"
12218    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12219    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12220    as_fn_arith $ac_count + 1 && ac_count=$as_val
12221    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12222      # Best one so far, save it but keep looking for a better one
12223      ac_cv_path_FGREP="$ac_path_FGREP"
12224      ac_path_FGREP_max=$ac_count
12225    fi
12226    # 10*(2^10) chars as input seems more than enough
12227    test $ac_count -gt 10 && break
12228  done
12229  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12230esac
12231
12232      $ac_path_FGREP_found && break 3
12233    done
12234  done
12235  done
12236IFS=$as_save_IFS
12237  if test -z "$ac_cv_path_FGREP"; then
12238    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12239  fi
12240else
12241  ac_cv_path_FGREP=$FGREP
12242fi
12243
12244   fi
12245fi
12246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12247$as_echo "$ac_cv_path_FGREP" >&6; }
12248 FGREP="$ac_cv_path_FGREP"
12249
12250
12251    else
12252      # If it succeeded, then it was overridden by the user. We will use it
12253      # for the tool.
12254
12255      # First remove it from the list of overridden variables, so we can test
12256      # for unknown variables in the end.
12257      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12258
12259      # Check if the provided tool contains a complete path.
12260      tool_specified="$FGREP"
12261      tool_basename="${tool_specified##*/}"
12262      if test "x$tool_basename" = "x$tool_specified"; then
12263        # A command without a complete path is provided, search $PATH.
12264        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12265$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12266        # Extract the first word of "$tool_basename", so it can be a program name with args.
12267set dummy $tool_basename; ac_word=$2
12268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12269$as_echo_n "checking for $ac_word... " >&6; }
12270if ${ac_cv_path_FGREP+:} false; then :
12271  $as_echo_n "(cached) " >&6
12272else
12273  case $FGREP in
12274  [\\/]* | ?:[\\/]*)
12275  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12276  ;;
12277  *)
12278  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12279for as_dir in $PATH
12280do
12281  IFS=$as_save_IFS
12282  test -z "$as_dir" && as_dir=.
12283    for ac_exec_ext in '' $ac_executable_extensions; do
12284  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12285    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12286    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12287    break 2
12288  fi
12289done
12290  done
12291IFS=$as_save_IFS
12292
12293  ;;
12294esac
12295fi
12296FGREP=$ac_cv_path_FGREP
12297if test -n "$FGREP"; then
12298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12299$as_echo "$FGREP" >&6; }
12300else
12301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12302$as_echo "no" >&6; }
12303fi
12304
12305
12306        if test "x$FGREP" = x; then
12307          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12308        fi
12309      else
12310        # Otherwise we believe it is a complete path. Use it as it is.
12311        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12312$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12313        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12314$as_echo_n "checking for FGREP... " >&6; }
12315        if test ! -x "$tool_specified"; then
12316          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12317$as_echo "not found" >&6; }
12318          as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12319        fi
12320        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12321$as_echo "$tool_specified" >&6; }
12322      fi
12323    fi
12324  fi
12325
12326
12327  if test "x$FGREP" = x; then
12328    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12329  fi
12330
12331
12332
12333
12334  # Publish this variable in the help.
12335
12336
12337  if test "x$SED" = x; then
12338    # The variable is not set by user, try to locate tool using the code snippet
12339    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12340$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12341if ${ac_cv_path_SED+:} false; then :
12342  $as_echo_n "(cached) " >&6
12343else
12344            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12345     for ac_i in 1 2 3 4 5 6 7; do
12346       ac_script="$ac_script$as_nl$ac_script"
12347     done
12348     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12349     { ac_script=; unset ac_script;}
12350     if test -z "$SED"; then
12351  ac_path_SED_found=false
12352  # Loop through the user's path and test for each of PROGNAME-LIST
12353  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12354for as_dir in $PATH
12355do
12356  IFS=$as_save_IFS
12357  test -z "$as_dir" && as_dir=.
12358    for ac_prog in sed gsed; do
12359    for ac_exec_ext in '' $ac_executable_extensions; do
12360      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12361      as_fn_executable_p "$ac_path_SED" || continue
12362# Check for GNU ac_path_SED and select it if it is found.
12363  # Check for GNU $ac_path_SED
12364case `"$ac_path_SED" --version 2>&1` in
12365*GNU*)
12366  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12367*)
12368  ac_count=0
12369  $as_echo_n 0123456789 >"conftest.in"
12370  while :
12371  do
12372    cat "conftest.in" "conftest.in" >"conftest.tmp"
12373    mv "conftest.tmp" "conftest.in"
12374    cp "conftest.in" "conftest.nl"
12375    $as_echo '' >> "conftest.nl"
12376    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12377    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12378    as_fn_arith $ac_count + 1 && ac_count=$as_val
12379    if test $ac_count -gt ${ac_path_SED_max-0}; then
12380      # Best one so far, save it but keep looking for a better one
12381      ac_cv_path_SED="$ac_path_SED"
12382      ac_path_SED_max=$ac_count
12383    fi
12384    # 10*(2^10) chars as input seems more than enough
12385    test $ac_count -gt 10 && break
12386  done
12387  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12388esac
12389
12390      $ac_path_SED_found && break 3
12391    done
12392  done
12393  done
12394IFS=$as_save_IFS
12395  if test -z "$ac_cv_path_SED"; then
12396    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12397  fi
12398else
12399  ac_cv_path_SED=$SED
12400fi
12401
12402fi
12403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12404$as_echo "$ac_cv_path_SED" >&6; }
12405 SED="$ac_cv_path_SED"
12406  rm -f conftest.sed
12407
12408  else
12409    # The variable is set, but is it from the command line or the environment?
12410
12411    # Try to remove the string !SED! from our list.
12412    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12413    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12414      # If it failed, the variable was not from the command line. Ignore it,
12415      # but warn the user (except for BASH, which is always set by the calling BASH).
12416      if test "xSED" != xBASH; then
12417        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12418$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12419      fi
12420      # Try to locate tool using the code snippet
12421      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12422$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12423if ${ac_cv_path_SED+:} false; then :
12424  $as_echo_n "(cached) " >&6
12425else
12426            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12427     for ac_i in 1 2 3 4 5 6 7; do
12428       ac_script="$ac_script$as_nl$ac_script"
12429     done
12430     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12431     { ac_script=; unset ac_script;}
12432     if test -z "$SED"; then
12433  ac_path_SED_found=false
12434  # Loop through the user's path and test for each of PROGNAME-LIST
12435  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12436for as_dir in $PATH
12437do
12438  IFS=$as_save_IFS
12439  test -z "$as_dir" && as_dir=.
12440    for ac_prog in sed gsed; do
12441    for ac_exec_ext in '' $ac_executable_extensions; do
12442      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12443      as_fn_executable_p "$ac_path_SED" || continue
12444# Check for GNU ac_path_SED and select it if it is found.
12445  # Check for GNU $ac_path_SED
12446case `"$ac_path_SED" --version 2>&1` in
12447*GNU*)
12448  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12449*)
12450  ac_count=0
12451  $as_echo_n 0123456789 >"conftest.in"
12452  while :
12453  do
12454    cat "conftest.in" "conftest.in" >"conftest.tmp"
12455    mv "conftest.tmp" "conftest.in"
12456    cp "conftest.in" "conftest.nl"
12457    $as_echo '' >> "conftest.nl"
12458    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12459    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12460    as_fn_arith $ac_count + 1 && ac_count=$as_val
12461    if test $ac_count -gt ${ac_path_SED_max-0}; then
12462      # Best one so far, save it but keep looking for a better one
12463      ac_cv_path_SED="$ac_path_SED"
12464      ac_path_SED_max=$ac_count
12465    fi
12466    # 10*(2^10) chars as input seems more than enough
12467    test $ac_count -gt 10 && break
12468  done
12469  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12470esac
12471
12472      $ac_path_SED_found && break 3
12473    done
12474  done
12475  done
12476IFS=$as_save_IFS
12477  if test -z "$ac_cv_path_SED"; then
12478    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12479  fi
12480else
12481  ac_cv_path_SED=$SED
12482fi
12483
12484fi
12485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12486$as_echo "$ac_cv_path_SED" >&6; }
12487 SED="$ac_cv_path_SED"
12488  rm -f conftest.sed
12489
12490    else
12491      # If it succeeded, then it was overridden by the user. We will use it
12492      # for the tool.
12493
12494      # First remove it from the list of overridden variables, so we can test
12495      # for unknown variables in the end.
12496      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12497
12498      # Check if the provided tool contains a complete path.
12499      tool_specified="$SED"
12500      tool_basename="${tool_specified##*/}"
12501      if test "x$tool_basename" = "x$tool_specified"; then
12502        # A command without a complete path is provided, search $PATH.
12503        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12504$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12505        # Extract the first word of "$tool_basename", so it can be a program name with args.
12506set dummy $tool_basename; ac_word=$2
12507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12508$as_echo_n "checking for $ac_word... " >&6; }
12509if ${ac_cv_path_SED+:} false; then :
12510  $as_echo_n "(cached) " >&6
12511else
12512  case $SED in
12513  [\\/]* | ?:[\\/]*)
12514  ac_cv_path_SED="$SED" # Let the user override the test with a path.
12515  ;;
12516  *)
12517  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12518for as_dir in $PATH
12519do
12520  IFS=$as_save_IFS
12521  test -z "$as_dir" && as_dir=.
12522    for ac_exec_ext in '' $ac_executable_extensions; do
12523  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12524    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12525    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12526    break 2
12527  fi
12528done
12529  done
12530IFS=$as_save_IFS
12531
12532  ;;
12533esac
12534fi
12535SED=$ac_cv_path_SED
12536if test -n "$SED"; then
12537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12538$as_echo "$SED" >&6; }
12539else
12540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12541$as_echo "no" >&6; }
12542fi
12543
12544
12545        if test "x$SED" = x; then
12546          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12547        fi
12548      else
12549        # Otherwise we believe it is a complete path. Use it as it is.
12550        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12551$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12552        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12553$as_echo_n "checking for SED... " >&6; }
12554        if test ! -x "$tool_specified"; then
12555          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12556$as_echo "not found" >&6; }
12557          as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12558        fi
12559        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12560$as_echo "$tool_specified" >&6; }
12561      fi
12562    fi
12563  fi
12564
12565
12566  if test "x$SED" = x; then
12567    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12568  fi
12569
12570
12571
12572  # Always force rm.
12573  RM="$RM -f"
12574
12575  # pwd behaves differently on various platforms and some don't support the -L flag.
12576  # Always use the bash builtin pwd to get uniform behavior.
12577  THEPWDCMD=pwd
12578
12579  # These are not required on all platforms
12580
12581
12582  # Publish this variable in the help.
12583
12584
12585  if test "x$CYGPATH" = x; then
12586    # The variable is not set by user, try to locate tool using the code snippet
12587    for ac_prog in cygpath
12588do
12589  # Extract the first word of "$ac_prog", so it can be a program name with args.
12590set dummy $ac_prog; ac_word=$2
12591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12592$as_echo_n "checking for $ac_word... " >&6; }
12593if ${ac_cv_path_CYGPATH+:} false; then :
12594  $as_echo_n "(cached) " >&6
12595else
12596  case $CYGPATH in
12597  [\\/]* | ?:[\\/]*)
12598  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12599  ;;
12600  *)
12601  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12602for as_dir in $PATH
12603do
12604  IFS=$as_save_IFS
12605  test -z "$as_dir" && as_dir=.
12606    for ac_exec_ext in '' $ac_executable_extensions; do
12607  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12608    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12609    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12610    break 2
12611  fi
12612done
12613  done
12614IFS=$as_save_IFS
12615
12616  ;;
12617esac
12618fi
12619CYGPATH=$ac_cv_path_CYGPATH
12620if test -n "$CYGPATH"; then
12621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12622$as_echo "$CYGPATH" >&6; }
12623else
12624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12625$as_echo "no" >&6; }
12626fi
12627
12628
12629  test -n "$CYGPATH" && break
12630done
12631
12632  else
12633    # The variable is set, but is it from the command line or the environment?
12634
12635    # Try to remove the string !CYGPATH! from our list.
12636    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12637    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12638      # If it failed, the variable was not from the command line. Ignore it,
12639      # but warn the user (except for BASH, which is always set by the calling BASH).
12640      if test "xCYGPATH" != xBASH; then
12641        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12642$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12643      fi
12644      # Try to locate tool using the code snippet
12645      for ac_prog in cygpath
12646do
12647  # Extract the first word of "$ac_prog", so it can be a program name with args.
12648set dummy $ac_prog; ac_word=$2
12649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12650$as_echo_n "checking for $ac_word... " >&6; }
12651if ${ac_cv_path_CYGPATH+:} false; then :
12652  $as_echo_n "(cached) " >&6
12653else
12654  case $CYGPATH in
12655  [\\/]* | ?:[\\/]*)
12656  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12657  ;;
12658  *)
12659  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12660for as_dir in $PATH
12661do
12662  IFS=$as_save_IFS
12663  test -z "$as_dir" && as_dir=.
12664    for ac_exec_ext in '' $ac_executable_extensions; do
12665  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12666    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12667    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12668    break 2
12669  fi
12670done
12671  done
12672IFS=$as_save_IFS
12673
12674  ;;
12675esac
12676fi
12677CYGPATH=$ac_cv_path_CYGPATH
12678if test -n "$CYGPATH"; then
12679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12680$as_echo "$CYGPATH" >&6; }
12681else
12682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12683$as_echo "no" >&6; }
12684fi
12685
12686
12687  test -n "$CYGPATH" && break
12688done
12689
12690    else
12691      # If it succeeded, then it was overridden by the user. We will use it
12692      # for the tool.
12693
12694      # First remove it from the list of overridden variables, so we can test
12695      # for unknown variables in the end.
12696      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12697
12698      # Check if the provided tool contains a complete path.
12699      tool_specified="$CYGPATH"
12700      tool_basename="${tool_specified##*/}"
12701      if test "x$tool_basename" = "x$tool_specified"; then
12702        # A command without a complete path is provided, search $PATH.
12703        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12704$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12705        # Extract the first word of "$tool_basename", so it can be a program name with args.
12706set dummy $tool_basename; ac_word=$2
12707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12708$as_echo_n "checking for $ac_word... " >&6; }
12709if ${ac_cv_path_CYGPATH+:} false; then :
12710  $as_echo_n "(cached) " >&6
12711else
12712  case $CYGPATH in
12713  [\\/]* | ?:[\\/]*)
12714  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12715  ;;
12716  *)
12717  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12718for as_dir in $PATH
12719do
12720  IFS=$as_save_IFS
12721  test -z "$as_dir" && as_dir=.
12722    for ac_exec_ext in '' $ac_executable_extensions; do
12723  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12724    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12725    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12726    break 2
12727  fi
12728done
12729  done
12730IFS=$as_save_IFS
12731
12732  ;;
12733esac
12734fi
12735CYGPATH=$ac_cv_path_CYGPATH
12736if test -n "$CYGPATH"; then
12737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12738$as_echo "$CYGPATH" >&6; }
12739else
12740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12741$as_echo "no" >&6; }
12742fi
12743
12744
12745        if test "x$CYGPATH" = x; then
12746          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12747        fi
12748      else
12749        # Otherwise we believe it is a complete path. Use it as it is.
12750        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12751$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12752        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12753$as_echo_n "checking for CYGPATH... " >&6; }
12754        if test ! -x "$tool_specified"; then
12755          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12756$as_echo "not found" >&6; }
12757          as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12758        fi
12759        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12760$as_echo "$tool_specified" >&6; }
12761      fi
12762    fi
12763  fi
12764
12765
12766
12767
12768  # Publish this variable in the help.
12769
12770
12771  if test "x$READLINK" = x; then
12772    # The variable is not set by user, try to locate tool using the code snippet
12773    for ac_prog in greadlink readlink
12774do
12775  # Extract the first word of "$ac_prog", so it can be a program name with args.
12776set dummy $ac_prog; ac_word=$2
12777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12778$as_echo_n "checking for $ac_word... " >&6; }
12779if ${ac_cv_path_READLINK+:} false; then :
12780  $as_echo_n "(cached) " >&6
12781else
12782  case $READLINK in
12783  [\\/]* | ?:[\\/]*)
12784  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12785  ;;
12786  *)
12787  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12788for as_dir in $PATH
12789do
12790  IFS=$as_save_IFS
12791  test -z "$as_dir" && as_dir=.
12792    for ac_exec_ext in '' $ac_executable_extensions; do
12793  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12794    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12795    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12796    break 2
12797  fi
12798done
12799  done
12800IFS=$as_save_IFS
12801
12802  ;;
12803esac
12804fi
12805READLINK=$ac_cv_path_READLINK
12806if test -n "$READLINK"; then
12807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12808$as_echo "$READLINK" >&6; }
12809else
12810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12811$as_echo "no" >&6; }
12812fi
12813
12814
12815  test -n "$READLINK" && break
12816done
12817
12818  else
12819    # The variable is set, but is it from the command line or the environment?
12820
12821    # Try to remove the string !READLINK! from our list.
12822    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12823    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12824      # If it failed, the variable was not from the command line. Ignore it,
12825      # but warn the user (except for BASH, which is always set by the calling BASH).
12826      if test "xREADLINK" != xBASH; then
12827        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12828$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12829      fi
12830      # Try to locate tool using the code snippet
12831      for ac_prog in greadlink readlink
12832do
12833  # Extract the first word of "$ac_prog", so it can be a program name with args.
12834set dummy $ac_prog; ac_word=$2
12835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12836$as_echo_n "checking for $ac_word... " >&6; }
12837if ${ac_cv_path_READLINK+:} false; then :
12838  $as_echo_n "(cached) " >&6
12839else
12840  case $READLINK in
12841  [\\/]* | ?:[\\/]*)
12842  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12843  ;;
12844  *)
12845  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12846for as_dir in $PATH
12847do
12848  IFS=$as_save_IFS
12849  test -z "$as_dir" && as_dir=.
12850    for ac_exec_ext in '' $ac_executable_extensions; do
12851  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12852    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12853    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12854    break 2
12855  fi
12856done
12857  done
12858IFS=$as_save_IFS
12859
12860  ;;
12861esac
12862fi
12863READLINK=$ac_cv_path_READLINK
12864if test -n "$READLINK"; then
12865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12866$as_echo "$READLINK" >&6; }
12867else
12868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12869$as_echo "no" >&6; }
12870fi
12871
12872
12873  test -n "$READLINK" && break
12874done
12875
12876    else
12877      # If it succeeded, then it was overridden by the user. We will use it
12878      # for the tool.
12879
12880      # First remove it from the list of overridden variables, so we can test
12881      # for unknown variables in the end.
12882      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12883
12884      # Check if the provided tool contains a complete path.
12885      tool_specified="$READLINK"
12886      tool_basename="${tool_specified##*/}"
12887      if test "x$tool_basename" = "x$tool_specified"; then
12888        # A command without a complete path is provided, search $PATH.
12889        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12890$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12891        # Extract the first word of "$tool_basename", so it can be a program name with args.
12892set dummy $tool_basename; ac_word=$2
12893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12894$as_echo_n "checking for $ac_word... " >&6; }
12895if ${ac_cv_path_READLINK+:} false; then :
12896  $as_echo_n "(cached) " >&6
12897else
12898  case $READLINK in
12899  [\\/]* | ?:[\\/]*)
12900  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12901  ;;
12902  *)
12903  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12904for as_dir in $PATH
12905do
12906  IFS=$as_save_IFS
12907  test -z "$as_dir" && as_dir=.
12908    for ac_exec_ext in '' $ac_executable_extensions; do
12909  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12910    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12911    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12912    break 2
12913  fi
12914done
12915  done
12916IFS=$as_save_IFS
12917
12918  ;;
12919esac
12920fi
12921READLINK=$ac_cv_path_READLINK
12922if test -n "$READLINK"; then
12923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12924$as_echo "$READLINK" >&6; }
12925else
12926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12927$as_echo "no" >&6; }
12928fi
12929
12930
12931        if test "x$READLINK" = x; then
12932          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12933        fi
12934      else
12935        # Otherwise we believe it is a complete path. Use it as it is.
12936        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12937$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12938        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12939$as_echo_n "checking for READLINK... " >&6; }
12940        if test ! -x "$tool_specified"; then
12941          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12942$as_echo "not found" >&6; }
12943          as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12944        fi
12945        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12946$as_echo "$tool_specified" >&6; }
12947      fi
12948    fi
12949  fi
12950
12951
12952
12953
12954  # Publish this variable in the help.
12955
12956
12957  if test "x$DF" = x; then
12958    # The variable is not set by user, try to locate tool using the code snippet
12959    for ac_prog in df
12960do
12961  # Extract the first word of "$ac_prog", so it can be a program name with args.
12962set dummy $ac_prog; ac_word=$2
12963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12964$as_echo_n "checking for $ac_word... " >&6; }
12965if ${ac_cv_path_DF+:} false; then :
12966  $as_echo_n "(cached) " >&6
12967else
12968  case $DF in
12969  [\\/]* | ?:[\\/]*)
12970  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12971  ;;
12972  *)
12973  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12974for as_dir in $PATH
12975do
12976  IFS=$as_save_IFS
12977  test -z "$as_dir" && as_dir=.
12978    for ac_exec_ext in '' $ac_executable_extensions; do
12979  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12980    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12981    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12982    break 2
12983  fi
12984done
12985  done
12986IFS=$as_save_IFS
12987
12988  ;;
12989esac
12990fi
12991DF=$ac_cv_path_DF
12992if test -n "$DF"; then
12993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12994$as_echo "$DF" >&6; }
12995else
12996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12997$as_echo "no" >&6; }
12998fi
12999
13000
13001  test -n "$DF" && break
13002done
13003
13004  else
13005    # The variable is set, but is it from the command line or the environment?
13006
13007    # Try to remove the string !DF! from our list.
13008    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
13009    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13010      # If it failed, the variable was not from the command line. Ignore it,
13011      # but warn the user (except for BASH, which is always set by the calling BASH).
13012      if test "xDF" != xBASH; then
13013        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
13014$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
13015      fi
13016      # Try to locate tool using the code snippet
13017      for ac_prog in df
13018do
13019  # Extract the first word of "$ac_prog", so it can be a program name with args.
13020set dummy $ac_prog; ac_word=$2
13021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13022$as_echo_n "checking for $ac_word... " >&6; }
13023if ${ac_cv_path_DF+:} false; then :
13024  $as_echo_n "(cached) " >&6
13025else
13026  case $DF in
13027  [\\/]* | ?:[\\/]*)
13028  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13029  ;;
13030  *)
13031  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13032for as_dir in $PATH
13033do
13034  IFS=$as_save_IFS
13035  test -z "$as_dir" && as_dir=.
13036    for ac_exec_ext in '' $ac_executable_extensions; do
13037  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13038    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13039    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13040    break 2
13041  fi
13042done
13043  done
13044IFS=$as_save_IFS
13045
13046  ;;
13047esac
13048fi
13049DF=$ac_cv_path_DF
13050if test -n "$DF"; then
13051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13052$as_echo "$DF" >&6; }
13053else
13054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13055$as_echo "no" >&6; }
13056fi
13057
13058
13059  test -n "$DF" && break
13060done
13061
13062    else
13063      # If it succeeded, then it was overridden by the user. We will use it
13064      # for the tool.
13065
13066      # First remove it from the list of overridden variables, so we can test
13067      # for unknown variables in the end.
13068      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13069
13070      # Check if the provided tool contains a complete path.
13071      tool_specified="$DF"
13072      tool_basename="${tool_specified##*/}"
13073      if test "x$tool_basename" = "x$tool_specified"; then
13074        # A command without a complete path is provided, search $PATH.
13075        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
13076$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
13077        # Extract the first word of "$tool_basename", so it can be a program name with args.
13078set dummy $tool_basename; ac_word=$2
13079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13080$as_echo_n "checking for $ac_word... " >&6; }
13081if ${ac_cv_path_DF+:} false; then :
13082  $as_echo_n "(cached) " >&6
13083else
13084  case $DF in
13085  [\\/]* | ?:[\\/]*)
13086  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13087  ;;
13088  *)
13089  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13090for as_dir in $PATH
13091do
13092  IFS=$as_save_IFS
13093  test -z "$as_dir" && as_dir=.
13094    for ac_exec_ext in '' $ac_executable_extensions; do
13095  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13096    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13097    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13098    break 2
13099  fi
13100done
13101  done
13102IFS=$as_save_IFS
13103
13104  ;;
13105esac
13106fi
13107DF=$ac_cv_path_DF
13108if test -n "$DF"; then
13109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13110$as_echo "$DF" >&6; }
13111else
13112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13113$as_echo "no" >&6; }
13114fi
13115
13116
13117        if test "x$DF" = x; then
13118          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13119        fi
13120      else
13121        # Otherwise we believe it is a complete path. Use it as it is.
13122        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13123$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13124        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13125$as_echo_n "checking for DF... " >&6; }
13126        if test ! -x "$tool_specified"; then
13127          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13128$as_echo "not found" >&6; }
13129          as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13130        fi
13131        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13132$as_echo "$tool_specified" >&6; }
13133      fi
13134    fi
13135  fi
13136
13137
13138
13139
13140  # Publish this variable in the help.
13141
13142
13143  if test "x$SETFILE" = x; then
13144    # The variable is not set by user, try to locate tool using the code snippet
13145    for ac_prog in SetFile
13146do
13147  # Extract the first word of "$ac_prog", so it can be a program name with args.
13148set dummy $ac_prog; ac_word=$2
13149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13150$as_echo_n "checking for $ac_word... " >&6; }
13151if ${ac_cv_path_SETFILE+:} false; then :
13152  $as_echo_n "(cached) " >&6
13153else
13154  case $SETFILE in
13155  [\\/]* | ?:[\\/]*)
13156  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13157  ;;
13158  *)
13159  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13160for as_dir in $PATH
13161do
13162  IFS=$as_save_IFS
13163  test -z "$as_dir" && as_dir=.
13164    for ac_exec_ext in '' $ac_executable_extensions; do
13165  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13166    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13167    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13168    break 2
13169  fi
13170done
13171  done
13172IFS=$as_save_IFS
13173
13174  ;;
13175esac
13176fi
13177SETFILE=$ac_cv_path_SETFILE
13178if test -n "$SETFILE"; then
13179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13180$as_echo "$SETFILE" >&6; }
13181else
13182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13183$as_echo "no" >&6; }
13184fi
13185
13186
13187  test -n "$SETFILE" && break
13188done
13189
13190  else
13191    # The variable is set, but is it from the command line or the environment?
13192
13193    # Try to remove the string !SETFILE! from our list.
13194    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
13195    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13196      # If it failed, the variable was not from the command line. Ignore it,
13197      # but warn the user (except for BASH, which is always set by the calling BASH).
13198      if test "xSETFILE" != xBASH; then
13199        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
13200$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
13201      fi
13202      # Try to locate tool using the code snippet
13203      for ac_prog in SetFile
13204do
13205  # Extract the first word of "$ac_prog", so it can be a program name with args.
13206set dummy $ac_prog; ac_word=$2
13207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13208$as_echo_n "checking for $ac_word... " >&6; }
13209if ${ac_cv_path_SETFILE+:} false; then :
13210  $as_echo_n "(cached) " >&6
13211else
13212  case $SETFILE in
13213  [\\/]* | ?:[\\/]*)
13214  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13215  ;;
13216  *)
13217  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13218for as_dir in $PATH
13219do
13220  IFS=$as_save_IFS
13221  test -z "$as_dir" && as_dir=.
13222    for ac_exec_ext in '' $ac_executable_extensions; do
13223  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13224    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13226    break 2
13227  fi
13228done
13229  done
13230IFS=$as_save_IFS
13231
13232  ;;
13233esac
13234fi
13235SETFILE=$ac_cv_path_SETFILE
13236if test -n "$SETFILE"; then
13237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13238$as_echo "$SETFILE" >&6; }
13239else
13240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13241$as_echo "no" >&6; }
13242fi
13243
13244
13245  test -n "$SETFILE" && break
13246done
13247
13248    else
13249      # If it succeeded, then it was overridden by the user. We will use it
13250      # for the tool.
13251
13252      # First remove it from the list of overridden variables, so we can test
13253      # for unknown variables in the end.
13254      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13255
13256      # Check if the provided tool contains a complete path.
13257      tool_specified="$SETFILE"
13258      tool_basename="${tool_specified##*/}"
13259      if test "x$tool_basename" = "x$tool_specified"; then
13260        # A command without a complete path is provided, search $PATH.
13261        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
13262$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
13263        # Extract the first word of "$tool_basename", so it can be a program name with args.
13264set dummy $tool_basename; ac_word=$2
13265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13266$as_echo_n "checking for $ac_word... " >&6; }
13267if ${ac_cv_path_SETFILE+:} false; then :
13268  $as_echo_n "(cached) " >&6
13269else
13270  case $SETFILE in
13271  [\\/]* | ?:[\\/]*)
13272  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13273  ;;
13274  *)
13275  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13276for as_dir in $PATH
13277do
13278  IFS=$as_save_IFS
13279  test -z "$as_dir" && as_dir=.
13280    for ac_exec_ext in '' $ac_executable_extensions; do
13281  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13282    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13283    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13284    break 2
13285  fi
13286done
13287  done
13288IFS=$as_save_IFS
13289
13290  ;;
13291esac
13292fi
13293SETFILE=$ac_cv_path_SETFILE
13294if test -n "$SETFILE"; then
13295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13296$as_echo "$SETFILE" >&6; }
13297else
13298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13299$as_echo "no" >&6; }
13300fi
13301
13302
13303        if test "x$SETFILE" = x; then
13304          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13305        fi
13306      else
13307        # Otherwise we believe it is a complete path. Use it as it is.
13308        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
13309$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
13310        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
13311$as_echo_n "checking for SETFILE... " >&6; }
13312        if test ! -x "$tool_specified"; then
13313          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13314$as_echo "not found" >&6; }
13315          as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
13316        fi
13317        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13318$as_echo "$tool_specified" >&6; }
13319      fi
13320    fi
13321  fi
13322
13323
13324
13325
13326# Now we can determine OpenJDK build and target platforms. This is required to
13327# have early on.
13328# Make sure we can run config.sub.
13329$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13330  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13331
13332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13333$as_echo_n "checking build system type... " >&6; }
13334if ${ac_cv_build+:} false; then :
13335  $as_echo_n "(cached) " >&6
13336else
13337  ac_build_alias=$build_alias
13338test "x$ac_build_alias" = x &&
13339  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13340test "x$ac_build_alias" = x &&
13341  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13342ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13343  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13344
13345fi
13346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13347$as_echo "$ac_cv_build" >&6; }
13348case $ac_cv_build in
13349*-*-*) ;;
13350*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13351esac
13352build=$ac_cv_build
13353ac_save_IFS=$IFS; IFS='-'
13354set x $ac_cv_build
13355shift
13356build_cpu=$1
13357build_vendor=$2
13358shift; shift
13359# Remember, the first character of IFS is used to create $*,
13360# except with old shells:
13361build_os=$*
13362IFS=$ac_save_IFS
13363case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13364
13365
13366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13367$as_echo_n "checking host system type... " >&6; }
13368if ${ac_cv_host+:} false; then :
13369  $as_echo_n "(cached) " >&6
13370else
13371  if test "x$host_alias" = x; then
13372  ac_cv_host=$ac_cv_build
13373else
13374  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13375    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13376fi
13377
13378fi
13379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13380$as_echo "$ac_cv_host" >&6; }
13381case $ac_cv_host in
13382*-*-*) ;;
13383*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13384esac
13385host=$ac_cv_host
13386ac_save_IFS=$IFS; IFS='-'
13387set x $ac_cv_host
13388shift
13389host_cpu=$1
13390host_vendor=$2
13391shift; shift
13392# Remember, the first character of IFS is used to create $*,
13393# except with old shells:
13394host_os=$*
13395IFS=$ac_save_IFS
13396case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13397
13398
13399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13400$as_echo_n "checking target system type... " >&6; }
13401if ${ac_cv_target+:} false; then :
13402  $as_echo_n "(cached) " >&6
13403else
13404  if test "x$target_alias" = x; then
13405  ac_cv_target=$ac_cv_host
13406else
13407  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13408    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13409fi
13410
13411fi
13412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13413$as_echo "$ac_cv_target" >&6; }
13414case $ac_cv_target in
13415*-*-*) ;;
13416*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13417esac
13418target=$ac_cv_target
13419ac_save_IFS=$IFS; IFS='-'
13420set x $ac_cv_target
13421shift
13422target_cpu=$1
13423target_vendor=$2
13424shift; shift
13425# Remember, the first character of IFS is used to create $*,
13426# except with old shells:
13427target_os=$*
13428IFS=$ac_save_IFS
13429case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13430
13431
13432# The aliases save the names the user supplied, while $host etc.
13433# will get canonicalized.
13434test -n "$target_alias" &&
13435  test "$program_prefix$program_suffix$program_transform_name" = \
13436    NONENONEs,x,x, &&
13437  program_prefix=${target_alias}-
13438
13439  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13440  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13441  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13442  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13443  # to use the configure naming style.
13444
13445
13446
13447
13448
13449  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13450  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13451  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13452  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13453  OPENJDK_TARGET_AUTOCONF_NAME="$host"
13454  OPENJDK_BUILD_AUTOCONF_NAME="$build"
13455
13456
13457
13458  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13459
13460  case "$build_os" in
13461    *linux*)
13462      VAR_OS=linux
13463      VAR_OS_API=posix
13464      VAR_OS_ENV=linux
13465      ;;
13466    *solaris*)
13467      VAR_OS=solaris
13468      VAR_OS_API=posix
13469      VAR_OS_ENV=solaris
13470      ;;
13471    *darwin*)
13472      VAR_OS=macosx
13473      VAR_OS_API=posix
13474      VAR_OS_ENV=macosx
13475      ;;
13476    *bsd*)
13477      VAR_OS=bsd
13478      VAR_OS_API=posix
13479      VAR_OS_ENV=bsd
13480      ;;
13481    *cygwin*)
13482      VAR_OS=windows
13483      VAR_OS_API=winapi
13484      VAR_OS_ENV=windows.cygwin
13485      ;;
13486    *mingw*)
13487      VAR_OS=windows
13488      VAR_OS_API=winapi
13489      VAR_OS_ENV=windows.msys
13490      ;;
13491    *aix*)
13492      VAR_OS=aix
13493      VAR_OS_API=posix
13494      VAR_OS_ENV=aix
13495      ;;
13496    *)
13497      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13498      ;;
13499  esac
13500
13501
13502  # First argument is the cpu name from the trip/quad
13503  case "$build_cpu" in
13504    x86_64)
13505      VAR_CPU=x86_64
13506      VAR_CPU_ARCH=x86
13507      VAR_CPU_BITS=64
13508      VAR_CPU_ENDIAN=little
13509      ;;
13510    i?86)
13511      VAR_CPU=x86
13512      VAR_CPU_ARCH=x86
13513      VAR_CPU_BITS=32
13514      VAR_CPU_ENDIAN=little
13515      ;;
13516    arm*)
13517      VAR_CPU=arm
13518      VAR_CPU_ARCH=arm
13519      VAR_CPU_BITS=32
13520      VAR_CPU_ENDIAN=little
13521      ;;
13522    powerpc)
13523      VAR_CPU=ppc
13524      VAR_CPU_ARCH=ppc
13525      VAR_CPU_BITS=32
13526      VAR_CPU_ENDIAN=big
13527      ;;
13528    powerpc64)
13529      VAR_CPU=ppc64
13530      VAR_CPU_ARCH=ppc
13531      VAR_CPU_BITS=64
13532      VAR_CPU_ENDIAN=big
13533      ;;
13534    powerpc64le)
13535      VAR_CPU=ppc64
13536      VAR_CPU_ARCH=ppc
13537      VAR_CPU_BITS=64
13538      VAR_CPU_ENDIAN=little
13539      ;;
13540    s390)
13541      VAR_CPU=s390
13542      VAR_CPU_ARCH=s390
13543      VAR_CPU_BITS=32
13544      VAR_CPU_ENDIAN=big
13545      ;;
13546    s390x)
13547      VAR_CPU=s390x
13548      VAR_CPU_ARCH=s390
13549      VAR_CPU_BITS=64
13550      VAR_CPU_ENDIAN=big
13551      ;;
13552    sparc)
13553      VAR_CPU=sparc
13554      VAR_CPU_ARCH=sparc
13555      VAR_CPU_BITS=32
13556      VAR_CPU_ENDIAN=big
13557      ;;
13558    sparcv9)
13559      VAR_CPU=sparcv9
13560      VAR_CPU_ARCH=sparc
13561      VAR_CPU_BITS=64
13562      VAR_CPU_ENDIAN=big
13563      ;;
13564    *)
13565      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13566      ;;
13567  esac
13568
13569  # ..and setup our own variables. (Do this explicitely to facilitate searching)
13570  OPENJDK_BUILD_OS="$VAR_OS"
13571  OPENJDK_BUILD_OS_API="$VAR_OS_API"
13572  OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13573  OPENJDK_BUILD_CPU="$VAR_CPU"
13574  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13575  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13576  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13577
13578
13579
13580
13581
13582
13583
13584  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13585$as_echo_n "checking openjdk-build os-cpu... " >&6; }
13586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13587$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13588
13589  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13590
13591  case "$host_os" in
13592    *linux*)
13593      VAR_OS=linux
13594      VAR_OS_API=posix
13595      VAR_OS_ENV=linux
13596      ;;
13597    *solaris*)
13598      VAR_OS=solaris
13599      VAR_OS_API=posix
13600      VAR_OS_ENV=solaris
13601      ;;
13602    *darwin*)
13603      VAR_OS=macosx
13604      VAR_OS_API=posix
13605      VAR_OS_ENV=macosx
13606      ;;
13607    *bsd*)
13608      VAR_OS=bsd
13609      VAR_OS_API=posix
13610      VAR_OS_ENV=bsd
13611      ;;
13612    *cygwin*)
13613      VAR_OS=windows
13614      VAR_OS_API=winapi
13615      VAR_OS_ENV=windows.cygwin
13616      ;;
13617    *mingw*)
13618      VAR_OS=windows
13619      VAR_OS_API=winapi
13620      VAR_OS_ENV=windows.msys
13621      ;;
13622    *aix*)
13623      VAR_OS=aix
13624      VAR_OS_API=posix
13625      VAR_OS_ENV=aix
13626      ;;
13627    *)
13628      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13629      ;;
13630  esac
13631
13632
13633  # First argument is the cpu name from the trip/quad
13634  case "$host_cpu" in
13635    x86_64)
13636      VAR_CPU=x86_64
13637      VAR_CPU_ARCH=x86
13638      VAR_CPU_BITS=64
13639      VAR_CPU_ENDIAN=little
13640      ;;
13641    i?86)
13642      VAR_CPU=x86
13643      VAR_CPU_ARCH=x86
13644      VAR_CPU_BITS=32
13645      VAR_CPU_ENDIAN=little
13646      ;;
13647    arm*)
13648      VAR_CPU=arm
13649      VAR_CPU_ARCH=arm
13650      VAR_CPU_BITS=32
13651      VAR_CPU_ENDIAN=little
13652      ;;
13653    powerpc)
13654      VAR_CPU=ppc
13655      VAR_CPU_ARCH=ppc
13656      VAR_CPU_BITS=32
13657      VAR_CPU_ENDIAN=big
13658      ;;
13659    powerpc64)
13660      VAR_CPU=ppc64
13661      VAR_CPU_ARCH=ppc
13662      VAR_CPU_BITS=64
13663      VAR_CPU_ENDIAN=big
13664      ;;
13665    powerpc64le)
13666      VAR_CPU=ppc64
13667      VAR_CPU_ARCH=ppc
13668      VAR_CPU_BITS=64
13669      VAR_CPU_ENDIAN=little
13670      ;;
13671    s390)
13672      VAR_CPU=s390
13673      VAR_CPU_ARCH=s390
13674      VAR_CPU_BITS=32
13675      VAR_CPU_ENDIAN=big
13676      ;;
13677    s390x)
13678      VAR_CPU=s390x
13679      VAR_CPU_ARCH=s390
13680      VAR_CPU_BITS=64
13681      VAR_CPU_ENDIAN=big
13682      ;;
13683    sparc)
13684      VAR_CPU=sparc
13685      VAR_CPU_ARCH=sparc
13686      VAR_CPU_BITS=32
13687      VAR_CPU_ENDIAN=big
13688      ;;
13689    sparcv9)
13690      VAR_CPU=sparcv9
13691      VAR_CPU_ARCH=sparc
13692      VAR_CPU_BITS=64
13693      VAR_CPU_ENDIAN=big
13694      ;;
13695    *)
13696      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13697      ;;
13698  esac
13699
13700  # ... and setup our own variables. (Do this explicitely to facilitate searching)
13701  OPENJDK_TARGET_OS="$VAR_OS"
13702  OPENJDK_TARGET_OS_API="$VAR_OS_API"
13703  OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13704  OPENJDK_TARGET_CPU="$VAR_CPU"
13705  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13706  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13707  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13708
13709
13710
13711
13712
13713
13714
13715  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13716$as_echo_n "checking openjdk-target os-cpu... " >&6; }
13717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13718$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13719
13720
13721
13722# Check whether --with-target-bits was given.
13723if test "${with_target_bits+set}" = set; then :
13724  withval=$with_target_bits;
13725fi
13726
13727
13728  # We have three types of compiles:
13729  # native  == normal compilation, target system == build system
13730  # cross   == traditional cross compilation, target system != build system; special toolchain needed
13731  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13732  #
13733  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13734    # We're doing a proper cross-compilation
13735    COMPILE_TYPE="cross"
13736  else
13737    COMPILE_TYPE="native"
13738  fi
13739
13740  if test "x$with_target_bits" != x; then
13741    if test "x$COMPILE_TYPE" = "xcross"; then
13742      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13743    fi
13744
13745    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13746      # A reduced build is requested
13747      COMPILE_TYPE="reduced"
13748      OPENJDK_TARGET_CPU_BITS=32
13749      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13750        OPENJDK_TARGET_CPU=x86
13751      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13752        OPENJDK_TARGET_CPU=sparc
13753      else
13754        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13755      fi
13756    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13757      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
13758    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13759      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13760$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13761    else
13762      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13763    fi
13764  fi
13765
13766
13767  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13768$as_echo_n "checking compilation type... " >&6; }
13769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13770$as_echo "$COMPILE_TYPE" >&6; }
13771
13772
13773  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13774    REQUIRED_OS_NAME=SunOS
13775    REQUIRED_OS_VERSION=5.10
13776  fi
13777  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13778    REQUIRED_OS_NAME=Linux
13779    REQUIRED_OS_VERSION=2.6
13780  fi
13781  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13782    REQUIRED_OS_NAME=Windows
13783    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13784      REQUIRED_OS_VERSION=5.2
13785    else
13786      REQUIRED_OS_VERSION=5.1
13787    fi
13788  fi
13789  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13790    REQUIRED_OS_NAME=Darwin
13791    REQUIRED_OS_VERSION=11.2
13792  fi
13793
13794
13795
13796
13797
13798  # Also store the legacy naming of the cpu.
13799  # Ie i586 and amd64 instead of x86 and x86_64
13800  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13801  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13802    OPENJDK_TARGET_CPU_LEGACY="i586"
13803  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13804    # On all platforms except MacOSX replace x86_64 with amd64.
13805    OPENJDK_TARGET_CPU_LEGACY="amd64"
13806  fi
13807
13808
13809  # And the second legacy naming of the cpu.
13810  # Ie i386 and amd64 instead of x86 and x86_64.
13811  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13812  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13813    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13814  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13815    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13816  fi
13817
13818
13819  # This is the name of the cpu (but using i386 and amd64 instead of
13820  # x86 and x86_64, respectively), preceeded by a /, to be used when
13821  # locating libraries. On macosx, it's empty, though.
13822  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13823  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13824    OPENJDK_TARGET_CPU_LIBDIR=""
13825  fi
13826
13827
13828  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13829  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13830  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13831  OPENJDK_TARGET_CPU_ISADIR=""
13832  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13833    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13834      OPENJDK_TARGET_CPU_ISADIR="/amd64"
13835    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13836      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13837    fi
13838  fi
13839
13840
13841  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13842  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13843  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13844    # On linux only, we replace x86 with i386.
13845    OPENJDK_TARGET_CPU_OSARCH="i386"
13846  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13847    # On all platforms except macosx, we replace x86_64 with amd64.
13848    OPENJDK_TARGET_CPU_OSARCH="amd64"
13849  fi
13850
13851
13852  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
13853  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13854    OPENJDK_TARGET_CPU_JLI="i386"
13855  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13856    # On all platforms except macosx, we replace x86_64 with amd64.
13857    OPENJDK_TARGET_CPU_JLI="amd64"
13858  fi
13859  # Now setup the -D flags for building libjli.
13860  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
13861  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13862    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
13863      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
13864    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
13865      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
13866    fi
13867  fi
13868
13869
13870  # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
13871  if test "x$OPENJDK_TARGET_OS_API" = xposix; then
13872    OPENJDK_TARGET_OS_API_DIR="solaris"
13873  fi
13874  if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
13875    OPENJDK_TARGET_OS_API_DIR="windows"
13876  fi
13877
13878
13879  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13880      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
13881  else
13882      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_API_DIR}
13883  fi
13884
13885
13886  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13887    A_LP64="LP64:="
13888    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
13889    # unpack200.exe
13890    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
13891      ADD_LP64="-D_LP64=1"
13892    fi
13893  fi
13894  LP64=$A_LP64
13895
13896
13897  if test "x$COMPILE_TYPE" = "xcross"; then
13898    # FIXME: ... or should this include reduced builds..?
13899    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
13900  else
13901    DEFINE_CROSS_COMPILE_ARCH=""
13902  fi
13903
13904
13905  # ZERO_ARCHDEF is used to enable architecture-specific code
13906  case "${OPENJDK_TARGET_CPU}" in
13907    ppc*)    ZERO_ARCHDEF=PPC   ;;
13908    s390*)   ZERO_ARCHDEF=S390  ;;
13909    sparc*)  ZERO_ARCHDEF=SPARC ;;
13910    x86_64*) ZERO_ARCHDEF=AMD64 ;;
13911    x86)     ZERO_ARCHDEF=IA32  ;;
13912    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
13913  esac
13914
13915
13916
13917
13918# Continue setting up basic stuff. Most remaining code require fundamental tools.
13919
13920  # Save the current directory this script was started from
13921  CURDIR="$PWD"
13922
13923  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13924    PATH_SEP=";"
13925
13926  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
13927  if test $SRC_ROOT_LENGTH -gt 100; then
13928    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
13929  fi
13930
13931  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13932    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
13933$as_echo_n "checking cygwin release... " >&6; }
13934    CYGWIN_VERSION=`$UNAME -r`
13935    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
13936$as_echo "$CYGWIN_VERSION" >&6; }
13937    WINDOWS_ENV_VENDOR='cygwin'
13938    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
13939
13940    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
13941    if test "x$CYGWIN_VERSION_OK" = x; then
13942      { $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
13943$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;}
13944      as_fn_error $? "Cannot continue" "$LINENO" 5
13945    fi
13946    if test "x$CYGPATH" = x; then
13947      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
13948    fi
13949    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
13950$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
13951    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
13952    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
13953    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
13954    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
13955    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
13956$as_echo "$CYGWIN_ROOT_PATH" >&6; }
13957    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
13958    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
13959    if test "x$test_cygdrive_prefix" = x; then
13960      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
13961    fi
13962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13963    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
13964$as_echo_n "checking msys release... " >&6; }
13965    MSYS_VERSION=`$UNAME -r`
13966    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
13967$as_echo "$MSYS_VERSION" >&6; }
13968
13969    WINDOWS_ENV_VENDOR='msys'
13970    WINDOWS_ENV_VERSION="$MSYS_VERSION"
13971
13972    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
13973$as_echo_n "checking msys root directory as unix-style path... " >&6; }
13974    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
13975    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
13976
13977  windows_path="$MSYS_ROOT_PATH"
13978  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13979    unix_path=`$CYGPATH -u "$windows_path"`
13980    MSYS_ROOT_PATH="$unix_path"
13981  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13982    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13983    MSYS_ROOT_PATH="$unix_path"
13984  fi
13985
13986    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
13987$as_echo "$MSYS_ROOT_PATH" >&6; }
13988    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
13989  else
13990    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
13991  fi
13992
13993  # Test if windows or unix (cygwin/msys) find is first in path.
13994  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
13995$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
13996  FIND_BINARY_OUTPUT=`find --version 2>&1`
13997  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
13998    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
13999$as_echo "unix style" >&6; }
14000  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
14001    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
14002$as_echo "Windows" >&6; }
14003    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
14004$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
14005    { $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
14006$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
14007    as_fn_error $? "Cannot continue" "$LINENO" 5
14008  else
14009    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
14010$as_echo "unknown" >&6; }
14011    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
14012$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
14013  fi
14014
14015  else
14016    PATH_SEP=":"
14017  fi
14018
14019
14020  # We get the top-level directory from the supporting wrappers.
14021  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
14022$as_echo_n "checking for top-level directory... " >&6; }
14023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
14024$as_echo "$TOPDIR" >&6; }
14025
14026
14027  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
14028
14029  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14030
14031  # Input might be given as Windows format, start by converting to
14032  # unix format.
14033  path="$CURDIR"
14034  new_path=`$CYGPATH -u "$path"`
14035
14036  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14037  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14038  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14039  # "foo.exe" is OK but "foo" is an error.
14040  #
14041  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14042  # It is also a way to make sure we got the proper file name for the real test later on.
14043  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14044  if test "x$test_shortpath" = x; then
14045    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14046$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14047    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
14048  fi
14049
14050  # Call helper function which possibly converts this using DOS-style short mode.
14051  # If so, the updated path is stored in $new_path.
14052
14053  input_path="$new_path"
14054  # Check if we need to convert this using DOS-style short mode. If the path
14055  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14056  # take no chances and rewrite it.
14057  # Note: m4 eats our [], so we need to use [ and ] instead.
14058  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14059  if test "x$has_forbidden_chars" != x; then
14060    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14061    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14062    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14063    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14064      # Going to short mode and back again did indeed matter. Since short mode is
14065      # case insensitive, let's make it lowercase to improve readability.
14066      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14067      # Now convert it back to Unix-stile (cygpath)
14068      input_path=`$CYGPATH -u "$shortmode_path"`
14069      new_path="$input_path"
14070    fi
14071  fi
14072
14073  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14074  if test "x$test_cygdrive_prefix" = x; then
14075    # As a simple fix, exclude /usr/bin since it's not a real path.
14076    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14077      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14078      # a path prefixed by /cygdrive for fixpath to work.
14079      new_path="$CYGWIN_ROOT_PATH$input_path"
14080    fi
14081  fi
14082
14083
14084  if test "x$path" != "x$new_path"; then
14085    CURDIR="$new_path"
14086    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14087$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14088  fi
14089
14090  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14091
14092  path="$CURDIR"
14093  has_colon=`$ECHO $path | $GREP ^.:`
14094  new_path="$path"
14095  if test "x$has_colon" = x; then
14096    # Not in mixed or Windows style, start by that.
14097    new_path=`cmd //c echo $path`
14098  fi
14099
14100
14101  input_path="$new_path"
14102  # Check if we need to convert this using DOS-style short mode. If the path
14103  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14104  # take no chances and rewrite it.
14105  # Note: m4 eats our [], so we need to use [ and ] instead.
14106  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14107  if test "x$has_forbidden_chars" != x; then
14108    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14109    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14110  fi
14111
14112
14113  windows_path="$new_path"
14114  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14115    unix_path=`$CYGPATH -u "$windows_path"`
14116    new_path="$unix_path"
14117  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14118    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14119    new_path="$unix_path"
14120  fi
14121
14122  if test "x$path" != "x$new_path"; then
14123    CURDIR="$new_path"
14124    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14125$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14126  fi
14127
14128  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14129  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14130
14131  else
14132    # We're on a posix platform. Hooray! :)
14133    path="$CURDIR"
14134    has_space=`$ECHO "$path" | $GREP " "`
14135    if test "x$has_space" != x; then
14136      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14137$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14138      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14139    fi
14140
14141    # Use eval to expand a potential ~
14142    eval path="$path"
14143    if test ! -f "$path" && test ! -d "$path"; then
14144      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14145    fi
14146
14147    CURDIR="`cd "$path"; $THEPWDCMD -L`"
14148  fi
14149
14150
14151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14152
14153  # Input might be given as Windows format, start by converting to
14154  # unix format.
14155  path="$TOPDIR"
14156  new_path=`$CYGPATH -u "$path"`
14157
14158  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14159  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14160  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14161  # "foo.exe" is OK but "foo" is an error.
14162  #
14163  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14164  # It is also a way to make sure we got the proper file name for the real test later on.
14165  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14166  if test "x$test_shortpath" = x; then
14167    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14168$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14169    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14170  fi
14171
14172  # Call helper function which possibly converts this using DOS-style short mode.
14173  # If so, the updated path is stored in $new_path.
14174
14175  input_path="$new_path"
14176  # Check if we need to convert this using DOS-style short mode. If the path
14177  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14178  # take no chances and rewrite it.
14179  # Note: m4 eats our [], so we need to use [ and ] instead.
14180  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14181  if test "x$has_forbidden_chars" != x; then
14182    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14183    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14184    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14185    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14186      # Going to short mode and back again did indeed matter. Since short mode is
14187      # case insensitive, let's make it lowercase to improve readability.
14188      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14189      # Now convert it back to Unix-stile (cygpath)
14190      input_path=`$CYGPATH -u "$shortmode_path"`
14191      new_path="$input_path"
14192    fi
14193  fi
14194
14195  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14196  if test "x$test_cygdrive_prefix" = x; then
14197    # As a simple fix, exclude /usr/bin since it's not a real path.
14198    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14199      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14200      # a path prefixed by /cygdrive for fixpath to work.
14201      new_path="$CYGWIN_ROOT_PATH$input_path"
14202    fi
14203  fi
14204
14205
14206  if test "x$path" != "x$new_path"; then
14207    TOPDIR="$new_path"
14208    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14209$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14210  fi
14211
14212  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14213
14214  path="$TOPDIR"
14215  has_colon=`$ECHO $path | $GREP ^.:`
14216  new_path="$path"
14217  if test "x$has_colon" = x; then
14218    # Not in mixed or Windows style, start by that.
14219    new_path=`cmd //c echo $path`
14220  fi
14221
14222
14223  input_path="$new_path"
14224  # Check if we need to convert this using DOS-style short mode. If the path
14225  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14226  # take no chances and rewrite it.
14227  # Note: m4 eats our [], so we need to use [ and ] instead.
14228  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14229  if test "x$has_forbidden_chars" != x; then
14230    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14231    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14232  fi
14233
14234
14235  windows_path="$new_path"
14236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14237    unix_path=`$CYGPATH -u "$windows_path"`
14238    new_path="$unix_path"
14239  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14240    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14241    new_path="$unix_path"
14242  fi
14243
14244  if test "x$path" != "x$new_path"; then
14245    TOPDIR="$new_path"
14246    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14247$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14248  fi
14249
14250  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14251  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14252
14253  else
14254    # We're on a posix platform. Hooray! :)
14255    path="$TOPDIR"
14256    has_space=`$ECHO "$path" | $GREP " "`
14257    if test "x$has_space" != x; then
14258      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14259$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14260      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14261    fi
14262
14263    # Use eval to expand a potential ~
14264    eval path="$path"
14265    if test ! -f "$path" && test ! -d "$path"; then
14266      as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14267    fi
14268
14269    TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14270  fi
14271
14272  # SRC_ROOT is a traditional alias for TOPDIR.
14273  SRC_ROOT=$TOPDIR
14274
14275  # Locate the directory of this script.
14276  AUTOCONF_DIR=$TOPDIR/common/autoconf
14277
14278
14279  # Setup default logging of stdout and stderr to build.log in the output root.
14280  BUILD_LOG='$(OUTPUT_ROOT)/build.log'
14281  BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
14282  BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
14283
14284
14285
14286
14287
14288# Check if it's a pure open build or if custom sources are to be used.
14289
14290  # Check whether --enable-openjdk-only was given.
14291if test "${enable_openjdk_only+set}" = set; then :
14292  enableval=$enable_openjdk_only;
14293else
14294  enable_openjdk_only="no"
14295fi
14296
14297
14298  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14299$as_echo_n "checking for presence of closed sources... " >&6; }
14300  if test -d "$SRC_ROOT/jdk/src/closed"; then
14301    CLOSED_SOURCE_PRESENT=yes
14302  else
14303    CLOSED_SOURCE_PRESENT=no
14304  fi
14305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14306$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14307
14308  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14309$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14310  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14312$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14313
14314  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14315    OPENJDK=true
14316    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14317      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14318$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14319    fi
14320  else
14321    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14322      OPENJDK=true
14323    else
14324      OPENJDK=false
14325    fi
14326  fi
14327
14328  if test "x$OPENJDK" = "xtrue"; then
14329    SET_OPENJDK="OPENJDK=true"
14330  fi
14331
14332
14333
14334  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
14335  # the IncludeCustomExtension macro.
14336
14337
14338# Check whether --with-custom-make-dir was given.
14339if test "${with_custom_make_dir+set}" = set; then :
14340  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
14341$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
14342fi
14343
14344
14345
14346
14347# These are needed to be able to create a configuration name (and thus the output directory)
14348
14349  ###############################################################################
14350  #
14351  # Check which variant of the JDK that we want to build.
14352  # Currently we have:
14353  #    normal:   standard edition
14354  # but the custom make system may add other variants
14355  #
14356  # Effectively the JDK variant gives a name to a specific set of
14357  # modules to compile into the JDK. In the future, these modules
14358  # might even be Jigsaw modules.
14359  #
14360  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14361$as_echo_n "checking which variant of the JDK to build... " >&6; }
14362
14363# Check whether --with-jdk-variant was given.
14364if test "${with_jdk_variant+set}" = set; then :
14365  withval=$with_jdk_variant;
14366fi
14367
14368
14369  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14370    JDK_VARIANT="normal"
14371  else
14372    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14373  fi
14374
14375
14376
14377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14378$as_echo "$JDK_VARIANT" >&6; }
14379
14380
14381###############################################################################
14382#
14383# Check which interpreter of the JVM we want to build.
14384# Currently we have:
14385#    template: Template interpreter (the default)
14386#    cpp     : C++ interpreter
14387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14388$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14389
14390# Check whether --with-jvm-interpreter was given.
14391if test "${with_jvm_interpreter+set}" = set; then :
14392  withval=$with_jvm_interpreter;
14393fi
14394
14395
14396if test "x$with_jvm_interpreter" = x; then
14397     with_jvm_interpreter="template"
14398fi
14399
14400JVM_INTERPRETER="$with_jvm_interpreter"
14401
14402if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14403   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14404fi
14405
14406
14407
14408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14409$as_echo "$with_jvm_interpreter" >&6; }
14410
14411
14412
14413  ###############################################################################
14414  #
14415  # Check which variants of the JVM that we want to build.
14416  # Currently we have:
14417  #    server: normal interpreter and a tiered C1/C2 compiler
14418  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14419  #    minimal1: reduced form of client with optional VM services and features stripped out
14420  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14421  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14422  #    zero: no machine code interpreter, no compiler
14423  #    zeroshark: zero interpreter and shark/llvm compiler backend
14424#    core: interpreter only, no compiler (only works on some platforms)
14425  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14426$as_echo_n "checking which variants of the JVM to build... " >&6; }
14427
14428# Check whether --with-jvm-variants was given.
14429if test "${with_jvm_variants+set}" = set; then :
14430  withval=$with_jvm_variants;
14431fi
14432
14433
14434  if test "x$with_jvm_variants" = x; then
14435    with_jvm_variants="server"
14436  fi
14437
14438  JVM_VARIANTS=",$with_jvm_variants,"
14439  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,//'`
14440
14441  if test "x$TEST_VARIANTS" != "x,"; then
14442     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14443  fi
14444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14445$as_echo "$with_jvm_variants" >&6; }
14446
14447  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14448  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14449  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14450  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14451  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14452  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14453  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14454
14455  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14456    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14457      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14458    fi
14459  fi
14460  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14461    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14462      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14463    fi
14464  fi
14465  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14466    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14467      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14468    fi
14469  fi
14470
14471  # Replace the commas with AND for use in the build directory name.
14472  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14473  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/'`
14474  if test "x$COUNT_VARIANTS" != "x,1"; then
14475    BUILDING_MULTIPLE_JVM_VARIANTS=yes
14476  else
14477    BUILDING_MULTIPLE_JVM_VARIANTS=no
14478  fi
14479
14480
14481
14482
14483
14484
14485
14486
14487
14488
14489  INCLUDE_SA=true
14490  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14491    INCLUDE_SA=false
14492  fi
14493  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14494    INCLUDE_SA=false
14495  fi
14496  if test "x$VAR_CPU" = xppc64 ; then
14497    INCLUDE_SA=false
14498  fi
14499
14500
14501  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14502    MACOSX_UNIVERSAL="true"
14503  fi
14504
14505
14506
14507
14508  ###############################################################################
14509  #
14510  # Set the debug level
14511  #    release: no debug information, all optimizations, no asserts.
14512  #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
14513  #    fastdebug: debug information (-g), all optimizations, all asserts
14514  #    slowdebug: debug information (-g), no optimizations, all asserts
14515  #
14516  DEBUG_LEVEL="release"
14517  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14518$as_echo_n "checking which debug level to use... " >&6; }
14519  # Check whether --enable-debug was given.
14520if test "${enable_debug+set}" = set; then :
14521  enableval=$enable_debug;
14522        ENABLE_DEBUG="${enableval}"
14523        DEBUG_LEVEL="fastdebug"
14524
14525else
14526  ENABLE_DEBUG="no"
14527fi
14528
14529
14530
14531# Check whether --with-debug-level was given.
14532if test "${with_debug_level+set}" = set; then :
14533  withval=$with_debug_level;
14534        DEBUG_LEVEL="${withval}"
14535        if test "x$ENABLE_DEBUG" = xyes; then
14536          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14537        fi
14538
14539fi
14540
14541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14542$as_echo "$DEBUG_LEVEL" >&6; }
14543
14544  if test "x$DEBUG_LEVEL" != xrelease && \
14545      test "x$DEBUG_LEVEL" != xoptimized && \
14546      test "x$DEBUG_LEVEL" != xfastdebug && \
14547      test "x$DEBUG_LEVEL" != xslowdebug; then
14548    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14549  fi
14550
14551
14552  ###############################################################################
14553  #
14554  # Setup legacy vars/targets and new vars to deal with different debug levels.
14555  #
14556
14557  case $DEBUG_LEVEL in
14558    release )
14559      VARIANT="OPT"
14560      FASTDEBUG="false"
14561      DEBUG_CLASSFILES="false"
14562      BUILD_VARIANT_RELEASE=""
14563      HOTSPOT_DEBUG_LEVEL="product"
14564      HOTSPOT_EXPORT="product"
14565      ;;
14566    fastdebug )
14567      VARIANT="DBG"
14568      FASTDEBUG="true"
14569      DEBUG_CLASSFILES="true"
14570      BUILD_VARIANT_RELEASE="-fastdebug"
14571      HOTSPOT_DEBUG_LEVEL="fastdebug"
14572      HOTSPOT_EXPORT="fastdebug"
14573      ;;
14574    slowdebug )
14575      VARIANT="DBG"
14576      FASTDEBUG="false"
14577      DEBUG_CLASSFILES="true"
14578      BUILD_VARIANT_RELEASE="-debug"
14579      HOTSPOT_DEBUG_LEVEL="jvmg"
14580      HOTSPOT_EXPORT="debug"
14581      ;;
14582    optimized )
14583      VARIANT="OPT"
14584      FASTDEBUG="false"
14585      DEBUG_CLASSFILES="false"
14586      BUILD_VARIANT_RELEASE="-optimized"
14587      HOTSPOT_DEBUG_LEVEL="optimized"
14588      HOTSPOT_EXPORT="optimized"
14589      ;;
14590  esac
14591
14592  # The debug level 'optimized' is a little special because it is currently only
14593  # applicable to the HotSpot build where it means to build a completely
14594  # optimized version of the VM without any debugging code (like for the
14595  # 'release' debug level which is called 'product' in the HotSpot build) but
14596  # with the exception that it can contain additional code which is otherwise
14597  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
14598  # test new and/or experimental features which are not intended for customer
14599  # shipment. Because these new features need to be tested and benchmarked in
14600  # real world scenarios, we want to build the containing JDK at the 'release'
14601  # debug level.
14602  if test "x$DEBUG_LEVEL" = xoptimized; then
14603    DEBUG_LEVEL="release"
14604  fi
14605
14606  #####
14607  # Generate the legacy makefile targets for hotspot.
14608  # The hotspot api for selecting the build artifacts, really, needs to be improved.
14609  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14610  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14611  # But until then ...
14612  HOTSPOT_TARGET=""
14613
14614  if test "x$JVM_VARIANT_SERVER" = xtrue; then
14615    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14616  fi
14617
14618  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14619    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14620  fi
14621
14622  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14623    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14624  fi
14625
14626  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14627    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14628  fi
14629
14630  if test "x$JVM_VARIANT_ZERO" = xtrue; then
14631    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14632  fi
14633
14634  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14635    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14636  fi
14637
14638  if test "x$JVM_VARIANT_CORE" = xtrue; then
14639    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14640  fi
14641
14642  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14643
14644  # On Macosx universal binaries are produced, but they only contain
14645  # 64 bit intel. This invalidates control of which jvms are built
14646  # from configure, but only server is valid anyway. Fix this
14647  # when hotspot makefiles are rewritten.
14648  if test "x$MACOSX_UNIVERSAL" = xtrue; then
14649    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14650  fi
14651
14652  #####
14653
14654
14655
14656
14657
14658
14659
14660
14661# With basic setup done, call the custom early hook.
14662
14663
14664# Check if we have devkits, extra paths or sysroot set.
14665
14666
14667# Check whether --with-devkit was given.
14668if test "${with_devkit+set}" = set; then :
14669  withval=$with_devkit;
14670
14671  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14672
14673  # Input might be given as Windows format, start by converting to
14674  # unix format.
14675  path="$with_devkit"
14676  new_path=`$CYGPATH -u "$path"`
14677
14678  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14679  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14680  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14681  # "foo.exe" is OK but "foo" is an error.
14682  #
14683  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14684  # It is also a way to make sure we got the proper file name for the real test later on.
14685  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14686  if test "x$test_shortpath" = x; then
14687    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14688$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14689    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14690  fi
14691
14692  # Call helper function which possibly converts this using DOS-style short mode.
14693  # If so, the updated path is stored in $new_path.
14694
14695  input_path="$new_path"
14696  # Check if we need to convert this using DOS-style short mode. If the path
14697  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14698  # take no chances and rewrite it.
14699  # Note: m4 eats our [], so we need to use [ and ] instead.
14700  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14701  if test "x$has_forbidden_chars" != x; then
14702    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14703    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14704    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14705    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14706      # Going to short mode and back again did indeed matter. Since short mode is
14707      # case insensitive, let's make it lowercase to improve readability.
14708      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14709      # Now convert it back to Unix-stile (cygpath)
14710      input_path=`$CYGPATH -u "$shortmode_path"`
14711      new_path="$input_path"
14712    fi
14713  fi
14714
14715  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14716  if test "x$test_cygdrive_prefix" = x; then
14717    # As a simple fix, exclude /usr/bin since it's not a real path.
14718    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14719      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14720      # a path prefixed by /cygdrive for fixpath to work.
14721      new_path="$CYGWIN_ROOT_PATH$input_path"
14722    fi
14723  fi
14724
14725
14726  if test "x$path" != "x$new_path"; then
14727    with_devkit="$new_path"
14728    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14729$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14730  fi
14731
14732  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14733
14734  path="$with_devkit"
14735  has_colon=`$ECHO $path | $GREP ^.:`
14736  new_path="$path"
14737  if test "x$has_colon" = x; then
14738    # Not in mixed or Windows style, start by that.
14739    new_path=`cmd //c echo $path`
14740  fi
14741
14742
14743  input_path="$new_path"
14744  # Check if we need to convert this using DOS-style short mode. If the path
14745  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14746  # take no chances and rewrite it.
14747  # Note: m4 eats our [], so we need to use [ and ] instead.
14748  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14749  if test "x$has_forbidden_chars" != x; then
14750    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14751    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14752  fi
14753
14754
14755  windows_path="$new_path"
14756  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14757    unix_path=`$CYGPATH -u "$windows_path"`
14758    new_path="$unix_path"
14759  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14760    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14761    new_path="$unix_path"
14762  fi
14763
14764  if test "x$path" != "x$new_path"; then
14765    with_devkit="$new_path"
14766    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14767$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14768  fi
14769
14770  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14771  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14772
14773  else
14774    # We're on a posix platform. Hooray! :)
14775    path="$with_devkit"
14776    has_space=`$ECHO "$path" | $GREP " "`
14777    if test "x$has_space" != x; then
14778      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14779$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14780      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14781    fi
14782
14783    # Use eval to expand a potential ~
14784    eval path="$path"
14785    if test ! -f "$path" && test ! -d "$path"; then
14786      as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14787    fi
14788
14789    with_devkit="`cd "$path"; $THEPWDCMD -L`"
14790  fi
14791
14792        DEVKIT_ROOT="$with_devkit"
14793        # Check for a meta data info file in the root of the devkit
14794        if test -f "$DEVKIT_ROOT/devkit.info"; then
14795          # This potentially sets the following:
14796          # DEVKIT_NAME: A descriptive name of the devkit
14797          # DEVKIT_TOOLCHAIN_PATH: Corresponds to --with-toolchain-path
14798          # DEVKIT_EXTRA_PATH: Corresponds to --with-extra-path
14799          # DEVKIT_SYSROOT: Corresponds to --with-sysroot
14800          . $DEVKIT_ROOT/devkit.info
14801        fi
14802
14803        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
14804$as_echo_n "checking for devkit... " >&6; }
14805        if test "x$DEVKIT_NAME" != x; then
14806          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
14807$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
14808        else
14809          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
14810$as_echo "$DEVKIT_ROOT" >&6; }
14811        fi
14812
14813        if test "x$DEVKIT_EXTRA_PATH" != x; then
14814
14815  if test "x$DEVKIT_EXTRA_PATH" != x; then
14816    if test "x$EXTRA_PATH" = x; then
14817      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
14818    else
14819      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
14820    fi
14821  fi
14822
14823        fi
14824
14825        # Fallback default of just /bin if DEVKIT_PATH is not defined
14826        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14827          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
14828        fi
14829
14830  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
14831    if test "x$TOOLCHAIN_PATH" = x; then
14832      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
14833    else
14834      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
14835    fi
14836  fi
14837
14838
14839        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
14840        # places for backwards compatiblity.
14841        if test "x$DEVKIT_SYSROOT" != x; then
14842          SYSROOT="$DEVKIT_SYSROOT"
14843        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
14844          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
14845        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
14846          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
14847        fi
14848
14849
14850fi
14851
14852
14853  # You can force the sysroot if the sysroot encoded into the compiler tools
14854  # is not correct.
14855
14856# Check whether --with-sys-root was given.
14857if test "${with_sys_root+set}" = set; then :
14858  withval=$with_sys_root; SYSROOT=$with_sys_root
14859
14860fi
14861
14862
14863
14864# Check whether --with-sysroot was given.
14865if test "${with_sysroot+set}" = set; then :
14866  withval=$with_sysroot; SYSROOT=$with_sysroot
14867
14868fi
14869
14870
14871
14872# Check whether --with-tools-dir was given.
14873if test "${with_tools_dir+set}" = set; then :
14874  withval=$with_tools_dir;
14875  if test "x$with_tools_dir" != x; then
14876    if test "x$TOOLCHAIN_PATH" = x; then
14877      TOOLCHAIN_PATH="$with_tools_dir"
14878    else
14879      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
14880    fi
14881  fi
14882
14883
14884fi
14885
14886
14887
14888# Check whether --with-toolchain-path was given.
14889if test "${with_toolchain_path+set}" = set; then :
14890  withval=$with_toolchain_path;
14891  if test "x$with_toolchain_path" != x; then
14892    if test "x$TOOLCHAIN_PATH" = x; then
14893      TOOLCHAIN_PATH="$with_toolchain_path"
14894    else
14895      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
14896    fi
14897  fi
14898
14899
14900fi
14901
14902
14903
14904# Check whether --with-extra-path was given.
14905if test "${with_extra_path+set}" = set; then :
14906  withval=$with_extra_path;
14907  if test "x$with_extra_path" != x; then
14908    if test "x$EXTRA_PATH" = x; then
14909      EXTRA_PATH="$with_extra_path"
14910    else
14911      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
14912    fi
14913  fi
14914
14915
14916fi
14917
14918
14919  # Prepend the extra path to the global path
14920
14921  if test "x$EXTRA_PATH" != x; then
14922    if test "x$PATH" = x; then
14923      PATH="$EXTRA_PATH"
14924    else
14925      PATH="$EXTRA_PATH:$PATH"
14926    fi
14927  fi
14928
14929
14930  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
14931    # Add extra search paths on solaris for utilities like ar and as etc...
14932    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
14933  fi
14934
14935  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
14936$as_echo_n "checking for sysroot... " >&6; }
14937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
14938$as_echo "$SYSROOT" >&6; }
14939  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
14940$as_echo_n "checking for toolchain path... " >&6; }
14941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
14942$as_echo "$TOOLCHAIN_PATH" >&6; }
14943  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
14944$as_echo_n "checking for extra path... " >&6; }
14945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
14946$as_echo "$EXTRA_PATH" >&6; }
14947
14948
14949# To properly create a configuration name, we need to have the OpenJDK target
14950# and options (variants and debug level) parsed.
14951
14952
14953
14954# Check whether --with-conf-name was given.
14955if test "${with_conf_name+set}" = set; then :
14956  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
14957fi
14958
14959
14960  # Test from where we are running configure, in or outside of src root.
14961  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
14962$as_echo_n "checking where to store configuration... " >&6; }
14963  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
14964      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
14965      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
14966    # We are running configure from the src root.
14967    # Create a default ./build/target-variant-debuglevel output root.
14968    if test "x${CONF_NAME}" = x; then
14969      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
14970$as_echo "in default location" >&6; }
14971      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
14972    else
14973      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
14974$as_echo "in build directory with custom name" >&6; }
14975    fi
14976    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
14977    $MKDIR -p "$OUTPUT_ROOT"
14978    if test ! -d "$OUTPUT_ROOT"; then
14979      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
14980    fi
14981  else
14982    # We are running configure from outside of the src dir.
14983    # Then use the current directory as output dir!
14984    # If configuration is situated in normal build directory, just use the build
14985    # directory name as configuration name, otherwise use the complete path.
14986    if test "x${CONF_NAME}" = x; then
14987      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
14988    fi
14989    OUTPUT_ROOT="$CURDIR"
14990    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
14991$as_echo "in current directory" >&6; }
14992
14993    # WARNING: This might be a bad thing to do. You need to be sure you want to
14994    # have a configuration in this directory. Do some sanity checks!
14995
14996    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
14997      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
14998      # other files
14999      files_present=`$LS $OUTPUT_ROOT`
15000      # Configure has already touched config.log and confdefs.h in the current dir when this check
15001      # is performed.
15002      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
15003      | $TR -d '\n'`
15004      if test "x$filtered_files" != x; then
15005        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
15006$as_echo "$as_me: Current directory is $CURDIR." >&6;}
15007        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
15008$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
15009        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
15010$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
15011        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
15012$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
15013        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
15014$as_echo "$as_me: seriously mess up just about everything." >&6;}
15015        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
15016$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
15017        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
15018$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
15019        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
15020      fi
15021    fi
15022  fi
15023  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
15024$as_echo_n "checking what configuration name to use... " >&6; }
15025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
15026$as_echo "$CONF_NAME" >&6; }
15027
15028
15029  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15030
15031  # Input might be given as Windows format, start by converting to
15032  # unix format.
15033  path="$OUTPUT_ROOT"
15034  new_path=`$CYGPATH -u "$path"`
15035
15036  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15037  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15038  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15039  # "foo.exe" is OK but "foo" is an error.
15040  #
15041  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15042  # It is also a way to make sure we got the proper file name for the real test later on.
15043  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15044  if test "x$test_shortpath" = x; then
15045    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15046$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15047    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
15048  fi
15049
15050  # Call helper function which possibly converts this using DOS-style short mode.
15051  # If so, the updated path is stored in $new_path.
15052
15053  input_path="$new_path"
15054  # Check if we need to convert this using DOS-style short mode. If the path
15055  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15056  # take no chances and rewrite it.
15057  # Note: m4 eats our [], so we need to use [ and ] instead.
15058  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15059  if test "x$has_forbidden_chars" != x; then
15060    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15061    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15062    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15063    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15064      # Going to short mode and back again did indeed matter. Since short mode is
15065      # case insensitive, let's make it lowercase to improve readability.
15066      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15067      # Now convert it back to Unix-stile (cygpath)
15068      input_path=`$CYGPATH -u "$shortmode_path"`
15069      new_path="$input_path"
15070    fi
15071  fi
15072
15073  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15074  if test "x$test_cygdrive_prefix" = x; then
15075    # As a simple fix, exclude /usr/bin since it's not a real path.
15076    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15077      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15078      # a path prefixed by /cygdrive for fixpath to work.
15079      new_path="$CYGWIN_ROOT_PATH$input_path"
15080    fi
15081  fi
15082
15083
15084  if test "x$path" != "x$new_path"; then
15085    OUTPUT_ROOT="$new_path"
15086    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15087$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15088  fi
15089
15090  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15091
15092  path="$OUTPUT_ROOT"
15093  has_colon=`$ECHO $path | $GREP ^.:`
15094  new_path="$path"
15095  if test "x$has_colon" = x; then
15096    # Not in mixed or Windows style, start by that.
15097    new_path=`cmd //c echo $path`
15098  fi
15099
15100
15101  input_path="$new_path"
15102  # Check if we need to convert this using DOS-style short mode. If the path
15103  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15104  # take no chances and rewrite it.
15105  # Note: m4 eats our [], so we need to use [ and ] instead.
15106  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15107  if test "x$has_forbidden_chars" != x; then
15108    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15109    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15110  fi
15111
15112
15113  windows_path="$new_path"
15114  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15115    unix_path=`$CYGPATH -u "$windows_path"`
15116    new_path="$unix_path"
15117  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15118    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15119    new_path="$unix_path"
15120  fi
15121
15122  if test "x$path" != "x$new_path"; then
15123    OUTPUT_ROOT="$new_path"
15124    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15125$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15126  fi
15127
15128  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15129  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15130
15131  else
15132    # We're on a posix platform. Hooray! :)
15133    path="$OUTPUT_ROOT"
15134    has_space=`$ECHO "$path" | $GREP " "`
15135    if test "x$has_space" != x; then
15136      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15137$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15138      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15139    fi
15140
15141    # Use eval to expand a potential ~
15142    eval path="$path"
15143    if test ! -f "$path" && test ! -d "$path"; then
15144      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
15145    fi
15146
15147    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
15148  fi
15149
15150
15151  SPEC=$OUTPUT_ROOT/spec.gmk
15152
15153  CONF_NAME=$CONF_NAME
15154
15155  OUTPUT_ROOT=$OUTPUT_ROOT
15156
15157
15158  # Most of the probed defines are put into config.h
15159  ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
15160
15161  # The spec.gmk file contains all variables for the make system.
15162  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
15163
15164  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
15165  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
15166
15167  # The bootcycle-spec.gmk file contains support for boot cycle builds.
15168  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
15169
15170  # The compare.sh is used to compare the build output to other builds.
15171  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
15172
15173  # Spec.sh is currently used by compare-objects.sh
15174  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
15175
15176  # The generated Makefile knows where the spec.gmk is and where the source is.
15177  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
15178  # which will look for generated configurations
15179  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
15180
15181
15182
15183# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15184
15185  for ac_prog in apt-get yum port pkgutil pkgadd
15186do
15187  # Extract the first word of "$ac_prog", so it can be a program name with args.
15188set dummy $ac_prog; ac_word=$2
15189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15190$as_echo_n "checking for $ac_word... " >&6; }
15191if ${ac_cv_prog_PKGHANDLER+:} false; then :
15192  $as_echo_n "(cached) " >&6
15193else
15194  if test -n "$PKGHANDLER"; then
15195  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15196else
15197as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15198for as_dir in $PATH
15199do
15200  IFS=$as_save_IFS
15201  test -z "$as_dir" && as_dir=.
15202    for ac_exec_ext in '' $ac_executable_extensions; do
15203  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15204    ac_cv_prog_PKGHANDLER="$ac_prog"
15205    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15206    break 2
15207  fi
15208done
15209  done
15210IFS=$as_save_IFS
15211
15212fi
15213fi
15214PKGHANDLER=$ac_cv_prog_PKGHANDLER
15215if test -n "$PKGHANDLER"; then
15216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15217$as_echo "$PKGHANDLER" >&6; }
15218else
15219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15220$as_echo "no" >&6; }
15221fi
15222
15223
15224  test -n "$PKGHANDLER" && break
15225done
15226
15227
15228
15229# Setup tools that requires more complex handling, or that is not needed by the configure script.
15230
15231
15232  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15233  if test "x$MAKE" != x; then
15234    # User has supplied a make, test it.
15235    if test ! -f "$MAKE"; then
15236      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15237    fi
15238
15239  MAKE_CANDIDATE=""$MAKE""
15240  DESCRIPTION="user supplied MAKE=$MAKE"
15241  if test "x$MAKE_CANDIDATE" != x; then
15242    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15243$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15244    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15245    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15246    if test "x$IS_GNU_MAKE" = x; then
15247      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15248$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15249    else
15250      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15251      if test "x$IS_MODERN_MAKE" = x; then
15252        { $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
15253$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;}
15254      else
15255        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15256          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15257            MAKE_EXPECTED_ENV='cygwin'
15258          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15259            MAKE_EXPECTED_ENV='msys'
15260          else
15261            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15262          fi
15263          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15264          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15265        else
15266          # Not relevant for non-Windows
15267          IS_MAKE_CORRECT_ENV=true
15268        fi
15269        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15270          { $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
15271$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;}
15272        else
15273          FOUND_MAKE=$MAKE_CANDIDATE
15274
15275  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15276
15277  # First separate the path from the arguments. This will split at the first
15278  # space.
15279  complete="$FOUND_MAKE"
15280  path="${complete%% *}"
15281  tmp="$complete EOL"
15282  arguments="${tmp#* }"
15283
15284  # Input might be given as Windows format, start by converting to
15285  # unix format.
15286  new_path=`$CYGPATH -u "$path"`
15287
15288  # Now try to locate executable using which
15289  new_path=`$WHICH "$new_path" 2> /dev/null`
15290  # bat and cmd files are not always considered executable in cygwin causing which
15291  # to not find them
15292  if test "x$new_path" = x \
15293      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15294      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15295    new_path=`$CYGPATH -u "$path"`
15296  fi
15297  if test "x$new_path" = x; then
15298    # Oops. Which didn't find the executable.
15299    # The splitting of arguments from the executable at a space might have been incorrect,
15300    # since paths with space are more likely in Windows. Give it another try with the whole
15301    # argument.
15302    path="$complete"
15303    arguments="EOL"
15304    new_path=`$CYGPATH -u "$path"`
15305    new_path=`$WHICH "$new_path" 2> /dev/null`
15306    # bat and cmd files are not always considered executable in cygwin causing which
15307    # to not find them
15308    if test "x$new_path" = x \
15309        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15310        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15311      new_path=`$CYGPATH -u "$path"`
15312    fi
15313    if test "x$new_path" = x; then
15314      # It's still not found. Now this is an unrecoverable error.
15315      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15316$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15317      has_space=`$ECHO "$complete" | $GREP " "`
15318      if test "x$has_space" != x; then
15319        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15320$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15321      fi
15322      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15323    fi
15324  fi
15325
15326  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15327  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15328  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15329  # "foo.exe" is OK but "foo" is an error.
15330  #
15331  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15332  # It is also a way to make sure we got the proper file name for the real test later on.
15333  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15334  if test "x$test_shortpath" = x; then
15335    # Short path failed, file does not exist as specified.
15336    # Try adding .exe or .cmd
15337    if test -f "${new_path}.exe"; then
15338      input_to_shortpath="${new_path}.exe"
15339    elif test -f "${new_path}.cmd"; then
15340      input_to_shortpath="${new_path}.cmd"
15341    else
15342      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15343$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15344      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15345$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15346      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15347    fi
15348  else
15349    input_to_shortpath="$new_path"
15350  fi
15351
15352  # Call helper function which possibly converts this using DOS-style short mode.
15353  # If so, the updated path is stored in $new_path.
15354  new_path="$input_to_shortpath"
15355
15356  input_path="$input_to_shortpath"
15357  # Check if we need to convert this using DOS-style short mode. If the path
15358  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15359  # take no chances and rewrite it.
15360  # Note: m4 eats our [], so we need to use [ and ] instead.
15361  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15362  if test "x$has_forbidden_chars" != x; then
15363    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15364    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15365    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15366    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15367      # Going to short mode and back again did indeed matter. Since short mode is
15368      # case insensitive, let's make it lowercase to improve readability.
15369      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15370      # Now convert it back to Unix-stile (cygpath)
15371      input_path=`$CYGPATH -u "$shortmode_path"`
15372      new_path="$input_path"
15373    fi
15374  fi
15375
15376  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15377  if test "x$test_cygdrive_prefix" = x; then
15378    # As a simple fix, exclude /usr/bin since it's not a real path.
15379    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15380      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15381      # a path prefixed by /cygdrive for fixpath to work.
15382      new_path="$CYGWIN_ROOT_PATH$input_path"
15383    fi
15384  fi
15385
15386  # remove trailing .exe if any
15387  new_path="${new_path/%.exe/}"
15388
15389  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15390
15391  # First separate the path from the arguments. This will split at the first
15392  # space.
15393  complete="$FOUND_MAKE"
15394  path="${complete%% *}"
15395  tmp="$complete EOL"
15396  arguments="${tmp#* }"
15397
15398  # Input might be given as Windows format, start by converting to
15399  # unix format.
15400  new_path="$path"
15401
15402  windows_path="$new_path"
15403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15404    unix_path=`$CYGPATH -u "$windows_path"`
15405    new_path="$unix_path"
15406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15407    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15408    new_path="$unix_path"
15409  fi
15410
15411
15412  # Now try to locate executable using which
15413  new_path=`$WHICH "$new_path" 2> /dev/null`
15414
15415  if test "x$new_path" = x; then
15416    # Oops. Which didn't find the executable.
15417    # The splitting of arguments from the executable at a space might have been incorrect,
15418    # since paths with space are more likely in Windows. Give it another try with the whole
15419    # argument.
15420    path="$complete"
15421    arguments="EOL"
15422    new_path="$path"
15423
15424  windows_path="$new_path"
15425  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15426    unix_path=`$CYGPATH -u "$windows_path"`
15427    new_path="$unix_path"
15428  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15429    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15430    new_path="$unix_path"
15431  fi
15432
15433
15434    new_path=`$WHICH "$new_path" 2> /dev/null`
15435
15436    if test "x$new_path" = x; then
15437      # It's still not found. Now this is an unrecoverable error.
15438      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15439$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15440      has_space=`$ECHO "$complete" | $GREP " "`
15441      if test "x$has_space" != x; then
15442        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15443$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15444      fi
15445      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15446    fi
15447  fi
15448
15449  # Now new_path has a complete unix path to the binary
15450  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15451    # Keep paths in /bin as-is, but remove trailing .exe if any
15452    new_path="${new_path/%.exe/}"
15453    # Do not save /bin paths to all_fixpath_prefixes!
15454  else
15455    # Not in mixed or Windows style, start by that.
15456    new_path=`cmd //c echo $new_path`
15457
15458  input_path="$new_path"
15459  # Check if we need to convert this using DOS-style short mode. If the path
15460  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15461  # take no chances and rewrite it.
15462  # Note: m4 eats our [], so we need to use [ and ] instead.
15463  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15464  if test "x$has_forbidden_chars" != x; then
15465    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15466    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15467  fi
15468
15469    # Output is in $new_path
15470
15471  windows_path="$new_path"
15472  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15473    unix_path=`$CYGPATH -u "$windows_path"`
15474    new_path="$unix_path"
15475  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15476    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15477    new_path="$unix_path"
15478  fi
15479
15480    # remove trailing .exe if any
15481    new_path="${new_path/%.exe/}"
15482
15483    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15484    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15485  fi
15486
15487  else
15488    # We're on a posix platform. Hooray! :)
15489    # First separate the path from the arguments. This will split at the first
15490    # space.
15491    complete="$FOUND_MAKE"
15492    path="${complete%% *}"
15493    tmp="$complete EOL"
15494    arguments="${tmp#* }"
15495
15496    # Cannot rely on the command "which" here since it doesn't always work.
15497    is_absolute_path=`$ECHO "$path" | $GREP ^/`
15498    if test -z "$is_absolute_path"; then
15499      # Path to executable is not absolute. Find it.
15500      IFS_save="$IFS"
15501      IFS=:
15502      for p in $PATH; do
15503        if test -f "$p/$path" && test -x "$p/$path"; then
15504          new_path="$p/$path"
15505          break
15506        fi
15507      done
15508      IFS="$IFS_save"
15509    else
15510      # This is an absolute path, we can use it without further modifications.
15511      new_path="$path"
15512    fi
15513
15514    if test "x$new_path" = x; then
15515      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15516$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15517      has_space=`$ECHO "$complete" | $GREP " "`
15518      if test "x$has_space" != x; then
15519        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15520$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15521      fi
15522      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15523    fi
15524  fi
15525
15526  # Now join together the path and the arguments once again
15527  if test "x$arguments" != xEOL; then
15528    new_complete="$new_path ${arguments% *}"
15529  else
15530    new_complete="$new_path"
15531  fi
15532
15533  if test "x$complete" != "x$new_complete"; then
15534    FOUND_MAKE="$new_complete"
15535    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15536$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15537  fi
15538
15539        fi
15540      fi
15541    fi
15542  fi
15543
15544    if test "x$FOUND_MAKE" = x; then
15545      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
15546    fi
15547  else
15548    # Try our hardest to locate a correct version of GNU make
15549    for ac_prog in gmake
15550do
15551  # Extract the first word of "$ac_prog", so it can be a program name with args.
15552set dummy $ac_prog; ac_word=$2
15553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15554$as_echo_n "checking for $ac_word... " >&6; }
15555if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15556  $as_echo_n "(cached) " >&6
15557else
15558  case $CHECK_GMAKE in
15559  [\\/]* | ?:[\\/]*)
15560  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15561  ;;
15562  *)
15563  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15564for as_dir in $PATH
15565do
15566  IFS=$as_save_IFS
15567  test -z "$as_dir" && as_dir=.
15568    for ac_exec_ext in '' $ac_executable_extensions; do
15569  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15570    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15571    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15572    break 2
15573  fi
15574done
15575  done
15576IFS=$as_save_IFS
15577
15578  ;;
15579esac
15580fi
15581CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15582if test -n "$CHECK_GMAKE"; then
15583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15584$as_echo "$CHECK_GMAKE" >&6; }
15585else
15586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15587$as_echo "no" >&6; }
15588fi
15589
15590
15591  test -n "$CHECK_GMAKE" && break
15592done
15593
15594
15595  MAKE_CANDIDATE=""$CHECK_GMAKE""
15596  DESCRIPTION="gmake in PATH"
15597  if test "x$MAKE_CANDIDATE" != x; then
15598    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15599$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15600    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15601    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15602    if test "x$IS_GNU_MAKE" = x; then
15603      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15604$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15605    else
15606      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15607      if test "x$IS_MODERN_MAKE" = x; then
15608        { $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
15609$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;}
15610      else
15611        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15612          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15613            MAKE_EXPECTED_ENV='cygwin'
15614          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15615            MAKE_EXPECTED_ENV='msys'
15616          else
15617            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15618          fi
15619          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15620          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15621        else
15622          # Not relevant for non-Windows
15623          IS_MAKE_CORRECT_ENV=true
15624        fi
15625        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15626          { $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
15627$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;}
15628        else
15629          FOUND_MAKE=$MAKE_CANDIDATE
15630
15631  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15632
15633  # First separate the path from the arguments. This will split at the first
15634  # space.
15635  complete="$FOUND_MAKE"
15636  path="${complete%% *}"
15637  tmp="$complete EOL"
15638  arguments="${tmp#* }"
15639
15640  # Input might be given as Windows format, start by converting to
15641  # unix format.
15642  new_path=`$CYGPATH -u "$path"`
15643
15644  # Now try to locate executable using which
15645  new_path=`$WHICH "$new_path" 2> /dev/null`
15646  # bat and cmd files are not always considered executable in cygwin causing which
15647  # to not find them
15648  if test "x$new_path" = x \
15649      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15650      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15651    new_path=`$CYGPATH -u "$path"`
15652  fi
15653  if test "x$new_path" = x; then
15654    # Oops. Which didn't find the executable.
15655    # The splitting of arguments from the executable at a space might have been incorrect,
15656    # since paths with space are more likely in Windows. Give it another try with the whole
15657    # argument.
15658    path="$complete"
15659    arguments="EOL"
15660    new_path=`$CYGPATH -u "$path"`
15661    new_path=`$WHICH "$new_path" 2> /dev/null`
15662    # bat and cmd files are not always considered executable in cygwin causing which
15663    # to not find them
15664    if test "x$new_path" = x \
15665        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15666        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15667      new_path=`$CYGPATH -u "$path"`
15668    fi
15669    if test "x$new_path" = x; then
15670      # It's still not found. Now this is an unrecoverable error.
15671      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15672$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15673      has_space=`$ECHO "$complete" | $GREP " "`
15674      if test "x$has_space" != x; then
15675        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15676$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15677      fi
15678      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15679    fi
15680  fi
15681
15682  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15683  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15684  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15685  # "foo.exe" is OK but "foo" is an error.
15686  #
15687  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15688  # It is also a way to make sure we got the proper file name for the real test later on.
15689  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15690  if test "x$test_shortpath" = x; then
15691    # Short path failed, file does not exist as specified.
15692    # Try adding .exe or .cmd
15693    if test -f "${new_path}.exe"; then
15694      input_to_shortpath="${new_path}.exe"
15695    elif test -f "${new_path}.cmd"; then
15696      input_to_shortpath="${new_path}.cmd"
15697    else
15698      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15699$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15700      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15701$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15702      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15703    fi
15704  else
15705    input_to_shortpath="$new_path"
15706  fi
15707
15708  # Call helper function which possibly converts this using DOS-style short mode.
15709  # If so, the updated path is stored in $new_path.
15710  new_path="$input_to_shortpath"
15711
15712  input_path="$input_to_shortpath"
15713  # Check if we need to convert this using DOS-style short mode. If the path
15714  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15715  # take no chances and rewrite it.
15716  # Note: m4 eats our [], so we need to use [ and ] instead.
15717  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15718  if test "x$has_forbidden_chars" != x; then
15719    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15720    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15721    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15722    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15723      # Going to short mode and back again did indeed matter. Since short mode is
15724      # case insensitive, let's make it lowercase to improve readability.
15725      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15726      # Now convert it back to Unix-stile (cygpath)
15727      input_path=`$CYGPATH -u "$shortmode_path"`
15728      new_path="$input_path"
15729    fi
15730  fi
15731
15732  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15733  if test "x$test_cygdrive_prefix" = x; then
15734    # As a simple fix, exclude /usr/bin since it's not a real path.
15735    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15736      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15737      # a path prefixed by /cygdrive for fixpath to work.
15738      new_path="$CYGWIN_ROOT_PATH$input_path"
15739    fi
15740  fi
15741
15742  # remove trailing .exe if any
15743  new_path="${new_path/%.exe/}"
15744
15745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15746
15747  # First separate the path from the arguments. This will split at the first
15748  # space.
15749  complete="$FOUND_MAKE"
15750  path="${complete%% *}"
15751  tmp="$complete EOL"
15752  arguments="${tmp#* }"
15753
15754  # Input might be given as Windows format, start by converting to
15755  # unix format.
15756  new_path="$path"
15757
15758  windows_path="$new_path"
15759  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15760    unix_path=`$CYGPATH -u "$windows_path"`
15761    new_path="$unix_path"
15762  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15763    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15764    new_path="$unix_path"
15765  fi
15766
15767
15768  # Now try to locate executable using which
15769  new_path=`$WHICH "$new_path" 2> /dev/null`
15770
15771  if test "x$new_path" = x; then
15772    # Oops. Which didn't find the executable.
15773    # The splitting of arguments from the executable at a space might have been incorrect,
15774    # since paths with space are more likely in Windows. Give it another try with the whole
15775    # argument.
15776    path="$complete"
15777    arguments="EOL"
15778    new_path="$path"
15779
15780  windows_path="$new_path"
15781  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15782    unix_path=`$CYGPATH -u "$windows_path"`
15783    new_path="$unix_path"
15784  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15785    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15786    new_path="$unix_path"
15787  fi
15788
15789
15790    new_path=`$WHICH "$new_path" 2> /dev/null`
15791
15792    if test "x$new_path" = x; then
15793      # It's still not found. Now this is an unrecoverable error.
15794      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15795$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15796      has_space=`$ECHO "$complete" | $GREP " "`
15797      if test "x$has_space" != x; then
15798        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15799$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15800      fi
15801      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15802    fi
15803  fi
15804
15805  # Now new_path has a complete unix path to the binary
15806  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15807    # Keep paths in /bin as-is, but remove trailing .exe if any
15808    new_path="${new_path/%.exe/}"
15809    # Do not save /bin paths to all_fixpath_prefixes!
15810  else
15811    # Not in mixed or Windows style, start by that.
15812    new_path=`cmd //c echo $new_path`
15813
15814  input_path="$new_path"
15815  # Check if we need to convert this using DOS-style short mode. If the path
15816  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15817  # take no chances and rewrite it.
15818  # Note: m4 eats our [], so we need to use [ and ] instead.
15819  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15820  if test "x$has_forbidden_chars" != x; then
15821    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15822    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15823  fi
15824
15825    # Output is in $new_path
15826
15827  windows_path="$new_path"
15828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15829    unix_path=`$CYGPATH -u "$windows_path"`
15830    new_path="$unix_path"
15831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15832    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15833    new_path="$unix_path"
15834  fi
15835
15836    # remove trailing .exe if any
15837    new_path="${new_path/%.exe/}"
15838
15839    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15840    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15841  fi
15842
15843  else
15844    # We're on a posix platform. Hooray! :)
15845    # First separate the path from the arguments. This will split at the first
15846    # space.
15847    complete="$FOUND_MAKE"
15848    path="${complete%% *}"
15849    tmp="$complete EOL"
15850    arguments="${tmp#* }"
15851
15852    # Cannot rely on the command "which" here since it doesn't always work.
15853    is_absolute_path=`$ECHO "$path" | $GREP ^/`
15854    if test -z "$is_absolute_path"; then
15855      # Path to executable is not absolute. Find it.
15856      IFS_save="$IFS"
15857      IFS=:
15858      for p in $PATH; do
15859        if test -f "$p/$path" && test -x "$p/$path"; then
15860          new_path="$p/$path"
15861          break
15862        fi
15863      done
15864      IFS="$IFS_save"
15865    else
15866      # This is an absolute path, we can use it without further modifications.
15867      new_path="$path"
15868    fi
15869
15870    if test "x$new_path" = x; then
15871      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15872$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15873      has_space=`$ECHO "$complete" | $GREP " "`
15874      if test "x$has_space" != x; then
15875        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15876$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15877      fi
15878      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15879    fi
15880  fi
15881
15882  # Now join together the path and the arguments once again
15883  if test "x$arguments" != xEOL; then
15884    new_complete="$new_path ${arguments% *}"
15885  else
15886    new_complete="$new_path"
15887  fi
15888
15889  if test "x$complete" != "x$new_complete"; then
15890    FOUND_MAKE="$new_complete"
15891    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15892$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15893  fi
15894
15895        fi
15896      fi
15897    fi
15898  fi
15899
15900
15901    if test "x$FOUND_MAKE" = x; then
15902      for ac_prog in make
15903do
15904  # Extract the first word of "$ac_prog", so it can be a program name with args.
15905set dummy $ac_prog; ac_word=$2
15906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15907$as_echo_n "checking for $ac_word... " >&6; }
15908if ${ac_cv_path_CHECK_MAKE+:} false; then :
15909  $as_echo_n "(cached) " >&6
15910else
15911  case $CHECK_MAKE in
15912  [\\/]* | ?:[\\/]*)
15913  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
15914  ;;
15915  *)
15916  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15917for as_dir in $PATH
15918do
15919  IFS=$as_save_IFS
15920  test -z "$as_dir" && as_dir=.
15921    for ac_exec_ext in '' $ac_executable_extensions; do
15922  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15923    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
15924    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15925    break 2
15926  fi
15927done
15928  done
15929IFS=$as_save_IFS
15930
15931  ;;
15932esac
15933fi
15934CHECK_MAKE=$ac_cv_path_CHECK_MAKE
15935if test -n "$CHECK_MAKE"; then
15936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
15937$as_echo "$CHECK_MAKE" >&6; }
15938else
15939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15940$as_echo "no" >&6; }
15941fi
15942
15943
15944  test -n "$CHECK_MAKE" && break
15945done
15946
15947
15948  MAKE_CANDIDATE=""$CHECK_MAKE""
15949  DESCRIPTION="make in PATH"
15950  if test "x$MAKE_CANDIDATE" != x; then
15951    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15952$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15953    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15954    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15955    if test "x$IS_GNU_MAKE" = x; then
15956      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15957$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15958    else
15959      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15960      if test "x$IS_MODERN_MAKE" = x; then
15961        { $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
15962$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;}
15963      else
15964        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15965          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15966            MAKE_EXPECTED_ENV='cygwin'
15967          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15968            MAKE_EXPECTED_ENV='msys'
15969          else
15970            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15971          fi
15972          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15973          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15974        else
15975          # Not relevant for non-Windows
15976          IS_MAKE_CORRECT_ENV=true
15977        fi
15978        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15979          { $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
15980$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;}
15981        else
15982          FOUND_MAKE=$MAKE_CANDIDATE
15983
15984  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15985
15986  # First separate the path from the arguments. This will split at the first
15987  # space.
15988  complete="$FOUND_MAKE"
15989  path="${complete%% *}"
15990  tmp="$complete EOL"
15991  arguments="${tmp#* }"
15992
15993  # Input might be given as Windows format, start by converting to
15994  # unix format.
15995  new_path=`$CYGPATH -u "$path"`
15996
15997  # Now try to locate executable using which
15998  new_path=`$WHICH "$new_path" 2> /dev/null`
15999  # bat and cmd files are not always considered executable in cygwin causing which
16000  # to not find them
16001  if test "x$new_path" = x \
16002      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16003      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16004    new_path=`$CYGPATH -u "$path"`
16005  fi
16006  if test "x$new_path" = x; then
16007    # Oops. Which didn't find the executable.
16008    # The splitting of arguments from the executable at a space might have been incorrect,
16009    # since paths with space are more likely in Windows. Give it another try with the whole
16010    # argument.
16011    path="$complete"
16012    arguments="EOL"
16013    new_path=`$CYGPATH -u "$path"`
16014    new_path=`$WHICH "$new_path" 2> /dev/null`
16015    # bat and cmd files are not always considered executable in cygwin causing which
16016    # to not find them
16017    if test "x$new_path" = x \
16018        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16019        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16020      new_path=`$CYGPATH -u "$path"`
16021    fi
16022    if test "x$new_path" = x; then
16023      # It's still not found. Now this is an unrecoverable error.
16024      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16025$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16026      has_space=`$ECHO "$complete" | $GREP " "`
16027      if test "x$has_space" != x; then
16028        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16029$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16030      fi
16031      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16032    fi
16033  fi
16034
16035  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16036  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16037  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16038  # "foo.exe" is OK but "foo" is an error.
16039  #
16040  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16041  # It is also a way to make sure we got the proper file name for the real test later on.
16042  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16043  if test "x$test_shortpath" = x; then
16044    # Short path failed, file does not exist as specified.
16045    # Try adding .exe or .cmd
16046    if test -f "${new_path}.exe"; then
16047      input_to_shortpath="${new_path}.exe"
16048    elif test -f "${new_path}.cmd"; then
16049      input_to_shortpath="${new_path}.cmd"
16050    else
16051      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16052$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16053      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16054$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16055      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16056    fi
16057  else
16058    input_to_shortpath="$new_path"
16059  fi
16060
16061  # Call helper function which possibly converts this using DOS-style short mode.
16062  # If so, the updated path is stored in $new_path.
16063  new_path="$input_to_shortpath"
16064
16065  input_path="$input_to_shortpath"
16066  # Check if we need to convert this using DOS-style short mode. If the path
16067  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16068  # take no chances and rewrite it.
16069  # Note: m4 eats our [], so we need to use [ and ] instead.
16070  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16071  if test "x$has_forbidden_chars" != x; then
16072    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16073    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16074    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16075    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16076      # Going to short mode and back again did indeed matter. Since short mode is
16077      # case insensitive, let's make it lowercase to improve readability.
16078      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16079      # Now convert it back to Unix-stile (cygpath)
16080      input_path=`$CYGPATH -u "$shortmode_path"`
16081      new_path="$input_path"
16082    fi
16083  fi
16084
16085  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16086  if test "x$test_cygdrive_prefix" = x; then
16087    # As a simple fix, exclude /usr/bin since it's not a real path.
16088    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16089      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16090      # a path prefixed by /cygdrive for fixpath to work.
16091      new_path="$CYGWIN_ROOT_PATH$input_path"
16092    fi
16093  fi
16094
16095  # remove trailing .exe if any
16096  new_path="${new_path/%.exe/}"
16097
16098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16099
16100  # First separate the path from the arguments. This will split at the first
16101  # space.
16102  complete="$FOUND_MAKE"
16103  path="${complete%% *}"
16104  tmp="$complete EOL"
16105  arguments="${tmp#* }"
16106
16107  # Input might be given as Windows format, start by converting to
16108  # unix format.
16109  new_path="$path"
16110
16111  windows_path="$new_path"
16112  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16113    unix_path=`$CYGPATH -u "$windows_path"`
16114    new_path="$unix_path"
16115  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16116    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16117    new_path="$unix_path"
16118  fi
16119
16120
16121  # Now try to locate executable using which
16122  new_path=`$WHICH "$new_path" 2> /dev/null`
16123
16124  if test "x$new_path" = x; then
16125    # Oops. Which didn't find the executable.
16126    # The splitting of arguments from the executable at a space might have been incorrect,
16127    # since paths with space are more likely in Windows. Give it another try with the whole
16128    # argument.
16129    path="$complete"
16130    arguments="EOL"
16131    new_path="$path"
16132
16133  windows_path="$new_path"
16134  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16135    unix_path=`$CYGPATH -u "$windows_path"`
16136    new_path="$unix_path"
16137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16138    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16139    new_path="$unix_path"
16140  fi
16141
16142
16143    new_path=`$WHICH "$new_path" 2> /dev/null`
16144
16145    if test "x$new_path" = x; then
16146      # It's still not found. Now this is an unrecoverable error.
16147      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16148$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16149      has_space=`$ECHO "$complete" | $GREP " "`
16150      if test "x$has_space" != x; then
16151        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16152$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16153      fi
16154      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16155    fi
16156  fi
16157
16158  # Now new_path has a complete unix path to the binary
16159  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16160    # Keep paths in /bin as-is, but remove trailing .exe if any
16161    new_path="${new_path/%.exe/}"
16162    # Do not save /bin paths to all_fixpath_prefixes!
16163  else
16164    # Not in mixed or Windows style, start by that.
16165    new_path=`cmd //c echo $new_path`
16166
16167  input_path="$new_path"
16168  # Check if we need to convert this using DOS-style short mode. If the path
16169  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16170  # take no chances and rewrite it.
16171  # Note: m4 eats our [], so we need to use [ and ] instead.
16172  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16173  if test "x$has_forbidden_chars" != x; then
16174    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16175    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16176  fi
16177
16178    # Output is in $new_path
16179
16180  windows_path="$new_path"
16181  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16182    unix_path=`$CYGPATH -u "$windows_path"`
16183    new_path="$unix_path"
16184  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16185    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16186    new_path="$unix_path"
16187  fi
16188
16189    # remove trailing .exe if any
16190    new_path="${new_path/%.exe/}"
16191
16192    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16193    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16194  fi
16195
16196  else
16197    # We're on a posix platform. Hooray! :)
16198    # First separate the path from the arguments. This will split at the first
16199    # space.
16200    complete="$FOUND_MAKE"
16201    path="${complete%% *}"
16202    tmp="$complete EOL"
16203    arguments="${tmp#* }"
16204
16205    # Cannot rely on the command "which" here since it doesn't always work.
16206    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16207    if test -z "$is_absolute_path"; then
16208      # Path to executable is not absolute. Find it.
16209      IFS_save="$IFS"
16210      IFS=:
16211      for p in $PATH; do
16212        if test -f "$p/$path" && test -x "$p/$path"; then
16213          new_path="$p/$path"
16214          break
16215        fi
16216      done
16217      IFS="$IFS_save"
16218    else
16219      # This is an absolute path, we can use it without further modifications.
16220      new_path="$path"
16221    fi
16222
16223    if test "x$new_path" = x; then
16224      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16225$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16226      has_space=`$ECHO "$complete" | $GREP " "`
16227      if test "x$has_space" != x; then
16228        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16229$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16230      fi
16231      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16232    fi
16233  fi
16234
16235  # Now join together the path and the arguments once again
16236  if test "x$arguments" != xEOL; then
16237    new_complete="$new_path ${arguments% *}"
16238  else
16239    new_complete="$new_path"
16240  fi
16241
16242  if test "x$complete" != "x$new_complete"; then
16243    FOUND_MAKE="$new_complete"
16244    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16245$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16246  fi
16247
16248        fi
16249      fi
16250    fi
16251  fi
16252
16253    fi
16254
16255    if test "x$FOUND_MAKE" = x; then
16256      if test "x$TOOLCHAIN_PATH" != x; then
16257        # We have a toolchain path, check that as well before giving up.
16258        OLD_PATH=$PATH
16259        PATH=$TOOLCHAIN_PATH:$PATH
16260        for ac_prog in gmake
16261do
16262  # Extract the first word of "$ac_prog", so it can be a program name with args.
16263set dummy $ac_prog; ac_word=$2
16264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16265$as_echo_n "checking for $ac_word... " >&6; }
16266if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16267  $as_echo_n "(cached) " >&6
16268else
16269  case $CHECK_TOOLSDIR_GMAKE in
16270  [\\/]* | ?:[\\/]*)
16271  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16272  ;;
16273  *)
16274  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16275for as_dir in $PATH
16276do
16277  IFS=$as_save_IFS
16278  test -z "$as_dir" && as_dir=.
16279    for ac_exec_ext in '' $ac_executable_extensions; do
16280  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16281    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16283    break 2
16284  fi
16285done
16286  done
16287IFS=$as_save_IFS
16288
16289  ;;
16290esac
16291fi
16292CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16293if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16295$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16296else
16297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16298$as_echo "no" >&6; }
16299fi
16300
16301
16302  test -n "$CHECK_TOOLSDIR_GMAKE" && break
16303done
16304
16305
16306  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16307  DESCRIPTION="gmake in tools-dir"
16308  if test "x$MAKE_CANDIDATE" != x; then
16309    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16310$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16311    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16312    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16313    if test "x$IS_GNU_MAKE" = x; then
16314      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16315$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16316    else
16317      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16318      if test "x$IS_MODERN_MAKE" = x; then
16319        { $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
16320$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;}
16321      else
16322        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16323          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16324            MAKE_EXPECTED_ENV='cygwin'
16325          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16326            MAKE_EXPECTED_ENV='msys'
16327          else
16328            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16329          fi
16330          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16331          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16332        else
16333          # Not relevant for non-Windows
16334          IS_MAKE_CORRECT_ENV=true
16335        fi
16336        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16337          { $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
16338$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;}
16339        else
16340          FOUND_MAKE=$MAKE_CANDIDATE
16341
16342  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16343
16344  # First separate the path from the arguments. This will split at the first
16345  # space.
16346  complete="$FOUND_MAKE"
16347  path="${complete%% *}"
16348  tmp="$complete EOL"
16349  arguments="${tmp#* }"
16350
16351  # Input might be given as Windows format, start by converting to
16352  # unix format.
16353  new_path=`$CYGPATH -u "$path"`
16354
16355  # Now try to locate executable using which
16356  new_path=`$WHICH "$new_path" 2> /dev/null`
16357  # bat and cmd files are not always considered executable in cygwin causing which
16358  # to not find them
16359  if test "x$new_path" = x \
16360      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16361      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16362    new_path=`$CYGPATH -u "$path"`
16363  fi
16364  if test "x$new_path" = x; then
16365    # Oops. Which didn't find the executable.
16366    # The splitting of arguments from the executable at a space might have been incorrect,
16367    # since paths with space are more likely in Windows. Give it another try with the whole
16368    # argument.
16369    path="$complete"
16370    arguments="EOL"
16371    new_path=`$CYGPATH -u "$path"`
16372    new_path=`$WHICH "$new_path" 2> /dev/null`
16373    # bat and cmd files are not always considered executable in cygwin causing which
16374    # to not find them
16375    if test "x$new_path" = x \
16376        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16377        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16378      new_path=`$CYGPATH -u "$path"`
16379    fi
16380    if test "x$new_path" = x; then
16381      # It's still not found. Now this is an unrecoverable error.
16382      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16383$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16384      has_space=`$ECHO "$complete" | $GREP " "`
16385      if test "x$has_space" != x; then
16386        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16387$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16388      fi
16389      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16390    fi
16391  fi
16392
16393  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16394  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16395  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16396  # "foo.exe" is OK but "foo" is an error.
16397  #
16398  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16399  # It is also a way to make sure we got the proper file name for the real test later on.
16400  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16401  if test "x$test_shortpath" = x; then
16402    # Short path failed, file does not exist as specified.
16403    # Try adding .exe or .cmd
16404    if test -f "${new_path}.exe"; then
16405      input_to_shortpath="${new_path}.exe"
16406    elif test -f "${new_path}.cmd"; then
16407      input_to_shortpath="${new_path}.cmd"
16408    else
16409      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16410$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16411      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16412$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16413      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16414    fi
16415  else
16416    input_to_shortpath="$new_path"
16417  fi
16418
16419  # Call helper function which possibly converts this using DOS-style short mode.
16420  # If so, the updated path is stored in $new_path.
16421  new_path="$input_to_shortpath"
16422
16423  input_path="$input_to_shortpath"
16424  # Check if we need to convert this using DOS-style short mode. If the path
16425  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16426  # take no chances and rewrite it.
16427  # Note: m4 eats our [], so we need to use [ and ] instead.
16428  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16429  if test "x$has_forbidden_chars" != x; then
16430    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16431    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16432    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16433    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16434      # Going to short mode and back again did indeed matter. Since short mode is
16435      # case insensitive, let's make it lowercase to improve readability.
16436      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16437      # Now convert it back to Unix-stile (cygpath)
16438      input_path=`$CYGPATH -u "$shortmode_path"`
16439      new_path="$input_path"
16440    fi
16441  fi
16442
16443  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16444  if test "x$test_cygdrive_prefix" = x; then
16445    # As a simple fix, exclude /usr/bin since it's not a real path.
16446    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16447      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16448      # a path prefixed by /cygdrive for fixpath to work.
16449      new_path="$CYGWIN_ROOT_PATH$input_path"
16450    fi
16451  fi
16452
16453  # remove trailing .exe if any
16454  new_path="${new_path/%.exe/}"
16455
16456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16457
16458  # First separate the path from the arguments. This will split at the first
16459  # space.
16460  complete="$FOUND_MAKE"
16461  path="${complete%% *}"
16462  tmp="$complete EOL"
16463  arguments="${tmp#* }"
16464
16465  # Input might be given as Windows format, start by converting to
16466  # unix format.
16467  new_path="$path"
16468
16469  windows_path="$new_path"
16470  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16471    unix_path=`$CYGPATH -u "$windows_path"`
16472    new_path="$unix_path"
16473  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16474    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16475    new_path="$unix_path"
16476  fi
16477
16478
16479  # Now try to locate executable using which
16480  new_path=`$WHICH "$new_path" 2> /dev/null`
16481
16482  if test "x$new_path" = x; then
16483    # Oops. Which didn't find the executable.
16484    # The splitting of arguments from the executable at a space might have been incorrect,
16485    # since paths with space are more likely in Windows. Give it another try with the whole
16486    # argument.
16487    path="$complete"
16488    arguments="EOL"
16489    new_path="$path"
16490
16491  windows_path="$new_path"
16492  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16493    unix_path=`$CYGPATH -u "$windows_path"`
16494    new_path="$unix_path"
16495  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16496    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16497    new_path="$unix_path"
16498  fi
16499
16500
16501    new_path=`$WHICH "$new_path" 2> /dev/null`
16502
16503    if test "x$new_path" = x; then
16504      # It's still not found. Now this is an unrecoverable error.
16505      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16506$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16507      has_space=`$ECHO "$complete" | $GREP " "`
16508      if test "x$has_space" != x; then
16509        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16510$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16511      fi
16512      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16513    fi
16514  fi
16515
16516  # Now new_path has a complete unix path to the binary
16517  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16518    # Keep paths in /bin as-is, but remove trailing .exe if any
16519    new_path="${new_path/%.exe/}"
16520    # Do not save /bin paths to all_fixpath_prefixes!
16521  else
16522    # Not in mixed or Windows style, start by that.
16523    new_path=`cmd //c echo $new_path`
16524
16525  input_path="$new_path"
16526  # Check if we need to convert this using DOS-style short mode. If the path
16527  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16528  # take no chances and rewrite it.
16529  # Note: m4 eats our [], so we need to use [ and ] instead.
16530  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16531  if test "x$has_forbidden_chars" != x; then
16532    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16533    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16534  fi
16535
16536    # Output is in $new_path
16537
16538  windows_path="$new_path"
16539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16540    unix_path=`$CYGPATH -u "$windows_path"`
16541    new_path="$unix_path"
16542  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16543    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16544    new_path="$unix_path"
16545  fi
16546
16547    # remove trailing .exe if any
16548    new_path="${new_path/%.exe/}"
16549
16550    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16551    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16552  fi
16553
16554  else
16555    # We're on a posix platform. Hooray! :)
16556    # First separate the path from the arguments. This will split at the first
16557    # space.
16558    complete="$FOUND_MAKE"
16559    path="${complete%% *}"
16560    tmp="$complete EOL"
16561    arguments="${tmp#* }"
16562
16563    # Cannot rely on the command "which" here since it doesn't always work.
16564    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16565    if test -z "$is_absolute_path"; then
16566      # Path to executable is not absolute. Find it.
16567      IFS_save="$IFS"
16568      IFS=:
16569      for p in $PATH; do
16570        if test -f "$p/$path" && test -x "$p/$path"; then
16571          new_path="$p/$path"
16572          break
16573        fi
16574      done
16575      IFS="$IFS_save"
16576    else
16577      # This is an absolute path, we can use it without further modifications.
16578      new_path="$path"
16579    fi
16580
16581    if test "x$new_path" = x; then
16582      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16583$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16584      has_space=`$ECHO "$complete" | $GREP " "`
16585      if test "x$has_space" != x; then
16586        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16587$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16588      fi
16589      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16590    fi
16591  fi
16592
16593  # Now join together the path and the arguments once again
16594  if test "x$arguments" != xEOL; then
16595    new_complete="$new_path ${arguments% *}"
16596  else
16597    new_complete="$new_path"
16598  fi
16599
16600  if test "x$complete" != "x$new_complete"; then
16601    FOUND_MAKE="$new_complete"
16602    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16603$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16604  fi
16605
16606        fi
16607      fi
16608    fi
16609  fi
16610
16611        if test "x$FOUND_MAKE" = x; then
16612          for ac_prog in make
16613do
16614  # Extract the first word of "$ac_prog", so it can be a program name with args.
16615set dummy $ac_prog; ac_word=$2
16616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16617$as_echo_n "checking for $ac_word... " >&6; }
16618if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
16619  $as_echo_n "(cached) " >&6
16620else
16621  case $CHECK_TOOLSDIR_MAKE in
16622  [\\/]* | ?:[\\/]*)
16623  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
16624  ;;
16625  *)
16626  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16627for as_dir in $PATH
16628do
16629  IFS=$as_save_IFS
16630  test -z "$as_dir" && as_dir=.
16631    for ac_exec_ext in '' $ac_executable_extensions; do
16632  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16633    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
16634    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16635    break 2
16636  fi
16637done
16638  done
16639IFS=$as_save_IFS
16640
16641  ;;
16642esac
16643fi
16644CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
16645if test -n "$CHECK_TOOLSDIR_MAKE"; then
16646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
16647$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
16648else
16649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16650$as_echo "no" >&6; }
16651fi
16652
16653
16654  test -n "$CHECK_TOOLSDIR_MAKE" && break
16655done
16656
16657
16658  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
16659  DESCRIPTION="make in tools-dir"
16660  if test "x$MAKE_CANDIDATE" != x; then
16661    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16662$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16663    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16664    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16665    if test "x$IS_GNU_MAKE" = x; then
16666      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16667$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16668    else
16669      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16670      if test "x$IS_MODERN_MAKE" = x; then
16671        { $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
16672$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;}
16673      else
16674        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16675          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16676            MAKE_EXPECTED_ENV='cygwin'
16677          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16678            MAKE_EXPECTED_ENV='msys'
16679          else
16680            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16681          fi
16682          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16683          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16684        else
16685          # Not relevant for non-Windows
16686          IS_MAKE_CORRECT_ENV=true
16687        fi
16688        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16689          { $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
16690$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;}
16691        else
16692          FOUND_MAKE=$MAKE_CANDIDATE
16693
16694  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16695
16696  # First separate the path from the arguments. This will split at the first
16697  # space.
16698  complete="$FOUND_MAKE"
16699  path="${complete%% *}"
16700  tmp="$complete EOL"
16701  arguments="${tmp#* }"
16702
16703  # Input might be given as Windows format, start by converting to
16704  # unix format.
16705  new_path=`$CYGPATH -u "$path"`
16706
16707  # Now try to locate executable using which
16708  new_path=`$WHICH "$new_path" 2> /dev/null`
16709  # bat and cmd files are not always considered executable in cygwin causing which
16710  # to not find them
16711  if test "x$new_path" = x \
16712      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16713      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16714    new_path=`$CYGPATH -u "$path"`
16715  fi
16716  if test "x$new_path" = x; then
16717    # Oops. Which didn't find the executable.
16718    # The splitting of arguments from the executable at a space might have been incorrect,
16719    # since paths with space are more likely in Windows. Give it another try with the whole
16720    # argument.
16721    path="$complete"
16722    arguments="EOL"
16723    new_path=`$CYGPATH -u "$path"`
16724    new_path=`$WHICH "$new_path" 2> /dev/null`
16725    # bat and cmd files are not always considered executable in cygwin causing which
16726    # to not find them
16727    if test "x$new_path" = x \
16728        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16729        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16730      new_path=`$CYGPATH -u "$path"`
16731    fi
16732    if test "x$new_path" = x; then
16733      # It's still not found. Now this is an unrecoverable error.
16734      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16735$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16736      has_space=`$ECHO "$complete" | $GREP " "`
16737      if test "x$has_space" != x; then
16738        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16739$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16740      fi
16741      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16742    fi
16743  fi
16744
16745  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16746  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16747  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16748  # "foo.exe" is OK but "foo" is an error.
16749  #
16750  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16751  # It is also a way to make sure we got the proper file name for the real test later on.
16752  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16753  if test "x$test_shortpath" = x; then
16754    # Short path failed, file does not exist as specified.
16755    # Try adding .exe or .cmd
16756    if test -f "${new_path}.exe"; then
16757      input_to_shortpath="${new_path}.exe"
16758    elif test -f "${new_path}.cmd"; then
16759      input_to_shortpath="${new_path}.cmd"
16760    else
16761      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16762$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16763      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16764$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16765      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16766    fi
16767  else
16768    input_to_shortpath="$new_path"
16769  fi
16770
16771  # Call helper function which possibly converts this using DOS-style short mode.
16772  # If so, the updated path is stored in $new_path.
16773  new_path="$input_to_shortpath"
16774
16775  input_path="$input_to_shortpath"
16776  # Check if we need to convert this using DOS-style short mode. If the path
16777  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16778  # take no chances and rewrite it.
16779  # Note: m4 eats our [], so we need to use [ and ] instead.
16780  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16781  if test "x$has_forbidden_chars" != x; then
16782    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16783    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16784    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16785    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16786      # Going to short mode and back again did indeed matter. Since short mode is
16787      # case insensitive, let's make it lowercase to improve readability.
16788      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16789      # Now convert it back to Unix-stile (cygpath)
16790      input_path=`$CYGPATH -u "$shortmode_path"`
16791      new_path="$input_path"
16792    fi
16793  fi
16794
16795  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16796  if test "x$test_cygdrive_prefix" = x; then
16797    # As a simple fix, exclude /usr/bin since it's not a real path.
16798    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16799      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16800      # a path prefixed by /cygdrive for fixpath to work.
16801      new_path="$CYGWIN_ROOT_PATH$input_path"
16802    fi
16803  fi
16804
16805  # remove trailing .exe if any
16806  new_path="${new_path/%.exe/}"
16807
16808  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16809
16810  # First separate the path from the arguments. This will split at the first
16811  # space.
16812  complete="$FOUND_MAKE"
16813  path="${complete%% *}"
16814  tmp="$complete EOL"
16815  arguments="${tmp#* }"
16816
16817  # Input might be given as Windows format, start by converting to
16818  # unix format.
16819  new_path="$path"
16820
16821  windows_path="$new_path"
16822  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16823    unix_path=`$CYGPATH -u "$windows_path"`
16824    new_path="$unix_path"
16825  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16826    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16827    new_path="$unix_path"
16828  fi
16829
16830
16831  # Now try to locate executable using which
16832  new_path=`$WHICH "$new_path" 2> /dev/null`
16833
16834  if test "x$new_path" = x; then
16835    # Oops. Which didn't find the executable.
16836    # The splitting of arguments from the executable at a space might have been incorrect,
16837    # since paths with space are more likely in Windows. Give it another try with the whole
16838    # argument.
16839    path="$complete"
16840    arguments="EOL"
16841    new_path="$path"
16842
16843  windows_path="$new_path"
16844  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16845    unix_path=`$CYGPATH -u "$windows_path"`
16846    new_path="$unix_path"
16847  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16848    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16849    new_path="$unix_path"
16850  fi
16851
16852
16853    new_path=`$WHICH "$new_path" 2> /dev/null`
16854
16855    if test "x$new_path" = x; then
16856      # It's still not found. Now this is an unrecoverable error.
16857      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16858$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16859      has_space=`$ECHO "$complete" | $GREP " "`
16860      if test "x$has_space" != x; then
16861        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16862$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16863      fi
16864      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16865    fi
16866  fi
16867
16868  # Now new_path has a complete unix path to the binary
16869  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16870    # Keep paths in /bin as-is, but remove trailing .exe if any
16871    new_path="${new_path/%.exe/}"
16872    # Do not save /bin paths to all_fixpath_prefixes!
16873  else
16874    # Not in mixed or Windows style, start by that.
16875    new_path=`cmd //c echo $new_path`
16876
16877  input_path="$new_path"
16878  # Check if we need to convert this using DOS-style short mode. If the path
16879  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16880  # take no chances and rewrite it.
16881  # Note: m4 eats our [], so we need to use [ and ] instead.
16882  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16883  if test "x$has_forbidden_chars" != x; then
16884    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16885    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16886  fi
16887
16888    # Output is in $new_path
16889
16890  windows_path="$new_path"
16891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16892    unix_path=`$CYGPATH -u "$windows_path"`
16893    new_path="$unix_path"
16894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16895    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16896    new_path="$unix_path"
16897  fi
16898
16899    # remove trailing .exe if any
16900    new_path="${new_path/%.exe/}"
16901
16902    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16903    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16904  fi
16905
16906  else
16907    # We're on a posix platform. Hooray! :)
16908    # First separate the path from the arguments. This will split at the first
16909    # space.
16910    complete="$FOUND_MAKE"
16911    path="${complete%% *}"
16912    tmp="$complete EOL"
16913    arguments="${tmp#* }"
16914
16915    # Cannot rely on the command "which" here since it doesn't always work.
16916    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16917    if test -z "$is_absolute_path"; then
16918      # Path to executable is not absolute. Find it.
16919      IFS_save="$IFS"
16920      IFS=:
16921      for p in $PATH; do
16922        if test -f "$p/$path" && test -x "$p/$path"; then
16923          new_path="$p/$path"
16924          break
16925        fi
16926      done
16927      IFS="$IFS_save"
16928    else
16929      # This is an absolute path, we can use it without further modifications.
16930      new_path="$path"
16931    fi
16932
16933    if test "x$new_path" = x; then
16934      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16935$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16936      has_space=`$ECHO "$complete" | $GREP " "`
16937      if test "x$has_space" != x; then
16938        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16939$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16940      fi
16941      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16942    fi
16943  fi
16944
16945  # Now join together the path and the arguments once again
16946  if test "x$arguments" != xEOL; then
16947    new_complete="$new_path ${arguments% *}"
16948  else
16949    new_complete="$new_path"
16950  fi
16951
16952  if test "x$complete" != "x$new_complete"; then
16953    FOUND_MAKE="$new_complete"
16954    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16955$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16956  fi
16957
16958        fi
16959      fi
16960    fi
16961  fi
16962
16963        fi
16964        PATH=$OLD_PATH
16965      fi
16966    fi
16967
16968    if test "x$FOUND_MAKE" = x; then
16969      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
16970    fi
16971  fi
16972
16973  MAKE=$FOUND_MAKE
16974
16975  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
16976$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
16977
16978
16979
16980  # Test if find supports -delete
16981  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
16982$as_echo_n "checking if find supports -delete... " >&6; }
16983  FIND_DELETE="-delete"
16984
16985  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
16986
16987  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
16988
16989  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
16990  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
16991    # No, it does not.
16992    rm $DELETEDIR/TestIfFindSupportsDelete
16993    FIND_DELETE="-exec rm \{\} \+"
16994    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16995$as_echo "no" >&6; }
16996  else
16997    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16998$as_echo "yes" >&6; }
16999  fi
17000  rmdir $DELETEDIR
17001
17002
17003
17004  # These tools might not be installed by default,
17005  # need hint on how to install them.
17006
17007
17008
17009  # Publish this variable in the help.
17010
17011
17012  if test "x$UNZIP" = x; then
17013    # The variable is not set by user, try to locate tool using the code snippet
17014    for ac_prog in unzip
17015do
17016  # Extract the first word of "$ac_prog", so it can be a program name with args.
17017set dummy $ac_prog; ac_word=$2
17018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17019$as_echo_n "checking for $ac_word... " >&6; }
17020if ${ac_cv_path_UNZIP+:} false; then :
17021  $as_echo_n "(cached) " >&6
17022else
17023  case $UNZIP in
17024  [\\/]* | ?:[\\/]*)
17025  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17026  ;;
17027  *)
17028  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17029for as_dir in $PATH
17030do
17031  IFS=$as_save_IFS
17032  test -z "$as_dir" && as_dir=.
17033    for ac_exec_ext in '' $ac_executable_extensions; do
17034  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17035    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17036    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17037    break 2
17038  fi
17039done
17040  done
17041IFS=$as_save_IFS
17042
17043  ;;
17044esac
17045fi
17046UNZIP=$ac_cv_path_UNZIP
17047if test -n "$UNZIP"; then
17048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17049$as_echo "$UNZIP" >&6; }
17050else
17051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17052$as_echo "no" >&6; }
17053fi
17054
17055
17056  test -n "$UNZIP" && break
17057done
17058
17059  else
17060    # The variable is set, but is it from the command line or the environment?
17061
17062    # Try to remove the string !UNZIP! from our list.
17063    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
17064    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17065      # If it failed, the variable was not from the command line. Ignore it,
17066      # but warn the user (except for BASH, which is always set by the calling BASH).
17067      if test "xUNZIP" != xBASH; then
17068        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
17069$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
17070      fi
17071      # Try to locate tool using the code snippet
17072      for ac_prog in unzip
17073do
17074  # Extract the first word of "$ac_prog", so it can be a program name with args.
17075set dummy $ac_prog; ac_word=$2
17076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17077$as_echo_n "checking for $ac_word... " >&6; }
17078if ${ac_cv_path_UNZIP+:} false; then :
17079  $as_echo_n "(cached) " >&6
17080else
17081  case $UNZIP in
17082  [\\/]* | ?:[\\/]*)
17083  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17084  ;;
17085  *)
17086  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17087for as_dir in $PATH
17088do
17089  IFS=$as_save_IFS
17090  test -z "$as_dir" && as_dir=.
17091    for ac_exec_ext in '' $ac_executable_extensions; do
17092  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17093    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17094    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17095    break 2
17096  fi
17097done
17098  done
17099IFS=$as_save_IFS
17100
17101  ;;
17102esac
17103fi
17104UNZIP=$ac_cv_path_UNZIP
17105if test -n "$UNZIP"; then
17106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17107$as_echo "$UNZIP" >&6; }
17108else
17109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17110$as_echo "no" >&6; }
17111fi
17112
17113
17114  test -n "$UNZIP" && break
17115done
17116
17117    else
17118      # If it succeeded, then it was overridden by the user. We will use it
17119      # for the tool.
17120
17121      # First remove it from the list of overridden variables, so we can test
17122      # for unknown variables in the end.
17123      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17124
17125      # Check if the provided tool contains a complete path.
17126      tool_specified="$UNZIP"
17127      tool_basename="${tool_specified##*/}"
17128      if test "x$tool_basename" = "x$tool_specified"; then
17129        # A command without a complete path is provided, search $PATH.
17130        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
17131$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
17132        # Extract the first word of "$tool_basename", so it can be a program name with args.
17133set dummy $tool_basename; ac_word=$2
17134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17135$as_echo_n "checking for $ac_word... " >&6; }
17136if ${ac_cv_path_UNZIP+:} false; then :
17137  $as_echo_n "(cached) " >&6
17138else
17139  case $UNZIP in
17140  [\\/]* | ?:[\\/]*)
17141  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17142  ;;
17143  *)
17144  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17145for as_dir in $PATH
17146do
17147  IFS=$as_save_IFS
17148  test -z "$as_dir" && as_dir=.
17149    for ac_exec_ext in '' $ac_executable_extensions; do
17150  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17151    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17152    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17153    break 2
17154  fi
17155done
17156  done
17157IFS=$as_save_IFS
17158
17159  ;;
17160esac
17161fi
17162UNZIP=$ac_cv_path_UNZIP
17163if test -n "$UNZIP"; then
17164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17165$as_echo "$UNZIP" >&6; }
17166else
17167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17168$as_echo "no" >&6; }
17169fi
17170
17171
17172        if test "x$UNZIP" = x; then
17173          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17174        fi
17175      else
17176        # Otherwise we believe it is a complete path. Use it as it is.
17177        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
17178$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
17179        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
17180$as_echo_n "checking for UNZIP... " >&6; }
17181        if test ! -x "$tool_specified"; then
17182          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17183$as_echo "not found" >&6; }
17184          as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17185        fi
17186        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17187$as_echo "$tool_specified" >&6; }
17188      fi
17189    fi
17190  fi
17191
17192
17193
17194  if test "x$UNZIP" = x; then
17195    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17196  fi
17197
17198
17199
17200
17201
17202  # Publish this variable in the help.
17203
17204
17205  if test "x$ZIP" = x; then
17206    # The variable is not set by user, try to locate tool using the code snippet
17207    for ac_prog in zip
17208do
17209  # Extract the first word of "$ac_prog", so it can be a program name with args.
17210set dummy $ac_prog; ac_word=$2
17211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17212$as_echo_n "checking for $ac_word... " >&6; }
17213if ${ac_cv_path_ZIP+:} false; then :
17214  $as_echo_n "(cached) " >&6
17215else
17216  case $ZIP in
17217  [\\/]* | ?:[\\/]*)
17218  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17219  ;;
17220  *)
17221  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17222for as_dir in $PATH
17223do
17224  IFS=$as_save_IFS
17225  test -z "$as_dir" && as_dir=.
17226    for ac_exec_ext in '' $ac_executable_extensions; do
17227  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17228    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17229    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17230    break 2
17231  fi
17232done
17233  done
17234IFS=$as_save_IFS
17235
17236  ;;
17237esac
17238fi
17239ZIP=$ac_cv_path_ZIP
17240if test -n "$ZIP"; then
17241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17242$as_echo "$ZIP" >&6; }
17243else
17244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17245$as_echo "no" >&6; }
17246fi
17247
17248
17249  test -n "$ZIP" && break
17250done
17251
17252  else
17253    # The variable is set, but is it from the command line or the environment?
17254
17255    # Try to remove the string !ZIP! from our list.
17256    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17257    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17258      # If it failed, the variable was not from the command line. Ignore it,
17259      # but warn the user (except for BASH, which is always set by the calling BASH).
17260      if test "xZIP" != xBASH; then
17261        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17262$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17263      fi
17264      # Try to locate tool using the code snippet
17265      for ac_prog in zip
17266do
17267  # Extract the first word of "$ac_prog", so it can be a program name with args.
17268set dummy $ac_prog; ac_word=$2
17269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17270$as_echo_n "checking for $ac_word... " >&6; }
17271if ${ac_cv_path_ZIP+:} false; then :
17272  $as_echo_n "(cached) " >&6
17273else
17274  case $ZIP in
17275  [\\/]* | ?:[\\/]*)
17276  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17277  ;;
17278  *)
17279  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17280for as_dir in $PATH
17281do
17282  IFS=$as_save_IFS
17283  test -z "$as_dir" && as_dir=.
17284    for ac_exec_ext in '' $ac_executable_extensions; do
17285  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17286    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17287    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17288    break 2
17289  fi
17290done
17291  done
17292IFS=$as_save_IFS
17293
17294  ;;
17295esac
17296fi
17297ZIP=$ac_cv_path_ZIP
17298if test -n "$ZIP"; then
17299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17300$as_echo "$ZIP" >&6; }
17301else
17302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17303$as_echo "no" >&6; }
17304fi
17305
17306
17307  test -n "$ZIP" && break
17308done
17309
17310    else
17311      # If it succeeded, then it was overridden by the user. We will use it
17312      # for the tool.
17313
17314      # First remove it from the list of overridden variables, so we can test
17315      # for unknown variables in the end.
17316      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17317
17318      # Check if the provided tool contains a complete path.
17319      tool_specified="$ZIP"
17320      tool_basename="${tool_specified##*/}"
17321      if test "x$tool_basename" = "x$tool_specified"; then
17322        # A command without a complete path is provided, search $PATH.
17323        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17324$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17325        # Extract the first word of "$tool_basename", so it can be a program name with args.
17326set dummy $tool_basename; ac_word=$2
17327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17328$as_echo_n "checking for $ac_word... " >&6; }
17329if ${ac_cv_path_ZIP+:} false; then :
17330  $as_echo_n "(cached) " >&6
17331else
17332  case $ZIP in
17333  [\\/]* | ?:[\\/]*)
17334  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17335  ;;
17336  *)
17337  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17338for as_dir in $PATH
17339do
17340  IFS=$as_save_IFS
17341  test -z "$as_dir" && as_dir=.
17342    for ac_exec_ext in '' $ac_executable_extensions; do
17343  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17344    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17345    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17346    break 2
17347  fi
17348done
17349  done
17350IFS=$as_save_IFS
17351
17352  ;;
17353esac
17354fi
17355ZIP=$ac_cv_path_ZIP
17356if test -n "$ZIP"; then
17357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17358$as_echo "$ZIP" >&6; }
17359else
17360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17361$as_echo "no" >&6; }
17362fi
17363
17364
17365        if test "x$ZIP" = x; then
17366          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17367        fi
17368      else
17369        # Otherwise we believe it is a complete path. Use it as it is.
17370        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17371$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17372        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17373$as_echo_n "checking for ZIP... " >&6; }
17374        if test ! -x "$tool_specified"; then
17375          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17376$as_echo "not found" >&6; }
17377          as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17378        fi
17379        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17380$as_echo "$tool_specified" >&6; }
17381      fi
17382    fi
17383  fi
17384
17385
17386
17387  if test "x$ZIP" = x; then
17388    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17389  fi
17390
17391
17392
17393  # Non-required basic tools
17394
17395
17396
17397  # Publish this variable in the help.
17398
17399
17400  if test "x$LDD" = x; then
17401    # The variable is not set by user, try to locate tool using the code snippet
17402    for ac_prog in ldd
17403do
17404  # Extract the first word of "$ac_prog", so it can be a program name with args.
17405set dummy $ac_prog; ac_word=$2
17406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17407$as_echo_n "checking for $ac_word... " >&6; }
17408if ${ac_cv_path_LDD+:} false; then :
17409  $as_echo_n "(cached) " >&6
17410else
17411  case $LDD in
17412  [\\/]* | ?:[\\/]*)
17413  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17414  ;;
17415  *)
17416  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17417for as_dir in $PATH
17418do
17419  IFS=$as_save_IFS
17420  test -z "$as_dir" && as_dir=.
17421    for ac_exec_ext in '' $ac_executable_extensions; do
17422  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17423    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17424    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17425    break 2
17426  fi
17427done
17428  done
17429IFS=$as_save_IFS
17430
17431  ;;
17432esac
17433fi
17434LDD=$ac_cv_path_LDD
17435if test -n "$LDD"; then
17436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17437$as_echo "$LDD" >&6; }
17438else
17439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17440$as_echo "no" >&6; }
17441fi
17442
17443
17444  test -n "$LDD" && break
17445done
17446
17447  else
17448    # The variable is set, but is it from the command line or the environment?
17449
17450    # Try to remove the string !LDD! from our list.
17451    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17452    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17453      # If it failed, the variable was not from the command line. Ignore it,
17454      # but warn the user (except for BASH, which is always set by the calling BASH).
17455      if test "xLDD" != xBASH; then
17456        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17457$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17458      fi
17459      # Try to locate tool using the code snippet
17460      for ac_prog in ldd
17461do
17462  # Extract the first word of "$ac_prog", so it can be a program name with args.
17463set dummy $ac_prog; ac_word=$2
17464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17465$as_echo_n "checking for $ac_word... " >&6; }
17466if ${ac_cv_path_LDD+:} false; then :
17467  $as_echo_n "(cached) " >&6
17468else
17469  case $LDD in
17470  [\\/]* | ?:[\\/]*)
17471  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17472  ;;
17473  *)
17474  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17475for as_dir in $PATH
17476do
17477  IFS=$as_save_IFS
17478  test -z "$as_dir" && as_dir=.
17479    for ac_exec_ext in '' $ac_executable_extensions; do
17480  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17481    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17482    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17483    break 2
17484  fi
17485done
17486  done
17487IFS=$as_save_IFS
17488
17489  ;;
17490esac
17491fi
17492LDD=$ac_cv_path_LDD
17493if test -n "$LDD"; then
17494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17495$as_echo "$LDD" >&6; }
17496else
17497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17498$as_echo "no" >&6; }
17499fi
17500
17501
17502  test -n "$LDD" && break
17503done
17504
17505    else
17506      # If it succeeded, then it was overridden by the user. We will use it
17507      # for the tool.
17508
17509      # First remove it from the list of overridden variables, so we can test
17510      # for unknown variables in the end.
17511      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17512
17513      # Check if the provided tool contains a complete path.
17514      tool_specified="$LDD"
17515      tool_basename="${tool_specified##*/}"
17516      if test "x$tool_basename" = "x$tool_specified"; then
17517        # A command without a complete path is provided, search $PATH.
17518        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
17519$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
17520        # Extract the first word of "$tool_basename", so it can be a program name with args.
17521set dummy $tool_basename; ac_word=$2
17522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17523$as_echo_n "checking for $ac_word... " >&6; }
17524if ${ac_cv_path_LDD+:} false; then :
17525  $as_echo_n "(cached) " >&6
17526else
17527  case $LDD in
17528  [\\/]* | ?:[\\/]*)
17529  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17530  ;;
17531  *)
17532  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17533for as_dir in $PATH
17534do
17535  IFS=$as_save_IFS
17536  test -z "$as_dir" && as_dir=.
17537    for ac_exec_ext in '' $ac_executable_extensions; do
17538  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17539    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17540    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17541    break 2
17542  fi
17543done
17544  done
17545IFS=$as_save_IFS
17546
17547  ;;
17548esac
17549fi
17550LDD=$ac_cv_path_LDD
17551if test -n "$LDD"; then
17552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17553$as_echo "$LDD" >&6; }
17554else
17555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17556$as_echo "no" >&6; }
17557fi
17558
17559
17560        if test "x$LDD" = x; then
17561          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17562        fi
17563      else
17564        # Otherwise we believe it is a complete path. Use it as it is.
17565        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
17566$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
17567        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
17568$as_echo_n "checking for LDD... " >&6; }
17569        if test ! -x "$tool_specified"; then
17570          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17571$as_echo "not found" >&6; }
17572          as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
17573        fi
17574        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17575$as_echo "$tool_specified" >&6; }
17576      fi
17577    fi
17578  fi
17579
17580
17581  if test "x$LDD" = "x"; then
17582    # List shared lib dependencies is used for
17583    # debug output and checking for forbidden dependencies.
17584    # We can build without it.
17585    LDD="true"
17586  fi
17587
17588
17589  # Publish this variable in the help.
17590
17591
17592  if test "x$OTOOL" = x; then
17593    # The variable is not set by user, try to locate tool using the code snippet
17594    for ac_prog in otool
17595do
17596  # Extract the first word of "$ac_prog", so it can be a program name with args.
17597set dummy $ac_prog; ac_word=$2
17598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17599$as_echo_n "checking for $ac_word... " >&6; }
17600if ${ac_cv_path_OTOOL+:} false; then :
17601  $as_echo_n "(cached) " >&6
17602else
17603  case $OTOOL in
17604  [\\/]* | ?:[\\/]*)
17605  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17606  ;;
17607  *)
17608  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17609for as_dir in $PATH
17610do
17611  IFS=$as_save_IFS
17612  test -z "$as_dir" && as_dir=.
17613    for ac_exec_ext in '' $ac_executable_extensions; do
17614  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17615    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17616    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17617    break 2
17618  fi
17619done
17620  done
17621IFS=$as_save_IFS
17622
17623  ;;
17624esac
17625fi
17626OTOOL=$ac_cv_path_OTOOL
17627if test -n "$OTOOL"; then
17628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17629$as_echo "$OTOOL" >&6; }
17630else
17631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17632$as_echo "no" >&6; }
17633fi
17634
17635
17636  test -n "$OTOOL" && break
17637done
17638
17639  else
17640    # The variable is set, but is it from the command line or the environment?
17641
17642    # Try to remove the string !OTOOL! from our list.
17643    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
17644    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17645      # If it failed, the variable was not from the command line. Ignore it,
17646      # but warn the user (except for BASH, which is always set by the calling BASH).
17647      if test "xOTOOL" != xBASH; then
17648        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
17649$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
17650      fi
17651      # Try to locate tool using the code snippet
17652      for ac_prog in otool
17653do
17654  # Extract the first word of "$ac_prog", so it can be a program name with args.
17655set dummy $ac_prog; ac_word=$2
17656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17657$as_echo_n "checking for $ac_word... " >&6; }
17658if ${ac_cv_path_OTOOL+:} false; then :
17659  $as_echo_n "(cached) " >&6
17660else
17661  case $OTOOL in
17662  [\\/]* | ?:[\\/]*)
17663  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17664  ;;
17665  *)
17666  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17667for as_dir in $PATH
17668do
17669  IFS=$as_save_IFS
17670  test -z "$as_dir" && as_dir=.
17671    for ac_exec_ext in '' $ac_executable_extensions; do
17672  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17673    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17674    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17675    break 2
17676  fi
17677done
17678  done
17679IFS=$as_save_IFS
17680
17681  ;;
17682esac
17683fi
17684OTOOL=$ac_cv_path_OTOOL
17685if test -n "$OTOOL"; then
17686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17687$as_echo "$OTOOL" >&6; }
17688else
17689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17690$as_echo "no" >&6; }
17691fi
17692
17693
17694  test -n "$OTOOL" && break
17695done
17696
17697    else
17698      # If it succeeded, then it was overridden by the user. We will use it
17699      # for the tool.
17700
17701      # First remove it from the list of overridden variables, so we can test
17702      # for unknown variables in the end.
17703      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17704
17705      # Check if the provided tool contains a complete path.
17706      tool_specified="$OTOOL"
17707      tool_basename="${tool_specified##*/}"
17708      if test "x$tool_basename" = "x$tool_specified"; then
17709        # A command without a complete path is provided, search $PATH.
17710        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
17711$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
17712        # Extract the first word of "$tool_basename", so it can be a program name with args.
17713set dummy $tool_basename; ac_word=$2
17714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17715$as_echo_n "checking for $ac_word... " >&6; }
17716if ${ac_cv_path_OTOOL+:} false; then :
17717  $as_echo_n "(cached) " >&6
17718else
17719  case $OTOOL in
17720  [\\/]* | ?:[\\/]*)
17721  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17722  ;;
17723  *)
17724  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17725for as_dir in $PATH
17726do
17727  IFS=$as_save_IFS
17728  test -z "$as_dir" && as_dir=.
17729    for ac_exec_ext in '' $ac_executable_extensions; do
17730  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17731    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17732    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17733    break 2
17734  fi
17735done
17736  done
17737IFS=$as_save_IFS
17738
17739  ;;
17740esac
17741fi
17742OTOOL=$ac_cv_path_OTOOL
17743if test -n "$OTOOL"; then
17744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17745$as_echo "$OTOOL" >&6; }
17746else
17747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17748$as_echo "no" >&6; }
17749fi
17750
17751
17752        if test "x$OTOOL" = x; then
17753          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17754        fi
17755      else
17756        # Otherwise we believe it is a complete path. Use it as it is.
17757        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
17758$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
17759        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
17760$as_echo_n "checking for OTOOL... " >&6; }
17761        if test ! -x "$tool_specified"; then
17762          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17763$as_echo "not found" >&6; }
17764          as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
17765        fi
17766        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17767$as_echo "$tool_specified" >&6; }
17768      fi
17769    fi
17770  fi
17771
17772
17773  if test "x$OTOOL" = "x"; then
17774    OTOOL="true"
17775  fi
17776
17777
17778  # Publish this variable in the help.
17779
17780
17781  if test "x$READELF" = x; then
17782    # The variable is not set by user, try to locate tool using the code snippet
17783    for ac_prog in greadelf readelf
17784do
17785  # Extract the first word of "$ac_prog", so it can be a program name with args.
17786set dummy $ac_prog; ac_word=$2
17787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17788$as_echo_n "checking for $ac_word... " >&6; }
17789if ${ac_cv_path_READELF+:} false; then :
17790  $as_echo_n "(cached) " >&6
17791else
17792  case $READELF in
17793  [\\/]* | ?:[\\/]*)
17794  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17795  ;;
17796  *)
17797  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17798for as_dir in $PATH
17799do
17800  IFS=$as_save_IFS
17801  test -z "$as_dir" && as_dir=.
17802    for ac_exec_ext in '' $ac_executable_extensions; do
17803  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17804    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17805    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17806    break 2
17807  fi
17808done
17809  done
17810IFS=$as_save_IFS
17811
17812  ;;
17813esac
17814fi
17815READELF=$ac_cv_path_READELF
17816if test -n "$READELF"; then
17817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17818$as_echo "$READELF" >&6; }
17819else
17820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17821$as_echo "no" >&6; }
17822fi
17823
17824
17825  test -n "$READELF" && break
17826done
17827
17828  else
17829    # The variable is set, but is it from the command line or the environment?
17830
17831    # Try to remove the string !READELF! from our list.
17832    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
17833    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17834      # If it failed, the variable was not from the command line. Ignore it,
17835      # but warn the user (except for BASH, which is always set by the calling BASH).
17836      if test "xREADELF" != xBASH; then
17837        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
17838$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
17839      fi
17840      # Try to locate tool using the code snippet
17841      for ac_prog in greadelf readelf
17842do
17843  # Extract the first word of "$ac_prog", so it can be a program name with args.
17844set dummy $ac_prog; ac_word=$2
17845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17846$as_echo_n "checking for $ac_word... " >&6; }
17847if ${ac_cv_path_READELF+:} false; then :
17848  $as_echo_n "(cached) " >&6
17849else
17850  case $READELF in
17851  [\\/]* | ?:[\\/]*)
17852  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17853  ;;
17854  *)
17855  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17856for as_dir in $PATH
17857do
17858  IFS=$as_save_IFS
17859  test -z "$as_dir" && as_dir=.
17860    for ac_exec_ext in '' $ac_executable_extensions; do
17861  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17862    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17863    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17864    break 2
17865  fi
17866done
17867  done
17868IFS=$as_save_IFS
17869
17870  ;;
17871esac
17872fi
17873READELF=$ac_cv_path_READELF
17874if test -n "$READELF"; then
17875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17876$as_echo "$READELF" >&6; }
17877else
17878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17879$as_echo "no" >&6; }
17880fi
17881
17882
17883  test -n "$READELF" && break
17884done
17885
17886    else
17887      # If it succeeded, then it was overridden by the user. We will use it
17888      # for the tool.
17889
17890      # First remove it from the list of overridden variables, so we can test
17891      # for unknown variables in the end.
17892      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17893
17894      # Check if the provided tool contains a complete path.
17895      tool_specified="$READELF"
17896      tool_basename="${tool_specified##*/}"
17897      if test "x$tool_basename" = "x$tool_specified"; then
17898        # A command without a complete path is provided, search $PATH.
17899        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
17900$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
17901        # Extract the first word of "$tool_basename", so it can be a program name with args.
17902set dummy $tool_basename; ac_word=$2
17903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17904$as_echo_n "checking for $ac_word... " >&6; }
17905if ${ac_cv_path_READELF+:} false; then :
17906  $as_echo_n "(cached) " >&6
17907else
17908  case $READELF in
17909  [\\/]* | ?:[\\/]*)
17910  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17911  ;;
17912  *)
17913  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17914for as_dir in $PATH
17915do
17916  IFS=$as_save_IFS
17917  test -z "$as_dir" && as_dir=.
17918    for ac_exec_ext in '' $ac_executable_extensions; do
17919  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17920    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17921    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17922    break 2
17923  fi
17924done
17925  done
17926IFS=$as_save_IFS
17927
17928  ;;
17929esac
17930fi
17931READELF=$ac_cv_path_READELF
17932if test -n "$READELF"; then
17933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17934$as_echo "$READELF" >&6; }
17935else
17936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17937$as_echo "no" >&6; }
17938fi
17939
17940
17941        if test "x$READELF" = x; then
17942          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17943        fi
17944      else
17945        # Otherwise we believe it is a complete path. Use it as it is.
17946        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
17947$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
17948        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
17949$as_echo_n "checking for READELF... " >&6; }
17950        if test ! -x "$tool_specified"; then
17951          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17952$as_echo "not found" >&6; }
17953          as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
17954        fi
17955        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17956$as_echo "$tool_specified" >&6; }
17957      fi
17958    fi
17959  fi
17960
17961
17962
17963
17964  # Publish this variable in the help.
17965
17966
17967  if test "x$HG" = x; then
17968    # The variable is not set by user, try to locate tool using the code snippet
17969    for ac_prog in hg
17970do
17971  # Extract the first word of "$ac_prog", so it can be a program name with args.
17972set dummy $ac_prog; ac_word=$2
17973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17974$as_echo_n "checking for $ac_word... " >&6; }
17975if ${ac_cv_path_HG+:} false; then :
17976  $as_echo_n "(cached) " >&6
17977else
17978  case $HG in
17979  [\\/]* | ?:[\\/]*)
17980  ac_cv_path_HG="$HG" # Let the user override the test with a path.
17981  ;;
17982  *)
17983  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17984for as_dir in $PATH
17985do
17986  IFS=$as_save_IFS
17987  test -z "$as_dir" && as_dir=.
17988    for ac_exec_ext in '' $ac_executable_extensions; do
17989  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17990    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
17991    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17992    break 2
17993  fi
17994done
17995  done
17996IFS=$as_save_IFS
17997
17998  ;;
17999esac
18000fi
18001HG=$ac_cv_path_HG
18002if test -n "$HG"; then
18003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18004$as_echo "$HG" >&6; }
18005else
18006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18007$as_echo "no" >&6; }
18008fi
18009
18010
18011  test -n "$HG" && break
18012done
18013
18014  else
18015    # The variable is set, but is it from the command line or the environment?
18016
18017    # Try to remove the string !HG! from our list.
18018    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
18019    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18020      # If it failed, the variable was not from the command line. Ignore it,
18021      # but warn the user (except for BASH, which is always set by the calling BASH).
18022      if test "xHG" != xBASH; then
18023        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
18024$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
18025      fi
18026      # Try to locate tool using the code snippet
18027      for ac_prog in hg
18028do
18029  # Extract the first word of "$ac_prog", so it can be a program name with args.
18030set dummy $ac_prog; ac_word=$2
18031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18032$as_echo_n "checking for $ac_word... " >&6; }
18033if ${ac_cv_path_HG+:} false; then :
18034  $as_echo_n "(cached) " >&6
18035else
18036  case $HG in
18037  [\\/]* | ?:[\\/]*)
18038  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18039  ;;
18040  *)
18041  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18042for as_dir in $PATH
18043do
18044  IFS=$as_save_IFS
18045  test -z "$as_dir" && as_dir=.
18046    for ac_exec_ext in '' $ac_executable_extensions; do
18047  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18048    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18049    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18050    break 2
18051  fi
18052done
18053  done
18054IFS=$as_save_IFS
18055
18056  ;;
18057esac
18058fi
18059HG=$ac_cv_path_HG
18060if test -n "$HG"; then
18061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18062$as_echo "$HG" >&6; }
18063else
18064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18065$as_echo "no" >&6; }
18066fi
18067
18068
18069  test -n "$HG" && break
18070done
18071
18072    else
18073      # If it succeeded, then it was overridden by the user. We will use it
18074      # for the tool.
18075
18076      # First remove it from the list of overridden variables, so we can test
18077      # for unknown variables in the end.
18078      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18079
18080      # Check if the provided tool contains a complete path.
18081      tool_specified="$HG"
18082      tool_basename="${tool_specified##*/}"
18083      if test "x$tool_basename" = "x$tool_specified"; then
18084        # A command without a complete path is provided, search $PATH.
18085        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
18086$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
18087        # Extract the first word of "$tool_basename", so it can be a program name with args.
18088set dummy $tool_basename; ac_word=$2
18089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18090$as_echo_n "checking for $ac_word... " >&6; }
18091if ${ac_cv_path_HG+:} false; then :
18092  $as_echo_n "(cached) " >&6
18093else
18094  case $HG in
18095  [\\/]* | ?:[\\/]*)
18096  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18097  ;;
18098  *)
18099  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18100for as_dir in $PATH
18101do
18102  IFS=$as_save_IFS
18103  test -z "$as_dir" && as_dir=.
18104    for ac_exec_ext in '' $ac_executable_extensions; do
18105  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18106    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18107    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18108    break 2
18109  fi
18110done
18111  done
18112IFS=$as_save_IFS
18113
18114  ;;
18115esac
18116fi
18117HG=$ac_cv_path_HG
18118if test -n "$HG"; then
18119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18120$as_echo "$HG" >&6; }
18121else
18122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18123$as_echo "no" >&6; }
18124fi
18125
18126
18127        if test "x$HG" = x; then
18128          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18129        fi
18130      else
18131        # Otherwise we believe it is a complete path. Use it as it is.
18132        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
18133$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
18134        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
18135$as_echo_n "checking for HG... " >&6; }
18136        if test ! -x "$tool_specified"; then
18137          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18138$as_echo "not found" >&6; }
18139          as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
18140        fi
18141        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18142$as_echo "$tool_specified" >&6; }
18143      fi
18144    fi
18145  fi
18146
18147
18148
18149
18150  # Publish this variable in the help.
18151
18152
18153  if test "x$STAT" = x; then
18154    # The variable is not set by user, try to locate tool using the code snippet
18155    for ac_prog in stat
18156do
18157  # Extract the first word of "$ac_prog", so it can be a program name with args.
18158set dummy $ac_prog; ac_word=$2
18159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18160$as_echo_n "checking for $ac_word... " >&6; }
18161if ${ac_cv_path_STAT+:} false; then :
18162  $as_echo_n "(cached) " >&6
18163else
18164  case $STAT in
18165  [\\/]* | ?:[\\/]*)
18166  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18167  ;;
18168  *)
18169  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18170for as_dir in $PATH
18171do
18172  IFS=$as_save_IFS
18173  test -z "$as_dir" && as_dir=.
18174    for ac_exec_ext in '' $ac_executable_extensions; do
18175  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18176    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18177    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18178    break 2
18179  fi
18180done
18181  done
18182IFS=$as_save_IFS
18183
18184  ;;
18185esac
18186fi
18187STAT=$ac_cv_path_STAT
18188if test -n "$STAT"; then
18189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18190$as_echo "$STAT" >&6; }
18191else
18192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18193$as_echo "no" >&6; }
18194fi
18195
18196
18197  test -n "$STAT" && break
18198done
18199
18200  else
18201    # The variable is set, but is it from the command line or the environment?
18202
18203    # Try to remove the string !STAT! from our list.
18204    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18205    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18206      # If it failed, the variable was not from the command line. Ignore it,
18207      # but warn the user (except for BASH, which is always set by the calling BASH).
18208      if test "xSTAT" != xBASH; then
18209        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18210$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18211      fi
18212      # Try to locate tool using the code snippet
18213      for ac_prog in stat
18214do
18215  # Extract the first word of "$ac_prog", so it can be a program name with args.
18216set dummy $ac_prog; ac_word=$2
18217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18218$as_echo_n "checking for $ac_word... " >&6; }
18219if ${ac_cv_path_STAT+:} false; then :
18220  $as_echo_n "(cached) " >&6
18221else
18222  case $STAT in
18223  [\\/]* | ?:[\\/]*)
18224  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18225  ;;
18226  *)
18227  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18228for as_dir in $PATH
18229do
18230  IFS=$as_save_IFS
18231  test -z "$as_dir" && as_dir=.
18232    for ac_exec_ext in '' $ac_executable_extensions; do
18233  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18234    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18235    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18236    break 2
18237  fi
18238done
18239  done
18240IFS=$as_save_IFS
18241
18242  ;;
18243esac
18244fi
18245STAT=$ac_cv_path_STAT
18246if test -n "$STAT"; then
18247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18248$as_echo "$STAT" >&6; }
18249else
18250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18251$as_echo "no" >&6; }
18252fi
18253
18254
18255  test -n "$STAT" && break
18256done
18257
18258    else
18259      # If it succeeded, then it was overridden by the user. We will use it
18260      # for the tool.
18261
18262      # First remove it from the list of overridden variables, so we can test
18263      # for unknown variables in the end.
18264      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18265
18266      # Check if the provided tool contains a complete path.
18267      tool_specified="$STAT"
18268      tool_basename="${tool_specified##*/}"
18269      if test "x$tool_basename" = "x$tool_specified"; then
18270        # A command without a complete path is provided, search $PATH.
18271        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18272$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18273        # Extract the first word of "$tool_basename", so it can be a program name with args.
18274set dummy $tool_basename; ac_word=$2
18275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18276$as_echo_n "checking for $ac_word... " >&6; }
18277if ${ac_cv_path_STAT+:} false; then :
18278  $as_echo_n "(cached) " >&6
18279else
18280  case $STAT in
18281  [\\/]* | ?:[\\/]*)
18282  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18283  ;;
18284  *)
18285  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18286for as_dir in $PATH
18287do
18288  IFS=$as_save_IFS
18289  test -z "$as_dir" && as_dir=.
18290    for ac_exec_ext in '' $ac_executable_extensions; do
18291  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18292    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18293    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18294    break 2
18295  fi
18296done
18297  done
18298IFS=$as_save_IFS
18299
18300  ;;
18301esac
18302fi
18303STAT=$ac_cv_path_STAT
18304if test -n "$STAT"; then
18305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18306$as_echo "$STAT" >&6; }
18307else
18308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18309$as_echo "no" >&6; }
18310fi
18311
18312
18313        if test "x$STAT" = x; then
18314          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18315        fi
18316      else
18317        # Otherwise we believe it is a complete path. Use it as it is.
18318        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18319$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18320        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18321$as_echo_n "checking for STAT... " >&6; }
18322        if test ! -x "$tool_specified"; then
18323          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18324$as_echo "not found" >&6; }
18325          as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18326        fi
18327        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18328$as_echo "$tool_specified" >&6; }
18329      fi
18330    fi
18331  fi
18332
18333
18334
18335
18336  # Publish this variable in the help.
18337
18338
18339  if test "x$TIME" = x; then
18340    # The variable is not set by user, try to locate tool using the code snippet
18341    for ac_prog in time
18342do
18343  # Extract the first word of "$ac_prog", so it can be a program name with args.
18344set dummy $ac_prog; ac_word=$2
18345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18346$as_echo_n "checking for $ac_word... " >&6; }
18347if ${ac_cv_path_TIME+:} false; then :
18348  $as_echo_n "(cached) " >&6
18349else
18350  case $TIME in
18351  [\\/]* | ?:[\\/]*)
18352  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18353  ;;
18354  *)
18355  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18356for as_dir in $PATH
18357do
18358  IFS=$as_save_IFS
18359  test -z "$as_dir" && as_dir=.
18360    for ac_exec_ext in '' $ac_executable_extensions; do
18361  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18362    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18363    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18364    break 2
18365  fi
18366done
18367  done
18368IFS=$as_save_IFS
18369
18370  ;;
18371esac
18372fi
18373TIME=$ac_cv_path_TIME
18374if test -n "$TIME"; then
18375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18376$as_echo "$TIME" >&6; }
18377else
18378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18379$as_echo "no" >&6; }
18380fi
18381
18382
18383  test -n "$TIME" && break
18384done
18385
18386  else
18387    # The variable is set, but is it from the command line or the environment?
18388
18389    # Try to remove the string !TIME! from our list.
18390    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18391    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18392      # If it failed, the variable was not from the command line. Ignore it,
18393      # but warn the user (except for BASH, which is always set by the calling BASH).
18394      if test "xTIME" != xBASH; then
18395        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18396$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18397      fi
18398      # Try to locate tool using the code snippet
18399      for ac_prog in time
18400do
18401  # Extract the first word of "$ac_prog", so it can be a program name with args.
18402set dummy $ac_prog; ac_word=$2
18403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18404$as_echo_n "checking for $ac_word... " >&6; }
18405if ${ac_cv_path_TIME+:} false; then :
18406  $as_echo_n "(cached) " >&6
18407else
18408  case $TIME in
18409  [\\/]* | ?:[\\/]*)
18410  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18411  ;;
18412  *)
18413  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18414for as_dir in $PATH
18415do
18416  IFS=$as_save_IFS
18417  test -z "$as_dir" && as_dir=.
18418    for ac_exec_ext in '' $ac_executable_extensions; do
18419  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18420    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18421    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18422    break 2
18423  fi
18424done
18425  done
18426IFS=$as_save_IFS
18427
18428  ;;
18429esac
18430fi
18431TIME=$ac_cv_path_TIME
18432if test -n "$TIME"; then
18433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18434$as_echo "$TIME" >&6; }
18435else
18436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18437$as_echo "no" >&6; }
18438fi
18439
18440
18441  test -n "$TIME" && break
18442done
18443
18444    else
18445      # If it succeeded, then it was overridden by the user. We will use it
18446      # for the tool.
18447
18448      # First remove it from the list of overridden variables, so we can test
18449      # for unknown variables in the end.
18450      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18451
18452      # Check if the provided tool contains a complete path.
18453      tool_specified="$TIME"
18454      tool_basename="${tool_specified##*/}"
18455      if test "x$tool_basename" = "x$tool_specified"; then
18456        # A command without a complete path is provided, search $PATH.
18457        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18458$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18459        # Extract the first word of "$tool_basename", so it can be a program name with args.
18460set dummy $tool_basename; ac_word=$2
18461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18462$as_echo_n "checking for $ac_word... " >&6; }
18463if ${ac_cv_path_TIME+:} false; then :
18464  $as_echo_n "(cached) " >&6
18465else
18466  case $TIME in
18467  [\\/]* | ?:[\\/]*)
18468  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18469  ;;
18470  *)
18471  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18472for as_dir in $PATH
18473do
18474  IFS=$as_save_IFS
18475  test -z "$as_dir" && as_dir=.
18476    for ac_exec_ext in '' $ac_executable_extensions; do
18477  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18478    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18479    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18480    break 2
18481  fi
18482done
18483  done
18484IFS=$as_save_IFS
18485
18486  ;;
18487esac
18488fi
18489TIME=$ac_cv_path_TIME
18490if test -n "$TIME"; then
18491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18492$as_echo "$TIME" >&6; }
18493else
18494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18495$as_echo "no" >&6; }
18496fi
18497
18498
18499        if test "x$TIME" = x; then
18500          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18501        fi
18502      else
18503        # Otherwise we believe it is a complete path. Use it as it is.
18504        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
18505$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
18506        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
18507$as_echo_n "checking for TIME... " >&6; }
18508        if test ! -x "$tool_specified"; then
18509          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18510$as_echo "not found" >&6; }
18511          as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
18512        fi
18513        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18514$as_echo "$tool_specified" >&6; }
18515      fi
18516    fi
18517  fi
18518
18519
18520  # Check if it's GNU time
18521  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
18522  if test "x$IS_GNU_TIME" != x; then
18523    IS_GNU_TIME=yes
18524  else
18525    IS_GNU_TIME=no
18526  fi
18527
18528
18529  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18530
18531
18532
18533  # Publish this variable in the help.
18534
18535
18536  if test "x$COMM" = x; then
18537    # The variable is not set by user, try to locate tool using the code snippet
18538    for ac_prog in comm
18539do
18540  # Extract the first word of "$ac_prog", so it can be a program name with args.
18541set dummy $ac_prog; ac_word=$2
18542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18543$as_echo_n "checking for $ac_word... " >&6; }
18544if ${ac_cv_path_COMM+:} false; then :
18545  $as_echo_n "(cached) " >&6
18546else
18547  case $COMM in
18548  [\\/]* | ?:[\\/]*)
18549  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18550  ;;
18551  *)
18552  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18553for as_dir in $PATH
18554do
18555  IFS=$as_save_IFS
18556  test -z "$as_dir" && as_dir=.
18557    for ac_exec_ext in '' $ac_executable_extensions; do
18558  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18559    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18560    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18561    break 2
18562  fi
18563done
18564  done
18565IFS=$as_save_IFS
18566
18567  ;;
18568esac
18569fi
18570COMM=$ac_cv_path_COMM
18571if test -n "$COMM"; then
18572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18573$as_echo "$COMM" >&6; }
18574else
18575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18576$as_echo "no" >&6; }
18577fi
18578
18579
18580  test -n "$COMM" && break
18581done
18582
18583  else
18584    # The variable is set, but is it from the command line or the environment?
18585
18586    # Try to remove the string !COMM! from our list.
18587    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
18588    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18589      # If it failed, the variable was not from the command line. Ignore it,
18590      # but warn the user (except for BASH, which is always set by the calling BASH).
18591      if test "xCOMM" != xBASH; then
18592        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
18593$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
18594      fi
18595      # Try to locate tool using the code snippet
18596      for ac_prog in comm
18597do
18598  # Extract the first word of "$ac_prog", so it can be a program name with args.
18599set dummy $ac_prog; ac_word=$2
18600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18601$as_echo_n "checking for $ac_word... " >&6; }
18602if ${ac_cv_path_COMM+:} false; then :
18603  $as_echo_n "(cached) " >&6
18604else
18605  case $COMM in
18606  [\\/]* | ?:[\\/]*)
18607  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18608  ;;
18609  *)
18610  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18611for as_dir in $PATH
18612do
18613  IFS=$as_save_IFS
18614  test -z "$as_dir" && as_dir=.
18615    for ac_exec_ext in '' $ac_executable_extensions; do
18616  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18617    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18619    break 2
18620  fi
18621done
18622  done
18623IFS=$as_save_IFS
18624
18625  ;;
18626esac
18627fi
18628COMM=$ac_cv_path_COMM
18629if test -n "$COMM"; then
18630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18631$as_echo "$COMM" >&6; }
18632else
18633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18634$as_echo "no" >&6; }
18635fi
18636
18637
18638  test -n "$COMM" && break
18639done
18640
18641    else
18642      # If it succeeded, then it was overridden by the user. We will use it
18643      # for the tool.
18644
18645      # First remove it from the list of overridden variables, so we can test
18646      # for unknown variables in the end.
18647      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18648
18649      # Check if the provided tool contains a complete path.
18650      tool_specified="$COMM"
18651      tool_basename="${tool_specified##*/}"
18652      if test "x$tool_basename" = "x$tool_specified"; then
18653        # A command without a complete path is provided, search $PATH.
18654        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
18655$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
18656        # Extract the first word of "$tool_basename", so it can be a program name with args.
18657set dummy $tool_basename; ac_word=$2
18658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18659$as_echo_n "checking for $ac_word... " >&6; }
18660if ${ac_cv_path_COMM+:} false; then :
18661  $as_echo_n "(cached) " >&6
18662else
18663  case $COMM in
18664  [\\/]* | ?:[\\/]*)
18665  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18666  ;;
18667  *)
18668  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18669for as_dir in $PATH
18670do
18671  IFS=$as_save_IFS
18672  test -z "$as_dir" && as_dir=.
18673    for ac_exec_ext in '' $ac_executable_extensions; do
18674  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18675    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18676    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18677    break 2
18678  fi
18679done
18680  done
18681IFS=$as_save_IFS
18682
18683  ;;
18684esac
18685fi
18686COMM=$ac_cv_path_COMM
18687if test -n "$COMM"; then
18688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18689$as_echo "$COMM" >&6; }
18690else
18691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18692$as_echo "no" >&6; }
18693fi
18694
18695
18696        if test "x$COMM" = x; then
18697          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18698        fi
18699      else
18700        # Otherwise we believe it is a complete path. Use it as it is.
18701        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
18702$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
18703        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
18704$as_echo_n "checking for COMM... " >&6; }
18705        if test ! -x "$tool_specified"; then
18706          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18707$as_echo "not found" >&6; }
18708          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
18709        fi
18710        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18711$as_echo "$tool_specified" >&6; }
18712      fi
18713    fi
18714  fi
18715
18716
18717
18718  if test "x$COMM" = x; then
18719    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
18720  fi
18721
18722
18723  fi
18724
18725  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
18726
18727
18728
18729  # Publish this variable in the help.
18730
18731
18732  if test "x$DSYMUTIL" = x; then
18733    # The variable is not set by user, try to locate tool using the code snippet
18734    for ac_prog in dsymutil
18735do
18736  # Extract the first word of "$ac_prog", so it can be a program name with args.
18737set dummy $ac_prog; ac_word=$2
18738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18739$as_echo_n "checking for $ac_word... " >&6; }
18740if ${ac_cv_path_DSYMUTIL+:} false; then :
18741  $as_echo_n "(cached) " >&6
18742else
18743  case $DSYMUTIL in
18744  [\\/]* | ?:[\\/]*)
18745  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18746  ;;
18747  *)
18748  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18749for as_dir in $PATH
18750do
18751  IFS=$as_save_IFS
18752  test -z "$as_dir" && as_dir=.
18753    for ac_exec_ext in '' $ac_executable_extensions; do
18754  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18755    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18756    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18757    break 2
18758  fi
18759done
18760  done
18761IFS=$as_save_IFS
18762
18763  ;;
18764esac
18765fi
18766DSYMUTIL=$ac_cv_path_DSYMUTIL
18767if test -n "$DSYMUTIL"; then
18768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18769$as_echo "$DSYMUTIL" >&6; }
18770else
18771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18772$as_echo "no" >&6; }
18773fi
18774
18775
18776  test -n "$DSYMUTIL" && break
18777done
18778
18779  else
18780    # The variable is set, but is it from the command line or the environment?
18781
18782    # Try to remove the string !DSYMUTIL! from our list.
18783    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
18784    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18785      # If it failed, the variable was not from the command line. Ignore it,
18786      # but warn the user (except for BASH, which is always set by the calling BASH).
18787      if test "xDSYMUTIL" != xBASH; then
18788        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
18789$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
18790      fi
18791      # Try to locate tool using the code snippet
18792      for ac_prog in dsymutil
18793do
18794  # Extract the first word of "$ac_prog", so it can be a program name with args.
18795set dummy $ac_prog; ac_word=$2
18796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18797$as_echo_n "checking for $ac_word... " >&6; }
18798if ${ac_cv_path_DSYMUTIL+:} false; then :
18799  $as_echo_n "(cached) " >&6
18800else
18801  case $DSYMUTIL in
18802  [\\/]* | ?:[\\/]*)
18803  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18804  ;;
18805  *)
18806  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18807for as_dir in $PATH
18808do
18809  IFS=$as_save_IFS
18810  test -z "$as_dir" && as_dir=.
18811    for ac_exec_ext in '' $ac_executable_extensions; do
18812  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18813    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18814    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18815    break 2
18816  fi
18817done
18818  done
18819IFS=$as_save_IFS
18820
18821  ;;
18822esac
18823fi
18824DSYMUTIL=$ac_cv_path_DSYMUTIL
18825if test -n "$DSYMUTIL"; then
18826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18827$as_echo "$DSYMUTIL" >&6; }
18828else
18829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18830$as_echo "no" >&6; }
18831fi
18832
18833
18834  test -n "$DSYMUTIL" && break
18835done
18836
18837    else
18838      # If it succeeded, then it was overridden by the user. We will use it
18839      # for the tool.
18840
18841      # First remove it from the list of overridden variables, so we can test
18842      # for unknown variables in the end.
18843      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18844
18845      # Check if the provided tool contains a complete path.
18846      tool_specified="$DSYMUTIL"
18847      tool_basename="${tool_specified##*/}"
18848      if test "x$tool_basename" = "x$tool_specified"; then
18849        # A command without a complete path is provided, search $PATH.
18850        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
18851$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
18852        # Extract the first word of "$tool_basename", so it can be a program name with args.
18853set dummy $tool_basename; ac_word=$2
18854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18855$as_echo_n "checking for $ac_word... " >&6; }
18856if ${ac_cv_path_DSYMUTIL+:} false; then :
18857  $as_echo_n "(cached) " >&6
18858else
18859  case $DSYMUTIL in
18860  [\\/]* | ?:[\\/]*)
18861  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18862  ;;
18863  *)
18864  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18865for as_dir in $PATH
18866do
18867  IFS=$as_save_IFS
18868  test -z "$as_dir" && as_dir=.
18869    for ac_exec_ext in '' $ac_executable_extensions; do
18870  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18871    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18872    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18873    break 2
18874  fi
18875done
18876  done
18877IFS=$as_save_IFS
18878
18879  ;;
18880esac
18881fi
18882DSYMUTIL=$ac_cv_path_DSYMUTIL
18883if test -n "$DSYMUTIL"; then
18884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18885$as_echo "$DSYMUTIL" >&6; }
18886else
18887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18888$as_echo "no" >&6; }
18889fi
18890
18891
18892        if test "x$DSYMUTIL" = x; then
18893          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18894        fi
18895      else
18896        # Otherwise we believe it is a complete path. Use it as it is.
18897        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
18898$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
18899        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
18900$as_echo_n "checking for DSYMUTIL... " >&6; }
18901        if test ! -x "$tool_specified"; then
18902          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18903$as_echo "not found" >&6; }
18904          as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
18905        fi
18906        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18907$as_echo "$tool_specified" >&6; }
18908      fi
18909    fi
18910  fi
18911
18912
18913
18914  if test "x$DSYMUTIL" = x; then
18915    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
18916  fi
18917
18918
18919
18920
18921
18922  # Publish this variable in the help.
18923
18924
18925  if test "x$XATTR" = x; then
18926    # The variable is not set by user, try to locate tool using the code snippet
18927    for ac_prog in xattr
18928do
18929  # Extract the first word of "$ac_prog", so it can be a program name with args.
18930set dummy $ac_prog; ac_word=$2
18931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18932$as_echo_n "checking for $ac_word... " >&6; }
18933if ${ac_cv_path_XATTR+:} false; then :
18934  $as_echo_n "(cached) " >&6
18935else
18936  case $XATTR in
18937  [\\/]* | ?:[\\/]*)
18938  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
18939  ;;
18940  *)
18941  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18942for as_dir in $PATH
18943do
18944  IFS=$as_save_IFS
18945  test -z "$as_dir" && as_dir=.
18946    for ac_exec_ext in '' $ac_executable_extensions; do
18947  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18948    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
18949    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18950    break 2
18951  fi
18952done
18953  done
18954IFS=$as_save_IFS
18955
18956  ;;
18957esac
18958fi
18959XATTR=$ac_cv_path_XATTR
18960if test -n "$XATTR"; then
18961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
18962$as_echo "$XATTR" >&6; }
18963else
18964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18965$as_echo "no" >&6; }
18966fi
18967
18968
18969  test -n "$XATTR" && break
18970done
18971
18972  else
18973    # The variable is set, but is it from the command line or the environment?
18974
18975    # Try to remove the string !XATTR! from our list.
18976    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
18977    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18978      # If it failed, the variable was not from the command line. Ignore it,
18979      # but warn the user (except for BASH, which is always set by the calling BASH).
18980      if test "xXATTR" != xBASH; then
18981        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
18982$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
18983      fi
18984      # Try to locate tool using the code snippet
18985      for ac_prog in xattr
18986do
18987  # Extract the first word of "$ac_prog", so it can be a program name with args.
18988set dummy $ac_prog; ac_word=$2
18989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18990$as_echo_n "checking for $ac_word... " >&6; }
18991if ${ac_cv_path_XATTR+:} false; then :
18992  $as_echo_n "(cached) " >&6
18993else
18994  case $XATTR in
18995  [\\/]* | ?:[\\/]*)
18996  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
18997  ;;
18998  *)
18999  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19000for as_dir in $PATH
19001do
19002  IFS=$as_save_IFS
19003  test -z "$as_dir" && as_dir=.
19004    for ac_exec_ext in '' $ac_executable_extensions; do
19005  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19006    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19007    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19008    break 2
19009  fi
19010done
19011  done
19012IFS=$as_save_IFS
19013
19014  ;;
19015esac
19016fi
19017XATTR=$ac_cv_path_XATTR
19018if test -n "$XATTR"; then
19019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19020$as_echo "$XATTR" >&6; }
19021else
19022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19023$as_echo "no" >&6; }
19024fi
19025
19026
19027  test -n "$XATTR" && break
19028done
19029
19030    else
19031      # If it succeeded, then it was overridden by the user. We will use it
19032      # for the tool.
19033
19034      # First remove it from the list of overridden variables, so we can test
19035      # for unknown variables in the end.
19036      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19037
19038      # Check if the provided tool contains a complete path.
19039      tool_specified="$XATTR"
19040      tool_basename="${tool_specified##*/}"
19041      if test "x$tool_basename" = "x$tool_specified"; then
19042        # A command without a complete path is provided, search $PATH.
19043        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
19044$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
19045        # Extract the first word of "$tool_basename", so it can be a program name with args.
19046set dummy $tool_basename; ac_word=$2
19047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19048$as_echo_n "checking for $ac_word... " >&6; }
19049if ${ac_cv_path_XATTR+:} false; then :
19050  $as_echo_n "(cached) " >&6
19051else
19052  case $XATTR in
19053  [\\/]* | ?:[\\/]*)
19054  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19055  ;;
19056  *)
19057  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19058for as_dir in $PATH
19059do
19060  IFS=$as_save_IFS
19061  test -z "$as_dir" && as_dir=.
19062    for ac_exec_ext in '' $ac_executable_extensions; do
19063  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19064    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19065    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19066    break 2
19067  fi
19068done
19069  done
19070IFS=$as_save_IFS
19071
19072  ;;
19073esac
19074fi
19075XATTR=$ac_cv_path_XATTR
19076if test -n "$XATTR"; then
19077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19078$as_echo "$XATTR" >&6; }
19079else
19080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19081$as_echo "no" >&6; }
19082fi
19083
19084
19085        if test "x$XATTR" = x; then
19086          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19087        fi
19088      else
19089        # Otherwise we believe it is a complete path. Use it as it is.
19090        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
19091$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
19092        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
19093$as_echo_n "checking for XATTR... " >&6; }
19094        if test ! -x "$tool_specified"; then
19095          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19096$as_echo "not found" >&6; }
19097          as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
19098        fi
19099        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19100$as_echo "$tool_specified" >&6; }
19101      fi
19102    fi
19103  fi
19104
19105
19106
19107  if test "x$XATTR" = x; then
19108    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
19109  fi
19110
19111
19112
19113
19114  # Publish this variable in the help.
19115
19116
19117  if test "x$CODESIGN" = x; then
19118    # The variable is not set by user, try to locate tool using the code snippet
19119    for ac_prog in codesign
19120do
19121  # Extract the first word of "$ac_prog", so it can be a program name with args.
19122set dummy $ac_prog; ac_word=$2
19123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19124$as_echo_n "checking for $ac_word... " >&6; }
19125if ${ac_cv_path_CODESIGN+:} false; then :
19126  $as_echo_n "(cached) " >&6
19127else
19128  case $CODESIGN in
19129  [\\/]* | ?:[\\/]*)
19130  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19131  ;;
19132  *)
19133  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19134for as_dir in $PATH
19135do
19136  IFS=$as_save_IFS
19137  test -z "$as_dir" && as_dir=.
19138    for ac_exec_ext in '' $ac_executable_extensions; do
19139  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19140    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19141    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19142    break 2
19143  fi
19144done
19145  done
19146IFS=$as_save_IFS
19147
19148  ;;
19149esac
19150fi
19151CODESIGN=$ac_cv_path_CODESIGN
19152if test -n "$CODESIGN"; then
19153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19154$as_echo "$CODESIGN" >&6; }
19155else
19156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19157$as_echo "no" >&6; }
19158fi
19159
19160
19161  test -n "$CODESIGN" && break
19162done
19163
19164  else
19165    # The variable is set, but is it from the command line or the environment?
19166
19167    # Try to remove the string !CODESIGN! from our list.
19168    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
19169    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19170      # If it failed, the variable was not from the command line. Ignore it,
19171      # but warn the user (except for BASH, which is always set by the calling BASH).
19172      if test "xCODESIGN" != xBASH; then
19173        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
19174$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
19175      fi
19176      # Try to locate tool using the code snippet
19177      for ac_prog in codesign
19178do
19179  # Extract the first word of "$ac_prog", so it can be a program name with args.
19180set dummy $ac_prog; ac_word=$2
19181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19182$as_echo_n "checking for $ac_word... " >&6; }
19183if ${ac_cv_path_CODESIGN+:} false; then :
19184  $as_echo_n "(cached) " >&6
19185else
19186  case $CODESIGN in
19187  [\\/]* | ?:[\\/]*)
19188  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19189  ;;
19190  *)
19191  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19192for as_dir in $PATH
19193do
19194  IFS=$as_save_IFS
19195  test -z "$as_dir" && as_dir=.
19196    for ac_exec_ext in '' $ac_executable_extensions; do
19197  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19198    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19199    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19200    break 2
19201  fi
19202done
19203  done
19204IFS=$as_save_IFS
19205
19206  ;;
19207esac
19208fi
19209CODESIGN=$ac_cv_path_CODESIGN
19210if test -n "$CODESIGN"; then
19211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19212$as_echo "$CODESIGN" >&6; }
19213else
19214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19215$as_echo "no" >&6; }
19216fi
19217
19218
19219  test -n "$CODESIGN" && break
19220done
19221
19222    else
19223      # If it succeeded, then it was overridden by the user. We will use it
19224      # for the tool.
19225
19226      # First remove it from the list of overridden variables, so we can test
19227      # for unknown variables in the end.
19228      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19229
19230      # Check if the provided tool contains a complete path.
19231      tool_specified="$CODESIGN"
19232      tool_basename="${tool_specified##*/}"
19233      if test "x$tool_basename" = "x$tool_specified"; then
19234        # A command without a complete path is provided, search $PATH.
19235        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19236$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19237        # Extract the first word of "$tool_basename", so it can be a program name with args.
19238set dummy $tool_basename; ac_word=$2
19239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19240$as_echo_n "checking for $ac_word... " >&6; }
19241if ${ac_cv_path_CODESIGN+:} false; then :
19242  $as_echo_n "(cached) " >&6
19243else
19244  case $CODESIGN in
19245  [\\/]* | ?:[\\/]*)
19246  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19247  ;;
19248  *)
19249  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19250for as_dir in $PATH
19251do
19252  IFS=$as_save_IFS
19253  test -z "$as_dir" && as_dir=.
19254    for ac_exec_ext in '' $ac_executable_extensions; do
19255  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19256    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19257    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19258    break 2
19259  fi
19260done
19261  done
19262IFS=$as_save_IFS
19263
19264  ;;
19265esac
19266fi
19267CODESIGN=$ac_cv_path_CODESIGN
19268if test -n "$CODESIGN"; then
19269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19270$as_echo "$CODESIGN" >&6; }
19271else
19272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19273$as_echo "no" >&6; }
19274fi
19275
19276
19277        if test "x$CODESIGN" = x; then
19278          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19279        fi
19280      else
19281        # Otherwise we believe it is a complete path. Use it as it is.
19282        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19283$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19284        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19285$as_echo_n "checking for CODESIGN... " >&6; }
19286        if test ! -x "$tool_specified"; then
19287          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19288$as_echo "not found" >&6; }
19289          as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19290        fi
19291        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19292$as_echo "$tool_specified" >&6; }
19293      fi
19294    fi
19295  fi
19296
19297
19298    if test "x$CODESIGN" != "x"; then
19299      # Verify that the openjdk_codesign certificate is present
19300      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19301$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19302      rm -f codesign-testfile
19303      touch codesign-testfile
19304      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19305      rm -f codesign-testfile
19306      if test "x$CODESIGN" = x; then
19307        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19308$as_echo "no" >&6; }
19309      else
19310        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19311$as_echo "yes" >&6; }
19312      fi
19313    fi
19314  fi
19315
19316
19317# Check if pkg-config is available.
19318
19319
19320if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19321	if test -n "$ac_tool_prefix"; then
19322  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19323set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19325$as_echo_n "checking for $ac_word... " >&6; }
19326if ${ac_cv_path_PKG_CONFIG+:} false; then :
19327  $as_echo_n "(cached) " >&6
19328else
19329  case $PKG_CONFIG in
19330  [\\/]* | ?:[\\/]*)
19331  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19332  ;;
19333  *)
19334  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19335for as_dir in $PATH
19336do
19337  IFS=$as_save_IFS
19338  test -z "$as_dir" && as_dir=.
19339    for ac_exec_ext in '' $ac_executable_extensions; do
19340  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19341    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19342    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19343    break 2
19344  fi
19345done
19346  done
19347IFS=$as_save_IFS
19348
19349  ;;
19350esac
19351fi
19352PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19353if test -n "$PKG_CONFIG"; then
19354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19355$as_echo "$PKG_CONFIG" >&6; }
19356else
19357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19358$as_echo "no" >&6; }
19359fi
19360
19361
19362fi
19363if test -z "$ac_cv_path_PKG_CONFIG"; then
19364  ac_pt_PKG_CONFIG=$PKG_CONFIG
19365  # Extract the first word of "pkg-config", so it can be a program name with args.
19366set dummy pkg-config; ac_word=$2
19367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19368$as_echo_n "checking for $ac_word... " >&6; }
19369if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19370  $as_echo_n "(cached) " >&6
19371else
19372  case $ac_pt_PKG_CONFIG in
19373  [\\/]* | ?:[\\/]*)
19374  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19375  ;;
19376  *)
19377  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19378for as_dir in $PATH
19379do
19380  IFS=$as_save_IFS
19381  test -z "$as_dir" && as_dir=.
19382    for ac_exec_ext in '' $ac_executable_extensions; do
19383  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19384    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19385    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19386    break 2
19387  fi
19388done
19389  done
19390IFS=$as_save_IFS
19391
19392  ;;
19393esac
19394fi
19395ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19396if test -n "$ac_pt_PKG_CONFIG"; then
19397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19398$as_echo "$ac_pt_PKG_CONFIG" >&6; }
19399else
19400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19401$as_echo "no" >&6; }
19402fi
19403
19404  if test "x$ac_pt_PKG_CONFIG" = x; then
19405    PKG_CONFIG=""
19406  else
19407    case $cross_compiling:$ac_tool_warned in
19408yes:)
19409{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19410$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19411ac_tool_warned=yes ;;
19412esac
19413    PKG_CONFIG=$ac_pt_PKG_CONFIG
19414  fi
19415else
19416  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19417fi
19418
19419fi
19420if test -n "$PKG_CONFIG"; then
19421	_pkg_min_version=0.9.0
19422	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19423$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19424	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19425		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19426$as_echo "yes" >&6; }
19427	else
19428		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19429$as_echo "no" >&6; }
19430		PKG_CONFIG=""
19431	fi
19432
19433fi
19434
19435# After basic tools have been setup, we can check build os specific details.
19436
19437  ###############################################################################
19438
19439  # Note that this is the build platform OS version!
19440
19441  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19442  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19443  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19444  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19445
19446
19447
19448
19449
19450# Setup builddeps, for automatic downloading of tools we need.
19451# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19452# boot-jdk setup, but we need to have basic tools setup first.
19453
19454
19455# Check whether --with-builddeps-conf was given.
19456if test "${with_builddeps_conf+set}" = set; then :
19457  withval=$with_builddeps_conf;
19458fi
19459
19460
19461
19462# Check whether --with-builddeps-server was given.
19463if test "${with_builddeps_server+set}" = set; then :
19464  withval=$with_builddeps_server;
19465fi
19466
19467
19468
19469# Check whether --with-builddeps-dir was given.
19470if test "${with_builddeps_dir+set}" = set; then :
19471  withval=$with_builddeps_dir;
19472else
19473  with_builddeps_dir=/localhome/builddeps
19474fi
19475
19476
19477
19478# Check whether --with-builddeps-group was given.
19479if test "${with_builddeps_group+set}" = set; then :
19480  withval=$with_builddeps_group;
19481fi
19482
19483
19484
19485
19486  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19487    if test "x$with_builddeps_conf" != x; then
19488      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19489$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19490      builddepsfile=$with_builddeps_conf
19491      if test -s $builddepsfile; then
19492        . $builddepsfile
19493        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19494$as_echo "loaded!" >&6; }
19495      else
19496        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19497      fi
19498    else
19499      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19500$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19501      builddepsfile=`mktemp`
19502      touch $builddepsfile
19503      # Put all found confs into a single file.
19504      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19505      # Source the file to acquire the variables
19506      if test -s $builddepsfile; then
19507        . $builddepsfile
19508        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19509$as_echo "found at least one!" >&6; }
19510      else
19511        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19512      fi
19513    fi
19514    # Create build and target names that use _ instead of "-" and ".".
19515    # This is necessary to use them in variable names.
19516    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19517    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19518    # Extract rewrite information for build and target
19519    eval rewritten_build=\${REWRITE_${build_var}}
19520    if test "x$rewritten_build" = x; then
19521      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19522      echo Build stays the same $rewritten_build
19523    else
19524      echo Rewriting build for builddeps into $rewritten_build
19525    fi
19526    eval rewritten_target=\${REWRITE_${target_var}}
19527    if test "x$rewritten_target" = x; then
19528      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19529      echo Target stays the same $rewritten_target
19530    else
19531      echo Rewriting target for builddeps into $rewritten_target
19532    fi
19533    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19534    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19535  fi
19536  for ac_prog in 7z unzip
19537do
19538  # Extract the first word of "$ac_prog", so it can be a program name with args.
19539set dummy $ac_prog; ac_word=$2
19540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19541$as_echo_n "checking for $ac_word... " >&6; }
19542if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19543  $as_echo_n "(cached) " >&6
19544else
19545  if test -n "$BDEPS_UNZIP"; then
19546  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19547else
19548as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19549for as_dir in $PATH
19550do
19551  IFS=$as_save_IFS
19552  test -z "$as_dir" && as_dir=.
19553    for ac_exec_ext in '' $ac_executable_extensions; do
19554  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19555    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
19556    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19557    break 2
19558  fi
19559done
19560  done
19561IFS=$as_save_IFS
19562
19563fi
19564fi
19565BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
19566if test -n "$BDEPS_UNZIP"; then
19567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
19568$as_echo "$BDEPS_UNZIP" >&6; }
19569else
19570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19571$as_echo "no" >&6; }
19572fi
19573
19574
19575  test -n "$BDEPS_UNZIP" && break
19576done
19577
19578  if test "x$BDEPS_UNZIP" = x7z; then
19579    BDEPS_UNZIP="7z x"
19580  fi
19581
19582  for ac_prog in wget lftp ftp
19583do
19584  # Extract the first word of "$ac_prog", so it can be a program name with args.
19585set dummy $ac_prog; ac_word=$2
19586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19587$as_echo_n "checking for $ac_word... " >&6; }
19588if ${ac_cv_prog_BDEPS_FTP+:} false; then :
19589  $as_echo_n "(cached) " >&6
19590else
19591  if test -n "$BDEPS_FTP"; then
19592  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
19593else
19594as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19595for as_dir in $PATH
19596do
19597  IFS=$as_save_IFS
19598  test -z "$as_dir" && as_dir=.
19599    for ac_exec_ext in '' $ac_executable_extensions; do
19600  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19601    ac_cv_prog_BDEPS_FTP="$ac_prog"
19602    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19603    break 2
19604  fi
19605done
19606  done
19607IFS=$as_save_IFS
19608
19609fi
19610fi
19611BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
19612if test -n "$BDEPS_FTP"; then
19613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
19614$as_echo "$BDEPS_FTP" >&6; }
19615else
19616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19617$as_echo "no" >&6; }
19618fi
19619
19620
19621  test -n "$BDEPS_FTP" && break
19622done
19623
19624
19625
19626###############################################################################
19627#
19628# Determine OpenJDK variants, options and version numbers.
19629#
19630###############################################################################
19631
19632# We need build & target for this.
19633
19634
19635  ###############################################################################
19636  #
19637  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
19638  # We always build headless support.
19639  #
19640  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
19641$as_echo_n "checking headful support... " >&6; }
19642  # Check whether --enable-headful was given.
19643if test "${enable_headful+set}" = set; then :
19644  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
19645else
19646  SUPPORT_HEADFUL=yes
19647fi
19648
19649
19650  SUPPORT_HEADLESS=yes
19651  BUILD_HEADLESS="BUILD_HEADLESS:=true"
19652
19653  if test "x$SUPPORT_HEADFUL" = xyes; then
19654    # We are building both headful and headless.
19655    headful_msg="include support for both headful and headless"
19656  fi
19657
19658  if test "x$SUPPORT_HEADFUL" = xno; then
19659    # Thus we are building headless only.
19660    BUILD_HEADLESS="BUILD_HEADLESS:=true"
19661    headful_msg="headless only"
19662  fi
19663
19664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
19665$as_echo "$headful_msg" >&6; }
19666
19667
19668
19669
19670
19671  # Control wether Hotspot runs Queens test after build.
19672  # Check whether --enable-hotspot-test-in-build was given.
19673if test "${enable_hotspot_test_in_build+set}" = set; then :
19674  enableval=$enable_hotspot_test_in_build;
19675else
19676  enable_hotspot_test_in_build=no
19677fi
19678
19679  if test "x$enable_hotspot_test_in_build" = "xyes"; then
19680    TEST_IN_BUILD=true
19681  else
19682    TEST_IN_BUILD=false
19683  fi
19684
19685
19686  ###############################################################################
19687  #
19688  # Choose cacerts source file
19689  #
19690
19691# Check whether --with-cacerts-file was given.
19692if test "${with_cacerts_file+set}" = set; then :
19693  withval=$with_cacerts_file;
19694fi
19695
19696  if test "x$with_cacerts_file" != x; then
19697    CACERTS_FILE=$with_cacerts_file
19698  else
19699    CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
19700  fi
19701
19702
19703  ###############################################################################
19704  #
19705  # Enable or disable unlimited crypto
19706  #
19707  # Check whether --enable-unlimited-crypto was given.
19708if test "${enable_unlimited_crypto+set}" = set; then :
19709  enableval=$enable_unlimited_crypto;
19710else
19711  enable_unlimited_crypto=no
19712fi
19713
19714  if test "x$enable_unlimited_crypto" = "xyes"; then
19715    UNLIMITED_CRYPTO=true
19716  else
19717    UNLIMITED_CRYPTO=false
19718  fi
19719
19720
19721  ###############################################################################
19722  #
19723  # Enable or disable the elliptic curve crypto implementation
19724  #
19725
19726
19727  ###############################################################################
19728  #
19729  # --enable-rmiconnector-iiop
19730  #
19731  # Check whether --enable-rmiconnector-iiop was given.
19732if test "${enable_rmiconnector_iiop+set}" = set; then :
19733  enableval=$enable_rmiconnector_iiop;
19734fi
19735
19736  if test "x$enable_rmiconnector_iiop" = "xyes"; then
19737    RMICONNECTOR_IIOP=true
19738  else
19739    RMICONNECTOR_IIOP=false
19740  fi
19741
19742
19743  ###############################################################################
19744  #
19745  # Compress jars
19746  #
19747  COMPRESS_JARS=false
19748
19749
19750
19751
19752  # Source the version numbers
19753  . $AUTOCONF_DIR/version-numbers
19754
19755  # Get the settings from parameters
19756
19757# Check whether --with-milestone was given.
19758if test "${with_milestone+set}" = set; then :
19759  withval=$with_milestone;
19760fi
19761
19762  if test "x$with_milestone" = xyes; then
19763    as_fn_error $? "Milestone must have a value" "$LINENO" 5
19764  elif test "x$with_milestone" != x; then
19765    MILESTONE="$with_milestone"
19766  fi
19767  if test "x$MILESTONE" = x; then
19768    MILESTONE=internal
19769  fi
19770
19771
19772# Check whether --with-update-version was given.
19773if test "${with_update_version+set}" = set; then :
19774  withval=$with_update_version;
19775fi
19776
19777  if test "x$with_update_version" = xyes; then
19778    as_fn_error $? "Update version must have a value" "$LINENO" 5
19779  elif test "x$with_update_version" != x; then
19780    JDK_UPDATE_VERSION="$with_update_version"
19781    # On macosx 10.7, it's not possible to set --with-update-version=0X due
19782    # to a bug in expr (which reduces it to just X). To work around this, we
19783    # always add a 0 to one digit update versions.
19784    if test "${#JDK_UPDATE_VERSION}" = "1"; then
19785      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
19786    fi
19787  fi
19788
19789
19790# Check whether --with-user-release-suffix was given.
19791if test "${with_user_release_suffix+set}" = set; then :
19792  withval=$with_user_release_suffix;
19793fi
19794
19795  if test "x$with_user_release_suffix" = xyes; then
19796    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
19797  elif test "x$with_user_release_suffix" != x; then
19798    USER_RELEASE_SUFFIX="$with_user_release_suffix"
19799  fi
19800
19801
19802# Check whether --with-build-number was given.
19803if test "${with_build_number+set}" = set; then :
19804  withval=$with_build_number;
19805fi
19806
19807  if test "x$with_build_number" = xyes; then
19808    as_fn_error $? "Build number must have a value" "$LINENO" 5
19809  elif test "x$with_build_number" != x; then
19810    JDK_BUILD_NUMBER="$with_build_number"
19811  fi
19812  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
19813  if test "x$JDK_BUILD_NUMBER" = x; then
19814    JDK_BUILD_NUMBER=b00
19815    if test "x$USER_RELEASE_SUFFIX" = x; then
19816      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
19817      # Avoid [:alnum:] since it depends on the locale.
19818      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
19819      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19820    fi
19821  fi
19822
19823  # Now set the JDK version, milestone, build number etc.
19824
19825
19826
19827
19828
19829
19830
19831
19832
19833
19834
19835
19836
19837
19838
19839  COPYRIGHT_YEAR=`date +'%Y'`
19840
19841
19842  if test "x$JDK_UPDATE_VERSION" != x; then
19843    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
19844  else
19845    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
19846  fi
19847
19848
19849  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
19850
19851
19852
19853###############################################################################
19854#
19855# Setup BootJDK, used to bootstrap the build.
19856#
19857###############################################################################
19858
19859
19860  BOOT_JDK_FOUND=no
19861
19862# Check whether --with-boot-jdk was given.
19863if test "${with_boot_jdk+set}" = set; then :
19864  withval=$with_boot_jdk;
19865fi
19866
19867
19868  # We look for the Boot JDK through various means, going from more certain to
19869  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
19870  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
19871  # must check if this is indeed valid; otherwise we'll continue looking.
19872
19873  # Test: Is bootjdk explicitely set by command line arguments?
19874
19875  if test "x$BOOT_JDK_FOUND" = xno; then
19876    # Now execute the test
19877
19878  if test "x$with_boot_jdk" != x; then
19879    BOOT_JDK=$with_boot_jdk
19880    BOOT_JDK_FOUND=maybe
19881    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
19882$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
19883  fi
19884
19885
19886    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
19887    if test "x$BOOT_JDK_FOUND" = xmaybe; then
19888      # Do we have a bin/java?
19889      if test ! -x "$BOOT_JDK/bin/java"; then
19890        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
19891$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
19892        BOOT_JDK_FOUND=no
19893      else
19894        # Do we have a bin/javac?
19895        if test ! -x "$BOOT_JDK/bin/javac"; then
19896          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
19897$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
19898          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
19899$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
19900          BOOT_JDK_FOUND=no
19901        else
19902          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
19903          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
19904            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
19905$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
19906            BOOT_JDK_FOUND=no
19907          else
19908            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
19909            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
19910
19911            # Extra M4 quote needed to protect [] in grep expression.
19912            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
19913            if test "x$FOUND_CORRECT_VERSION" = x; then
19914              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
19915$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
19916              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
19917$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
19918              BOOT_JDK_FOUND=no
19919            else
19920              # We're done! :-)
19921              BOOT_JDK_FOUND=yes
19922
19923  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19924
19925  # Input might be given as Windows format, start by converting to
19926  # unix format.
19927  path="$BOOT_JDK"
19928  new_path=`$CYGPATH -u "$path"`
19929
19930  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19931  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19932  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19933  # "foo.exe" is OK but "foo" is an error.
19934  #
19935  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19936  # It is also a way to make sure we got the proper file name for the real test later on.
19937  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19938  if test "x$test_shortpath" = x; then
19939    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
19940$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
19941    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
19942  fi
19943
19944  # Call helper function which possibly converts this using DOS-style short mode.
19945  # If so, the updated path is stored in $new_path.
19946
19947  input_path="$new_path"
19948  # Check if we need to convert this using DOS-style short mode. If the path
19949  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19950  # take no chances and rewrite it.
19951  # Note: m4 eats our [], so we need to use [ and ] instead.
19952  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19953  if test "x$has_forbidden_chars" != x; then
19954    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19955    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19956    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19957    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19958      # Going to short mode and back again did indeed matter. Since short mode is
19959      # case insensitive, let's make it lowercase to improve readability.
19960      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19961      # Now convert it back to Unix-stile (cygpath)
19962      input_path=`$CYGPATH -u "$shortmode_path"`
19963      new_path="$input_path"
19964    fi
19965  fi
19966
19967  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19968  if test "x$test_cygdrive_prefix" = x; then
19969    # As a simple fix, exclude /usr/bin since it's not a real path.
19970    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
19971      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19972      # a path prefixed by /cygdrive for fixpath to work.
19973      new_path="$CYGWIN_ROOT_PATH$input_path"
19974    fi
19975  fi
19976
19977
19978  if test "x$path" != "x$new_path"; then
19979    BOOT_JDK="$new_path"
19980    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
19981$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
19982  fi
19983
19984  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19985
19986  path="$BOOT_JDK"
19987  has_colon=`$ECHO $path | $GREP ^.:`
19988  new_path="$path"
19989  if test "x$has_colon" = x; then
19990    # Not in mixed or Windows style, start by that.
19991    new_path=`cmd //c echo $path`
19992  fi
19993
19994
19995  input_path="$new_path"
19996  # Check if we need to convert this using DOS-style short mode. If the path
19997  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19998  # take no chances and rewrite it.
19999  # Note: m4 eats our [], so we need to use [ and ] instead.
20000  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20001  if test "x$has_forbidden_chars" != x; then
20002    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20003    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20004  fi
20005
20006
20007  windows_path="$new_path"
20008  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20009    unix_path=`$CYGPATH -u "$windows_path"`
20010    new_path="$unix_path"
20011  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20012    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20013    new_path="$unix_path"
20014  fi
20015
20016  if test "x$path" != "x$new_path"; then
20017    BOOT_JDK="$new_path"
20018    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20019$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20020  fi
20021
20022  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20023  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20024
20025  else
20026    # We're on a posix platform. Hooray! :)
20027    path="$BOOT_JDK"
20028    has_space=`$ECHO "$path" | $GREP " "`
20029    if test "x$has_space" != x; then
20030      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20031$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20032      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20033    fi
20034
20035    # Use eval to expand a potential ~
20036    eval path="$path"
20037    if test ! -f "$path" && test ! -d "$path"; then
20038      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20039    fi
20040
20041    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20042  fi
20043
20044              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20045$as_echo_n "checking for Boot JDK... " >&6; }
20046              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20047$as_echo "$BOOT_JDK" >&6; }
20048              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20049$as_echo_n "checking Boot JDK version... " >&6; }
20050              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20051              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20052$as_echo "$BOOT_JDK_VERSION" >&6; }
20053            fi # end check jdk version
20054          fi # end check rt.jar
20055        fi # end check javac
20056      fi # end check java
20057    fi # end check boot jdk found
20058  fi
20059
20060  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
20061    # Having specified an argument which is incorrect will produce an instant failure;
20062    # we should not go on looking
20063    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
20064  fi
20065
20066  # Test: Is bootjdk available from builddeps?
20067
20068  if test "x$BOOT_JDK_FOUND" = xno; then
20069    # Now execute the test
20070
20071
20072
20073  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
20074    # Source the builddeps file again, to make sure it uses the latest variables!
20075    . $builddepsfile
20076    # Look for a target and build machine specific resource!
20077    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
20078    if test "x$resource" = x; then
20079      # Ok, lets instead look for a target specific resource
20080      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
20081    fi
20082    if test "x$resource" = x; then
20083      # Ok, lets instead look for a build specific resource
20084      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
20085    fi
20086    if test "x$resource" = x; then
20087      # Ok, lets instead look for a generic resource
20088      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
20089      resource=${builddep_bootjdk}
20090    fi
20091    if test "x$resource" != x; then
20092      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
20093$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
20094      # If the resource in the builddeps.conf file is an existing directory,
20095      # for example /java/linux/cups
20096      if test -d ${resource}; then
20097        depdir=${resource}
20098      else
20099
20100  # bootjdk is for example mymodule
20101  # $resource is for example libs/general/libmymod_1_2_3.zip
20102  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
20103  # $with_builddeps_dir is for example /localhome/builddeps
20104  # depdir is the name of the variable into which we store the depdir, eg MYMOD
20105  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
20106  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
20107  filename=`basename $resource`
20108  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
20109  filebase=${filename%%.*}
20110  extension=${filename#*.}
20111  installdir=$with_builddeps_dir/$filebase
20112  if test ! -f $installdir/$filename.unpacked; then
20113    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
20114$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
20115    if test ! -d $installdir; then
20116      mkdir -p $installdir
20117    fi
20118    if test ! -d $installdir; then
20119      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
20120    fi
20121    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
20122    touch $tmpfile
20123    if test ! -f $tmpfile; then
20124      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
20125    fi
20126
20127  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
20128  # $tmpfile is the local file name for the downloaded file.
20129  VALID_TOOL=no
20130  if test "x$BDEPS_FTP" = xwget; then
20131    VALID_TOOL=yes
20132    wget -O $tmpfile $with_builddeps_server/$resource
20133  fi
20134  if test "x$BDEPS_FTP" = xlftp; then
20135    VALID_TOOL=yes
20136    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
20137  fi
20138  if test "x$BDEPS_FTP" = xftp; then
20139    VALID_TOOL=yes
20140    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
20141    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
20142    FTPUSERPWD=${FTPSERVER%%@*}
20143    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
20144      FTPUSER=${userpwd%%:*}
20145      FTPPWD=${userpwd#*@}
20146      FTPSERVER=${FTPSERVER#*@}
20147    else
20148      FTPUSER=ftp
20149      FTPPWD=ftp
20150    fi
20151    # the "pass" command does not work on some
20152    # ftp clients (read ftp.exe) but if it works,
20153    # passive mode is better!
20154    ( \
20155        echo "user $FTPUSER $FTPPWD"        ; \
20156        echo "pass"                         ; \
20157        echo "bin"                          ; \
20158        echo "get $FTPPATH $tmpfile"              ; \
20159    ) | ftp -in $FTPSERVER
20160  fi
20161  if test "x$VALID_TOOL" != xyes; then
20162    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
20163  fi
20164
20165    mv $tmpfile $installdir/$filename
20166    if test ! -s $installdir/$filename; then
20167      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
20168    fi
20169    case "$extension" in
20170      zip)  echo "Unzipping $installdir/$filename..."
20171        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
20172        ;;
20173      tar.gz) echo "Untaring $installdir/$filename..."
20174        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20175        ;;
20176      tgz) echo "Untaring $installdir/$filename..."
20177        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20178        ;;
20179      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
20180        ;;
20181    esac
20182  fi
20183  if test -f $installdir/$filename.unpacked; then
20184    depdir=$installdir
20185  fi
20186
20187      fi
20188      # Source the builddeps file again, because in the previous command, the depdir
20189      # was updated to point at the current build dependency install directory.
20190      . $builddepsfile
20191      # Now extract variables from the builddeps.conf files.
20192      theroot=${builddep_bootjdk_ROOT}
20193      thecflags=${builddep_bootjdk_CFLAGS}
20194      thelibs=${builddep_bootjdk_LIBS}
20195      if test "x$depdir" = x; then
20196        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
20197      fi
20198      BOOT_JDK=$depdir
20199      if test "x$theroot" != x; then
20200        BOOT_JDK="$theroot"
20201      fi
20202      if test "x$thecflags" != x; then
20203        BOOT_JDK_CFLAGS="$thecflags"
20204      fi
20205      if test "x$thelibs" != x; then
20206        BOOT_JDK_LIBS="$thelibs"
20207      fi
20208      BOOT_JDK_FOUND=maybe
20209      else BOOT_JDK_FOUND=no
20210
20211    fi
20212    else BOOT_JDK_FOUND=no
20213
20214  fi
20215
20216
20217
20218    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20219    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20220      # Do we have a bin/java?
20221      if test ! -x "$BOOT_JDK/bin/java"; then
20222        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20223$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20224        BOOT_JDK_FOUND=no
20225      else
20226        # Do we have a bin/javac?
20227        if test ! -x "$BOOT_JDK/bin/javac"; then
20228          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20229$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20230          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20231$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20232          BOOT_JDK_FOUND=no
20233        else
20234          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20235          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20236            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20237$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20238            BOOT_JDK_FOUND=no
20239          else
20240            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20241            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20242
20243            # Extra M4 quote needed to protect [] in grep expression.
20244            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20245            if test "x$FOUND_CORRECT_VERSION" = x; then
20246              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20247$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20248              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20249$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20250              BOOT_JDK_FOUND=no
20251            else
20252              # We're done! :-)
20253              BOOT_JDK_FOUND=yes
20254
20255  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20256
20257  # Input might be given as Windows format, start by converting to
20258  # unix format.
20259  path="$BOOT_JDK"
20260  new_path=`$CYGPATH -u "$path"`
20261
20262  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20263  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20264  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20265  # "foo.exe" is OK but "foo" is an error.
20266  #
20267  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20268  # It is also a way to make sure we got the proper file name for the real test later on.
20269  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20270  if test "x$test_shortpath" = x; then
20271    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20272$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20273    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20274  fi
20275
20276  # Call helper function which possibly converts this using DOS-style short mode.
20277  # If so, the updated path is stored in $new_path.
20278
20279  input_path="$new_path"
20280  # Check if we need to convert this using DOS-style short mode. If the path
20281  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20282  # take no chances and rewrite it.
20283  # Note: m4 eats our [], so we need to use [ and ] instead.
20284  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20285  if test "x$has_forbidden_chars" != x; then
20286    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20287    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20288    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20289    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20290      # Going to short mode and back again did indeed matter. Since short mode is
20291      # case insensitive, let's make it lowercase to improve readability.
20292      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20293      # Now convert it back to Unix-stile (cygpath)
20294      input_path=`$CYGPATH -u "$shortmode_path"`
20295      new_path="$input_path"
20296    fi
20297  fi
20298
20299  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20300  if test "x$test_cygdrive_prefix" = x; then
20301    # As a simple fix, exclude /usr/bin since it's not a real path.
20302    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20303      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20304      # a path prefixed by /cygdrive for fixpath to work.
20305      new_path="$CYGWIN_ROOT_PATH$input_path"
20306    fi
20307  fi
20308
20309
20310  if test "x$path" != "x$new_path"; then
20311    BOOT_JDK="$new_path"
20312    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20313$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20314  fi
20315
20316  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20317
20318  path="$BOOT_JDK"
20319  has_colon=`$ECHO $path | $GREP ^.:`
20320  new_path="$path"
20321  if test "x$has_colon" = x; then
20322    # Not in mixed or Windows style, start by that.
20323    new_path=`cmd //c echo $path`
20324  fi
20325
20326
20327  input_path="$new_path"
20328  # Check if we need to convert this using DOS-style short mode. If the path
20329  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20330  # take no chances and rewrite it.
20331  # Note: m4 eats our [], so we need to use [ and ] instead.
20332  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20333  if test "x$has_forbidden_chars" != x; then
20334    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20335    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20336  fi
20337
20338
20339  windows_path="$new_path"
20340  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20341    unix_path=`$CYGPATH -u "$windows_path"`
20342    new_path="$unix_path"
20343  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20344    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20345    new_path="$unix_path"
20346  fi
20347
20348  if test "x$path" != "x$new_path"; then
20349    BOOT_JDK="$new_path"
20350    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20351$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20352  fi
20353
20354  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20355  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20356
20357  else
20358    # We're on a posix platform. Hooray! :)
20359    path="$BOOT_JDK"
20360    has_space=`$ECHO "$path" | $GREP " "`
20361    if test "x$has_space" != x; then
20362      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20363$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20364      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20365    fi
20366
20367    # Use eval to expand a potential ~
20368    eval path="$path"
20369    if test ! -f "$path" && test ! -d "$path"; then
20370      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20371    fi
20372
20373    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20374  fi
20375
20376              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20377$as_echo_n "checking for Boot JDK... " >&6; }
20378              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20379$as_echo "$BOOT_JDK" >&6; }
20380              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20381$as_echo_n "checking Boot JDK version... " >&6; }
20382              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20383              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20384$as_echo "$BOOT_JDK_VERSION" >&6; }
20385            fi # end check jdk version
20386          fi # end check rt.jar
20387        fi # end check javac
20388      fi # end check java
20389    fi # end check boot jdk found
20390  fi
20391
20392
20393  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
20394
20395  if test "x$BOOT_JDK_FOUND" = xno; then
20396    # Now execute the test
20397
20398  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20399    # First check at user selected default
20400
20401  if test "x$BOOT_JDK_FOUND" = xno; then
20402    # Now execute the test
20403
20404  if test -x /usr/libexec/java_home; then
20405    BOOT_JDK=`/usr/libexec/java_home `
20406    BOOT_JDK_FOUND=maybe
20407    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
20408$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
20409  fi
20410
20411
20412    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20413    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20414      # Do we have a bin/java?
20415      if test ! -x "$BOOT_JDK/bin/java"; then
20416        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20417$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20418        BOOT_JDK_FOUND=no
20419      else
20420        # Do we have a bin/javac?
20421        if test ! -x "$BOOT_JDK/bin/javac"; then
20422          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20423$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20424          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20425$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20426          BOOT_JDK_FOUND=no
20427        else
20428          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20429          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20430            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20431$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20432            BOOT_JDK_FOUND=no
20433          else
20434            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20435            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20436
20437            # Extra M4 quote needed to protect [] in grep expression.
20438            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20439            if test "x$FOUND_CORRECT_VERSION" = x; then
20440              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20441$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20442              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20443$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20444              BOOT_JDK_FOUND=no
20445            else
20446              # We're done! :-)
20447              BOOT_JDK_FOUND=yes
20448
20449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20450
20451  # Input might be given as Windows format, start by converting to
20452  # unix format.
20453  path="$BOOT_JDK"
20454  new_path=`$CYGPATH -u "$path"`
20455
20456  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20457  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20458  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20459  # "foo.exe" is OK but "foo" is an error.
20460  #
20461  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20462  # It is also a way to make sure we got the proper file name for the real test later on.
20463  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20464  if test "x$test_shortpath" = x; then
20465    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20466$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20467    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20468  fi
20469
20470  # Call helper function which possibly converts this using DOS-style short mode.
20471  # If so, the updated path is stored in $new_path.
20472
20473  input_path="$new_path"
20474  # Check if we need to convert this using DOS-style short mode. If the path
20475  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20476  # take no chances and rewrite it.
20477  # Note: m4 eats our [], so we need to use [ and ] instead.
20478  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20479  if test "x$has_forbidden_chars" != x; then
20480    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20481    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20482    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20483    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20484      # Going to short mode and back again did indeed matter. Since short mode is
20485      # case insensitive, let's make it lowercase to improve readability.
20486      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20487      # Now convert it back to Unix-stile (cygpath)
20488      input_path=`$CYGPATH -u "$shortmode_path"`
20489      new_path="$input_path"
20490    fi
20491  fi
20492
20493  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20494  if test "x$test_cygdrive_prefix" = x; then
20495    # As a simple fix, exclude /usr/bin since it's not a real path.
20496    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20497      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20498      # a path prefixed by /cygdrive for fixpath to work.
20499      new_path="$CYGWIN_ROOT_PATH$input_path"
20500    fi
20501  fi
20502
20503
20504  if test "x$path" != "x$new_path"; then
20505    BOOT_JDK="$new_path"
20506    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20507$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20508  fi
20509
20510  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20511
20512  path="$BOOT_JDK"
20513  has_colon=`$ECHO $path | $GREP ^.:`
20514  new_path="$path"
20515  if test "x$has_colon" = x; then
20516    # Not in mixed or Windows style, start by that.
20517    new_path=`cmd //c echo $path`
20518  fi
20519
20520
20521  input_path="$new_path"
20522  # Check if we need to convert this using DOS-style short mode. If the path
20523  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20524  # take no chances and rewrite it.
20525  # Note: m4 eats our [], so we need to use [ and ] instead.
20526  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20527  if test "x$has_forbidden_chars" != x; then
20528    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20529    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20530  fi
20531
20532
20533  windows_path="$new_path"
20534  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20535    unix_path=`$CYGPATH -u "$windows_path"`
20536    new_path="$unix_path"
20537  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20538    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20539    new_path="$unix_path"
20540  fi
20541
20542  if test "x$path" != "x$new_path"; then
20543    BOOT_JDK="$new_path"
20544    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20545$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20546  fi
20547
20548  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20549  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20550
20551  else
20552    # We're on a posix platform. Hooray! :)
20553    path="$BOOT_JDK"
20554    has_space=`$ECHO "$path" | $GREP " "`
20555    if test "x$has_space" != x; then
20556      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20557$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20558      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20559    fi
20560
20561    # Use eval to expand a potential ~
20562    eval path="$path"
20563    if test ! -f "$path" && test ! -d "$path"; then
20564      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20565    fi
20566
20567    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20568  fi
20569
20570              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20571$as_echo_n "checking for Boot JDK... " >&6; }
20572              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20573$as_echo "$BOOT_JDK" >&6; }
20574              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20575$as_echo_n "checking Boot JDK version... " >&6; }
20576              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20577              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20578$as_echo "$BOOT_JDK_VERSION" >&6; }
20579            fi # end check jdk version
20580          fi # end check rt.jar
20581        fi # end check javac
20582      fi # end check java
20583    fi # end check boot jdk found
20584  fi
20585
20586    # If that did not work out (e.g. too old), try explicit versions instead
20587
20588  if test "x$BOOT_JDK_FOUND" = xno; then
20589    # Now execute the test
20590
20591  if test -x /usr/libexec/java_home; then
20592    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
20593    BOOT_JDK_FOUND=maybe
20594    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
20595$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
20596  fi
20597
20598
20599    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20600    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20601      # Do we have a bin/java?
20602      if test ! -x "$BOOT_JDK/bin/java"; then
20603        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20604$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20605        BOOT_JDK_FOUND=no
20606      else
20607        # Do we have a bin/javac?
20608        if test ! -x "$BOOT_JDK/bin/javac"; then
20609          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20610$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20611          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20612$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20613          BOOT_JDK_FOUND=no
20614        else
20615          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20616          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20617            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20618$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20619            BOOT_JDK_FOUND=no
20620          else
20621            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20622            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20623
20624            # Extra M4 quote needed to protect [] in grep expression.
20625            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20626            if test "x$FOUND_CORRECT_VERSION" = x; then
20627              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20628$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20629              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20630$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20631              BOOT_JDK_FOUND=no
20632            else
20633              # We're done! :-)
20634              BOOT_JDK_FOUND=yes
20635
20636  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20637
20638  # Input might be given as Windows format, start by converting to
20639  # unix format.
20640  path="$BOOT_JDK"
20641  new_path=`$CYGPATH -u "$path"`
20642
20643  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20644  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20645  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20646  # "foo.exe" is OK but "foo" is an error.
20647  #
20648  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20649  # It is also a way to make sure we got the proper file name for the real test later on.
20650  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20651  if test "x$test_shortpath" = x; then
20652    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20653$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20654    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20655  fi
20656
20657  # Call helper function which possibly converts this using DOS-style short mode.
20658  # If so, the updated path is stored in $new_path.
20659
20660  input_path="$new_path"
20661  # Check if we need to convert this using DOS-style short mode. If the path
20662  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20663  # take no chances and rewrite it.
20664  # Note: m4 eats our [], so we need to use [ and ] instead.
20665  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20666  if test "x$has_forbidden_chars" != x; then
20667    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20668    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20669    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20670    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20671      # Going to short mode and back again did indeed matter. Since short mode is
20672      # case insensitive, let's make it lowercase to improve readability.
20673      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20674      # Now convert it back to Unix-stile (cygpath)
20675      input_path=`$CYGPATH -u "$shortmode_path"`
20676      new_path="$input_path"
20677    fi
20678  fi
20679
20680  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20681  if test "x$test_cygdrive_prefix" = x; then
20682    # As a simple fix, exclude /usr/bin since it's not a real path.
20683    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20684      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20685      # a path prefixed by /cygdrive for fixpath to work.
20686      new_path="$CYGWIN_ROOT_PATH$input_path"
20687    fi
20688  fi
20689
20690
20691  if test "x$path" != "x$new_path"; then
20692    BOOT_JDK="$new_path"
20693    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20694$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20695  fi
20696
20697  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20698
20699  path="$BOOT_JDK"
20700  has_colon=`$ECHO $path | $GREP ^.:`
20701  new_path="$path"
20702  if test "x$has_colon" = x; then
20703    # Not in mixed or Windows style, start by that.
20704    new_path=`cmd //c echo $path`
20705  fi
20706
20707
20708  input_path="$new_path"
20709  # Check if we need to convert this using DOS-style short mode. If the path
20710  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20711  # take no chances and rewrite it.
20712  # Note: m4 eats our [], so we need to use [ and ] instead.
20713  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20714  if test "x$has_forbidden_chars" != x; then
20715    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20716    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20717  fi
20718
20719
20720  windows_path="$new_path"
20721  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20722    unix_path=`$CYGPATH -u "$windows_path"`
20723    new_path="$unix_path"
20724  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20725    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20726    new_path="$unix_path"
20727  fi
20728
20729  if test "x$path" != "x$new_path"; then
20730    BOOT_JDK="$new_path"
20731    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20732$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20733  fi
20734
20735  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20736  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20737
20738  else
20739    # We're on a posix platform. Hooray! :)
20740    path="$BOOT_JDK"
20741    has_space=`$ECHO "$path" | $GREP " "`
20742    if test "x$has_space" != x; then
20743      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20744$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20745      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20746    fi
20747
20748    # Use eval to expand a potential ~
20749    eval path="$path"
20750    if test ! -f "$path" && test ! -d "$path"; then
20751      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20752    fi
20753
20754    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20755  fi
20756
20757              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20758$as_echo_n "checking for Boot JDK... " >&6; }
20759              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20760$as_echo "$BOOT_JDK" >&6; }
20761              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20762$as_echo_n "checking Boot JDK version... " >&6; }
20763              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20764              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20765$as_echo "$BOOT_JDK_VERSION" >&6; }
20766            fi # end check jdk version
20767          fi # end check rt.jar
20768        fi # end check javac
20769      fi # end check java
20770    fi # end check boot jdk found
20771  fi
20772
20773
20774  if test "x$BOOT_JDK_FOUND" = xno; then
20775    # Now execute the test
20776
20777  if test -x /usr/libexec/java_home; then
20778    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
20779    BOOT_JDK_FOUND=maybe
20780    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
20781$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
20782  fi
20783
20784
20785    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20786    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20787      # Do we have a bin/java?
20788      if test ! -x "$BOOT_JDK/bin/java"; then
20789        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20790$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20791        BOOT_JDK_FOUND=no
20792      else
20793        # Do we have a bin/javac?
20794        if test ! -x "$BOOT_JDK/bin/javac"; then
20795          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20796$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20797          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20798$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20799          BOOT_JDK_FOUND=no
20800        else
20801          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20802          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20803            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20804$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20805            BOOT_JDK_FOUND=no
20806          else
20807            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20808            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20809
20810            # Extra M4 quote needed to protect [] in grep expression.
20811            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20812            if test "x$FOUND_CORRECT_VERSION" = x; then
20813              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20814$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20815              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20816$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20817              BOOT_JDK_FOUND=no
20818            else
20819              # We're done! :-)
20820              BOOT_JDK_FOUND=yes
20821
20822  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20823
20824  # Input might be given as Windows format, start by converting to
20825  # unix format.
20826  path="$BOOT_JDK"
20827  new_path=`$CYGPATH -u "$path"`
20828
20829  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20830  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20831  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20832  # "foo.exe" is OK but "foo" is an error.
20833  #
20834  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20835  # It is also a way to make sure we got the proper file name for the real test later on.
20836  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20837  if test "x$test_shortpath" = x; then
20838    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20839$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20840    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20841  fi
20842
20843  # Call helper function which possibly converts this using DOS-style short mode.
20844  # If so, the updated path is stored in $new_path.
20845
20846  input_path="$new_path"
20847  # Check if we need to convert this using DOS-style short mode. If the path
20848  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20849  # take no chances and rewrite it.
20850  # Note: m4 eats our [], so we need to use [ and ] instead.
20851  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20852  if test "x$has_forbidden_chars" != x; then
20853    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20854    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20855    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20856    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20857      # Going to short mode and back again did indeed matter. Since short mode is
20858      # case insensitive, let's make it lowercase to improve readability.
20859      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20860      # Now convert it back to Unix-stile (cygpath)
20861      input_path=`$CYGPATH -u "$shortmode_path"`
20862      new_path="$input_path"
20863    fi
20864  fi
20865
20866  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20867  if test "x$test_cygdrive_prefix" = x; then
20868    # As a simple fix, exclude /usr/bin since it's not a real path.
20869    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20870      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20871      # a path prefixed by /cygdrive for fixpath to work.
20872      new_path="$CYGWIN_ROOT_PATH$input_path"
20873    fi
20874  fi
20875
20876
20877  if test "x$path" != "x$new_path"; then
20878    BOOT_JDK="$new_path"
20879    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20880$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20881  fi
20882
20883  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20884
20885  path="$BOOT_JDK"
20886  has_colon=`$ECHO $path | $GREP ^.:`
20887  new_path="$path"
20888  if test "x$has_colon" = x; then
20889    # Not in mixed or Windows style, start by that.
20890    new_path=`cmd //c echo $path`
20891  fi
20892
20893
20894  input_path="$new_path"
20895  # Check if we need to convert this using DOS-style short mode. If the path
20896  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20897  # take no chances and rewrite it.
20898  # Note: m4 eats our [], so we need to use [ and ] instead.
20899  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20900  if test "x$has_forbidden_chars" != x; then
20901    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20902    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20903  fi
20904
20905
20906  windows_path="$new_path"
20907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20908    unix_path=`$CYGPATH -u "$windows_path"`
20909    new_path="$unix_path"
20910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20911    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20912    new_path="$unix_path"
20913  fi
20914
20915  if test "x$path" != "x$new_path"; then
20916    BOOT_JDK="$new_path"
20917    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20918$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20919  fi
20920
20921  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20922  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20923
20924  else
20925    # We're on a posix platform. Hooray! :)
20926    path="$BOOT_JDK"
20927    has_space=`$ECHO "$path" | $GREP " "`
20928    if test "x$has_space" != x; then
20929      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20930$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20931      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20932    fi
20933
20934    # Use eval to expand a potential ~
20935    eval path="$path"
20936    if test ! -f "$path" && test ! -d "$path"; then
20937      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20938    fi
20939
20940    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20941  fi
20942
20943              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20944$as_echo_n "checking for Boot JDK... " >&6; }
20945              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20946$as_echo "$BOOT_JDK" >&6; }
20947              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20948$as_echo_n "checking Boot JDK version... " >&6; }
20949              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20950              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20951$as_echo "$BOOT_JDK_VERSION" >&6; }
20952            fi # end check jdk version
20953          fi # end check rt.jar
20954        fi # end check javac
20955      fi # end check java
20956    fi # end check boot jdk found
20957  fi
20958
20959
20960  if test "x$BOOT_JDK_FOUND" = xno; then
20961    # Now execute the test
20962
20963  if test -x /usr/libexec/java_home; then
20964    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
20965    BOOT_JDK_FOUND=maybe
20966    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
20967$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
20968  fi
20969
20970
20971    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20972    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20973      # Do we have a bin/java?
20974      if test ! -x "$BOOT_JDK/bin/java"; then
20975        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20976$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20977        BOOT_JDK_FOUND=no
20978      else
20979        # Do we have a bin/javac?
20980        if test ! -x "$BOOT_JDK/bin/javac"; then
20981          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20982$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20983          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20984$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20985          BOOT_JDK_FOUND=no
20986        else
20987          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20988          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20989            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20990$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20991            BOOT_JDK_FOUND=no
20992          else
20993            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20994            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20995
20996            # Extra M4 quote needed to protect [] in grep expression.
20997            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20998            if test "x$FOUND_CORRECT_VERSION" = x; then
20999              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21000$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21001              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21002$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21003              BOOT_JDK_FOUND=no
21004            else
21005              # We're done! :-)
21006              BOOT_JDK_FOUND=yes
21007
21008  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21009
21010  # Input might be given as Windows format, start by converting to
21011  # unix format.
21012  path="$BOOT_JDK"
21013  new_path=`$CYGPATH -u "$path"`
21014
21015  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21016  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21017  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21018  # "foo.exe" is OK but "foo" is an error.
21019  #
21020  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21021  # It is also a way to make sure we got the proper file name for the real test later on.
21022  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21023  if test "x$test_shortpath" = x; then
21024    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21025$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21026    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21027  fi
21028
21029  # Call helper function which possibly converts this using DOS-style short mode.
21030  # If so, the updated path is stored in $new_path.
21031
21032  input_path="$new_path"
21033  # Check if we need to convert this using DOS-style short mode. If the path
21034  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21035  # take no chances and rewrite it.
21036  # Note: m4 eats our [], so we need to use [ and ] instead.
21037  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21038  if test "x$has_forbidden_chars" != x; then
21039    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21040    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21041    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21042    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21043      # Going to short mode and back again did indeed matter. Since short mode is
21044      # case insensitive, let's make it lowercase to improve readability.
21045      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21046      # Now convert it back to Unix-stile (cygpath)
21047      input_path=`$CYGPATH -u "$shortmode_path"`
21048      new_path="$input_path"
21049    fi
21050  fi
21051
21052  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21053  if test "x$test_cygdrive_prefix" = x; then
21054    # As a simple fix, exclude /usr/bin since it's not a real path.
21055    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21056      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21057      # a path prefixed by /cygdrive for fixpath to work.
21058      new_path="$CYGWIN_ROOT_PATH$input_path"
21059    fi
21060  fi
21061
21062
21063  if test "x$path" != "x$new_path"; then
21064    BOOT_JDK="$new_path"
21065    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21066$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21067  fi
21068
21069  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21070
21071  path="$BOOT_JDK"
21072  has_colon=`$ECHO $path | $GREP ^.:`
21073  new_path="$path"
21074  if test "x$has_colon" = x; then
21075    # Not in mixed or Windows style, start by that.
21076    new_path=`cmd //c echo $path`
21077  fi
21078
21079
21080  input_path="$new_path"
21081  # Check if we need to convert this using DOS-style short mode. If the path
21082  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21083  # take no chances and rewrite it.
21084  # Note: m4 eats our [], so we need to use [ and ] instead.
21085  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21086  if test "x$has_forbidden_chars" != x; then
21087    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21088    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21089  fi
21090
21091
21092  windows_path="$new_path"
21093  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21094    unix_path=`$CYGPATH -u "$windows_path"`
21095    new_path="$unix_path"
21096  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21097    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21098    new_path="$unix_path"
21099  fi
21100
21101  if test "x$path" != "x$new_path"; then
21102    BOOT_JDK="$new_path"
21103    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21104$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21105  fi
21106
21107  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21108  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21109
21110  else
21111    # We're on a posix platform. Hooray! :)
21112    path="$BOOT_JDK"
21113    has_space=`$ECHO "$path" | $GREP " "`
21114    if test "x$has_space" != x; then
21115      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21116$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21117      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21118    fi
21119
21120    # Use eval to expand a potential ~
21121    eval path="$path"
21122    if test ! -f "$path" && test ! -d "$path"; then
21123      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21124    fi
21125
21126    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21127  fi
21128
21129              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21130$as_echo_n "checking for Boot JDK... " >&6; }
21131              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21132$as_echo "$BOOT_JDK" >&6; }
21133              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21134$as_echo_n "checking Boot JDK version... " >&6; }
21135              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21136              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21137$as_echo "$BOOT_JDK_VERSION" >&6; }
21138            fi # end check jdk version
21139          fi # end check rt.jar
21140        fi # end check javac
21141      fi # end check java
21142    fi # end check boot jdk found
21143  fi
21144
21145  fi
21146
21147
21148    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21149    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21150      # Do we have a bin/java?
21151      if test ! -x "$BOOT_JDK/bin/java"; then
21152        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21153$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21154        BOOT_JDK_FOUND=no
21155      else
21156        # Do we have a bin/javac?
21157        if test ! -x "$BOOT_JDK/bin/javac"; then
21158          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21159$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21160          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21161$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21162          BOOT_JDK_FOUND=no
21163        else
21164          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21165          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21166            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21167$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21168            BOOT_JDK_FOUND=no
21169          else
21170            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21171            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21172
21173            # Extra M4 quote needed to protect [] in grep expression.
21174            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21175            if test "x$FOUND_CORRECT_VERSION" = x; then
21176              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21177$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21178              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21179$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21180              BOOT_JDK_FOUND=no
21181            else
21182              # We're done! :-)
21183              BOOT_JDK_FOUND=yes
21184
21185  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21186
21187  # Input might be given as Windows format, start by converting to
21188  # unix format.
21189  path="$BOOT_JDK"
21190  new_path=`$CYGPATH -u "$path"`
21191
21192  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21193  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21194  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21195  # "foo.exe" is OK but "foo" is an error.
21196  #
21197  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21198  # It is also a way to make sure we got the proper file name for the real test later on.
21199  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21200  if test "x$test_shortpath" = x; then
21201    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21202$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21203    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21204  fi
21205
21206  # Call helper function which possibly converts this using DOS-style short mode.
21207  # If so, the updated path is stored in $new_path.
21208
21209  input_path="$new_path"
21210  # Check if we need to convert this using DOS-style short mode. If the path
21211  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21212  # take no chances and rewrite it.
21213  # Note: m4 eats our [], so we need to use [ and ] instead.
21214  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21215  if test "x$has_forbidden_chars" != x; then
21216    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21217    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21218    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21219    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21220      # Going to short mode and back again did indeed matter. Since short mode is
21221      # case insensitive, let's make it lowercase to improve readability.
21222      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21223      # Now convert it back to Unix-stile (cygpath)
21224      input_path=`$CYGPATH -u "$shortmode_path"`
21225      new_path="$input_path"
21226    fi
21227  fi
21228
21229  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21230  if test "x$test_cygdrive_prefix" = x; then
21231    # As a simple fix, exclude /usr/bin since it's not a real path.
21232    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21233      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21234      # a path prefixed by /cygdrive for fixpath to work.
21235      new_path="$CYGWIN_ROOT_PATH$input_path"
21236    fi
21237  fi
21238
21239
21240  if test "x$path" != "x$new_path"; then
21241    BOOT_JDK="$new_path"
21242    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21243$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21244  fi
21245
21246  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21247
21248  path="$BOOT_JDK"
21249  has_colon=`$ECHO $path | $GREP ^.:`
21250  new_path="$path"
21251  if test "x$has_colon" = x; then
21252    # Not in mixed or Windows style, start by that.
21253    new_path=`cmd //c echo $path`
21254  fi
21255
21256
21257  input_path="$new_path"
21258  # Check if we need to convert this using DOS-style short mode. If the path
21259  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21260  # take no chances and rewrite it.
21261  # Note: m4 eats our [], so we need to use [ and ] instead.
21262  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21263  if test "x$has_forbidden_chars" != x; then
21264    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21265    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21266  fi
21267
21268
21269  windows_path="$new_path"
21270  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21271    unix_path=`$CYGPATH -u "$windows_path"`
21272    new_path="$unix_path"
21273  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21274    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21275    new_path="$unix_path"
21276  fi
21277
21278  if test "x$path" != "x$new_path"; then
21279    BOOT_JDK="$new_path"
21280    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21281$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21282  fi
21283
21284  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21285  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21286
21287  else
21288    # We're on a posix platform. Hooray! :)
21289    path="$BOOT_JDK"
21290    has_space=`$ECHO "$path" | $GREP " "`
21291    if test "x$has_space" != x; then
21292      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21293$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21294      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21295    fi
21296
21297    # Use eval to expand a potential ~
21298    eval path="$path"
21299    if test ! -f "$path" && test ! -d "$path"; then
21300      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21301    fi
21302
21303    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21304  fi
21305
21306              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21307$as_echo_n "checking for Boot JDK... " >&6; }
21308              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21309$as_echo "$BOOT_JDK" >&6; }
21310              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21311$as_echo_n "checking Boot JDK version... " >&6; }
21312              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21313              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21314$as_echo "$BOOT_JDK_VERSION" >&6; }
21315            fi # end check jdk version
21316          fi # end check rt.jar
21317        fi # end check javac
21318      fi # end check java
21319    fi # end check boot jdk found
21320  fi
21321
21322
21323  # Test: Is $JAVA_HOME set?
21324
21325  if test "x$BOOT_JDK_FOUND" = xno; then
21326    # Now execute the test
21327
21328  if test "x$JAVA_HOME" != x; then
21329    JAVA_HOME_PROCESSED="$JAVA_HOME"
21330
21331  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21332
21333  # Input might be given as Windows format, start by converting to
21334  # unix format.
21335  path="$JAVA_HOME_PROCESSED"
21336  new_path=`$CYGPATH -u "$path"`
21337
21338  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21339  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21340  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21341  # "foo.exe" is OK but "foo" is an error.
21342  #
21343  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21344  # It is also a way to make sure we got the proper file name for the real test later on.
21345  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21346  if test "x$test_shortpath" = x; then
21347    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21348$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21349    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
21350  fi
21351
21352  # Call helper function which possibly converts this using DOS-style short mode.
21353  # If so, the updated path is stored in $new_path.
21354
21355  input_path="$new_path"
21356  # Check if we need to convert this using DOS-style short mode. If the path
21357  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21358  # take no chances and rewrite it.
21359  # Note: m4 eats our [], so we need to use [ and ] instead.
21360  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21361  if test "x$has_forbidden_chars" != x; then
21362    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21363    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21364    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21365    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21366      # Going to short mode and back again did indeed matter. Since short mode is
21367      # case insensitive, let's make it lowercase to improve readability.
21368      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21369      # Now convert it back to Unix-stile (cygpath)
21370      input_path=`$CYGPATH -u "$shortmode_path"`
21371      new_path="$input_path"
21372    fi
21373  fi
21374
21375  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21376  if test "x$test_cygdrive_prefix" = x; then
21377    # As a simple fix, exclude /usr/bin since it's not a real path.
21378    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21379      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21380      # a path prefixed by /cygdrive for fixpath to work.
21381      new_path="$CYGWIN_ROOT_PATH$input_path"
21382    fi
21383  fi
21384
21385
21386  if test "x$path" != "x$new_path"; then
21387    JAVA_HOME_PROCESSED="$new_path"
21388    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21389$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21390  fi
21391
21392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21393
21394  path="$JAVA_HOME_PROCESSED"
21395  has_colon=`$ECHO $path | $GREP ^.:`
21396  new_path="$path"
21397  if test "x$has_colon" = x; then
21398    # Not in mixed or Windows style, start by that.
21399    new_path=`cmd //c echo $path`
21400  fi
21401
21402
21403  input_path="$new_path"
21404  # Check if we need to convert this using DOS-style short mode. If the path
21405  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21406  # take no chances and rewrite it.
21407  # Note: m4 eats our [], so we need to use [ and ] instead.
21408  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21409  if test "x$has_forbidden_chars" != x; then
21410    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21411    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21412  fi
21413
21414
21415  windows_path="$new_path"
21416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21417    unix_path=`$CYGPATH -u "$windows_path"`
21418    new_path="$unix_path"
21419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21420    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21421    new_path="$unix_path"
21422  fi
21423
21424  if test "x$path" != "x$new_path"; then
21425    JAVA_HOME_PROCESSED="$new_path"
21426    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21427$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21428  fi
21429
21430  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21431  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21432
21433  else
21434    # We're on a posix platform. Hooray! :)
21435    path="$JAVA_HOME_PROCESSED"
21436    has_space=`$ECHO "$path" | $GREP " "`
21437    if test "x$has_space" != x; then
21438      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21439$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21440      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21441    fi
21442
21443    # Use eval to expand a potential ~
21444    eval path="$path"
21445    if test ! -f "$path" && test ! -d "$path"; then
21446      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
21447    fi
21448
21449    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
21450  fi
21451
21452    if test ! -d "$JAVA_HOME_PROCESSED"; then
21453      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
21454$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
21455    else
21456      # Aha, the user has set a JAVA_HOME
21457      # let us use that as the Boot JDK.
21458      BOOT_JDK="$JAVA_HOME_PROCESSED"
21459      BOOT_JDK_FOUND=maybe
21460      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
21461$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
21462    fi
21463  fi
21464
21465
21466    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21467    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21468      # Do we have a bin/java?
21469      if test ! -x "$BOOT_JDK/bin/java"; then
21470        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21471$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21472        BOOT_JDK_FOUND=no
21473      else
21474        # Do we have a bin/javac?
21475        if test ! -x "$BOOT_JDK/bin/javac"; then
21476          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21477$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21478          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21479$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21480          BOOT_JDK_FOUND=no
21481        else
21482          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21483          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21484            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21485$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21486            BOOT_JDK_FOUND=no
21487          else
21488            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21489            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21490
21491            # Extra M4 quote needed to protect [] in grep expression.
21492            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21493            if test "x$FOUND_CORRECT_VERSION" = x; then
21494              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21495$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21496              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21497$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21498              BOOT_JDK_FOUND=no
21499            else
21500              # We're done! :-)
21501              BOOT_JDK_FOUND=yes
21502
21503  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21504
21505  # Input might be given as Windows format, start by converting to
21506  # unix format.
21507  path="$BOOT_JDK"
21508  new_path=`$CYGPATH -u "$path"`
21509
21510  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21511  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21512  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21513  # "foo.exe" is OK but "foo" is an error.
21514  #
21515  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21516  # It is also a way to make sure we got the proper file name for the real test later on.
21517  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21518  if test "x$test_shortpath" = x; then
21519    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21520$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21521    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21522  fi
21523
21524  # Call helper function which possibly converts this using DOS-style short mode.
21525  # If so, the updated path is stored in $new_path.
21526
21527  input_path="$new_path"
21528  # Check if we need to convert this using DOS-style short mode. If the path
21529  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21530  # take no chances and rewrite it.
21531  # Note: m4 eats our [], so we need to use [ and ] instead.
21532  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21533  if test "x$has_forbidden_chars" != x; then
21534    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21535    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21536    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21537    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21538      # Going to short mode and back again did indeed matter. Since short mode is
21539      # case insensitive, let's make it lowercase to improve readability.
21540      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21541      # Now convert it back to Unix-stile (cygpath)
21542      input_path=`$CYGPATH -u "$shortmode_path"`
21543      new_path="$input_path"
21544    fi
21545  fi
21546
21547  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21548  if test "x$test_cygdrive_prefix" = x; then
21549    # As a simple fix, exclude /usr/bin since it's not a real path.
21550    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21551      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21552      # a path prefixed by /cygdrive for fixpath to work.
21553      new_path="$CYGWIN_ROOT_PATH$input_path"
21554    fi
21555  fi
21556
21557
21558  if test "x$path" != "x$new_path"; then
21559    BOOT_JDK="$new_path"
21560    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21561$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21562  fi
21563
21564  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21565
21566  path="$BOOT_JDK"
21567  has_colon=`$ECHO $path | $GREP ^.:`
21568  new_path="$path"
21569  if test "x$has_colon" = x; then
21570    # Not in mixed or Windows style, start by that.
21571    new_path=`cmd //c echo $path`
21572  fi
21573
21574
21575  input_path="$new_path"
21576  # Check if we need to convert this using DOS-style short mode. If the path
21577  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21578  # take no chances and rewrite it.
21579  # Note: m4 eats our [], so we need to use [ and ] instead.
21580  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21581  if test "x$has_forbidden_chars" != x; then
21582    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21583    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21584  fi
21585
21586
21587  windows_path="$new_path"
21588  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21589    unix_path=`$CYGPATH -u "$windows_path"`
21590    new_path="$unix_path"
21591  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21592    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21593    new_path="$unix_path"
21594  fi
21595
21596  if test "x$path" != "x$new_path"; then
21597    BOOT_JDK="$new_path"
21598    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21599$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21600  fi
21601
21602  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21603  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21604
21605  else
21606    # We're on a posix platform. Hooray! :)
21607    path="$BOOT_JDK"
21608    has_space=`$ECHO "$path" | $GREP " "`
21609    if test "x$has_space" != x; then
21610      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21611$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21612      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21613    fi
21614
21615    # Use eval to expand a potential ~
21616    eval path="$path"
21617    if test ! -f "$path" && test ! -d "$path"; then
21618      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21619    fi
21620
21621    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21622  fi
21623
21624              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21625$as_echo_n "checking for Boot JDK... " >&6; }
21626              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21627$as_echo "$BOOT_JDK" >&6; }
21628              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21629$as_echo_n "checking Boot JDK version... " >&6; }
21630              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21631              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21632$as_echo "$BOOT_JDK_VERSION" >&6; }
21633            fi # end check jdk version
21634          fi # end check rt.jar
21635        fi # end check javac
21636      fi # end check java
21637    fi # end check boot jdk found
21638  fi
21639
21640
21641  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
21642
21643  if test "x$BOOT_JDK_FOUND" = xno; then
21644    # Now execute the test
21645
21646  # Extract the first word of "javac", so it can be a program name with args.
21647set dummy javac; ac_word=$2
21648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21649$as_echo_n "checking for $ac_word... " >&6; }
21650if ${ac_cv_path_JAVAC_CHECK+:} false; then :
21651  $as_echo_n "(cached) " >&6
21652else
21653  case $JAVAC_CHECK in
21654  [\\/]* | ?:[\\/]*)
21655  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
21656  ;;
21657  *)
21658  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21659for as_dir in $PATH
21660do
21661  IFS=$as_save_IFS
21662  test -z "$as_dir" && as_dir=.
21663    for ac_exec_ext in '' $ac_executable_extensions; do
21664  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21665    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
21666    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21667    break 2
21668  fi
21669done
21670  done
21671IFS=$as_save_IFS
21672
21673  ;;
21674esac
21675fi
21676JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
21677if test -n "$JAVAC_CHECK"; then
21678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
21679$as_echo "$JAVAC_CHECK" >&6; }
21680else
21681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21682$as_echo "no" >&6; }
21683fi
21684
21685
21686  # Extract the first word of "java", so it can be a program name with args.
21687set dummy java; ac_word=$2
21688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21689$as_echo_n "checking for $ac_word... " >&6; }
21690if ${ac_cv_path_JAVA_CHECK+:} false; then :
21691  $as_echo_n "(cached) " >&6
21692else
21693  case $JAVA_CHECK in
21694  [\\/]* | ?:[\\/]*)
21695  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
21696  ;;
21697  *)
21698  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21699for as_dir in $PATH
21700do
21701  IFS=$as_save_IFS
21702  test -z "$as_dir" && as_dir=.
21703    for ac_exec_ext in '' $ac_executable_extensions; do
21704  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21705    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
21706    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21707    break 2
21708  fi
21709done
21710  done
21711IFS=$as_save_IFS
21712
21713  ;;
21714esac
21715fi
21716JAVA_CHECK=$ac_cv_path_JAVA_CHECK
21717if test -n "$JAVA_CHECK"; then
21718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
21719$as_echo "$JAVA_CHECK" >&6; }
21720else
21721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21722$as_echo "no" >&6; }
21723fi
21724
21725
21726  BINARY="$JAVAC_CHECK"
21727  if test "x$JAVAC_CHECK" = x; then
21728    BINARY="$JAVA_CHECK"
21729  fi
21730  if test "x$BINARY" != x; then
21731    # So there is a java(c) binary, it might be part of a JDK.
21732    # Lets find the JDK/JRE directory by following symbolic links.
21733    # Linux/GNU systems often have links from /usr/bin/java to
21734    # /etc/alternatives/java to the real JDK binary.
21735
21736  if test "x$OPENJDK_BUILD_OS" != xwindows; then
21737    # Follow a chain of symbolic links. Use readlink
21738    # where it exists, else fall back to horribly
21739    # complicated shell code.
21740    if test "x$READLINK_TESTED" != yes; then
21741      # On MacOSX there is a readlink tool with a different
21742      # purpose than the GNU readlink tool. Check the found readlink.
21743      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21744      if test "x$ISGNU" = x; then
21745        # A readlink that we do not know how to use.
21746        # Are there other non-GNU readlinks out there?
21747        READLINK_TESTED=yes
21748        READLINK=
21749      fi
21750    fi
21751
21752    if test "x$READLINK" != x; then
21753      BINARY=`$READLINK -f $BINARY`
21754    else
21755      # Save the current directory for restoring afterwards
21756      STARTDIR=$PWD
21757      COUNTER=0
21758      sym_link_dir=`$DIRNAME $BINARY`
21759      sym_link_file=`$BASENAME $BINARY`
21760      cd $sym_link_dir
21761      # Use -P flag to resolve symlinks in directories.
21762      cd `$THEPWDCMD -P`
21763      sym_link_dir=`$THEPWDCMD -P`
21764      # Resolve file symlinks
21765      while test $COUNTER -lt 20; do
21766        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21767        if test "x$ISLINK" == x; then
21768          # This is not a symbolic link! We are done!
21769          break
21770        fi
21771        # Again resolve directory symlinks since the target of the just found
21772        # link could be in a different directory
21773        cd `$DIRNAME $ISLINK`
21774        sym_link_dir=`$THEPWDCMD -P`
21775        sym_link_file=`$BASENAME $ISLINK`
21776        let COUNTER=COUNTER+1
21777      done
21778      cd $STARTDIR
21779      BINARY=$sym_link_dir/$sym_link_file
21780    fi
21781  fi
21782
21783    BOOT_JDK=`dirname "$BINARY"`
21784    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
21785    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
21786      # Looks like we found ourselves an JDK
21787      BOOT_JDK_FOUND=maybe
21788      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
21789$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
21790    fi
21791  fi
21792
21793
21794    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21795    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21796      # Do we have a bin/java?
21797      if test ! -x "$BOOT_JDK/bin/java"; then
21798        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21799$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21800        BOOT_JDK_FOUND=no
21801      else
21802        # Do we have a bin/javac?
21803        if test ! -x "$BOOT_JDK/bin/javac"; then
21804          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21805$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21806          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21807$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21808          BOOT_JDK_FOUND=no
21809        else
21810          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21811          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21812            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21813$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21814            BOOT_JDK_FOUND=no
21815          else
21816            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21817            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21818
21819            # Extra M4 quote needed to protect [] in grep expression.
21820            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21821            if test "x$FOUND_CORRECT_VERSION" = x; then
21822              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21823$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21824              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21825$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21826              BOOT_JDK_FOUND=no
21827            else
21828              # We're done! :-)
21829              BOOT_JDK_FOUND=yes
21830
21831  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21832
21833  # Input might be given as Windows format, start by converting to
21834  # unix format.
21835  path="$BOOT_JDK"
21836  new_path=`$CYGPATH -u "$path"`
21837
21838  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21839  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21840  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21841  # "foo.exe" is OK but "foo" is an error.
21842  #
21843  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21844  # It is also a way to make sure we got the proper file name for the real test later on.
21845  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21846  if test "x$test_shortpath" = x; then
21847    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21848$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21849    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21850  fi
21851
21852  # Call helper function which possibly converts this using DOS-style short mode.
21853  # If so, the updated path is stored in $new_path.
21854
21855  input_path="$new_path"
21856  # Check if we need to convert this using DOS-style short mode. If the path
21857  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21858  # take no chances and rewrite it.
21859  # Note: m4 eats our [], so we need to use [ and ] instead.
21860  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21861  if test "x$has_forbidden_chars" != x; then
21862    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21863    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21864    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21865    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21866      # Going to short mode and back again did indeed matter. Since short mode is
21867      # case insensitive, let's make it lowercase to improve readability.
21868      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21869      # Now convert it back to Unix-stile (cygpath)
21870      input_path=`$CYGPATH -u "$shortmode_path"`
21871      new_path="$input_path"
21872    fi
21873  fi
21874
21875  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21876  if test "x$test_cygdrive_prefix" = x; then
21877    # As a simple fix, exclude /usr/bin since it's not a real path.
21878    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21879      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21880      # a path prefixed by /cygdrive for fixpath to work.
21881      new_path="$CYGWIN_ROOT_PATH$input_path"
21882    fi
21883  fi
21884
21885
21886  if test "x$path" != "x$new_path"; then
21887    BOOT_JDK="$new_path"
21888    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21889$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21890  fi
21891
21892  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21893
21894  path="$BOOT_JDK"
21895  has_colon=`$ECHO $path | $GREP ^.:`
21896  new_path="$path"
21897  if test "x$has_colon" = x; then
21898    # Not in mixed or Windows style, start by that.
21899    new_path=`cmd //c echo $path`
21900  fi
21901
21902
21903  input_path="$new_path"
21904  # Check if we need to convert this using DOS-style short mode. If the path
21905  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21906  # take no chances and rewrite it.
21907  # Note: m4 eats our [], so we need to use [ and ] instead.
21908  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21909  if test "x$has_forbidden_chars" != x; then
21910    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21911    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21912  fi
21913
21914
21915  windows_path="$new_path"
21916  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21917    unix_path=`$CYGPATH -u "$windows_path"`
21918    new_path="$unix_path"
21919  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21920    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21921    new_path="$unix_path"
21922  fi
21923
21924  if test "x$path" != "x$new_path"; then
21925    BOOT_JDK="$new_path"
21926    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21927$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21928  fi
21929
21930  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21931  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21932
21933  else
21934    # We're on a posix platform. Hooray! :)
21935    path="$BOOT_JDK"
21936    has_space=`$ECHO "$path" | $GREP " "`
21937    if test "x$has_space" != x; then
21938      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21939$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21940      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21941    fi
21942
21943    # Use eval to expand a potential ~
21944    eval path="$path"
21945    if test ! -f "$path" && test ! -d "$path"; then
21946      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21947    fi
21948
21949    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21950  fi
21951
21952              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21953$as_echo_n "checking for Boot JDK... " >&6; }
21954              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21955$as_echo "$BOOT_JDK" >&6; }
21956              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21957$as_echo_n "checking Boot JDK version... " >&6; }
21958              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21959              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21960$as_echo "$BOOT_JDK_VERSION" >&6; }
21961            fi # end check jdk version
21962          fi # end check rt.jar
21963        fi # end check javac
21964      fi # end check java
21965    fi # end check boot jdk found
21966  fi
21967
21968
21969  # Test: Is there a JDK installed in default, well-known locations?
21970
21971  if test "x$BOOT_JDK_FOUND" = xno; then
21972    # Now execute the test
21973
21974  if test "x$OPENJDK_TARGET_OS" = xwindows; then
21975
21976  if test "x$BOOT_JDK_FOUND" = xno; then
21977    # Now execute the test
21978
21979  if test "x$ProgramW6432" != x; then
21980    VIRTUAL_DIR="$ProgramW6432/Java"
21981
21982  windows_path="$VIRTUAL_DIR"
21983  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21984    unix_path=`$CYGPATH -u "$windows_path"`
21985    VIRTUAL_DIR="$unix_path"
21986  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21987    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21988    VIRTUAL_DIR="$unix_path"
21989  fi
21990
21991
21992  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
21993  BOOT_JDK_SUFFIX=""
21994  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
21995  if test "x$ALL_JDKS_FOUND" != x; then
21996    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
21997
21998  if test "x$BOOT_JDK_FOUND" = xno; then
21999    # Now execute the test
22000
22001        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22002        if test -d "$BOOT_JDK"; then
22003          BOOT_JDK_FOUND=maybe
22004          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22005$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22006        fi
22007
22008
22009    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22010    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22011      # Do we have a bin/java?
22012      if test ! -x "$BOOT_JDK/bin/java"; then
22013        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22014$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22015        BOOT_JDK_FOUND=no
22016      else
22017        # Do we have a bin/javac?
22018        if test ! -x "$BOOT_JDK/bin/javac"; then
22019          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22020$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22021          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22022$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22023          BOOT_JDK_FOUND=no
22024        else
22025          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22026          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22027            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22028$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22029            BOOT_JDK_FOUND=no
22030          else
22031            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22032            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22033
22034            # Extra M4 quote needed to protect [] in grep expression.
22035            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22036            if test "x$FOUND_CORRECT_VERSION" = x; then
22037              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22038$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22039              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22040$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22041              BOOT_JDK_FOUND=no
22042            else
22043              # We're done! :-)
22044              BOOT_JDK_FOUND=yes
22045
22046  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22047
22048  # Input might be given as Windows format, start by converting to
22049  # unix format.
22050  path="$BOOT_JDK"
22051  new_path=`$CYGPATH -u "$path"`
22052
22053  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22054  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22055  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22056  # "foo.exe" is OK but "foo" is an error.
22057  #
22058  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22059  # It is also a way to make sure we got the proper file name for the real test later on.
22060  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22061  if test "x$test_shortpath" = x; then
22062    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22063$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22064    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22065  fi
22066
22067  # Call helper function which possibly converts this using DOS-style short mode.
22068  # If so, the updated path is stored in $new_path.
22069
22070  input_path="$new_path"
22071  # Check if we need to convert this using DOS-style short mode. If the path
22072  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22073  # take no chances and rewrite it.
22074  # Note: m4 eats our [], so we need to use [ and ] instead.
22075  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22076  if test "x$has_forbidden_chars" != x; then
22077    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22078    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22079    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22080    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22081      # Going to short mode and back again did indeed matter. Since short mode is
22082      # case insensitive, let's make it lowercase to improve readability.
22083      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22084      # Now convert it back to Unix-stile (cygpath)
22085      input_path=`$CYGPATH -u "$shortmode_path"`
22086      new_path="$input_path"
22087    fi
22088  fi
22089
22090  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22091  if test "x$test_cygdrive_prefix" = x; then
22092    # As a simple fix, exclude /usr/bin since it's not a real path.
22093    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22094      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22095      # a path prefixed by /cygdrive for fixpath to work.
22096      new_path="$CYGWIN_ROOT_PATH$input_path"
22097    fi
22098  fi
22099
22100
22101  if test "x$path" != "x$new_path"; then
22102    BOOT_JDK="$new_path"
22103    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22104$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22105  fi
22106
22107  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22108
22109  path="$BOOT_JDK"
22110  has_colon=`$ECHO $path | $GREP ^.:`
22111  new_path="$path"
22112  if test "x$has_colon" = x; then
22113    # Not in mixed or Windows style, start by that.
22114    new_path=`cmd //c echo $path`
22115  fi
22116
22117
22118  input_path="$new_path"
22119  # Check if we need to convert this using DOS-style short mode. If the path
22120  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22121  # take no chances and rewrite it.
22122  # Note: m4 eats our [], so we need to use [ and ] instead.
22123  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22124  if test "x$has_forbidden_chars" != x; then
22125    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22126    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22127  fi
22128
22129
22130  windows_path="$new_path"
22131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22132    unix_path=`$CYGPATH -u "$windows_path"`
22133    new_path="$unix_path"
22134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22135    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22136    new_path="$unix_path"
22137  fi
22138
22139  if test "x$path" != "x$new_path"; then
22140    BOOT_JDK="$new_path"
22141    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22142$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22143  fi
22144
22145  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22146  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22147
22148  else
22149    # We're on a posix platform. Hooray! :)
22150    path="$BOOT_JDK"
22151    has_space=`$ECHO "$path" | $GREP " "`
22152    if test "x$has_space" != x; then
22153      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22154$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22155      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22156    fi
22157
22158    # Use eval to expand a potential ~
22159    eval path="$path"
22160    if test ! -f "$path" && test ! -d "$path"; then
22161      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22162    fi
22163
22164    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22165  fi
22166
22167              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22168$as_echo_n "checking for Boot JDK... " >&6; }
22169              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22170$as_echo "$BOOT_JDK" >&6; }
22171              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22172$as_echo_n "checking Boot JDK version... " >&6; }
22173              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22174              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22175$as_echo "$BOOT_JDK_VERSION" >&6; }
22176            fi # end check jdk version
22177          fi # end check rt.jar
22178        fi # end check javac
22179      fi # end check java
22180    fi # end check boot jdk found
22181  fi
22182
22183    done
22184  fi
22185
22186  fi
22187
22188
22189    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22190    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22191      # Do we have a bin/java?
22192      if test ! -x "$BOOT_JDK/bin/java"; then
22193        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22194$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22195        BOOT_JDK_FOUND=no
22196      else
22197        # Do we have a bin/javac?
22198        if test ! -x "$BOOT_JDK/bin/javac"; then
22199          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22200$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22201          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22202$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22203          BOOT_JDK_FOUND=no
22204        else
22205          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22206          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22207            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22208$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22209            BOOT_JDK_FOUND=no
22210          else
22211            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22212            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22213
22214            # Extra M4 quote needed to protect [] in grep expression.
22215            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22216            if test "x$FOUND_CORRECT_VERSION" = x; then
22217              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22218$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22219              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22220$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22221              BOOT_JDK_FOUND=no
22222            else
22223              # We're done! :-)
22224              BOOT_JDK_FOUND=yes
22225
22226  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22227
22228  # Input might be given as Windows format, start by converting to
22229  # unix format.
22230  path="$BOOT_JDK"
22231  new_path=`$CYGPATH -u "$path"`
22232
22233  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22234  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22235  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22236  # "foo.exe" is OK but "foo" is an error.
22237  #
22238  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22239  # It is also a way to make sure we got the proper file name for the real test later on.
22240  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22241  if test "x$test_shortpath" = x; then
22242    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22243$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22244    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22245  fi
22246
22247  # Call helper function which possibly converts this using DOS-style short mode.
22248  # If so, the updated path is stored in $new_path.
22249
22250  input_path="$new_path"
22251  # Check if we need to convert this using DOS-style short mode. If the path
22252  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22253  # take no chances and rewrite it.
22254  # Note: m4 eats our [], so we need to use [ and ] instead.
22255  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22256  if test "x$has_forbidden_chars" != x; then
22257    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22258    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22259    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22260    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22261      # Going to short mode and back again did indeed matter. Since short mode is
22262      # case insensitive, let's make it lowercase to improve readability.
22263      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22264      # Now convert it back to Unix-stile (cygpath)
22265      input_path=`$CYGPATH -u "$shortmode_path"`
22266      new_path="$input_path"
22267    fi
22268  fi
22269
22270  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22271  if test "x$test_cygdrive_prefix" = x; then
22272    # As a simple fix, exclude /usr/bin since it's not a real path.
22273    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22274      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22275      # a path prefixed by /cygdrive for fixpath to work.
22276      new_path="$CYGWIN_ROOT_PATH$input_path"
22277    fi
22278  fi
22279
22280
22281  if test "x$path" != "x$new_path"; then
22282    BOOT_JDK="$new_path"
22283    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22284$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22285  fi
22286
22287  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22288
22289  path="$BOOT_JDK"
22290  has_colon=`$ECHO $path | $GREP ^.:`
22291  new_path="$path"
22292  if test "x$has_colon" = x; then
22293    # Not in mixed or Windows style, start by that.
22294    new_path=`cmd //c echo $path`
22295  fi
22296
22297
22298  input_path="$new_path"
22299  # Check if we need to convert this using DOS-style short mode. If the path
22300  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22301  # take no chances and rewrite it.
22302  # Note: m4 eats our [], so we need to use [ and ] instead.
22303  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22304  if test "x$has_forbidden_chars" != x; then
22305    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22306    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22307  fi
22308
22309
22310  windows_path="$new_path"
22311  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22312    unix_path=`$CYGPATH -u "$windows_path"`
22313    new_path="$unix_path"
22314  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22315    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22316    new_path="$unix_path"
22317  fi
22318
22319  if test "x$path" != "x$new_path"; then
22320    BOOT_JDK="$new_path"
22321    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22322$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22323  fi
22324
22325  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22326  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22327
22328  else
22329    # We're on a posix platform. Hooray! :)
22330    path="$BOOT_JDK"
22331    has_space=`$ECHO "$path" | $GREP " "`
22332    if test "x$has_space" != x; then
22333      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22334$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22335      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22336    fi
22337
22338    # Use eval to expand a potential ~
22339    eval path="$path"
22340    if test ! -f "$path" && test ! -d "$path"; then
22341      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22342    fi
22343
22344    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22345  fi
22346
22347              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22348$as_echo_n "checking for Boot JDK... " >&6; }
22349              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22350$as_echo "$BOOT_JDK" >&6; }
22351              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22352$as_echo_n "checking Boot JDK version... " >&6; }
22353              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22354              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22355$as_echo "$BOOT_JDK_VERSION" >&6; }
22356            fi # end check jdk version
22357          fi # end check rt.jar
22358        fi # end check javac
22359      fi # end check java
22360    fi # end check boot jdk found
22361  fi
22362
22363
22364  if test "x$BOOT_JDK_FOUND" = xno; then
22365    # Now execute the test
22366
22367  if test "x$PROGRAMW6432" != x; then
22368    VIRTUAL_DIR="$PROGRAMW6432/Java"
22369
22370  windows_path="$VIRTUAL_DIR"
22371  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22372    unix_path=`$CYGPATH -u "$windows_path"`
22373    VIRTUAL_DIR="$unix_path"
22374  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22375    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22376    VIRTUAL_DIR="$unix_path"
22377  fi
22378
22379
22380  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22381  BOOT_JDK_SUFFIX=""
22382  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22383  if test "x$ALL_JDKS_FOUND" != x; then
22384    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22385
22386  if test "x$BOOT_JDK_FOUND" = xno; then
22387    # Now execute the test
22388
22389        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22390        if test -d "$BOOT_JDK"; then
22391          BOOT_JDK_FOUND=maybe
22392          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22393$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22394        fi
22395
22396
22397    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22398    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22399      # Do we have a bin/java?
22400      if test ! -x "$BOOT_JDK/bin/java"; then
22401        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22402$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22403        BOOT_JDK_FOUND=no
22404      else
22405        # Do we have a bin/javac?
22406        if test ! -x "$BOOT_JDK/bin/javac"; then
22407          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22408$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22409          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22410$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22411          BOOT_JDK_FOUND=no
22412        else
22413          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22414          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22415            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22416$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22417            BOOT_JDK_FOUND=no
22418          else
22419            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22420            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22421
22422            # Extra M4 quote needed to protect [] in grep expression.
22423            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22424            if test "x$FOUND_CORRECT_VERSION" = x; then
22425              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22426$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22427              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22428$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22429              BOOT_JDK_FOUND=no
22430            else
22431              # We're done! :-)
22432              BOOT_JDK_FOUND=yes
22433
22434  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22435
22436  # Input might be given as Windows format, start by converting to
22437  # unix format.
22438  path="$BOOT_JDK"
22439  new_path=`$CYGPATH -u "$path"`
22440
22441  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22442  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22443  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22444  # "foo.exe" is OK but "foo" is an error.
22445  #
22446  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22447  # It is also a way to make sure we got the proper file name for the real test later on.
22448  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22449  if test "x$test_shortpath" = x; then
22450    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22451$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22452    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22453  fi
22454
22455  # Call helper function which possibly converts this using DOS-style short mode.
22456  # If so, the updated path is stored in $new_path.
22457
22458  input_path="$new_path"
22459  # Check if we need to convert this using DOS-style short mode. If the path
22460  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22461  # take no chances and rewrite it.
22462  # Note: m4 eats our [], so we need to use [ and ] instead.
22463  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22464  if test "x$has_forbidden_chars" != x; then
22465    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22466    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22467    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22468    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22469      # Going to short mode and back again did indeed matter. Since short mode is
22470      # case insensitive, let's make it lowercase to improve readability.
22471      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22472      # Now convert it back to Unix-stile (cygpath)
22473      input_path=`$CYGPATH -u "$shortmode_path"`
22474      new_path="$input_path"
22475    fi
22476  fi
22477
22478  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22479  if test "x$test_cygdrive_prefix" = x; then
22480    # As a simple fix, exclude /usr/bin since it's not a real path.
22481    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22482      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22483      # a path prefixed by /cygdrive for fixpath to work.
22484      new_path="$CYGWIN_ROOT_PATH$input_path"
22485    fi
22486  fi
22487
22488
22489  if test "x$path" != "x$new_path"; then
22490    BOOT_JDK="$new_path"
22491    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22492$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22493  fi
22494
22495  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22496
22497  path="$BOOT_JDK"
22498  has_colon=`$ECHO $path | $GREP ^.:`
22499  new_path="$path"
22500  if test "x$has_colon" = x; then
22501    # Not in mixed or Windows style, start by that.
22502    new_path=`cmd //c echo $path`
22503  fi
22504
22505
22506  input_path="$new_path"
22507  # Check if we need to convert this using DOS-style short mode. If the path
22508  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22509  # take no chances and rewrite it.
22510  # Note: m4 eats our [], so we need to use [ and ] instead.
22511  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22512  if test "x$has_forbidden_chars" != x; then
22513    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22514    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22515  fi
22516
22517
22518  windows_path="$new_path"
22519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22520    unix_path=`$CYGPATH -u "$windows_path"`
22521    new_path="$unix_path"
22522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22523    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22524    new_path="$unix_path"
22525  fi
22526
22527  if test "x$path" != "x$new_path"; then
22528    BOOT_JDK="$new_path"
22529    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22530$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22531  fi
22532
22533  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22534  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22535
22536  else
22537    # We're on a posix platform. Hooray! :)
22538    path="$BOOT_JDK"
22539    has_space=`$ECHO "$path" | $GREP " "`
22540    if test "x$has_space" != x; then
22541      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22542$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22543      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22544    fi
22545
22546    # Use eval to expand a potential ~
22547    eval path="$path"
22548    if test ! -f "$path" && test ! -d "$path"; then
22549      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22550    fi
22551
22552    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22553  fi
22554
22555              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22556$as_echo_n "checking for Boot JDK... " >&6; }
22557              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22558$as_echo "$BOOT_JDK" >&6; }
22559              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22560$as_echo_n "checking Boot JDK version... " >&6; }
22561              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22562              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22563$as_echo "$BOOT_JDK_VERSION" >&6; }
22564            fi # end check jdk version
22565          fi # end check rt.jar
22566        fi # end check javac
22567      fi # end check java
22568    fi # end check boot jdk found
22569  fi
22570
22571    done
22572  fi
22573
22574  fi
22575
22576
22577    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22578    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22579      # Do we have a bin/java?
22580      if test ! -x "$BOOT_JDK/bin/java"; then
22581        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22582$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22583        BOOT_JDK_FOUND=no
22584      else
22585        # Do we have a bin/javac?
22586        if test ! -x "$BOOT_JDK/bin/javac"; then
22587          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22588$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22589          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22590$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22591          BOOT_JDK_FOUND=no
22592        else
22593          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22594          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22595            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22596$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22597            BOOT_JDK_FOUND=no
22598          else
22599            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22600            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22601
22602            # Extra M4 quote needed to protect [] in grep expression.
22603            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22604            if test "x$FOUND_CORRECT_VERSION" = x; then
22605              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22606$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22607              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22608$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22609              BOOT_JDK_FOUND=no
22610            else
22611              # We're done! :-)
22612              BOOT_JDK_FOUND=yes
22613
22614  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22615
22616  # Input might be given as Windows format, start by converting to
22617  # unix format.
22618  path="$BOOT_JDK"
22619  new_path=`$CYGPATH -u "$path"`
22620
22621  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22622  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22623  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22624  # "foo.exe" is OK but "foo" is an error.
22625  #
22626  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22627  # It is also a way to make sure we got the proper file name for the real test later on.
22628  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22629  if test "x$test_shortpath" = x; then
22630    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22631$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22632    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22633  fi
22634
22635  # Call helper function which possibly converts this using DOS-style short mode.
22636  # If so, the updated path is stored in $new_path.
22637
22638  input_path="$new_path"
22639  # Check if we need to convert this using DOS-style short mode. If the path
22640  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22641  # take no chances and rewrite it.
22642  # Note: m4 eats our [], so we need to use [ and ] instead.
22643  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22644  if test "x$has_forbidden_chars" != x; then
22645    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22646    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22647    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22648    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22649      # Going to short mode and back again did indeed matter. Since short mode is
22650      # case insensitive, let's make it lowercase to improve readability.
22651      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22652      # Now convert it back to Unix-stile (cygpath)
22653      input_path=`$CYGPATH -u "$shortmode_path"`
22654      new_path="$input_path"
22655    fi
22656  fi
22657
22658  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22659  if test "x$test_cygdrive_prefix" = x; then
22660    # As a simple fix, exclude /usr/bin since it's not a real path.
22661    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22662      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22663      # a path prefixed by /cygdrive for fixpath to work.
22664      new_path="$CYGWIN_ROOT_PATH$input_path"
22665    fi
22666  fi
22667
22668
22669  if test "x$path" != "x$new_path"; then
22670    BOOT_JDK="$new_path"
22671    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22672$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22673  fi
22674
22675  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22676
22677  path="$BOOT_JDK"
22678  has_colon=`$ECHO $path | $GREP ^.:`
22679  new_path="$path"
22680  if test "x$has_colon" = x; then
22681    # Not in mixed or Windows style, start by that.
22682    new_path=`cmd //c echo $path`
22683  fi
22684
22685
22686  input_path="$new_path"
22687  # Check if we need to convert this using DOS-style short mode. If the path
22688  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22689  # take no chances and rewrite it.
22690  # Note: m4 eats our [], so we need to use [ and ] instead.
22691  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22692  if test "x$has_forbidden_chars" != x; then
22693    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22694    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22695  fi
22696
22697
22698  windows_path="$new_path"
22699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22700    unix_path=`$CYGPATH -u "$windows_path"`
22701    new_path="$unix_path"
22702  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22703    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22704    new_path="$unix_path"
22705  fi
22706
22707  if test "x$path" != "x$new_path"; then
22708    BOOT_JDK="$new_path"
22709    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22710$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22711  fi
22712
22713  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22714  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22715
22716  else
22717    # We're on a posix platform. Hooray! :)
22718    path="$BOOT_JDK"
22719    has_space=`$ECHO "$path" | $GREP " "`
22720    if test "x$has_space" != x; then
22721      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22722$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22723      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22724    fi
22725
22726    # Use eval to expand a potential ~
22727    eval path="$path"
22728    if test ! -f "$path" && test ! -d "$path"; then
22729      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22730    fi
22731
22732    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22733  fi
22734
22735              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22736$as_echo_n "checking for Boot JDK... " >&6; }
22737              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22738$as_echo "$BOOT_JDK" >&6; }
22739              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22740$as_echo_n "checking Boot JDK version... " >&6; }
22741              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22742              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22743$as_echo "$BOOT_JDK_VERSION" >&6; }
22744            fi # end check jdk version
22745          fi # end check rt.jar
22746        fi # end check javac
22747      fi # end check java
22748    fi # end check boot jdk found
22749  fi
22750
22751
22752  if test "x$BOOT_JDK_FOUND" = xno; then
22753    # Now execute the test
22754
22755  if test "x$PROGRAMFILES" != x; then
22756    VIRTUAL_DIR="$PROGRAMFILES/Java"
22757
22758  windows_path="$VIRTUAL_DIR"
22759  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22760    unix_path=`$CYGPATH -u "$windows_path"`
22761    VIRTUAL_DIR="$unix_path"
22762  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22763    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22764    VIRTUAL_DIR="$unix_path"
22765  fi
22766
22767
22768  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22769  BOOT_JDK_SUFFIX=""
22770  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22771  if test "x$ALL_JDKS_FOUND" != x; then
22772    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22773
22774  if test "x$BOOT_JDK_FOUND" = xno; then
22775    # Now execute the test
22776
22777        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22778        if test -d "$BOOT_JDK"; then
22779          BOOT_JDK_FOUND=maybe
22780          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22781$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22782        fi
22783
22784
22785    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22786    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22787      # Do we have a bin/java?
22788      if test ! -x "$BOOT_JDK/bin/java"; then
22789        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22790$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22791        BOOT_JDK_FOUND=no
22792      else
22793        # Do we have a bin/javac?
22794        if test ! -x "$BOOT_JDK/bin/javac"; then
22795          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22796$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22797          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22798$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22799          BOOT_JDK_FOUND=no
22800        else
22801          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22802          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22803            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22804$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22805            BOOT_JDK_FOUND=no
22806          else
22807            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22808            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22809
22810            # Extra M4 quote needed to protect [] in grep expression.
22811            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22812            if test "x$FOUND_CORRECT_VERSION" = x; then
22813              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22814$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22815              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22816$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22817              BOOT_JDK_FOUND=no
22818            else
22819              # We're done! :-)
22820              BOOT_JDK_FOUND=yes
22821
22822  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22823
22824  # Input might be given as Windows format, start by converting to
22825  # unix format.
22826  path="$BOOT_JDK"
22827  new_path=`$CYGPATH -u "$path"`
22828
22829  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22830  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22831  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22832  # "foo.exe" is OK but "foo" is an error.
22833  #
22834  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22835  # It is also a way to make sure we got the proper file name for the real test later on.
22836  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22837  if test "x$test_shortpath" = x; then
22838    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22839$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22840    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22841  fi
22842
22843  # Call helper function which possibly converts this using DOS-style short mode.
22844  # If so, the updated path is stored in $new_path.
22845
22846  input_path="$new_path"
22847  # Check if we need to convert this using DOS-style short mode. If the path
22848  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22849  # take no chances and rewrite it.
22850  # Note: m4 eats our [], so we need to use [ and ] instead.
22851  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22852  if test "x$has_forbidden_chars" != x; then
22853    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22854    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22855    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22856    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22857      # Going to short mode and back again did indeed matter. Since short mode is
22858      # case insensitive, let's make it lowercase to improve readability.
22859      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22860      # Now convert it back to Unix-stile (cygpath)
22861      input_path=`$CYGPATH -u "$shortmode_path"`
22862      new_path="$input_path"
22863    fi
22864  fi
22865
22866  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22867  if test "x$test_cygdrive_prefix" = x; then
22868    # As a simple fix, exclude /usr/bin since it's not a real path.
22869    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22870      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22871      # a path prefixed by /cygdrive for fixpath to work.
22872      new_path="$CYGWIN_ROOT_PATH$input_path"
22873    fi
22874  fi
22875
22876
22877  if test "x$path" != "x$new_path"; then
22878    BOOT_JDK="$new_path"
22879    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22880$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22881  fi
22882
22883  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22884
22885  path="$BOOT_JDK"
22886  has_colon=`$ECHO $path | $GREP ^.:`
22887  new_path="$path"
22888  if test "x$has_colon" = x; then
22889    # Not in mixed or Windows style, start by that.
22890    new_path=`cmd //c echo $path`
22891  fi
22892
22893
22894  input_path="$new_path"
22895  # Check if we need to convert this using DOS-style short mode. If the path
22896  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22897  # take no chances and rewrite it.
22898  # Note: m4 eats our [], so we need to use [ and ] instead.
22899  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22900  if test "x$has_forbidden_chars" != x; then
22901    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22902    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22903  fi
22904
22905
22906  windows_path="$new_path"
22907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22908    unix_path=`$CYGPATH -u "$windows_path"`
22909    new_path="$unix_path"
22910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22911    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22912    new_path="$unix_path"
22913  fi
22914
22915  if test "x$path" != "x$new_path"; then
22916    BOOT_JDK="$new_path"
22917    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22918$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22919  fi
22920
22921  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22922  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22923
22924  else
22925    # We're on a posix platform. Hooray! :)
22926    path="$BOOT_JDK"
22927    has_space=`$ECHO "$path" | $GREP " "`
22928    if test "x$has_space" != x; then
22929      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22930$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22931      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22932    fi
22933
22934    # Use eval to expand a potential ~
22935    eval path="$path"
22936    if test ! -f "$path" && test ! -d "$path"; then
22937      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22938    fi
22939
22940    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22941  fi
22942
22943              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22944$as_echo_n "checking for Boot JDK... " >&6; }
22945              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22946$as_echo "$BOOT_JDK" >&6; }
22947              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22948$as_echo_n "checking Boot JDK version... " >&6; }
22949              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22950              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22951$as_echo "$BOOT_JDK_VERSION" >&6; }
22952            fi # end check jdk version
22953          fi # end check rt.jar
22954        fi # end check javac
22955      fi # end check java
22956    fi # end check boot jdk found
22957  fi
22958
22959    done
22960  fi
22961
22962  fi
22963
22964
22965    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22966    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22967      # Do we have a bin/java?
22968      if test ! -x "$BOOT_JDK/bin/java"; then
22969        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22970$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22971        BOOT_JDK_FOUND=no
22972      else
22973        # Do we have a bin/javac?
22974        if test ! -x "$BOOT_JDK/bin/javac"; then
22975          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22976$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22977          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22978$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22979          BOOT_JDK_FOUND=no
22980        else
22981          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22982          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22983            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22984$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22985            BOOT_JDK_FOUND=no
22986          else
22987            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22988            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22989
22990            # Extra M4 quote needed to protect [] in grep expression.
22991            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22992            if test "x$FOUND_CORRECT_VERSION" = x; then
22993              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22994$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22995              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22996$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22997              BOOT_JDK_FOUND=no
22998            else
22999              # We're done! :-)
23000              BOOT_JDK_FOUND=yes
23001
23002  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23003
23004  # Input might be given as Windows format, start by converting to
23005  # unix format.
23006  path="$BOOT_JDK"
23007  new_path=`$CYGPATH -u "$path"`
23008
23009  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23010  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23011  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23012  # "foo.exe" is OK but "foo" is an error.
23013  #
23014  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23015  # It is also a way to make sure we got the proper file name for the real test later on.
23016  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23017  if test "x$test_shortpath" = x; then
23018    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23019$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23020    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23021  fi
23022
23023  # Call helper function which possibly converts this using DOS-style short mode.
23024  # If so, the updated path is stored in $new_path.
23025
23026  input_path="$new_path"
23027  # Check if we need to convert this using DOS-style short mode. If the path
23028  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23029  # take no chances and rewrite it.
23030  # Note: m4 eats our [], so we need to use [ and ] instead.
23031  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23032  if test "x$has_forbidden_chars" != x; then
23033    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23034    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23035    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23036    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23037      # Going to short mode and back again did indeed matter. Since short mode is
23038      # case insensitive, let's make it lowercase to improve readability.
23039      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23040      # Now convert it back to Unix-stile (cygpath)
23041      input_path=`$CYGPATH -u "$shortmode_path"`
23042      new_path="$input_path"
23043    fi
23044  fi
23045
23046  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23047  if test "x$test_cygdrive_prefix" = x; then
23048    # As a simple fix, exclude /usr/bin since it's not a real path.
23049    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23050      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23051      # a path prefixed by /cygdrive for fixpath to work.
23052      new_path="$CYGWIN_ROOT_PATH$input_path"
23053    fi
23054  fi
23055
23056
23057  if test "x$path" != "x$new_path"; then
23058    BOOT_JDK="$new_path"
23059    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23060$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23061  fi
23062
23063  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23064
23065  path="$BOOT_JDK"
23066  has_colon=`$ECHO $path | $GREP ^.:`
23067  new_path="$path"
23068  if test "x$has_colon" = x; then
23069    # Not in mixed or Windows style, start by that.
23070    new_path=`cmd //c echo $path`
23071  fi
23072
23073
23074  input_path="$new_path"
23075  # Check if we need to convert this using DOS-style short mode. If the path
23076  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23077  # take no chances and rewrite it.
23078  # Note: m4 eats our [], so we need to use [ and ] instead.
23079  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23080  if test "x$has_forbidden_chars" != x; then
23081    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23082    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23083  fi
23084
23085
23086  windows_path="$new_path"
23087  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23088    unix_path=`$CYGPATH -u "$windows_path"`
23089    new_path="$unix_path"
23090  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23091    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23092    new_path="$unix_path"
23093  fi
23094
23095  if test "x$path" != "x$new_path"; then
23096    BOOT_JDK="$new_path"
23097    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23098$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23099  fi
23100
23101  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23102  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23103
23104  else
23105    # We're on a posix platform. Hooray! :)
23106    path="$BOOT_JDK"
23107    has_space=`$ECHO "$path" | $GREP " "`
23108    if test "x$has_space" != x; then
23109      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23110$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23111      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23112    fi
23113
23114    # Use eval to expand a potential ~
23115    eval path="$path"
23116    if test ! -f "$path" && test ! -d "$path"; then
23117      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23118    fi
23119
23120    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23121  fi
23122
23123              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23124$as_echo_n "checking for Boot JDK... " >&6; }
23125              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23126$as_echo "$BOOT_JDK" >&6; }
23127              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23128$as_echo_n "checking Boot JDK version... " >&6; }
23129              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23130              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23131$as_echo "$BOOT_JDK_VERSION" >&6; }
23132            fi # end check jdk version
23133          fi # end check rt.jar
23134        fi # end check javac
23135      fi # end check java
23136    fi # end check boot jdk found
23137  fi
23138
23139
23140  if test "x$BOOT_JDK_FOUND" = xno; then
23141    # Now execute the test
23142
23143  if test "x$ProgramFiles" != x; then
23144    VIRTUAL_DIR="$ProgramFiles/Java"
23145
23146  windows_path="$VIRTUAL_DIR"
23147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23148    unix_path=`$CYGPATH -u "$windows_path"`
23149    VIRTUAL_DIR="$unix_path"
23150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23151    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23152    VIRTUAL_DIR="$unix_path"
23153  fi
23154
23155
23156  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23157  BOOT_JDK_SUFFIX=""
23158  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23159  if test "x$ALL_JDKS_FOUND" != x; then
23160    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23161
23162  if test "x$BOOT_JDK_FOUND" = xno; then
23163    # Now execute the test
23164
23165        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23166        if test -d "$BOOT_JDK"; then
23167          BOOT_JDK_FOUND=maybe
23168          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23169$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23170        fi
23171
23172
23173    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23174    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23175      # Do we have a bin/java?
23176      if test ! -x "$BOOT_JDK/bin/java"; then
23177        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23178$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23179        BOOT_JDK_FOUND=no
23180      else
23181        # Do we have a bin/javac?
23182        if test ! -x "$BOOT_JDK/bin/javac"; then
23183          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23184$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23185          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23186$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23187          BOOT_JDK_FOUND=no
23188        else
23189          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23190          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23191            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23192$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23193            BOOT_JDK_FOUND=no
23194          else
23195            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23196            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23197
23198            # Extra M4 quote needed to protect [] in grep expression.
23199            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23200            if test "x$FOUND_CORRECT_VERSION" = x; then
23201              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23202$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23203              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23204$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23205              BOOT_JDK_FOUND=no
23206            else
23207              # We're done! :-)
23208              BOOT_JDK_FOUND=yes
23209
23210  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23211
23212  # Input might be given as Windows format, start by converting to
23213  # unix format.
23214  path="$BOOT_JDK"
23215  new_path=`$CYGPATH -u "$path"`
23216
23217  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23218  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23219  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23220  # "foo.exe" is OK but "foo" is an error.
23221  #
23222  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23223  # It is also a way to make sure we got the proper file name for the real test later on.
23224  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23225  if test "x$test_shortpath" = x; then
23226    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23227$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23228    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23229  fi
23230
23231  # Call helper function which possibly converts this using DOS-style short mode.
23232  # If so, the updated path is stored in $new_path.
23233
23234  input_path="$new_path"
23235  # Check if we need to convert this using DOS-style short mode. If the path
23236  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23237  # take no chances and rewrite it.
23238  # Note: m4 eats our [], so we need to use [ and ] instead.
23239  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23240  if test "x$has_forbidden_chars" != x; then
23241    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23242    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23243    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23244    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23245      # Going to short mode and back again did indeed matter. Since short mode is
23246      # case insensitive, let's make it lowercase to improve readability.
23247      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23248      # Now convert it back to Unix-stile (cygpath)
23249      input_path=`$CYGPATH -u "$shortmode_path"`
23250      new_path="$input_path"
23251    fi
23252  fi
23253
23254  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23255  if test "x$test_cygdrive_prefix" = x; then
23256    # As a simple fix, exclude /usr/bin since it's not a real path.
23257    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23258      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23259      # a path prefixed by /cygdrive for fixpath to work.
23260      new_path="$CYGWIN_ROOT_PATH$input_path"
23261    fi
23262  fi
23263
23264
23265  if test "x$path" != "x$new_path"; then
23266    BOOT_JDK="$new_path"
23267    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23268$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23269  fi
23270
23271  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23272
23273  path="$BOOT_JDK"
23274  has_colon=`$ECHO $path | $GREP ^.:`
23275  new_path="$path"
23276  if test "x$has_colon" = x; then
23277    # Not in mixed or Windows style, start by that.
23278    new_path=`cmd //c echo $path`
23279  fi
23280
23281
23282  input_path="$new_path"
23283  # Check if we need to convert this using DOS-style short mode. If the path
23284  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23285  # take no chances and rewrite it.
23286  # Note: m4 eats our [], so we need to use [ and ] instead.
23287  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23288  if test "x$has_forbidden_chars" != x; then
23289    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23290    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23291  fi
23292
23293
23294  windows_path="$new_path"
23295  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23296    unix_path=`$CYGPATH -u "$windows_path"`
23297    new_path="$unix_path"
23298  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23299    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23300    new_path="$unix_path"
23301  fi
23302
23303  if test "x$path" != "x$new_path"; then
23304    BOOT_JDK="$new_path"
23305    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23306$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23307  fi
23308
23309  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23310  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23311
23312  else
23313    # We're on a posix platform. Hooray! :)
23314    path="$BOOT_JDK"
23315    has_space=`$ECHO "$path" | $GREP " "`
23316    if test "x$has_space" != x; then
23317      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23318$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23319      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23320    fi
23321
23322    # Use eval to expand a potential ~
23323    eval path="$path"
23324    if test ! -f "$path" && test ! -d "$path"; then
23325      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23326    fi
23327
23328    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23329  fi
23330
23331              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23332$as_echo_n "checking for Boot JDK... " >&6; }
23333              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23334$as_echo "$BOOT_JDK" >&6; }
23335              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23336$as_echo_n "checking Boot JDK version... " >&6; }
23337              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23338              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23339$as_echo "$BOOT_JDK_VERSION" >&6; }
23340            fi # end check jdk version
23341          fi # end check rt.jar
23342        fi # end check javac
23343      fi # end check java
23344    fi # end check boot jdk found
23345  fi
23346
23347    done
23348  fi
23349
23350  fi
23351
23352
23353    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23354    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23355      # Do we have a bin/java?
23356      if test ! -x "$BOOT_JDK/bin/java"; then
23357        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23358$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23359        BOOT_JDK_FOUND=no
23360      else
23361        # Do we have a bin/javac?
23362        if test ! -x "$BOOT_JDK/bin/javac"; then
23363          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23364$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23365          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23366$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23367          BOOT_JDK_FOUND=no
23368        else
23369          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23370          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23371            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23372$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23373            BOOT_JDK_FOUND=no
23374          else
23375            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23376            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23377
23378            # Extra M4 quote needed to protect [] in grep expression.
23379            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23380            if test "x$FOUND_CORRECT_VERSION" = x; then
23381              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23382$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23383              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23384$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23385              BOOT_JDK_FOUND=no
23386            else
23387              # We're done! :-)
23388              BOOT_JDK_FOUND=yes
23389
23390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23391
23392  # Input might be given as Windows format, start by converting to
23393  # unix format.
23394  path="$BOOT_JDK"
23395  new_path=`$CYGPATH -u "$path"`
23396
23397  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23398  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23399  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23400  # "foo.exe" is OK but "foo" is an error.
23401  #
23402  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23403  # It is also a way to make sure we got the proper file name for the real test later on.
23404  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23405  if test "x$test_shortpath" = x; then
23406    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23407$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23408    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23409  fi
23410
23411  # Call helper function which possibly converts this using DOS-style short mode.
23412  # If so, the updated path is stored in $new_path.
23413
23414  input_path="$new_path"
23415  # Check if we need to convert this using DOS-style short mode. If the path
23416  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23417  # take no chances and rewrite it.
23418  # Note: m4 eats our [], so we need to use [ and ] instead.
23419  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23420  if test "x$has_forbidden_chars" != x; then
23421    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23422    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23423    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23424    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23425      # Going to short mode and back again did indeed matter. Since short mode is
23426      # case insensitive, let's make it lowercase to improve readability.
23427      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23428      # Now convert it back to Unix-stile (cygpath)
23429      input_path=`$CYGPATH -u "$shortmode_path"`
23430      new_path="$input_path"
23431    fi
23432  fi
23433
23434  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23435  if test "x$test_cygdrive_prefix" = x; then
23436    # As a simple fix, exclude /usr/bin since it's not a real path.
23437    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23438      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23439      # a path prefixed by /cygdrive for fixpath to work.
23440      new_path="$CYGWIN_ROOT_PATH$input_path"
23441    fi
23442  fi
23443
23444
23445  if test "x$path" != "x$new_path"; then
23446    BOOT_JDK="$new_path"
23447    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23448$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23449  fi
23450
23451  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23452
23453  path="$BOOT_JDK"
23454  has_colon=`$ECHO $path | $GREP ^.:`
23455  new_path="$path"
23456  if test "x$has_colon" = x; then
23457    # Not in mixed or Windows style, start by that.
23458    new_path=`cmd //c echo $path`
23459  fi
23460
23461
23462  input_path="$new_path"
23463  # Check if we need to convert this using DOS-style short mode. If the path
23464  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23465  # take no chances and rewrite it.
23466  # Note: m4 eats our [], so we need to use [ and ] instead.
23467  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23468  if test "x$has_forbidden_chars" != x; then
23469    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23470    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23471  fi
23472
23473
23474  windows_path="$new_path"
23475  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23476    unix_path=`$CYGPATH -u "$windows_path"`
23477    new_path="$unix_path"
23478  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23479    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23480    new_path="$unix_path"
23481  fi
23482
23483  if test "x$path" != "x$new_path"; then
23484    BOOT_JDK="$new_path"
23485    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23486$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23487  fi
23488
23489  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23490  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23491
23492  else
23493    # We're on a posix platform. Hooray! :)
23494    path="$BOOT_JDK"
23495    has_space=`$ECHO "$path" | $GREP " "`
23496    if test "x$has_space" != x; then
23497      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23498$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23499      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23500    fi
23501
23502    # Use eval to expand a potential ~
23503    eval path="$path"
23504    if test ! -f "$path" && test ! -d "$path"; then
23505      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23506    fi
23507
23508    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23509  fi
23510
23511              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23512$as_echo_n "checking for Boot JDK... " >&6; }
23513              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23514$as_echo "$BOOT_JDK" >&6; }
23515              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23516$as_echo_n "checking Boot JDK version... " >&6; }
23517              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23518              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23519$as_echo "$BOOT_JDK_VERSION" >&6; }
23520            fi # end check jdk version
23521          fi # end check rt.jar
23522        fi # end check javac
23523      fi # end check java
23524    fi # end check boot jdk found
23525  fi
23526
23527
23528  if test "x$BOOT_JDK_FOUND" = xno; then
23529    # Now execute the test
23530
23531  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
23532  BOOT_JDK_SUFFIX=""
23533  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23534  if test "x$ALL_JDKS_FOUND" != x; then
23535    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23536
23537  if test "x$BOOT_JDK_FOUND" = xno; then
23538    # Now execute the test
23539
23540        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23541        if test -d "$BOOT_JDK"; then
23542          BOOT_JDK_FOUND=maybe
23543          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23544$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23545        fi
23546
23547
23548    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23549    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23550      # Do we have a bin/java?
23551      if test ! -x "$BOOT_JDK/bin/java"; then
23552        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23553$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23554        BOOT_JDK_FOUND=no
23555      else
23556        # Do we have a bin/javac?
23557        if test ! -x "$BOOT_JDK/bin/javac"; then
23558          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23559$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23560          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23561$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23562          BOOT_JDK_FOUND=no
23563        else
23564          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23565          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23566            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23567$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23568            BOOT_JDK_FOUND=no
23569          else
23570            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23571            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23572
23573            # Extra M4 quote needed to protect [] in grep expression.
23574            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23575            if test "x$FOUND_CORRECT_VERSION" = x; then
23576              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23577$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23578              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23579$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23580              BOOT_JDK_FOUND=no
23581            else
23582              # We're done! :-)
23583              BOOT_JDK_FOUND=yes
23584
23585  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23586
23587  # Input might be given as Windows format, start by converting to
23588  # unix format.
23589  path="$BOOT_JDK"
23590  new_path=`$CYGPATH -u "$path"`
23591
23592  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23593  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23594  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23595  # "foo.exe" is OK but "foo" is an error.
23596  #
23597  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23598  # It is also a way to make sure we got the proper file name for the real test later on.
23599  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23600  if test "x$test_shortpath" = x; then
23601    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23602$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23603    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23604  fi
23605
23606  # Call helper function which possibly converts this using DOS-style short mode.
23607  # If so, the updated path is stored in $new_path.
23608
23609  input_path="$new_path"
23610  # Check if we need to convert this using DOS-style short mode. If the path
23611  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23612  # take no chances and rewrite it.
23613  # Note: m4 eats our [], so we need to use [ and ] instead.
23614  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23615  if test "x$has_forbidden_chars" != x; then
23616    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23617    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23618    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23619    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23620      # Going to short mode and back again did indeed matter. Since short mode is
23621      # case insensitive, let's make it lowercase to improve readability.
23622      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23623      # Now convert it back to Unix-stile (cygpath)
23624      input_path=`$CYGPATH -u "$shortmode_path"`
23625      new_path="$input_path"
23626    fi
23627  fi
23628
23629  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23630  if test "x$test_cygdrive_prefix" = x; then
23631    # As a simple fix, exclude /usr/bin since it's not a real path.
23632    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23633      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23634      # a path prefixed by /cygdrive for fixpath to work.
23635      new_path="$CYGWIN_ROOT_PATH$input_path"
23636    fi
23637  fi
23638
23639
23640  if test "x$path" != "x$new_path"; then
23641    BOOT_JDK="$new_path"
23642    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23643$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23644  fi
23645
23646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23647
23648  path="$BOOT_JDK"
23649  has_colon=`$ECHO $path | $GREP ^.:`
23650  new_path="$path"
23651  if test "x$has_colon" = x; then
23652    # Not in mixed or Windows style, start by that.
23653    new_path=`cmd //c echo $path`
23654  fi
23655
23656
23657  input_path="$new_path"
23658  # Check if we need to convert this using DOS-style short mode. If the path
23659  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23660  # take no chances and rewrite it.
23661  # Note: m4 eats our [], so we need to use [ and ] instead.
23662  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23663  if test "x$has_forbidden_chars" != x; then
23664    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23665    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23666  fi
23667
23668
23669  windows_path="$new_path"
23670  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23671    unix_path=`$CYGPATH -u "$windows_path"`
23672    new_path="$unix_path"
23673  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23674    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23675    new_path="$unix_path"
23676  fi
23677
23678  if test "x$path" != "x$new_path"; then
23679    BOOT_JDK="$new_path"
23680    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23681$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23682  fi
23683
23684  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23685  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23686
23687  else
23688    # We're on a posix platform. Hooray! :)
23689    path="$BOOT_JDK"
23690    has_space=`$ECHO "$path" | $GREP " "`
23691    if test "x$has_space" != x; then
23692      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23693$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23694      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23695    fi
23696
23697    # Use eval to expand a potential ~
23698    eval path="$path"
23699    if test ! -f "$path" && test ! -d "$path"; then
23700      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23701    fi
23702
23703    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23704  fi
23705
23706              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23707$as_echo_n "checking for Boot JDK... " >&6; }
23708              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23709$as_echo "$BOOT_JDK" >&6; }
23710              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23711$as_echo_n "checking Boot JDK version... " >&6; }
23712              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23713              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23714$as_echo "$BOOT_JDK_VERSION" >&6; }
23715            fi # end check jdk version
23716          fi # end check rt.jar
23717        fi # end check javac
23718      fi # end check java
23719    fi # end check boot jdk found
23720  fi
23721
23722    done
23723  fi
23724
23725
23726    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23727    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23728      # Do we have a bin/java?
23729      if test ! -x "$BOOT_JDK/bin/java"; then
23730        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23731$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23732        BOOT_JDK_FOUND=no
23733      else
23734        # Do we have a bin/javac?
23735        if test ! -x "$BOOT_JDK/bin/javac"; then
23736          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23737$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23738          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23739$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23740          BOOT_JDK_FOUND=no
23741        else
23742          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23743          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23744            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23745$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23746            BOOT_JDK_FOUND=no
23747          else
23748            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23749            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23750
23751            # Extra M4 quote needed to protect [] in grep expression.
23752            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23753            if test "x$FOUND_CORRECT_VERSION" = x; then
23754              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23755$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23756              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23757$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23758              BOOT_JDK_FOUND=no
23759            else
23760              # We're done! :-)
23761              BOOT_JDK_FOUND=yes
23762
23763  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23764
23765  # Input might be given as Windows format, start by converting to
23766  # unix format.
23767  path="$BOOT_JDK"
23768  new_path=`$CYGPATH -u "$path"`
23769
23770  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23771  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23772  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23773  # "foo.exe" is OK but "foo" is an error.
23774  #
23775  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23776  # It is also a way to make sure we got the proper file name for the real test later on.
23777  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23778  if test "x$test_shortpath" = x; then
23779    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23780$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23781    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23782  fi
23783
23784  # Call helper function which possibly converts this using DOS-style short mode.
23785  # If so, the updated path is stored in $new_path.
23786
23787  input_path="$new_path"
23788  # Check if we need to convert this using DOS-style short mode. If the path
23789  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23790  # take no chances and rewrite it.
23791  # Note: m4 eats our [], so we need to use [ and ] instead.
23792  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23793  if test "x$has_forbidden_chars" != x; then
23794    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23795    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23796    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23797    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23798      # Going to short mode and back again did indeed matter. Since short mode is
23799      # case insensitive, let's make it lowercase to improve readability.
23800      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23801      # Now convert it back to Unix-stile (cygpath)
23802      input_path=`$CYGPATH -u "$shortmode_path"`
23803      new_path="$input_path"
23804    fi
23805  fi
23806
23807  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23808  if test "x$test_cygdrive_prefix" = x; then
23809    # As a simple fix, exclude /usr/bin since it's not a real path.
23810    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23811      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23812      # a path prefixed by /cygdrive for fixpath to work.
23813      new_path="$CYGWIN_ROOT_PATH$input_path"
23814    fi
23815  fi
23816
23817
23818  if test "x$path" != "x$new_path"; then
23819    BOOT_JDK="$new_path"
23820    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23821$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23822  fi
23823
23824  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23825
23826  path="$BOOT_JDK"
23827  has_colon=`$ECHO $path | $GREP ^.:`
23828  new_path="$path"
23829  if test "x$has_colon" = x; then
23830    # Not in mixed or Windows style, start by that.
23831    new_path=`cmd //c echo $path`
23832  fi
23833
23834
23835  input_path="$new_path"
23836  # Check if we need to convert this using DOS-style short mode. If the path
23837  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23838  # take no chances and rewrite it.
23839  # Note: m4 eats our [], so we need to use [ and ] instead.
23840  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23841  if test "x$has_forbidden_chars" != x; then
23842    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23843    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23844  fi
23845
23846
23847  windows_path="$new_path"
23848  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23849    unix_path=`$CYGPATH -u "$windows_path"`
23850    new_path="$unix_path"
23851  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23852    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23853    new_path="$unix_path"
23854  fi
23855
23856  if test "x$path" != "x$new_path"; then
23857    BOOT_JDK="$new_path"
23858    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23859$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23860  fi
23861
23862  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23863  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23864
23865  else
23866    # We're on a posix platform. Hooray! :)
23867    path="$BOOT_JDK"
23868    has_space=`$ECHO "$path" | $GREP " "`
23869    if test "x$has_space" != x; then
23870      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23871$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23872      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23873    fi
23874
23875    # Use eval to expand a potential ~
23876    eval path="$path"
23877    if test ! -f "$path" && test ! -d "$path"; then
23878      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23879    fi
23880
23881    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23882  fi
23883
23884              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23885$as_echo_n "checking for Boot JDK... " >&6; }
23886              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23887$as_echo "$BOOT_JDK" >&6; }
23888              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23889$as_echo_n "checking Boot JDK version... " >&6; }
23890              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23891              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23892$as_echo "$BOOT_JDK_VERSION" >&6; }
23893            fi # end check jdk version
23894          fi # end check rt.jar
23895        fi # end check javac
23896      fi # end check java
23897    fi # end check boot jdk found
23898  fi
23899
23900  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
23901
23902  if test "x$BOOT_JDK_FOUND" = xno; then
23903    # Now execute the test
23904
23905  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
23906  BOOT_JDK_SUFFIX="/Contents/Home"
23907  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23908  if test "x$ALL_JDKS_FOUND" != x; then
23909    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23910
23911  if test "x$BOOT_JDK_FOUND" = xno; then
23912    # Now execute the test
23913
23914        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23915        if test -d "$BOOT_JDK"; then
23916          BOOT_JDK_FOUND=maybe
23917          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23918$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23919        fi
23920
23921
23922    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23923    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23924      # Do we have a bin/java?
23925      if test ! -x "$BOOT_JDK/bin/java"; then
23926        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23927$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23928        BOOT_JDK_FOUND=no
23929      else
23930        # Do we have a bin/javac?
23931        if test ! -x "$BOOT_JDK/bin/javac"; then
23932          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23933$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23934          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23935$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23936          BOOT_JDK_FOUND=no
23937        else
23938          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23939          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23940            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23941$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23942            BOOT_JDK_FOUND=no
23943          else
23944            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23945            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23946
23947            # Extra M4 quote needed to protect [] in grep expression.
23948            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23949            if test "x$FOUND_CORRECT_VERSION" = x; then
23950              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23951$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23952              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23953$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23954              BOOT_JDK_FOUND=no
23955            else
23956              # We're done! :-)
23957              BOOT_JDK_FOUND=yes
23958
23959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23960
23961  # Input might be given as Windows format, start by converting to
23962  # unix format.
23963  path="$BOOT_JDK"
23964  new_path=`$CYGPATH -u "$path"`
23965
23966  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23967  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23968  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23969  # "foo.exe" is OK but "foo" is an error.
23970  #
23971  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23972  # It is also a way to make sure we got the proper file name for the real test later on.
23973  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23974  if test "x$test_shortpath" = x; then
23975    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23976$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23977    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23978  fi
23979
23980  # Call helper function which possibly converts this using DOS-style short mode.
23981  # If so, the updated path is stored in $new_path.
23982
23983  input_path="$new_path"
23984  # Check if we need to convert this using DOS-style short mode. If the path
23985  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23986  # take no chances and rewrite it.
23987  # Note: m4 eats our [], so we need to use [ and ] instead.
23988  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23989  if test "x$has_forbidden_chars" != x; then
23990    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23991    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23992    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23993    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23994      # Going to short mode and back again did indeed matter. Since short mode is
23995      # case insensitive, let's make it lowercase to improve readability.
23996      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23997      # Now convert it back to Unix-stile (cygpath)
23998      input_path=`$CYGPATH -u "$shortmode_path"`
23999      new_path="$input_path"
24000    fi
24001  fi
24002
24003  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24004  if test "x$test_cygdrive_prefix" = x; then
24005    # As a simple fix, exclude /usr/bin since it's not a real path.
24006    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24007      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24008      # a path prefixed by /cygdrive for fixpath to work.
24009      new_path="$CYGWIN_ROOT_PATH$input_path"
24010    fi
24011  fi
24012
24013
24014  if test "x$path" != "x$new_path"; then
24015    BOOT_JDK="$new_path"
24016    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24017$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24018  fi
24019
24020  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24021
24022  path="$BOOT_JDK"
24023  has_colon=`$ECHO $path | $GREP ^.:`
24024  new_path="$path"
24025  if test "x$has_colon" = x; then
24026    # Not in mixed or Windows style, start by that.
24027    new_path=`cmd //c echo $path`
24028  fi
24029
24030
24031  input_path="$new_path"
24032  # Check if we need to convert this using DOS-style short mode. If the path
24033  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24034  # take no chances and rewrite it.
24035  # Note: m4 eats our [], so we need to use [ and ] instead.
24036  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24037  if test "x$has_forbidden_chars" != x; then
24038    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24039    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24040  fi
24041
24042
24043  windows_path="$new_path"
24044  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24045    unix_path=`$CYGPATH -u "$windows_path"`
24046    new_path="$unix_path"
24047  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24048    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24049    new_path="$unix_path"
24050  fi
24051
24052  if test "x$path" != "x$new_path"; then
24053    BOOT_JDK="$new_path"
24054    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24055$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24056  fi
24057
24058  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24059  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24060
24061  else
24062    # We're on a posix platform. Hooray! :)
24063    path="$BOOT_JDK"
24064    has_space=`$ECHO "$path" | $GREP " "`
24065    if test "x$has_space" != x; then
24066      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24067$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24068      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24069    fi
24070
24071    # Use eval to expand a potential ~
24072    eval path="$path"
24073    if test ! -f "$path" && test ! -d "$path"; then
24074      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24075    fi
24076
24077    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24078  fi
24079
24080              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24081$as_echo_n "checking for Boot JDK... " >&6; }
24082              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24083$as_echo "$BOOT_JDK" >&6; }
24084              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24085$as_echo_n "checking Boot JDK version... " >&6; }
24086              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24087              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24088$as_echo "$BOOT_JDK_VERSION" >&6; }
24089            fi # end check jdk version
24090          fi # end check rt.jar
24091        fi # end check javac
24092      fi # end check java
24093    fi # end check boot jdk found
24094  fi
24095
24096    done
24097  fi
24098
24099
24100    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24101    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24102      # Do we have a bin/java?
24103      if test ! -x "$BOOT_JDK/bin/java"; then
24104        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24105$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24106        BOOT_JDK_FOUND=no
24107      else
24108        # Do we have a bin/javac?
24109        if test ! -x "$BOOT_JDK/bin/javac"; then
24110          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24111$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24112          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24113$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24114          BOOT_JDK_FOUND=no
24115        else
24116          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24117          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24118            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24119$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24120            BOOT_JDK_FOUND=no
24121          else
24122            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24123            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24124
24125            # Extra M4 quote needed to protect [] in grep expression.
24126            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24127            if test "x$FOUND_CORRECT_VERSION" = x; then
24128              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24129$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24130              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24131$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24132              BOOT_JDK_FOUND=no
24133            else
24134              # We're done! :-)
24135              BOOT_JDK_FOUND=yes
24136
24137  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24138
24139  # Input might be given as Windows format, start by converting to
24140  # unix format.
24141  path="$BOOT_JDK"
24142  new_path=`$CYGPATH -u "$path"`
24143
24144  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24145  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24146  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24147  # "foo.exe" is OK but "foo" is an error.
24148  #
24149  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24150  # It is also a way to make sure we got the proper file name for the real test later on.
24151  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24152  if test "x$test_shortpath" = x; then
24153    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24154$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24155    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24156  fi
24157
24158  # Call helper function which possibly converts this using DOS-style short mode.
24159  # If so, the updated path is stored in $new_path.
24160
24161  input_path="$new_path"
24162  # Check if we need to convert this using DOS-style short mode. If the path
24163  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24164  # take no chances and rewrite it.
24165  # Note: m4 eats our [], so we need to use [ and ] instead.
24166  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24167  if test "x$has_forbidden_chars" != x; then
24168    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24169    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24170    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24171    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24172      # Going to short mode and back again did indeed matter. Since short mode is
24173      # case insensitive, let's make it lowercase to improve readability.
24174      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24175      # Now convert it back to Unix-stile (cygpath)
24176      input_path=`$CYGPATH -u "$shortmode_path"`
24177      new_path="$input_path"
24178    fi
24179  fi
24180
24181  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24182  if test "x$test_cygdrive_prefix" = x; then
24183    # As a simple fix, exclude /usr/bin since it's not a real path.
24184    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24185      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24186      # a path prefixed by /cygdrive for fixpath to work.
24187      new_path="$CYGWIN_ROOT_PATH$input_path"
24188    fi
24189  fi
24190
24191
24192  if test "x$path" != "x$new_path"; then
24193    BOOT_JDK="$new_path"
24194    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24195$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24196  fi
24197
24198  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24199
24200  path="$BOOT_JDK"
24201  has_colon=`$ECHO $path | $GREP ^.:`
24202  new_path="$path"
24203  if test "x$has_colon" = x; then
24204    # Not in mixed or Windows style, start by that.
24205    new_path=`cmd //c echo $path`
24206  fi
24207
24208
24209  input_path="$new_path"
24210  # Check if we need to convert this using DOS-style short mode. If the path
24211  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24212  # take no chances and rewrite it.
24213  # Note: m4 eats our [], so we need to use [ and ] instead.
24214  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24215  if test "x$has_forbidden_chars" != x; then
24216    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24217    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24218  fi
24219
24220
24221  windows_path="$new_path"
24222  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24223    unix_path=`$CYGPATH -u "$windows_path"`
24224    new_path="$unix_path"
24225  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24226    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24227    new_path="$unix_path"
24228  fi
24229
24230  if test "x$path" != "x$new_path"; then
24231    BOOT_JDK="$new_path"
24232    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24233$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24234  fi
24235
24236  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24237  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24238
24239  else
24240    # We're on a posix platform. Hooray! :)
24241    path="$BOOT_JDK"
24242    has_space=`$ECHO "$path" | $GREP " "`
24243    if test "x$has_space" != x; then
24244      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24245$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24246      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24247    fi
24248
24249    # Use eval to expand a potential ~
24250    eval path="$path"
24251    if test ! -f "$path" && test ! -d "$path"; then
24252      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24253    fi
24254
24255    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24256  fi
24257
24258              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24259$as_echo_n "checking for Boot JDK... " >&6; }
24260              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24261$as_echo "$BOOT_JDK" >&6; }
24262              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24263$as_echo_n "checking Boot JDK version... " >&6; }
24264              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24265              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24266$as_echo "$BOOT_JDK_VERSION" >&6; }
24267            fi # end check jdk version
24268          fi # end check rt.jar
24269        fi # end check javac
24270      fi # end check java
24271    fi # end check boot jdk found
24272  fi
24273
24274
24275  if test "x$BOOT_JDK_FOUND" = xno; then
24276    # Now execute the test
24277
24278  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
24279  BOOT_JDK_SUFFIX="/Contents/Home"
24280  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24281  if test "x$ALL_JDKS_FOUND" != x; then
24282    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24283
24284  if test "x$BOOT_JDK_FOUND" = xno; then
24285    # Now execute the test
24286
24287        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24288        if test -d "$BOOT_JDK"; then
24289          BOOT_JDK_FOUND=maybe
24290          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24291$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24292        fi
24293
24294
24295    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24296    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24297      # Do we have a bin/java?
24298      if test ! -x "$BOOT_JDK/bin/java"; then
24299        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24300$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24301        BOOT_JDK_FOUND=no
24302      else
24303        # Do we have a bin/javac?
24304        if test ! -x "$BOOT_JDK/bin/javac"; then
24305          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24306$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24307          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24308$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24309          BOOT_JDK_FOUND=no
24310        else
24311          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24312          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24313            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24314$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24315            BOOT_JDK_FOUND=no
24316          else
24317            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24318            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24319
24320            # Extra M4 quote needed to protect [] in grep expression.
24321            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24322            if test "x$FOUND_CORRECT_VERSION" = x; then
24323              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24324$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24325              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24326$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24327              BOOT_JDK_FOUND=no
24328            else
24329              # We're done! :-)
24330              BOOT_JDK_FOUND=yes
24331
24332  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24333
24334  # Input might be given as Windows format, start by converting to
24335  # unix format.
24336  path="$BOOT_JDK"
24337  new_path=`$CYGPATH -u "$path"`
24338
24339  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24340  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24341  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24342  # "foo.exe" is OK but "foo" is an error.
24343  #
24344  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24345  # It is also a way to make sure we got the proper file name for the real test later on.
24346  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24347  if test "x$test_shortpath" = x; then
24348    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24349$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24350    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24351  fi
24352
24353  # Call helper function which possibly converts this using DOS-style short mode.
24354  # If so, the updated path is stored in $new_path.
24355
24356  input_path="$new_path"
24357  # Check if we need to convert this using DOS-style short mode. If the path
24358  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24359  # take no chances and rewrite it.
24360  # Note: m4 eats our [], so we need to use [ and ] instead.
24361  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24362  if test "x$has_forbidden_chars" != x; then
24363    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24364    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24365    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24366    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24367      # Going to short mode and back again did indeed matter. Since short mode is
24368      # case insensitive, let's make it lowercase to improve readability.
24369      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24370      # Now convert it back to Unix-stile (cygpath)
24371      input_path=`$CYGPATH -u "$shortmode_path"`
24372      new_path="$input_path"
24373    fi
24374  fi
24375
24376  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24377  if test "x$test_cygdrive_prefix" = x; then
24378    # As a simple fix, exclude /usr/bin since it's not a real path.
24379    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24380      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24381      # a path prefixed by /cygdrive for fixpath to work.
24382      new_path="$CYGWIN_ROOT_PATH$input_path"
24383    fi
24384  fi
24385
24386
24387  if test "x$path" != "x$new_path"; then
24388    BOOT_JDK="$new_path"
24389    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24390$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24391  fi
24392
24393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24394
24395  path="$BOOT_JDK"
24396  has_colon=`$ECHO $path | $GREP ^.:`
24397  new_path="$path"
24398  if test "x$has_colon" = x; then
24399    # Not in mixed or Windows style, start by that.
24400    new_path=`cmd //c echo $path`
24401  fi
24402
24403
24404  input_path="$new_path"
24405  # Check if we need to convert this using DOS-style short mode. If the path
24406  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24407  # take no chances and rewrite it.
24408  # Note: m4 eats our [], so we need to use [ and ] instead.
24409  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24410  if test "x$has_forbidden_chars" != x; then
24411    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24412    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24413  fi
24414
24415
24416  windows_path="$new_path"
24417  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24418    unix_path=`$CYGPATH -u "$windows_path"`
24419    new_path="$unix_path"
24420  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24421    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24422    new_path="$unix_path"
24423  fi
24424
24425  if test "x$path" != "x$new_path"; then
24426    BOOT_JDK="$new_path"
24427    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24428$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24429  fi
24430
24431  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24432  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24433
24434  else
24435    # We're on a posix platform. Hooray! :)
24436    path="$BOOT_JDK"
24437    has_space=`$ECHO "$path" | $GREP " "`
24438    if test "x$has_space" != x; then
24439      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24440$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24441      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24442    fi
24443
24444    # Use eval to expand a potential ~
24445    eval path="$path"
24446    if test ! -f "$path" && test ! -d "$path"; then
24447      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24448    fi
24449
24450    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24451  fi
24452
24453              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24454$as_echo_n "checking for Boot JDK... " >&6; }
24455              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24456$as_echo "$BOOT_JDK" >&6; }
24457              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24458$as_echo_n "checking Boot JDK version... " >&6; }
24459              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24460              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24461$as_echo "$BOOT_JDK_VERSION" >&6; }
24462            fi # end check jdk version
24463          fi # end check rt.jar
24464        fi # end check javac
24465      fi # end check java
24466    fi # end check boot jdk found
24467  fi
24468
24469    done
24470  fi
24471
24472
24473    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24474    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24475      # Do we have a bin/java?
24476      if test ! -x "$BOOT_JDK/bin/java"; then
24477        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24478$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24479        BOOT_JDK_FOUND=no
24480      else
24481        # Do we have a bin/javac?
24482        if test ! -x "$BOOT_JDK/bin/javac"; then
24483          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24484$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24485          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24486$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24487          BOOT_JDK_FOUND=no
24488        else
24489          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24490          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24491            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24492$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24493            BOOT_JDK_FOUND=no
24494          else
24495            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24496            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24497
24498            # Extra M4 quote needed to protect [] in grep expression.
24499            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24500            if test "x$FOUND_CORRECT_VERSION" = x; then
24501              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24502$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24503              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24504$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24505              BOOT_JDK_FOUND=no
24506            else
24507              # We're done! :-)
24508              BOOT_JDK_FOUND=yes
24509
24510  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24511
24512  # Input might be given as Windows format, start by converting to
24513  # unix format.
24514  path="$BOOT_JDK"
24515  new_path=`$CYGPATH -u "$path"`
24516
24517  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24518  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24519  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24520  # "foo.exe" is OK but "foo" is an error.
24521  #
24522  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24523  # It is also a way to make sure we got the proper file name for the real test later on.
24524  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24525  if test "x$test_shortpath" = x; then
24526    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24527$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24528    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24529  fi
24530
24531  # Call helper function which possibly converts this using DOS-style short mode.
24532  # If so, the updated path is stored in $new_path.
24533
24534  input_path="$new_path"
24535  # Check if we need to convert this using DOS-style short mode. If the path
24536  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24537  # take no chances and rewrite it.
24538  # Note: m4 eats our [], so we need to use [ and ] instead.
24539  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24540  if test "x$has_forbidden_chars" != x; then
24541    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24542    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24543    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24544    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24545      # Going to short mode and back again did indeed matter. Since short mode is
24546      # case insensitive, let's make it lowercase to improve readability.
24547      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24548      # Now convert it back to Unix-stile (cygpath)
24549      input_path=`$CYGPATH -u "$shortmode_path"`
24550      new_path="$input_path"
24551    fi
24552  fi
24553
24554  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24555  if test "x$test_cygdrive_prefix" = x; then
24556    # As a simple fix, exclude /usr/bin since it's not a real path.
24557    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24558      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24559      # a path prefixed by /cygdrive for fixpath to work.
24560      new_path="$CYGWIN_ROOT_PATH$input_path"
24561    fi
24562  fi
24563
24564
24565  if test "x$path" != "x$new_path"; then
24566    BOOT_JDK="$new_path"
24567    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24568$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24569  fi
24570
24571  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24572
24573  path="$BOOT_JDK"
24574  has_colon=`$ECHO $path | $GREP ^.:`
24575  new_path="$path"
24576  if test "x$has_colon" = x; then
24577    # Not in mixed or Windows style, start by that.
24578    new_path=`cmd //c echo $path`
24579  fi
24580
24581
24582  input_path="$new_path"
24583  # Check if we need to convert this using DOS-style short mode. If the path
24584  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24585  # take no chances and rewrite it.
24586  # Note: m4 eats our [], so we need to use [ and ] instead.
24587  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24588  if test "x$has_forbidden_chars" != x; then
24589    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24590    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24591  fi
24592
24593
24594  windows_path="$new_path"
24595  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24596    unix_path=`$CYGPATH -u "$windows_path"`
24597    new_path="$unix_path"
24598  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24599    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24600    new_path="$unix_path"
24601  fi
24602
24603  if test "x$path" != "x$new_path"; then
24604    BOOT_JDK="$new_path"
24605    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24606$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24607  fi
24608
24609  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24610  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24611
24612  else
24613    # We're on a posix platform. Hooray! :)
24614    path="$BOOT_JDK"
24615    has_space=`$ECHO "$path" | $GREP " "`
24616    if test "x$has_space" != x; then
24617      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24618$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24619      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24620    fi
24621
24622    # Use eval to expand a potential ~
24623    eval path="$path"
24624    if test ! -f "$path" && test ! -d "$path"; then
24625      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24626    fi
24627
24628    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24629  fi
24630
24631              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24632$as_echo_n "checking for Boot JDK... " >&6; }
24633              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24634$as_echo "$BOOT_JDK" >&6; }
24635              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24636$as_echo_n "checking Boot JDK version... " >&6; }
24637              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24638              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24639$as_echo "$BOOT_JDK_VERSION" >&6; }
24640            fi # end check jdk version
24641          fi # end check rt.jar
24642        fi # end check javac
24643      fi # end check java
24644    fi # end check boot jdk found
24645  fi
24646
24647  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
24648
24649  if test "x$BOOT_JDK_FOUND" = xno; then
24650    # Now execute the test
24651
24652  BOOT_JDK_PREFIX="/usr/lib/jvm"
24653  BOOT_JDK_SUFFIX=""
24654  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24655  if test "x$ALL_JDKS_FOUND" != x; then
24656    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24657
24658  if test "x$BOOT_JDK_FOUND" = xno; then
24659    # Now execute the test
24660
24661        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24662        if test -d "$BOOT_JDK"; then
24663          BOOT_JDK_FOUND=maybe
24664          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24665$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24666        fi
24667
24668
24669    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24670    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24671      # Do we have a bin/java?
24672      if test ! -x "$BOOT_JDK/bin/java"; then
24673        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24674$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24675        BOOT_JDK_FOUND=no
24676      else
24677        # Do we have a bin/javac?
24678        if test ! -x "$BOOT_JDK/bin/javac"; then
24679          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24680$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24681          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24682$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24683          BOOT_JDK_FOUND=no
24684        else
24685          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24686          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24687            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24688$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24689            BOOT_JDK_FOUND=no
24690          else
24691            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24692            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24693
24694            # Extra M4 quote needed to protect [] in grep expression.
24695            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24696            if test "x$FOUND_CORRECT_VERSION" = x; then
24697              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24698$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24699              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24700$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24701              BOOT_JDK_FOUND=no
24702            else
24703              # We're done! :-)
24704              BOOT_JDK_FOUND=yes
24705
24706  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24707
24708  # Input might be given as Windows format, start by converting to
24709  # unix format.
24710  path="$BOOT_JDK"
24711  new_path=`$CYGPATH -u "$path"`
24712
24713  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24714  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24715  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24716  # "foo.exe" is OK but "foo" is an error.
24717  #
24718  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24719  # It is also a way to make sure we got the proper file name for the real test later on.
24720  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24721  if test "x$test_shortpath" = x; then
24722    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24723$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24724    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24725  fi
24726
24727  # Call helper function which possibly converts this using DOS-style short mode.
24728  # If so, the updated path is stored in $new_path.
24729
24730  input_path="$new_path"
24731  # Check if we need to convert this using DOS-style short mode. If the path
24732  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24733  # take no chances and rewrite it.
24734  # Note: m4 eats our [], so we need to use [ and ] instead.
24735  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24736  if test "x$has_forbidden_chars" != x; then
24737    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24738    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24739    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24740    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24741      # Going to short mode and back again did indeed matter. Since short mode is
24742      # case insensitive, let's make it lowercase to improve readability.
24743      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24744      # Now convert it back to Unix-stile (cygpath)
24745      input_path=`$CYGPATH -u "$shortmode_path"`
24746      new_path="$input_path"
24747    fi
24748  fi
24749
24750  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24751  if test "x$test_cygdrive_prefix" = x; then
24752    # As a simple fix, exclude /usr/bin since it's not a real path.
24753    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24754      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24755      # a path prefixed by /cygdrive for fixpath to work.
24756      new_path="$CYGWIN_ROOT_PATH$input_path"
24757    fi
24758  fi
24759
24760
24761  if test "x$path" != "x$new_path"; then
24762    BOOT_JDK="$new_path"
24763    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24764$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24765  fi
24766
24767  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24768
24769  path="$BOOT_JDK"
24770  has_colon=`$ECHO $path | $GREP ^.:`
24771  new_path="$path"
24772  if test "x$has_colon" = x; then
24773    # Not in mixed or Windows style, start by that.
24774    new_path=`cmd //c echo $path`
24775  fi
24776
24777
24778  input_path="$new_path"
24779  # Check if we need to convert this using DOS-style short mode. If the path
24780  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24781  # take no chances and rewrite it.
24782  # Note: m4 eats our [], so we need to use [ and ] instead.
24783  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24784  if test "x$has_forbidden_chars" != x; then
24785    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24786    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24787  fi
24788
24789
24790  windows_path="$new_path"
24791  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24792    unix_path=`$CYGPATH -u "$windows_path"`
24793    new_path="$unix_path"
24794  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24795    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24796    new_path="$unix_path"
24797  fi
24798
24799  if test "x$path" != "x$new_path"; then
24800    BOOT_JDK="$new_path"
24801    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24802$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24803  fi
24804
24805  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24806  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24807
24808  else
24809    # We're on a posix platform. Hooray! :)
24810    path="$BOOT_JDK"
24811    has_space=`$ECHO "$path" | $GREP " "`
24812    if test "x$has_space" != x; then
24813      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24814$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24815      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24816    fi
24817
24818    # Use eval to expand a potential ~
24819    eval path="$path"
24820    if test ! -f "$path" && test ! -d "$path"; then
24821      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24822    fi
24823
24824    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24825  fi
24826
24827              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24828$as_echo_n "checking for Boot JDK... " >&6; }
24829              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24830$as_echo "$BOOT_JDK" >&6; }
24831              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24832$as_echo_n "checking Boot JDK version... " >&6; }
24833              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24834              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24835$as_echo "$BOOT_JDK_VERSION" >&6; }
24836            fi # end check jdk version
24837          fi # end check rt.jar
24838        fi # end check javac
24839      fi # end check java
24840    fi # end check boot jdk found
24841  fi
24842
24843    done
24844  fi
24845
24846
24847    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24848    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24849      # Do we have a bin/java?
24850      if test ! -x "$BOOT_JDK/bin/java"; then
24851        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24852$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24853        BOOT_JDK_FOUND=no
24854      else
24855        # Do we have a bin/javac?
24856        if test ! -x "$BOOT_JDK/bin/javac"; then
24857          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24858$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24859          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24860$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24861          BOOT_JDK_FOUND=no
24862        else
24863          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24864          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24865            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24866$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24867            BOOT_JDK_FOUND=no
24868          else
24869            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24870            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24871
24872            # Extra M4 quote needed to protect [] in grep expression.
24873            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24874            if test "x$FOUND_CORRECT_VERSION" = x; then
24875              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24876$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24877              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24878$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24879              BOOT_JDK_FOUND=no
24880            else
24881              # We're done! :-)
24882              BOOT_JDK_FOUND=yes
24883
24884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24885
24886  # Input might be given as Windows format, start by converting to
24887  # unix format.
24888  path="$BOOT_JDK"
24889  new_path=`$CYGPATH -u "$path"`
24890
24891  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24892  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24893  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24894  # "foo.exe" is OK but "foo" is an error.
24895  #
24896  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24897  # It is also a way to make sure we got the proper file name for the real test later on.
24898  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24899  if test "x$test_shortpath" = x; then
24900    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24901$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24902    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24903  fi
24904
24905  # Call helper function which possibly converts this using DOS-style short mode.
24906  # If so, the updated path is stored in $new_path.
24907
24908  input_path="$new_path"
24909  # Check if we need to convert this using DOS-style short mode. If the path
24910  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24911  # take no chances and rewrite it.
24912  # Note: m4 eats our [], so we need to use [ and ] instead.
24913  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24914  if test "x$has_forbidden_chars" != x; then
24915    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24916    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24917    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24918    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24919      # Going to short mode and back again did indeed matter. Since short mode is
24920      # case insensitive, let's make it lowercase to improve readability.
24921      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24922      # Now convert it back to Unix-stile (cygpath)
24923      input_path=`$CYGPATH -u "$shortmode_path"`
24924      new_path="$input_path"
24925    fi
24926  fi
24927
24928  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24929  if test "x$test_cygdrive_prefix" = x; then
24930    # As a simple fix, exclude /usr/bin since it's not a real path.
24931    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24932      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24933      # a path prefixed by /cygdrive for fixpath to work.
24934      new_path="$CYGWIN_ROOT_PATH$input_path"
24935    fi
24936  fi
24937
24938
24939  if test "x$path" != "x$new_path"; then
24940    BOOT_JDK="$new_path"
24941    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24942$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24943  fi
24944
24945  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24946
24947  path="$BOOT_JDK"
24948  has_colon=`$ECHO $path | $GREP ^.:`
24949  new_path="$path"
24950  if test "x$has_colon" = x; then
24951    # Not in mixed or Windows style, start by that.
24952    new_path=`cmd //c echo $path`
24953  fi
24954
24955
24956  input_path="$new_path"
24957  # Check if we need to convert this using DOS-style short mode. If the path
24958  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24959  # take no chances and rewrite it.
24960  # Note: m4 eats our [], so we need to use [ and ] instead.
24961  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24962  if test "x$has_forbidden_chars" != x; then
24963    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24964    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24965  fi
24966
24967
24968  windows_path="$new_path"
24969  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24970    unix_path=`$CYGPATH -u "$windows_path"`
24971    new_path="$unix_path"
24972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24973    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24974    new_path="$unix_path"
24975  fi
24976
24977  if test "x$path" != "x$new_path"; then
24978    BOOT_JDK="$new_path"
24979    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24980$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24981  fi
24982
24983  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24984  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24985
24986  else
24987    # We're on a posix platform. Hooray! :)
24988    path="$BOOT_JDK"
24989    has_space=`$ECHO "$path" | $GREP " "`
24990    if test "x$has_space" != x; then
24991      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24992$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24993      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24994    fi
24995
24996    # Use eval to expand a potential ~
24997    eval path="$path"
24998    if test ! -f "$path" && test ! -d "$path"; then
24999      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25000    fi
25001
25002    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25003  fi
25004
25005              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25006$as_echo_n "checking for Boot JDK... " >&6; }
25007              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25008$as_echo "$BOOT_JDK" >&6; }
25009              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25010$as_echo_n "checking Boot JDK version... " >&6; }
25011              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25012              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25013$as_echo "$BOOT_JDK_VERSION" >&6; }
25014            fi # end check jdk version
25015          fi # end check rt.jar
25016        fi # end check javac
25017      fi # end check java
25018    fi # end check boot jdk found
25019  fi
25020
25021  fi
25022
25023
25024    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25025    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25026      # Do we have a bin/java?
25027      if test ! -x "$BOOT_JDK/bin/java"; then
25028        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25029$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25030        BOOT_JDK_FOUND=no
25031      else
25032        # Do we have a bin/javac?
25033        if test ! -x "$BOOT_JDK/bin/javac"; then
25034          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25035$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25036          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25037$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25038          BOOT_JDK_FOUND=no
25039        else
25040          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
25041          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
25042            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
25043$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
25044            BOOT_JDK_FOUND=no
25045          else
25046            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25047            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25048
25049            # Extra M4 quote needed to protect [] in grep expression.
25050            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25051            if test "x$FOUND_CORRECT_VERSION" = x; then
25052              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25053$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25054              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25055$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25056              BOOT_JDK_FOUND=no
25057            else
25058              # We're done! :-)
25059              BOOT_JDK_FOUND=yes
25060
25061  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25062
25063  # Input might be given as Windows format, start by converting to
25064  # unix format.
25065  path="$BOOT_JDK"
25066  new_path=`$CYGPATH -u "$path"`
25067
25068  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25069  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25070  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25071  # "foo.exe" is OK but "foo" is an error.
25072  #
25073  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25074  # It is also a way to make sure we got the proper file name for the real test later on.
25075  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25076  if test "x$test_shortpath" = x; then
25077    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25078$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25079    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25080  fi
25081
25082  # Call helper function which possibly converts this using DOS-style short mode.
25083  # If so, the updated path is stored in $new_path.
25084
25085  input_path="$new_path"
25086  # Check if we need to convert this using DOS-style short mode. If the path
25087  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25088  # take no chances and rewrite it.
25089  # Note: m4 eats our [], so we need to use [ and ] instead.
25090  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25091  if test "x$has_forbidden_chars" != x; then
25092    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25093    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25094    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25095    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25096      # Going to short mode and back again did indeed matter. Since short mode is
25097      # case insensitive, let's make it lowercase to improve readability.
25098      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25099      # Now convert it back to Unix-stile (cygpath)
25100      input_path=`$CYGPATH -u "$shortmode_path"`
25101      new_path="$input_path"
25102    fi
25103  fi
25104
25105  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25106  if test "x$test_cygdrive_prefix" = x; then
25107    # As a simple fix, exclude /usr/bin since it's not a real path.
25108    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25109      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25110      # a path prefixed by /cygdrive for fixpath to work.
25111      new_path="$CYGWIN_ROOT_PATH$input_path"
25112    fi
25113  fi
25114
25115
25116  if test "x$path" != "x$new_path"; then
25117    BOOT_JDK="$new_path"
25118    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25119$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25120  fi
25121
25122  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25123
25124  path="$BOOT_JDK"
25125  has_colon=`$ECHO $path | $GREP ^.:`
25126  new_path="$path"
25127  if test "x$has_colon" = x; then
25128    # Not in mixed or Windows style, start by that.
25129    new_path=`cmd //c echo $path`
25130  fi
25131
25132
25133  input_path="$new_path"
25134  # Check if we need to convert this using DOS-style short mode. If the path
25135  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25136  # take no chances and rewrite it.
25137  # Note: m4 eats our [], so we need to use [ and ] instead.
25138  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25139  if test "x$has_forbidden_chars" != x; then
25140    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25141    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25142  fi
25143
25144
25145  windows_path="$new_path"
25146  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25147    unix_path=`$CYGPATH -u "$windows_path"`
25148    new_path="$unix_path"
25149  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25150    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25151    new_path="$unix_path"
25152  fi
25153
25154  if test "x$path" != "x$new_path"; then
25155    BOOT_JDK="$new_path"
25156    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25157$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25158  fi
25159
25160  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25161  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25162
25163  else
25164    # We're on a posix platform. Hooray! :)
25165    path="$BOOT_JDK"
25166    has_space=`$ECHO "$path" | $GREP " "`
25167    if test "x$has_space" != x; then
25168      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25169$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25170      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25171    fi
25172
25173    # Use eval to expand a potential ~
25174    eval path="$path"
25175    if test ! -f "$path" && test ! -d "$path"; then
25176      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25177    fi
25178
25179    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25180  fi
25181
25182              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25183$as_echo_n "checking for Boot JDK... " >&6; }
25184              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25185$as_echo "$BOOT_JDK" >&6; }
25186              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25187$as_echo_n "checking Boot JDK version... " >&6; }
25188              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25189              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25190$as_echo "$BOOT_JDK_VERSION" >&6; }
25191            fi # end check jdk version
25192          fi # end check rt.jar
25193        fi # end check javac
25194      fi # end check java
25195    fi # end check boot jdk found
25196  fi
25197
25198
25199  # If we haven't found anything yet, we've truly lost. Give up.
25200  if test "x$BOOT_JDK_FOUND" = xno; then
25201
25202  # Print a helpful message on how to acquire the necessary build dependency.
25203  # openjdk is the help tag: freetype, cups, pulse, alsa etc
25204  MISSING_DEPENDENCY=openjdk
25205
25206  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25207    cygwin_help $MISSING_DEPENDENCY
25208  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25209    msys_help $MISSING_DEPENDENCY
25210  else
25211    PKGHANDLER_COMMAND=
25212
25213    case $PKGHANDLER in
25214      apt-get)
25215        apt_help     $MISSING_DEPENDENCY ;;
25216      yum)
25217        yum_help     $MISSING_DEPENDENCY ;;
25218      port)
25219        port_help    $MISSING_DEPENDENCY ;;
25220      pkgutil)
25221        pkgutil_help $MISSING_DEPENDENCY ;;
25222      pkgadd)
25223        pkgadd_help  $MISSING_DEPENDENCY ;;
25224    esac
25225
25226    if test "x$PKGHANDLER_COMMAND" != x; then
25227      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25228    fi
25229  fi
25230
25231    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
25232$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
25233    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
25234$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25235    as_fn_error $? "Cannot continue" "$LINENO" 5
25236  fi
25237
25238  # Setup proper paths for what we found
25239  BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
25240  if test ! -f "$BOOT_RTJAR"; then
25241    # On MacOSX it is called classes.jar
25242    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
25243    if test -f "$BOOT_RTJAR"; then
25244      # Remove the ..
25245      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
25246    fi
25247  fi
25248  BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
25249  BOOT_JDK="$BOOT_JDK"
25250
25251
25252
25253
25254  # Setup tools from the Boot JDK.
25255
25256  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25257
25258  # Publish this variable in the help.
25259
25260
25261  if test "x$JAVA" = x; then
25262    # The variable is not set by user, try to locate tool using the code snippet
25263
25264      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25265$as_echo_n "checking for java in Boot JDK... " >&6; }
25266      JAVA=$BOOT_JDK/bin/java
25267      if test ! -x $JAVA; then
25268        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25269$as_echo "not found" >&6; }
25270        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25271$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25272        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25273      fi
25274      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25275$as_echo "ok" >&6; }
25276
25277
25278  else
25279    # The variable is set, but is it from the command line or the environment?
25280
25281    # Try to remove the string !JAVA! from our list.
25282    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
25283    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25284      # If it failed, the variable was not from the command line. Ignore it,
25285      # but warn the user (except for BASH, which is always set by the calling BASH).
25286      if test "xJAVA" != xBASH; then
25287        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
25288$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
25289      fi
25290      # Try to locate tool using the code snippet
25291
25292      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25293$as_echo_n "checking for java in Boot JDK... " >&6; }
25294      JAVA=$BOOT_JDK/bin/java
25295      if test ! -x $JAVA; then
25296        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25297$as_echo "not found" >&6; }
25298        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25299$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25300        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25301      fi
25302      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25303$as_echo "ok" >&6; }
25304
25305
25306    else
25307      # If it succeeded, then it was overridden by the user. We will use it
25308      # for the tool.
25309
25310      # First remove it from the list of overridden variables, so we can test
25311      # for unknown variables in the end.
25312      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25313
25314      # Check if the provided tool contains a complete path.
25315      tool_specified="$JAVA"
25316      tool_basename="${tool_specified##*/}"
25317      if test "x$tool_basename" = "x$tool_specified"; then
25318        # A command without a complete path is provided, search $PATH.
25319        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
25320$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
25321        # Extract the first word of "$tool_basename", so it can be a program name with args.
25322set dummy $tool_basename; ac_word=$2
25323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25324$as_echo_n "checking for $ac_word... " >&6; }
25325if ${ac_cv_path_JAVA+:} false; then :
25326  $as_echo_n "(cached) " >&6
25327else
25328  case $JAVA in
25329  [\\/]* | ?:[\\/]*)
25330  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
25331  ;;
25332  *)
25333  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25334for as_dir in $PATH
25335do
25336  IFS=$as_save_IFS
25337  test -z "$as_dir" && as_dir=.
25338    for ac_exec_ext in '' $ac_executable_extensions; do
25339  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25340    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
25341    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25342    break 2
25343  fi
25344done
25345  done
25346IFS=$as_save_IFS
25347
25348  ;;
25349esac
25350fi
25351JAVA=$ac_cv_path_JAVA
25352if test -n "$JAVA"; then
25353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
25354$as_echo "$JAVA" >&6; }
25355else
25356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25357$as_echo "no" >&6; }
25358fi
25359
25360
25361        if test "x$JAVA" = x; then
25362          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25363        fi
25364      else
25365        # Otherwise we believe it is a complete path. Use it as it is.
25366        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
25367$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
25368        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
25369$as_echo_n "checking for JAVA... " >&6; }
25370        if test ! -x "$tool_specified"; then
25371          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25372$as_echo "not found" >&6; }
25373          as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
25374        fi
25375        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25376$as_echo "$tool_specified" >&6; }
25377      fi
25378    fi
25379  fi
25380
25381
25382
25383  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25384
25385  # Publish this variable in the help.
25386
25387
25388  if test "x$JAVAC" = x; then
25389    # The variable is not set by user, try to locate tool using the code snippet
25390
25391      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25392$as_echo_n "checking for javac in Boot JDK... " >&6; }
25393      JAVAC=$BOOT_JDK/bin/javac
25394      if test ! -x $JAVAC; then
25395        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25396$as_echo "not found" >&6; }
25397        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25398$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25399        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25400      fi
25401      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25402$as_echo "ok" >&6; }
25403
25404
25405  else
25406    # The variable is set, but is it from the command line or the environment?
25407
25408    # Try to remove the string !JAVAC! from our list.
25409    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
25410    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25411      # If it failed, the variable was not from the command line. Ignore it,
25412      # but warn the user (except for BASH, which is always set by the calling BASH).
25413      if test "xJAVAC" != xBASH; then
25414        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
25415$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
25416      fi
25417      # Try to locate tool using the code snippet
25418
25419      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25420$as_echo_n "checking for javac in Boot JDK... " >&6; }
25421      JAVAC=$BOOT_JDK/bin/javac
25422      if test ! -x $JAVAC; then
25423        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25424$as_echo "not found" >&6; }
25425        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25426$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25427        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25428      fi
25429      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25430$as_echo "ok" >&6; }
25431
25432
25433    else
25434      # If it succeeded, then it was overridden by the user. We will use it
25435      # for the tool.
25436
25437      # First remove it from the list of overridden variables, so we can test
25438      # for unknown variables in the end.
25439      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25440
25441      # Check if the provided tool contains a complete path.
25442      tool_specified="$JAVAC"
25443      tool_basename="${tool_specified##*/}"
25444      if test "x$tool_basename" = "x$tool_specified"; then
25445        # A command without a complete path is provided, search $PATH.
25446        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
25447$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
25448        # Extract the first word of "$tool_basename", so it can be a program name with args.
25449set dummy $tool_basename; ac_word=$2
25450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25451$as_echo_n "checking for $ac_word... " >&6; }
25452if ${ac_cv_path_JAVAC+:} false; then :
25453  $as_echo_n "(cached) " >&6
25454else
25455  case $JAVAC in
25456  [\\/]* | ?:[\\/]*)
25457  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
25458  ;;
25459  *)
25460  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25461for as_dir in $PATH
25462do
25463  IFS=$as_save_IFS
25464  test -z "$as_dir" && as_dir=.
25465    for ac_exec_ext in '' $ac_executable_extensions; do
25466  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25467    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
25468    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25469    break 2
25470  fi
25471done
25472  done
25473IFS=$as_save_IFS
25474
25475  ;;
25476esac
25477fi
25478JAVAC=$ac_cv_path_JAVAC
25479if test -n "$JAVAC"; then
25480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
25481$as_echo "$JAVAC" >&6; }
25482else
25483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25484$as_echo "no" >&6; }
25485fi
25486
25487
25488        if test "x$JAVAC" = x; then
25489          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25490        fi
25491      else
25492        # Otherwise we believe it is a complete path. Use it as it is.
25493        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
25494$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
25495        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
25496$as_echo_n "checking for JAVAC... " >&6; }
25497        if test ! -x "$tool_specified"; then
25498          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25499$as_echo "not found" >&6; }
25500          as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
25501        fi
25502        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25503$as_echo "$tool_specified" >&6; }
25504      fi
25505    fi
25506  fi
25507
25508
25509
25510  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25511
25512  # Publish this variable in the help.
25513
25514
25515  if test "x$JAVAH" = x; then
25516    # The variable is not set by user, try to locate tool using the code snippet
25517
25518      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25519$as_echo_n "checking for javah in Boot JDK... " >&6; }
25520      JAVAH=$BOOT_JDK/bin/javah
25521      if test ! -x $JAVAH; then
25522        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25523$as_echo "not found" >&6; }
25524        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25525$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25526        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25527      fi
25528      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25529$as_echo "ok" >&6; }
25530
25531
25532  else
25533    # The variable is set, but is it from the command line or the environment?
25534
25535    # Try to remove the string !JAVAH! from our list.
25536    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
25537    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25538      # If it failed, the variable was not from the command line. Ignore it,
25539      # but warn the user (except for BASH, which is always set by the calling BASH).
25540      if test "xJAVAH" != xBASH; then
25541        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
25542$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
25543      fi
25544      # Try to locate tool using the code snippet
25545
25546      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25547$as_echo_n "checking for javah in Boot JDK... " >&6; }
25548      JAVAH=$BOOT_JDK/bin/javah
25549      if test ! -x $JAVAH; then
25550        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25551$as_echo "not found" >&6; }
25552        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25553$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25554        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25555      fi
25556      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25557$as_echo "ok" >&6; }
25558
25559
25560    else
25561      # If it succeeded, then it was overridden by the user. We will use it
25562      # for the tool.
25563
25564      # First remove it from the list of overridden variables, so we can test
25565      # for unknown variables in the end.
25566      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25567
25568      # Check if the provided tool contains a complete path.
25569      tool_specified="$JAVAH"
25570      tool_basename="${tool_specified##*/}"
25571      if test "x$tool_basename" = "x$tool_specified"; then
25572        # A command without a complete path is provided, search $PATH.
25573        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
25574$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
25575        # Extract the first word of "$tool_basename", so it can be a program name with args.
25576set dummy $tool_basename; ac_word=$2
25577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25578$as_echo_n "checking for $ac_word... " >&6; }
25579if ${ac_cv_path_JAVAH+:} false; then :
25580  $as_echo_n "(cached) " >&6
25581else
25582  case $JAVAH in
25583  [\\/]* | ?:[\\/]*)
25584  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
25585  ;;
25586  *)
25587  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25588for as_dir in $PATH
25589do
25590  IFS=$as_save_IFS
25591  test -z "$as_dir" && as_dir=.
25592    for ac_exec_ext in '' $ac_executable_extensions; do
25593  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25594    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
25595    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25596    break 2
25597  fi
25598done
25599  done
25600IFS=$as_save_IFS
25601
25602  ;;
25603esac
25604fi
25605JAVAH=$ac_cv_path_JAVAH
25606if test -n "$JAVAH"; then
25607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
25608$as_echo "$JAVAH" >&6; }
25609else
25610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25611$as_echo "no" >&6; }
25612fi
25613
25614
25615        if test "x$JAVAH" = x; then
25616          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25617        fi
25618      else
25619        # Otherwise we believe it is a complete path. Use it as it is.
25620        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
25621$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
25622        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
25623$as_echo_n "checking for JAVAH... " >&6; }
25624        if test ! -x "$tool_specified"; then
25625          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25626$as_echo "not found" >&6; }
25627          as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
25628        fi
25629        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25630$as_echo "$tool_specified" >&6; }
25631      fi
25632    fi
25633  fi
25634
25635
25636
25637  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25638
25639  # Publish this variable in the help.
25640
25641
25642  if test "x$JAR" = x; then
25643    # The variable is not set by user, try to locate tool using the code snippet
25644
25645      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25646$as_echo_n "checking for jar in Boot JDK... " >&6; }
25647      JAR=$BOOT_JDK/bin/jar
25648      if test ! -x $JAR; then
25649        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25650$as_echo "not found" >&6; }
25651        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25652$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25653        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25654      fi
25655      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25656$as_echo "ok" >&6; }
25657
25658
25659  else
25660    # The variable is set, but is it from the command line or the environment?
25661
25662    # Try to remove the string !JAR! from our list.
25663    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
25664    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25665      # If it failed, the variable was not from the command line. Ignore it,
25666      # but warn the user (except for BASH, which is always set by the calling BASH).
25667      if test "xJAR" != xBASH; then
25668        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
25669$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
25670      fi
25671      # Try to locate tool using the code snippet
25672
25673      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25674$as_echo_n "checking for jar in Boot JDK... " >&6; }
25675      JAR=$BOOT_JDK/bin/jar
25676      if test ! -x $JAR; then
25677        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25678$as_echo "not found" >&6; }
25679        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25680$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25681        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25682      fi
25683      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25684$as_echo "ok" >&6; }
25685
25686
25687    else
25688      # If it succeeded, then it was overridden by the user. We will use it
25689      # for the tool.
25690
25691      # First remove it from the list of overridden variables, so we can test
25692      # for unknown variables in the end.
25693      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25694
25695      # Check if the provided tool contains a complete path.
25696      tool_specified="$JAR"
25697      tool_basename="${tool_specified##*/}"
25698      if test "x$tool_basename" = "x$tool_specified"; then
25699        # A command without a complete path is provided, search $PATH.
25700        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
25701$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
25702        # Extract the first word of "$tool_basename", so it can be a program name with args.
25703set dummy $tool_basename; ac_word=$2
25704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25705$as_echo_n "checking for $ac_word... " >&6; }
25706if ${ac_cv_path_JAR+:} false; then :
25707  $as_echo_n "(cached) " >&6
25708else
25709  case $JAR in
25710  [\\/]* | ?:[\\/]*)
25711  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
25712  ;;
25713  *)
25714  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25715for as_dir in $PATH
25716do
25717  IFS=$as_save_IFS
25718  test -z "$as_dir" && as_dir=.
25719    for ac_exec_ext in '' $ac_executable_extensions; do
25720  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25721    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
25722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25723    break 2
25724  fi
25725done
25726  done
25727IFS=$as_save_IFS
25728
25729  ;;
25730esac
25731fi
25732JAR=$ac_cv_path_JAR
25733if test -n "$JAR"; then
25734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
25735$as_echo "$JAR" >&6; }
25736else
25737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25738$as_echo "no" >&6; }
25739fi
25740
25741
25742        if test "x$JAR" = x; then
25743          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25744        fi
25745      else
25746        # Otherwise we believe it is a complete path. Use it as it is.
25747        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
25748$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
25749        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
25750$as_echo_n "checking for JAR... " >&6; }
25751        if test ! -x "$tool_specified"; then
25752          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25753$as_echo "not found" >&6; }
25754          as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
25755        fi
25756        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25757$as_echo "$tool_specified" >&6; }
25758      fi
25759    fi
25760  fi
25761
25762
25763
25764  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25765
25766  # Publish this variable in the help.
25767
25768
25769  if test "x$NATIVE2ASCII" = x; then
25770    # The variable is not set by user, try to locate tool using the code snippet
25771
25772      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25773$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25774      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25775      if test ! -x $NATIVE2ASCII; then
25776        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25777$as_echo "not found" >&6; }
25778        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25779$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25780        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25781      fi
25782      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25783$as_echo "ok" >&6; }
25784
25785
25786  else
25787    # The variable is set, but is it from the command line or the environment?
25788
25789    # Try to remove the string !NATIVE2ASCII! from our list.
25790    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NATIVE2ASCII!/}
25791    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25792      # If it failed, the variable was not from the command line. Ignore it,
25793      # but warn the user (except for BASH, which is always set by the calling BASH).
25794      if test "xNATIVE2ASCII" != xBASH; then
25795        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&5
25796$as_echo "$as_me: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&2;}
25797      fi
25798      # Try to locate tool using the code snippet
25799
25800      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25801$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25802      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25803      if test ! -x $NATIVE2ASCII; then
25804        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25805$as_echo "not found" >&6; }
25806        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25807$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25808        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25809      fi
25810      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25811$as_echo "ok" >&6; }
25812
25813
25814    else
25815      # If it succeeded, then it was overridden by the user. We will use it
25816      # for the tool.
25817
25818      # First remove it from the list of overridden variables, so we can test
25819      # for unknown variables in the end.
25820      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25821
25822      # Check if the provided tool contains a complete path.
25823      tool_specified="$NATIVE2ASCII"
25824      tool_basename="${tool_specified##*/}"
25825      if test "x$tool_basename" = "x$tool_specified"; then
25826        # A command without a complete path is provided, search $PATH.
25827        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&5
25828$as_echo "$as_me: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&6;}
25829        # Extract the first word of "$tool_basename", so it can be a program name with args.
25830set dummy $tool_basename; ac_word=$2
25831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25832$as_echo_n "checking for $ac_word... " >&6; }
25833if ${ac_cv_path_NATIVE2ASCII+:} false; then :
25834  $as_echo_n "(cached) " >&6
25835else
25836  case $NATIVE2ASCII in
25837  [\\/]* | ?:[\\/]*)
25838  ac_cv_path_NATIVE2ASCII="$NATIVE2ASCII" # Let the user override the test with a path.
25839  ;;
25840  *)
25841  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25842for as_dir in $PATH
25843do
25844  IFS=$as_save_IFS
25845  test -z "$as_dir" && as_dir=.
25846    for ac_exec_ext in '' $ac_executable_extensions; do
25847  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25848    ac_cv_path_NATIVE2ASCII="$as_dir/$ac_word$ac_exec_ext"
25849    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25850    break 2
25851  fi
25852done
25853  done
25854IFS=$as_save_IFS
25855
25856  ;;
25857esac
25858fi
25859NATIVE2ASCII=$ac_cv_path_NATIVE2ASCII
25860if test -n "$NATIVE2ASCII"; then
25861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE2ASCII" >&5
25862$as_echo "$NATIVE2ASCII" >&6; }
25863else
25864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25865$as_echo "no" >&6; }
25866fi
25867
25868
25869        if test "x$NATIVE2ASCII" = x; then
25870          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25871        fi
25872      else
25873        # Otherwise we believe it is a complete path. Use it as it is.
25874        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&5
25875$as_echo "$as_me: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&6;}
25876        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NATIVE2ASCII" >&5
25877$as_echo_n "checking for NATIVE2ASCII... " >&6; }
25878        if test ! -x "$tool_specified"; then
25879          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25880$as_echo "not found" >&6; }
25881          as_fn_error $? "User supplied tool NATIVE2ASCII=$tool_specified does not exist or is not executable" "$LINENO" 5
25882        fi
25883        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25884$as_echo "$tool_specified" >&6; }
25885      fi
25886    fi
25887  fi
25888
25889
25890
25891  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25892
25893  # Publish this variable in the help.
25894
25895
25896  if test "x$JARSIGNER" = x; then
25897    # The variable is not set by user, try to locate tool using the code snippet
25898
25899      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
25900$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
25901      JARSIGNER=$BOOT_JDK/bin/jarsigner
25902      if test ! -x $JARSIGNER; then
25903        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25904$as_echo "not found" >&6; }
25905        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25906$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25907        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
25908      fi
25909      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25910$as_echo "ok" >&6; }
25911
25912
25913  else
25914    # The variable is set, but is it from the command line or the environment?
25915
25916    # Try to remove the string !JARSIGNER! from our list.
25917    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
25918    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25919      # If it failed, the variable was not from the command line. Ignore it,
25920      # but warn the user (except for BASH, which is always set by the calling BASH).
25921      if test "xJARSIGNER" != xBASH; then
25922        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
25923$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
25924      fi
25925      # Try to locate tool using the code snippet
25926
25927      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
25928$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
25929      JARSIGNER=$BOOT_JDK/bin/jarsigner
25930      if test ! -x $JARSIGNER; then
25931        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25932$as_echo "not found" >&6; }
25933        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25934$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25935        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
25936      fi
25937      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25938$as_echo "ok" >&6; }
25939
25940
25941    else
25942      # If it succeeded, then it was overridden by the user. We will use it
25943      # for the tool.
25944
25945      # First remove it from the list of overridden variables, so we can test
25946      # for unknown variables in the end.
25947      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25948
25949      # Check if the provided tool contains a complete path.
25950      tool_specified="$JARSIGNER"
25951      tool_basename="${tool_specified##*/}"
25952      if test "x$tool_basename" = "x$tool_specified"; then
25953        # A command without a complete path is provided, search $PATH.
25954        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
25955$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
25956        # Extract the first word of "$tool_basename", so it can be a program name with args.
25957set dummy $tool_basename; ac_word=$2
25958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25959$as_echo_n "checking for $ac_word... " >&6; }
25960if ${ac_cv_path_JARSIGNER+:} false; then :
25961  $as_echo_n "(cached) " >&6
25962else
25963  case $JARSIGNER in
25964  [\\/]* | ?:[\\/]*)
25965  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
25966  ;;
25967  *)
25968  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25969for as_dir in $PATH
25970do
25971  IFS=$as_save_IFS
25972  test -z "$as_dir" && as_dir=.
25973    for ac_exec_ext in '' $ac_executable_extensions; do
25974  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25975    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
25976    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25977    break 2
25978  fi
25979done
25980  done
25981IFS=$as_save_IFS
25982
25983  ;;
25984esac
25985fi
25986JARSIGNER=$ac_cv_path_JARSIGNER
25987if test -n "$JARSIGNER"; then
25988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
25989$as_echo "$JARSIGNER" >&6; }
25990else
25991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25992$as_echo "no" >&6; }
25993fi
25994
25995
25996        if test "x$JARSIGNER" = x; then
25997          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25998        fi
25999      else
26000        # Otherwise we believe it is a complete path. Use it as it is.
26001        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
26002$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
26003        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
26004$as_echo_n "checking for JARSIGNER... " >&6; }
26005        if test ! -x "$tool_specified"; then
26006          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26007$as_echo "not found" >&6; }
26008          as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
26009        fi
26010        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26011$as_echo "$tool_specified" >&6; }
26012      fi
26013    fi
26014  fi
26015
26016
26017
26018  # Finally, set some other options...
26019
26020  # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
26021  BOOT_JDK_SOURCETARGET="-source 7 -target 7"
26022
26023
26024
26025
26026  ##############################################################################
26027  #
26028  # Specify jvm options for anything that is run with the Boot JDK.
26029  # Not all JVM:s accept the same arguments on the command line.
26030  #
26031
26032# Check whether --with-boot-jdk-jvmargs was given.
26033if test "${with_boot_jdk_jvmargs+set}" = set; then :
26034  withval=$with_boot_jdk_jvmargs;
26035fi
26036
26037
26038  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
26039$as_echo_n "checking flags for boot jdk java command ... " >&6; }
26040
26041  # Disable special log output when a debug build is used as Boot JDK...
26042
26043  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
26044  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
26045  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
26046  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26047  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26048  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26049    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
26050    JVM_ARG_OK=true
26051  else
26052    $ECHO "Arg failed:" >&5
26053    $ECHO "$OUTPUT" >&5
26054    JVM_ARG_OK=false
26055  fi
26056
26057
26058  # Apply user provided options.
26059
26060  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
26061  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
26062  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
26063  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26064  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26065  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26066    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
26067    JVM_ARG_OK=true
26068  else
26069    $ECHO "Arg failed:" >&5
26070    $ECHO "$OUTPUT" >&5
26071    JVM_ARG_OK=false
26072  fi
26073
26074
26075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
26076$as_echo "$boot_jdk_jvmargs" >&6; }
26077
26078  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
26079  JAVA_FLAGS=$boot_jdk_jvmargs
26080
26081
26082
26083  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
26084$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
26085
26086  # Starting amount of heap memory.
26087
26088  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
26089  $ECHO "Command: $JAVA -Xms64M -version" >&5
26090  OUTPUT=`$JAVA -Xms64M -version 2>&1`
26091  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26092  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26093  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26094    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
26095    JVM_ARG_OK=true
26096  else
26097    $ECHO "Arg failed:" >&5
26098    $ECHO "$OUTPUT" >&5
26099    JVM_ARG_OK=false
26100  fi
26101
26102
26103  # Maximum amount of heap memory.
26104  # Maximum stack size.
26105  if test "x$BUILD_NUM_BITS" = x32; then
26106    JVM_MAX_HEAP=1100M
26107    STACK_SIZE=768
26108  else
26109    # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
26110    # pointers are used. Apparently, we need to increase the heap and stack
26111    # space for the jvm. More specifically, when running javac to build huge
26112    # jdk batch
26113    JVM_MAX_HEAP=1600M
26114    STACK_SIZE=1536
26115  fi
26116
26117  $ECHO "Check if jvm arg is ok: -Xmx$JVM_MAX_HEAP" >&5
26118  $ECHO "Command: $JAVA -Xmx$JVM_MAX_HEAP -version" >&5
26119  OUTPUT=`$JAVA -Xmx$JVM_MAX_HEAP -version 2>&1`
26120  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26121  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26122  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26123    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx$JVM_MAX_HEAP"
26124    JVM_ARG_OK=true
26125  else
26126    $ECHO "Arg failed:" >&5
26127    $ECHO "$OUTPUT" >&5
26128    JVM_ARG_OK=false
26129  fi
26130
26131
26132  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
26133  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
26134  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
26135  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26136  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26137  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26138    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
26139    JVM_ARG_OK=true
26140  else
26141    $ECHO "Arg failed:" >&5
26142    $ECHO "$OUTPUT" >&5
26143    JVM_ARG_OK=false
26144  fi
26145
26146
26147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
26148$as_echo "$boot_jdk_jvmargs_big" >&6; }
26149
26150  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
26151
26152
26153
26154  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
26155$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
26156
26157  # Use serial gc for small short lived tools if possible
26158
26159  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
26160  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
26161  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
26162  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26163  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26164  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26165    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
26166    JVM_ARG_OK=true
26167  else
26168    $ECHO "Arg failed:" >&5
26169    $ECHO "$OUTPUT" >&5
26170    JVM_ARG_OK=false
26171  fi
26172
26173
26174  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
26175  $ECHO "Command: $JAVA -Xms32M -version" >&5
26176  OUTPUT=`$JAVA -Xms32M -version 2>&1`
26177  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26178  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26179  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26180    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
26181    JVM_ARG_OK=true
26182  else
26183    $ECHO "Arg failed:" >&5
26184    $ECHO "$OUTPUT" >&5
26185    JVM_ARG_OK=false
26186  fi
26187
26188
26189  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
26190  $ECHO "Command: $JAVA -Xmx512M -version" >&5
26191  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
26192  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26193  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26194  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26195    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
26196    JVM_ARG_OK=true
26197  else
26198    $ECHO "Arg failed:" >&5
26199    $ECHO "$OUTPUT" >&5
26200    JVM_ARG_OK=false
26201  fi
26202
26203
26204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
26205$as_echo "$boot_jdk_jvmargs_small" >&6; }
26206
26207  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
26208
26209
26210
26211###############################################################################
26212#
26213# Configure the sources to use. We can add or override individual directories.
26214#
26215###############################################################################
26216
26217
26218  # Where are the sources. Any of these can be overridden
26219  # using --with-override-corba and the likes.
26220  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
26221  CORBA_TOPDIR="$SRC_ROOT/corba"
26222  JAXP_TOPDIR="$SRC_ROOT/jaxp"
26223  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
26224  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
26225  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
26226  JDK_TOPDIR="$SRC_ROOT/jdk"
26227
26228
26229
26230
26231
26232
26233
26234
26235
26236
26237  ###############################################################################
26238  #
26239  # Pickup additional source for a component from outside of the source root
26240  # or override source for a component.
26241  #
26242
26243# Check whether --with-add-source-root was given.
26244if test "${with_add_source_root+set}" = set; then :
26245  withval=$with_add_source_root;
26246fi
26247
26248
26249
26250# Check whether --with-override-source-root was given.
26251if test "${with_override_source_root+set}" = set; then :
26252  withval=$with_override_source_root;
26253fi
26254
26255
26256
26257# Check whether --with-adds-and-overrides was given.
26258if test "${with_adds_and_overrides+set}" = set; then :
26259  withval=$with_adds_and_overrides;
26260fi
26261
26262
26263  if test "x$with_adds_and_overrides" != x; then
26264    with_add_source_root="$with_adds_and_overrides/adds"
26265    with_override_source_root="$with_adds_and_overrides/overrides"
26266  fi
26267
26268  if test "x$with_add_source_root" != x; then
26269    if ! test -d $with_add_source_root; then
26270      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
26271    fi
26272    CURDIR="$PWD"
26273    cd "$with_add_source_root"
26274    ADD_SRC_ROOT="`pwd`"
26275    cd "$CURDIR"
26276    # Verify that the addon source root does not have any root makefiles.
26277    # If it does, then it is usually an error, prevent this.
26278    if test -f $with_add_source_root/langtools/make/Makefile; then
26279      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
26280    fi
26281    if test -f $with_add_source_root/corba/make/Makefile; then
26282      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
26283    fi
26284    if test -f $with_add_source_root/jaxp/make/Makefile; then
26285      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
26286    fi
26287    if test -f $with_add_source_root/jaxws/make/Makefile; then
26288      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
26289    fi
26290    if test -f $with_add_source_root/hotspot/make/Makefile; then
26291      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
26292    fi
26293    if test -f $with_add_source_root/nashorn/make/Makefile; then
26294      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
26295    fi
26296    if test -f $with_add_source_root/jdk/make/Makefile; then
26297      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
26298    fi
26299  fi
26300
26301
26302  if test "x$with_override_source_root" != x; then
26303    if ! test -d $with_override_source_root; then
26304      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
26305    fi
26306    CURDIR="$PWD"
26307    cd "$with_override_source_root"
26308    OVERRIDE_SRC_ROOT="`pwd`"
26309    cd "$CURDIR"
26310    if test -f $with_override_source_root/langtools/make/Makefile; then
26311      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
26312    fi
26313    if test -f $with_override_source_root/corba/make/Makefile; then
26314      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
26315    fi
26316    if test -f $with_override_source_root/jaxp/make/Makefile; then
26317      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
26318    fi
26319    if test -f $with_override_source_root/jaxws/make/Makefile; then
26320      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
26321    fi
26322    if test -f $with_override_source_root/hotspot/make/Makefile; then
26323      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
26324    fi
26325    if test -f $with_override_source_root/nashorn/make/Makefile; then
26326      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
26327    fi
26328    if test -f $with_override_source_root/jdk/make/Makefile; then
26329      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
26330    fi
26331  fi
26332
26333
26334  ###############################################################################
26335  #
26336  # Override a repo completely, this is used for example when you have 3 small
26337  # development sandboxes of the langtools sources and want to avoid having 3 full
26338  # OpenJDK sources checked out on disk.
26339  #
26340  # Assuming that the 3 langtools sandboxes are located here:
26341  # /home/fredrik/sandbox1/langtools
26342  # /home/fredrik/sandbox2/langtools
26343  # /home/fredrik/sandbox3/langtools
26344  #
26345  # From the source root you create build subdirs manually:
26346  #     mkdir -p build1 build2 build3
26347  # in each build directory run:
26348  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
26349  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
26350  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
26351  #
26352
26353
26354# Check whether --with-override-langtools was given.
26355if test "${with_override_langtools+set}" = set; then :
26356  withval=$with_override_langtools;
26357fi
26358
26359
26360
26361# Check whether --with-override-corba was given.
26362if test "${with_override_corba+set}" = set; then :
26363  withval=$with_override_corba;
26364fi
26365
26366
26367
26368# Check whether --with-override-jaxp was given.
26369if test "${with_override_jaxp+set}" = set; then :
26370  withval=$with_override_jaxp;
26371fi
26372
26373
26374
26375# Check whether --with-override-jaxws was given.
26376if test "${with_override_jaxws+set}" = set; then :
26377  withval=$with_override_jaxws;
26378fi
26379
26380
26381
26382# Check whether --with-override-hotspot was given.
26383if test "${with_override_hotspot+set}" = set; then :
26384  withval=$with_override_hotspot;
26385fi
26386
26387
26388
26389# Check whether --with-override-nashorn was given.
26390if test "${with_override_nashorn+set}" = set; then :
26391  withval=$with_override_nashorn;
26392fi
26393
26394
26395
26396# Check whether --with-override-jdk was given.
26397if test "${with_override_jdk+set}" = set; then :
26398  withval=$with_override_jdk;
26399fi
26400
26401
26402  if test "x$with_override_langtools" != x; then
26403    CURDIR="$PWD"
26404    cd "$with_override_langtools"
26405    LANGTOOLS_TOPDIR="`pwd`"
26406    cd "$CURDIR"
26407    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
26408      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
26409    fi
26410    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
26411$as_echo_n "checking if langtools should be overridden... " >&6; }
26412    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
26413$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
26414  fi
26415  if test "x$with_override_corba" != x; then
26416    CURDIR="$PWD"
26417    cd "$with_override_corba"
26418    CORBA_TOPDIR="`pwd`"
26419    cd "$CURDIR"
26420    if ! test -f $CORBA_TOPDIR/make/Makefile; then
26421      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26422    fi
26423    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26424$as_echo_n "checking if corba should be overridden... " >&6; }
26425    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26426$as_echo "yes with $CORBA_TOPDIR" >&6; }
26427  fi
26428  if test "x$with_override_jaxp" != x; then
26429    CURDIR="$PWD"
26430    cd "$with_override_jaxp"
26431    JAXP_TOPDIR="`pwd`"
26432    cd "$CURDIR"
26433    if ! test -f $JAXP_TOPDIR/make/Makefile; then
26434      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26435    fi
26436    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26437$as_echo_n "checking if jaxp should be overridden... " >&6; }
26438    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26439$as_echo "yes with $JAXP_TOPDIR" >&6; }
26440  fi
26441  if test "x$with_override_jaxws" != x; then
26442    CURDIR="$PWD"
26443    cd "$with_override_jaxws"
26444    JAXWS_TOPDIR="`pwd`"
26445    cd "$CURDIR"
26446    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26447      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26448    fi
26449    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26450$as_echo_n "checking if jaxws should be overridden... " >&6; }
26451    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26452$as_echo "yes with $JAXWS_TOPDIR" >&6; }
26453  fi
26454  if test "x$with_override_hotspot" != x; then
26455    CURDIR="$PWD"
26456    cd "$with_override_hotspot"
26457    HOTSPOT_TOPDIR="`pwd`"
26458    cd "$CURDIR"
26459    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26460      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26461    fi
26462    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26463$as_echo_n "checking if hotspot should be overridden... " >&6; }
26464    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26465$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26466  fi
26467  if test "x$with_override_nashorn" != x; then
26468    CURDIR="$PWD"
26469    cd "$with_override_nashorn"
26470    NASHORN_TOPDIR="`pwd`"
26471    cd "$CURDIR"
26472    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26473      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26474    fi
26475    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26476$as_echo_n "checking if nashorn should be overridden... " >&6; }
26477    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26478$as_echo "yes with $NASHORN_TOPDIR" >&6; }
26479  fi
26480  if test "x$with_override_jdk" != x; then
26481    CURDIR="$PWD"
26482    cd "$with_override_jdk"
26483    JDK_TOPDIR="`pwd`"
26484    cd "$CURDIR"
26485    if ! test -f $JDK_TOPDIR/make/Makefile; then
26486      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26487    fi
26488    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26489$as_echo_n "checking if JDK should be overridden... " >&6; }
26490    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26491$as_echo "yes with $JDK_TOPDIR" >&6; }
26492  fi
26493
26494
26495  BUILD_OUTPUT="$OUTPUT_ROOT"
26496
26497
26498  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26499  BUILD_HOTSPOT=true
26500
26501
26502
26503# Check whether --with-import-hotspot was given.
26504if test "${with_import_hotspot+set}" = set; then :
26505  withval=$with_import_hotspot;
26506fi
26507
26508  if test "x$with_import_hotspot" != x; then
26509    CURDIR="$PWD"
26510    cd "$with_import_hotspot"
26511    HOTSPOT_DIST="`pwd`"
26512    cd "$CURDIR"
26513    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26514      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26515    fi
26516    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26517$as_echo_n "checking if hotspot should be imported... " >&6; }
26518    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26519$as_echo "yes from $HOTSPOT_DIST" >&6; }
26520    BUILD_HOTSPOT=false
26521  fi
26522
26523  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26524
26525
26526###############################################################################
26527#
26528# Setup the toolchain (compilers etc), i.e. tools used to compile and process
26529# native code.
26530#
26531###############################################################################
26532
26533# First determine the toolchain type (compiler family)
26534
26535
26536# Check whether --with-toolchain-type was given.
26537if test "${with_toolchain_type+set}" = set; then :
26538  withval=$with_toolchain_type;
26539fi
26540
26541
26542  # Use indirect variable referencing
26543  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
26544  VALID_TOOLCHAINS=${!toolchain_var_name}
26545
26546  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26547    # On Mac OS X, default toolchain to clang after Xcode 5
26548    XCODE_VERSION_OUTPUT=`xcodebuild -version 2>&1 | $HEAD -n 1`
26549    $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
26550    if test $? -ne 0; then
26551      as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
26552    fi
26553    XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
26554        $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
26555        $CUT -f 1 -d .`
26556    { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
26557$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
26558    if test $XCODE_MAJOR_VERSION -ge 5; then
26559        DEFAULT_TOOLCHAIN="clang"
26560    else
26561        DEFAULT_TOOLCHAIN="gcc"
26562    fi
26563  else
26564    # First toolchain type in the list is the default
26565    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
26566  fi
26567
26568  if test "x$with_toolchain_type" = xlist; then
26569    # List all toolchains
26570    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
26571$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
26572    for toolchain in $VALID_TOOLCHAINS; do
26573      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
26574      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26575      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
26576    done
26577
26578    exit 0
26579  elif test "x$with_toolchain_type" != x; then
26580    # User override; check that it is valid
26581    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
26582      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
26583$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
26584      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
26585$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
26586      as_fn_error $? "Cannot continue." "$LINENO" 5
26587    fi
26588    TOOLCHAIN_TYPE=$with_toolchain_type
26589  else
26590    # No flag given, use default
26591    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
26592  fi
26593
26594
26595  TOOLCHAIN_CC_BINARY_clang="clang"
26596  TOOLCHAIN_CC_BINARY_gcc="gcc"
26597  TOOLCHAIN_CC_BINARY_microsoft="cl"
26598  TOOLCHAIN_CC_BINARY_solstudio="cc"
26599  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
26600
26601  TOOLCHAIN_CXX_BINARY_clang="clang++"
26602  TOOLCHAIN_CXX_BINARY_gcc="g++"
26603  TOOLCHAIN_CXX_BINARY_microsoft="cl"
26604  TOOLCHAIN_CXX_BINARY_solstudio="CC"
26605  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
26606
26607  # Use indirect variable referencing
26608  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
26609  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26610  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
26611  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
26612  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
26613  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
26614
26615
26616  # Define filename patterns
26617  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26618    LIBRARY_PREFIX=
26619    SHARED_LIBRARY_SUFFIX='.dll'
26620    STATIC_LIBRARY_SUFFIX='.lib'
26621    SHARED_LIBRARY='$1.dll'
26622    STATIC_LIBRARY='$1.lib'
26623    OBJ_SUFFIX='.obj'
26624    EXE_SUFFIX='.exe'
26625  else
26626    LIBRARY_PREFIX=lib
26627    SHARED_LIBRARY_SUFFIX='.so'
26628    STATIC_LIBRARY_SUFFIX='.a'
26629    SHARED_LIBRARY='lib$1.so'
26630    STATIC_LIBRARY='lib$1.a'
26631    OBJ_SUFFIX='.o'
26632    EXE_SUFFIX=''
26633    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26634      SHARED_LIBRARY='lib$1.dylib'
26635      SHARED_LIBRARY_SUFFIX='.dylib'
26636    fi
26637  fi
26638
26639
26640
26641
26642
26643
26644
26645
26646
26647
26648  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
26649    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
26650$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
26651  else
26652    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
26653$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
26654  fi
26655
26656
26657# Then detect the actual binaries needed
26658
26659  # FIXME: Is this needed?
26660  ac_ext=cpp
26661ac_cpp='$CXXCPP $CPPFLAGS'
26662ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26663ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26664ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26665
26666
26667  # Store the CFLAGS etc passed to the configure script.
26668  ORG_CFLAGS="$CFLAGS"
26669  ORG_CXXFLAGS="$CXXFLAGS"
26670  ORG_OBJCFLAGS="$OBJCFLAGS"
26671
26672  # On Windows, we need to detect the visual studio installation first.
26673  # This will change the PATH, but we need to keep that new PATH even
26674  # after toolchain detection is done, since the compiler (on x86) uses
26675  # it for DLL resolution in runtime.
26676  if test "x$OPENJDK_BUILD_OS" = "xwindows" && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
26677
26678  # Store path to cygwin link.exe to help excluding it when searching for
26679  # VS linker. This must be done before changing the PATH when looking for VS.
26680  # Extract the first word of "link", so it can be a program name with args.
26681set dummy link; ac_word=$2
26682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26683$as_echo_n "checking for $ac_word... " >&6; }
26684if ${ac_cv_path_CYGWIN_LINK+:} false; then :
26685  $as_echo_n "(cached) " >&6
26686else
26687  case $CYGWIN_LINK in
26688  [\\/]* | ?:[\\/]*)
26689  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
26690  ;;
26691  *)
26692  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26693for as_dir in $PATH
26694do
26695  IFS=$as_save_IFS
26696  test -z "$as_dir" && as_dir=.
26697    for ac_exec_ext in '' $ac_executable_extensions; do
26698  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26699    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
26700    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26701    break 2
26702  fi
26703done
26704  done
26705IFS=$as_save_IFS
26706
26707  ;;
26708esac
26709fi
26710CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
26711if test -n "$CYGWIN_LINK"; then
26712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
26713$as_echo "$CYGWIN_LINK" >&6; }
26714else
26715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26716$as_echo "no" >&6; }
26717fi
26718
26719
26720  if test "x$CYGWIN_LINK" != x; then
26721    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
26722$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
26723    "$CYGWIN_LINK" --version > /dev/null
26724    if test $? -eq 0 ; then
26725      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26726$as_echo "yes" >&6; }
26727    else
26728      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26729$as_echo "no" >&6; }
26730      # This might be the VS linker. Don't exclude it later on.
26731      CYGWIN_LINK=""
26732    fi
26733  fi
26734
26735  # First-hand choice is to locate and run the vsvars bat file.
26736
26737  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26738    VCVARSFILE="vc/bin/vcvars32.bat"
26739  else
26740    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26741  fi
26742
26743  VS_ENV_CMD=""
26744  VS_ENV_ARGS=""
26745  if test "x$with_toolsdir" != x; then
26746
26747  if test "x$VS_ENV_CMD" = x; then
26748    VS100BASE="$with_toolsdir/../.."
26749    METHOD="--with-tools-dir"
26750
26751  windows_path="$VS100BASE"
26752  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26753    unix_path=`$CYGPATH -u "$windows_path"`
26754    VS100BASE="$unix_path"
26755  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26756    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26757    VS100BASE="$unix_path"
26758  fi
26759
26760    if test -d "$VS100BASE"; then
26761      if test -f "$VS100BASE/$VCVARSFILE"; then
26762        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26763$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26764        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26765      else
26766        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26767$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26768        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26769$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26770      fi
26771    fi
26772  fi
26773
26774  fi
26775
26776  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
26777    # Having specified an argument which is incorrect will produce an instant failure;
26778    # we should not go on looking
26779    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
26780$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
26781    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
26782$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
26783    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
26784  fi
26785
26786  if test "x$VS100COMNTOOLS" != x; then
26787
26788  if test "x$VS_ENV_CMD" = x; then
26789    VS100BASE="$VS100COMNTOOLS/../.."
26790    METHOD="VS100COMNTOOLS variable"
26791
26792  windows_path="$VS100BASE"
26793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26794    unix_path=`$CYGPATH -u "$windows_path"`
26795    VS100BASE="$unix_path"
26796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26797    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26798    VS100BASE="$unix_path"
26799  fi
26800
26801    if test -d "$VS100BASE"; then
26802      if test -f "$VS100BASE/$VCVARSFILE"; then
26803        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26804$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26805        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26806      else
26807        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26808$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26809        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26810$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26811      fi
26812    fi
26813  fi
26814
26815  fi
26816  if test "x$PROGRAMFILES" != x; then
26817
26818  if test "x$VS_ENV_CMD" = x; then
26819    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
26820    METHOD="well-known name"
26821
26822  windows_path="$VS100BASE"
26823  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26824    unix_path=`$CYGPATH -u "$windows_path"`
26825    VS100BASE="$unix_path"
26826  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26827    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26828    VS100BASE="$unix_path"
26829  fi
26830
26831    if test -d "$VS100BASE"; then
26832      if test -f "$VS100BASE/$VCVARSFILE"; then
26833        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26834$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26835        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26836      else
26837        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26838$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26839        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26840$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26841      fi
26842    fi
26843  fi
26844
26845  fi
26846
26847  if test "x$VS_ENV_CMD" = x; then
26848    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
26849    METHOD="well-known name"
26850
26851  windows_path="$VS100BASE"
26852  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26853    unix_path=`$CYGPATH -u "$windows_path"`
26854    VS100BASE="$unix_path"
26855  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26856    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26857    VS100BASE="$unix_path"
26858  fi
26859
26860    if test -d "$VS100BASE"; then
26861      if test -f "$VS100BASE/$VCVARSFILE"; then
26862        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26863$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26864        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26865      else
26866        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26867$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26868        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26869$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26870      fi
26871    fi
26872  fi
26873
26874
26875  if test "x$VS_ENV_CMD" = x; then
26876    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
26877    METHOD="well-known name"
26878
26879  windows_path="$VS100BASE"
26880  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26881    unix_path=`$CYGPATH -u "$windows_path"`
26882    VS100BASE="$unix_path"
26883  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26884    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26885    VS100BASE="$unix_path"
26886  fi
26887
26888    if test -d "$VS100BASE"; then
26889      if test -f "$VS100BASE/$VCVARSFILE"; then
26890        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26891$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26892        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26893      else
26894        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26895$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26896        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26897$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26898      fi
26899    fi
26900  fi
26901
26902
26903  if test "x$ProgramW6432" != x; then
26904
26905  if test "x$VS_ENV_CMD" = x; then
26906    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
26907    METHOD="well-known name"
26908
26909  windows_path="$WIN_SDK_BASE"
26910  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26911    unix_path=`$CYGPATH -u "$windows_path"`
26912    WIN_SDK_BASE="$unix_path"
26913  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26914    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26915    WIN_SDK_BASE="$unix_path"
26916  fi
26917
26918    if test -d "$WIN_SDK_BASE"; then
26919      # There have been cases of partial or broken SDK installations. A missing
26920      # lib dir is not going to work.
26921      if test ! -d "$WIN_SDK_BASE/../lib"; then
26922        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26923$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26924        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26925$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26926      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26927        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26928$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26929        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26930        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26931          VS_ENV_ARGS="/x86"
26932        else
26933          VS_ENV_ARGS="/x64"
26934        fi
26935      else
26936        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26937$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26938        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26939$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26940      fi
26941    fi
26942  fi
26943
26944  fi
26945  if test "x$PROGRAMW6432" != x; then
26946
26947  if test "x$VS_ENV_CMD" = x; then
26948    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
26949    METHOD="well-known name"
26950
26951  windows_path="$WIN_SDK_BASE"
26952  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26953    unix_path=`$CYGPATH -u "$windows_path"`
26954    WIN_SDK_BASE="$unix_path"
26955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26956    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26957    WIN_SDK_BASE="$unix_path"
26958  fi
26959
26960    if test -d "$WIN_SDK_BASE"; then
26961      # There have been cases of partial or broken SDK installations. A missing
26962      # lib dir is not going to work.
26963      if test ! -d "$WIN_SDK_BASE/../lib"; then
26964        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26965$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26966        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26967$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26968      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26969        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26970$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26971        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26972        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26973          VS_ENV_ARGS="/x86"
26974        else
26975          VS_ENV_ARGS="/x64"
26976        fi
26977      else
26978        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26979$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26980        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26981$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26982      fi
26983    fi
26984  fi
26985
26986  fi
26987  if test "x$PROGRAMFILES" != x; then
26988
26989  if test "x$VS_ENV_CMD" = x; then
26990    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
26991    METHOD="well-known name"
26992
26993  windows_path="$WIN_SDK_BASE"
26994  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26995    unix_path=`$CYGPATH -u "$windows_path"`
26996    WIN_SDK_BASE="$unix_path"
26997  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26998    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26999    WIN_SDK_BASE="$unix_path"
27000  fi
27001
27002    if test -d "$WIN_SDK_BASE"; then
27003      # There have been cases of partial or broken SDK installations. A missing
27004      # lib dir is not going to work.
27005      if test ! -d "$WIN_SDK_BASE/../lib"; then
27006        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27007$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27008        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27009$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27010      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27011        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27012$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27013        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27014        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27015          VS_ENV_ARGS="/x86"
27016        else
27017          VS_ENV_ARGS="/x64"
27018        fi
27019      else
27020        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27021$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27022        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27023$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27024      fi
27025    fi
27026  fi
27027
27028  fi
27029
27030  if test "x$VS_ENV_CMD" = x; then
27031    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
27032    METHOD="well-known name"
27033
27034  windows_path="$WIN_SDK_BASE"
27035  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27036    unix_path=`$CYGPATH -u "$windows_path"`
27037    WIN_SDK_BASE="$unix_path"
27038  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27039    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27040    WIN_SDK_BASE="$unix_path"
27041  fi
27042
27043    if test -d "$WIN_SDK_BASE"; then
27044      # There have been cases of partial or broken SDK installations. A missing
27045      # lib dir is not going to work.
27046      if test ! -d "$WIN_SDK_BASE/../lib"; then
27047        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27048$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27049        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27050$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27051      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27052        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27053$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27054        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27055        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27056          VS_ENV_ARGS="/x86"
27057        else
27058          VS_ENV_ARGS="/x64"
27059        fi
27060      else
27061        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27062$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27063        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27064$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27065      fi
27066    fi
27067  fi
27068
27069
27070  if test "x$VS_ENV_CMD" = x; then
27071    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
27072    METHOD="well-known name"
27073
27074  windows_path="$WIN_SDK_BASE"
27075  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27076    unix_path=`$CYGPATH -u "$windows_path"`
27077    WIN_SDK_BASE="$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    WIN_SDK_BASE="$unix_path"
27081  fi
27082
27083    if test -d "$WIN_SDK_BASE"; then
27084      # There have been cases of partial or broken SDK installations. A missing
27085      # lib dir is not going to work.
27086      if test ! -d "$WIN_SDK_BASE/../lib"; then
27087        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27088$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27089        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27090$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27091      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27092        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27093$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27094        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27095        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27096          VS_ENV_ARGS="/x86"
27097        else
27098          VS_ENV_ARGS="/x64"
27099        fi
27100      else
27101        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27102$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27103        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27104$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27105      fi
27106    fi
27107  fi
27108
27109
27110  if test "x$VS_ENV_CMD" != x; then
27111    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
27112
27113  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27114
27115  # First separate the path from the arguments. This will split at the first
27116  # space.
27117  complete="$VS_ENV_CMD"
27118  path="${complete%% *}"
27119  tmp="$complete EOL"
27120  arguments="${tmp#* }"
27121
27122  # Input might be given as Windows format, start by converting to
27123  # unix format.
27124  new_path=`$CYGPATH -u "$path"`
27125
27126  # Now try to locate executable using which
27127  new_path=`$WHICH "$new_path" 2> /dev/null`
27128  # bat and cmd files are not always considered executable in cygwin causing which
27129  # to not find them
27130  if test "x$new_path" = x \
27131      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27132      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27133    new_path=`$CYGPATH -u "$path"`
27134  fi
27135  if test "x$new_path" = x; then
27136    # Oops. Which didn't find the executable.
27137    # The splitting of arguments from the executable at a space might have been incorrect,
27138    # since paths with space are more likely in Windows. Give it another try with the whole
27139    # argument.
27140    path="$complete"
27141    arguments="EOL"
27142    new_path=`$CYGPATH -u "$path"`
27143    new_path=`$WHICH "$new_path" 2> /dev/null`
27144    # bat and cmd files are not always considered executable in cygwin causing which
27145    # to not find them
27146    if test "x$new_path" = x \
27147        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27148        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27149      new_path=`$CYGPATH -u "$path"`
27150    fi
27151    if test "x$new_path" = x; then
27152      # It's still not found. Now this is an unrecoverable error.
27153      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27154$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27155      has_space=`$ECHO "$complete" | $GREP " "`
27156      if test "x$has_space" != x; then
27157        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27158$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27159      fi
27160      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27161    fi
27162  fi
27163
27164  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27165  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27166  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27167  # "foo.exe" is OK but "foo" is an error.
27168  #
27169  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27170  # It is also a way to make sure we got the proper file name for the real test later on.
27171  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27172  if test "x$test_shortpath" = x; then
27173    # Short path failed, file does not exist as specified.
27174    # Try adding .exe or .cmd
27175    if test -f "${new_path}.exe"; then
27176      input_to_shortpath="${new_path}.exe"
27177    elif test -f "${new_path}.cmd"; then
27178      input_to_shortpath="${new_path}.cmd"
27179    else
27180      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
27181$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
27182      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27183$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27184      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27185    fi
27186  else
27187    input_to_shortpath="$new_path"
27188  fi
27189
27190  # Call helper function which possibly converts this using DOS-style short mode.
27191  # If so, the updated path is stored in $new_path.
27192  new_path="$input_to_shortpath"
27193
27194  input_path="$input_to_shortpath"
27195  # Check if we need to convert this using DOS-style short mode. If the path
27196  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27197  # take no chances and rewrite it.
27198  # Note: m4 eats our [], so we need to use [ and ] instead.
27199  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27200  if test "x$has_forbidden_chars" != x; then
27201    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27202    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27203    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27204    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27205      # Going to short mode and back again did indeed matter. Since short mode is
27206      # case insensitive, let's make it lowercase to improve readability.
27207      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27208      # Now convert it back to Unix-stile (cygpath)
27209      input_path=`$CYGPATH -u "$shortmode_path"`
27210      new_path="$input_path"
27211    fi
27212  fi
27213
27214  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27215  if test "x$test_cygdrive_prefix" = x; then
27216    # As a simple fix, exclude /usr/bin since it's not a real path.
27217    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27218      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27219      # a path prefixed by /cygdrive for fixpath to work.
27220      new_path="$CYGWIN_ROOT_PATH$input_path"
27221    fi
27222  fi
27223
27224  # remove trailing .exe if any
27225  new_path="${new_path/%.exe/}"
27226
27227  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27228
27229  # First separate the path from the arguments. This will split at the first
27230  # space.
27231  complete="$VS_ENV_CMD"
27232  path="${complete%% *}"
27233  tmp="$complete EOL"
27234  arguments="${tmp#* }"
27235
27236  # Input might be given as Windows format, start by converting to
27237  # unix format.
27238  new_path="$path"
27239
27240  windows_path="$new_path"
27241  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27242    unix_path=`$CYGPATH -u "$windows_path"`
27243    new_path="$unix_path"
27244  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27245    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27246    new_path="$unix_path"
27247  fi
27248
27249
27250  # Now try to locate executable using which
27251  new_path=`$WHICH "$new_path" 2> /dev/null`
27252
27253  if test "x$new_path" = x; then
27254    # Oops. Which didn't find the executable.
27255    # The splitting of arguments from the executable at a space might have been incorrect,
27256    # since paths with space are more likely in Windows. Give it another try with the whole
27257    # argument.
27258    path="$complete"
27259    arguments="EOL"
27260    new_path="$path"
27261
27262  windows_path="$new_path"
27263  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27264    unix_path=`$CYGPATH -u "$windows_path"`
27265    new_path="$unix_path"
27266  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27267    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27268    new_path="$unix_path"
27269  fi
27270
27271
27272    new_path=`$WHICH "$new_path" 2> /dev/null`
27273
27274    if test "x$new_path" = x; then
27275      # It's still not found. Now this is an unrecoverable error.
27276      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27277$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27278      has_space=`$ECHO "$complete" | $GREP " "`
27279      if test "x$has_space" != x; then
27280        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27281$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27282      fi
27283      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27284    fi
27285  fi
27286
27287  # Now new_path has a complete unix path to the binary
27288  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27289    # Keep paths in /bin as-is, but remove trailing .exe if any
27290    new_path="${new_path/%.exe/}"
27291    # Do not save /bin paths to all_fixpath_prefixes!
27292  else
27293    # Not in mixed or Windows style, start by that.
27294    new_path=`cmd //c echo $new_path`
27295
27296  input_path="$new_path"
27297  # Check if we need to convert this using DOS-style short mode. If the path
27298  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27299  # take no chances and rewrite it.
27300  # Note: m4 eats our [], so we need to use [ and ] instead.
27301  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27302  if test "x$has_forbidden_chars" != x; then
27303    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27304    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27305  fi
27306
27307    # Output is in $new_path
27308
27309  windows_path="$new_path"
27310  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27311    unix_path=`$CYGPATH -u "$windows_path"`
27312    new_path="$unix_path"
27313  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27314    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27315    new_path="$unix_path"
27316  fi
27317
27318    # remove trailing .exe if any
27319    new_path="${new_path/%.exe/}"
27320
27321    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27322    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27323  fi
27324
27325  else
27326    # We're on a posix platform. Hooray! :)
27327    # First separate the path from the arguments. This will split at the first
27328    # space.
27329    complete="$VS_ENV_CMD"
27330    path="${complete%% *}"
27331    tmp="$complete EOL"
27332    arguments="${tmp#* }"
27333
27334    # Cannot rely on the command "which" here since it doesn't always work.
27335    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27336    if test -z "$is_absolute_path"; then
27337      # Path to executable is not absolute. Find it.
27338      IFS_save="$IFS"
27339      IFS=:
27340      for p in $PATH; do
27341        if test -f "$p/$path" && test -x "$p/$path"; then
27342          new_path="$p/$path"
27343          break
27344        fi
27345      done
27346      IFS="$IFS_save"
27347    else
27348      # This is an absolute path, we can use it without further modifications.
27349      new_path="$path"
27350    fi
27351
27352    if test "x$new_path" = x; then
27353      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27354$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27355      has_space=`$ECHO "$complete" | $GREP " "`
27356      if test "x$has_space" != x; then
27357        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27358$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27359      fi
27360      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27361    fi
27362  fi
27363
27364  # Now join together the path and the arguments once again
27365  if test "x$arguments" != xEOL; then
27366    new_complete="$new_path ${arguments% *}"
27367  else
27368    new_complete="$new_path"
27369  fi
27370
27371  if test "x$complete" != "x$new_complete"; then
27372    VS_ENV_CMD="$new_complete"
27373    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
27374$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
27375  fi
27376
27377
27378    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
27379    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
27380$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
27381
27382    # We need to create a couple of temporary files.
27383    VS_ENV_TMP_DIR="$OUTPUT_ROOT/vs-env"
27384    $MKDIR -p $VS_ENV_TMP_DIR
27385
27386    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
27387    # Instead create a shell script which will set the relevant variables when run.
27388    WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
27389
27390  unix_path="$WINPATH_VS_ENV_CMD"
27391  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27392    windows_path=`$CYGPATH -m "$unix_path"`
27393    WINPATH_VS_ENV_CMD="$windows_path"
27394  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27395    windows_path=`cmd //c echo $unix_path`
27396    WINPATH_VS_ENV_CMD="$windows_path"
27397  fi
27398
27399    WINPATH_BASH="$BASH"
27400
27401  unix_path="$WINPATH_BASH"
27402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27403    windows_path=`$CYGPATH -m "$unix_path"`
27404    WINPATH_BASH="$windows_path"
27405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27406    windows_path=`cmd //c echo $unix_path`
27407    WINPATH_BASH="$windows_path"
27408  fi
27409
27410
27411    # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
27412    # script (executable by bash) that will setup the important variables.
27413    EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
27414    $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
27415    # This will end up something like:
27416    # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
27417    $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
27418    # These will end up something like:
27419    # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
27420    # The trailing space for everyone except PATH is no typo, but is needed due
27421    # to trailing \ in the Windows paths. These will be stripped later.
27422    $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27423    $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27424    $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27425    $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27426    $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27427    $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27428
27429    # Now execute the newly created bat file.
27430    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
27431    # Change directory so we don't need to mess with Windows paths in redirects.
27432    cd $VS_ENV_TMP_DIR
27433    cmd /c extract-vs-env.bat | $CAT
27434    cd $CURDIR
27435
27436    if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
27437      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
27438$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
27439      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27440$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27441      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27442$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27443      as_fn_error $? "Cannot continue" "$LINENO" 5
27444    fi
27445
27446    # Now set all paths and other env variables. This will allow the rest of
27447    # the configure script to find and run the compiler in the proper way.
27448    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
27449$as_echo "$as_me: Setting extracted environment variables" >&6;}
27450    . $VS_ENV_TMP_DIR/set-vs-env.sh
27451    # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
27452    # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
27453  else
27454    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
27455    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
27456$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
27457  fi
27458
27459  # At this point, we should have correct variables in the environment, or we can't continue.
27460  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
27461$as_echo_n "checking for Visual Studio variables... " >&6; }
27462
27463  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
27464    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
27465      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
27466$as_echo "present but broken" >&6; }
27467      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
27468    else
27469      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27470$as_echo "ok" >&6; }
27471      # Remove any trailing "\" and " " from the variables.
27472      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED 's/\\\\* *$//'`
27473      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\* *$//'`
27474      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
27475      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
27476      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
27477      # Remove any paths containing # (typically F#) as that messes up make. This
27478      # is needed if visual studio was installed with F# support.
27479      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
27480
27481
27482
27483
27484    fi
27485  else
27486    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
27487$as_echo "not found" >&6; }
27488
27489    if test "x$VS_ENV_CMD" = x; then
27490      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
27491$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
27492      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
27493$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
27494    else
27495      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
27496$as_echo "$as_me: Running the extraction script failed." >&6;}
27497    fi
27498    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27499$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27500    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27501$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27502    as_fn_error $? "Cannot continue" "$LINENO" 5
27503  fi
27504
27505    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
27506    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
27507    PATH="$VS_PATH"
27508    # The microsoft toolchain also requires INCLUDE and LIB to be set.
27509    export INCLUDE="$VS_INCLUDE"
27510    export LIB="$VS_LIB"
27511  fi
27512
27513  # autoconf magic only relies on PATH, so update it if tools dir is specified
27514  OLD_PATH="$PATH"
27515
27516  # For solaris we really need solaris tools, and not the GNU equivalent.
27517  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
27518  # so add that to path before starting to probe.
27519  # FIXME: This was originally only done for AS,NM,GNM,STRIP,MCS,OBJCOPY,OBJDUMP.
27520  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
27521    PATH="/usr/ccs/bin:$PATH"
27522  fi
27523
27524  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
27525  # override all other locations.
27526  if test "x$TOOLCHAIN_PATH" != x; then
27527    PATH=$TOOLCHAIN_PATH:$PATH
27528  fi
27529
27530
27531  #
27532  # Setup the compilers (CC and CXX)
27533  #
27534
27535  COMPILER_NAME=C
27536  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
27537
27538  if test "x$CC" != x; then
27539    # User has supplied compiler name already, always let that override.
27540    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
27541$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
27542    if test "x`basename $CC`" = "x$CC"; then
27543      # A command without a complete path is provided, search $PATH.
27544
27545      for ac_prog in $CC
27546do
27547  # Extract the first word of "$ac_prog", so it can be a program name with args.
27548set dummy $ac_prog; ac_word=$2
27549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27550$as_echo_n "checking for $ac_word... " >&6; }
27551if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27552  $as_echo_n "(cached) " >&6
27553else
27554  case $POTENTIAL_CC in
27555  [\\/]* | ?:[\\/]*)
27556  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27557  ;;
27558  *)
27559  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27560for as_dir in $PATH
27561do
27562  IFS=$as_save_IFS
27563  test -z "$as_dir" && as_dir=.
27564    for ac_exec_ext in '' $ac_executable_extensions; do
27565  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27566    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27567    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27568    break 2
27569  fi
27570done
27571  done
27572IFS=$as_save_IFS
27573
27574  ;;
27575esac
27576fi
27577POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27578if test -n "$POTENTIAL_CC"; then
27579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27580$as_echo "$POTENTIAL_CC" >&6; }
27581else
27582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27583$as_echo "no" >&6; }
27584fi
27585
27586
27587  test -n "$POTENTIAL_CC" && break
27588done
27589
27590      if test "x$POTENTIAL_CC" != x; then
27591        CC=$POTENTIAL_CC
27592      else
27593        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
27594      fi
27595    else
27596      # Otherwise it might already be a complete path
27597      if test ! -x "$CC"; then
27598        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
27599      fi
27600    fi
27601  else
27602    # No user supplied value. Locate compiler ourselves.
27603
27604    # If we are cross compiling, assume cross compilation tools follows the
27605    # cross compilation standard where they are prefixed with the autoconf
27606    # standard name for the target. For example the binary
27607    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
27608    # If we are not cross compiling, then the default compiler name will be
27609    # used.
27610
27611    CC=
27612    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
27613    # before checking the rest of the PATH.
27614    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
27615    # step, this should not be necessary.
27616    if test -n "$TOOLCHAIN_PATH"; then
27617      PATH_save="$PATH"
27618      PATH="$TOOLCHAIN_PATH"
27619      for ac_prog in $SEARCH_LIST
27620do
27621  # Extract the first word of "$ac_prog", so it can be a program name with args.
27622set dummy $ac_prog; ac_word=$2
27623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27624$as_echo_n "checking for $ac_word... " >&6; }
27625if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
27626  $as_echo_n "(cached) " >&6
27627else
27628  case $TOOLCHAIN_PATH_CC in
27629  [\\/]* | ?:[\\/]*)
27630  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
27631  ;;
27632  *)
27633  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27634for as_dir in $PATH
27635do
27636  IFS=$as_save_IFS
27637  test -z "$as_dir" && as_dir=.
27638    for ac_exec_ext in '' $ac_executable_extensions; do
27639  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27640    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
27641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27642    break 2
27643  fi
27644done
27645  done
27646IFS=$as_save_IFS
27647
27648  ;;
27649esac
27650fi
27651TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
27652if test -n "$TOOLCHAIN_PATH_CC"; then
27653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
27654$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
27655else
27656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27657$as_echo "no" >&6; }
27658fi
27659
27660
27661  test -n "$TOOLCHAIN_PATH_CC" && break
27662done
27663
27664      CC=$TOOLCHAIN_PATH_CC
27665      PATH="$PATH_save"
27666    fi
27667
27668    # AC_PATH_PROGS can't be run multiple times with the same variable,
27669    # so create a new name for this run.
27670    if test "x$CC" = x; then
27671      for ac_prog in $SEARCH_LIST
27672do
27673  # Extract the first word of "$ac_prog", so it can be a program name with args.
27674set dummy $ac_prog; ac_word=$2
27675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27676$as_echo_n "checking for $ac_word... " >&6; }
27677if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27678  $as_echo_n "(cached) " >&6
27679else
27680  case $POTENTIAL_CC in
27681  [\\/]* | ?:[\\/]*)
27682  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27683  ;;
27684  *)
27685  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27686for as_dir in $PATH
27687do
27688  IFS=$as_save_IFS
27689  test -z "$as_dir" && as_dir=.
27690    for ac_exec_ext in '' $ac_executable_extensions; do
27691  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27692    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27693    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27694    break 2
27695  fi
27696done
27697  done
27698IFS=$as_save_IFS
27699
27700  ;;
27701esac
27702fi
27703POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27704if test -n "$POTENTIAL_CC"; then
27705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27706$as_echo "$POTENTIAL_CC" >&6; }
27707else
27708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27709$as_echo "no" >&6; }
27710fi
27711
27712
27713  test -n "$POTENTIAL_CC" && break
27714done
27715
27716      CC=$POTENTIAL_CC
27717    fi
27718
27719    if test "x$CC" = x; then
27720
27721  # Print a helpful message on how to acquire the necessary build dependency.
27722  # devkit is the help tag: freetype, cups, pulse, alsa etc
27723  MISSING_DEPENDENCY=devkit
27724
27725  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27726    cygwin_help $MISSING_DEPENDENCY
27727  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27728    msys_help $MISSING_DEPENDENCY
27729  else
27730    PKGHANDLER_COMMAND=
27731
27732    case $PKGHANDLER in
27733      apt-get)
27734        apt_help     $MISSING_DEPENDENCY ;;
27735      yum)
27736        yum_help     $MISSING_DEPENDENCY ;;
27737      port)
27738        port_help    $MISSING_DEPENDENCY ;;
27739      pkgutil)
27740        pkgutil_help $MISSING_DEPENDENCY ;;
27741      pkgadd)
27742        pkgadd_help  $MISSING_DEPENDENCY ;;
27743    esac
27744
27745    if test "x$PKGHANDLER_COMMAND" != x; then
27746      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
27747    fi
27748  fi
27749
27750      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
27751    fi
27752  fi
27753
27754  # Now we have a compiler binary in CC. Make sure it's okay.
27755
27756  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27757
27758  # First separate the path from the arguments. This will split at the first
27759  # space.
27760  complete="$CC"
27761  path="${complete%% *}"
27762  tmp="$complete EOL"
27763  arguments="${tmp#* }"
27764
27765  # Input might be given as Windows format, start by converting to
27766  # unix format.
27767  new_path=`$CYGPATH -u "$path"`
27768
27769  # Now try to locate executable using which
27770  new_path=`$WHICH "$new_path" 2> /dev/null`
27771  # bat and cmd files are not always considered executable in cygwin causing which
27772  # to not find them
27773  if test "x$new_path" = x \
27774      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27775      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27776    new_path=`$CYGPATH -u "$path"`
27777  fi
27778  if test "x$new_path" = x; then
27779    # Oops. Which didn't find the executable.
27780    # The splitting of arguments from the executable at a space might have been incorrect,
27781    # since paths with space are more likely in Windows. Give it another try with the whole
27782    # argument.
27783    path="$complete"
27784    arguments="EOL"
27785    new_path=`$CYGPATH -u "$path"`
27786    new_path=`$WHICH "$new_path" 2> /dev/null`
27787    # bat and cmd files are not always considered executable in cygwin causing which
27788    # to not find them
27789    if test "x$new_path" = x \
27790        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27791        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27792      new_path=`$CYGPATH -u "$path"`
27793    fi
27794    if test "x$new_path" = x; then
27795      # It's still not found. Now this is an unrecoverable error.
27796      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27797$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27798      has_space=`$ECHO "$complete" | $GREP " "`
27799      if test "x$has_space" != x; then
27800        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27801$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27802      fi
27803      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27804    fi
27805  fi
27806
27807  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27808  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27809  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27810  # "foo.exe" is OK but "foo" is an error.
27811  #
27812  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27813  # It is also a way to make sure we got the proper file name for the real test later on.
27814  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27815  if test "x$test_shortpath" = x; then
27816    # Short path failed, file does not exist as specified.
27817    # Try adding .exe or .cmd
27818    if test -f "${new_path}.exe"; then
27819      input_to_shortpath="${new_path}.exe"
27820    elif test -f "${new_path}.cmd"; then
27821      input_to_shortpath="${new_path}.cmd"
27822    else
27823      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
27824$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
27825      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27826$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27827      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27828    fi
27829  else
27830    input_to_shortpath="$new_path"
27831  fi
27832
27833  # Call helper function which possibly converts this using DOS-style short mode.
27834  # If so, the updated path is stored in $new_path.
27835  new_path="$input_to_shortpath"
27836
27837  input_path="$input_to_shortpath"
27838  # Check if we need to convert this using DOS-style short mode. If the path
27839  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27840  # take no chances and rewrite it.
27841  # Note: m4 eats our [], so we need to use [ and ] instead.
27842  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27843  if test "x$has_forbidden_chars" != x; then
27844    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27845    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27846    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27847    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27848      # Going to short mode and back again did indeed matter. Since short mode is
27849      # case insensitive, let's make it lowercase to improve readability.
27850      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27851      # Now convert it back to Unix-stile (cygpath)
27852      input_path=`$CYGPATH -u "$shortmode_path"`
27853      new_path="$input_path"
27854    fi
27855  fi
27856
27857  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27858  if test "x$test_cygdrive_prefix" = x; then
27859    # As a simple fix, exclude /usr/bin since it's not a real path.
27860    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27861      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27862      # a path prefixed by /cygdrive for fixpath to work.
27863      new_path="$CYGWIN_ROOT_PATH$input_path"
27864    fi
27865  fi
27866
27867  # remove trailing .exe if any
27868  new_path="${new_path/%.exe/}"
27869
27870  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27871
27872  # First separate the path from the arguments. This will split at the first
27873  # space.
27874  complete="$CC"
27875  path="${complete%% *}"
27876  tmp="$complete EOL"
27877  arguments="${tmp#* }"
27878
27879  # Input might be given as Windows format, start by converting to
27880  # unix format.
27881  new_path="$path"
27882
27883  windows_path="$new_path"
27884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27885    unix_path=`$CYGPATH -u "$windows_path"`
27886    new_path="$unix_path"
27887  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27888    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27889    new_path="$unix_path"
27890  fi
27891
27892
27893  # Now try to locate executable using which
27894  new_path=`$WHICH "$new_path" 2> /dev/null`
27895
27896  if test "x$new_path" = x; then
27897    # Oops. Which didn't find the executable.
27898    # The splitting of arguments from the executable at a space might have been incorrect,
27899    # since paths with space are more likely in Windows. Give it another try with the whole
27900    # argument.
27901    path="$complete"
27902    arguments="EOL"
27903    new_path="$path"
27904
27905  windows_path="$new_path"
27906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27907    unix_path=`$CYGPATH -u "$windows_path"`
27908    new_path="$unix_path"
27909  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27910    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27911    new_path="$unix_path"
27912  fi
27913
27914
27915    new_path=`$WHICH "$new_path" 2> /dev/null`
27916
27917    if test "x$new_path" = x; then
27918      # It's still not found. Now this is an unrecoverable error.
27919      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27920$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27921      has_space=`$ECHO "$complete" | $GREP " "`
27922      if test "x$has_space" != x; then
27923        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27924$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27925      fi
27926      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27927    fi
27928  fi
27929
27930  # Now new_path has a complete unix path to the binary
27931  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27932    # Keep paths in /bin as-is, but remove trailing .exe if any
27933    new_path="${new_path/%.exe/}"
27934    # Do not save /bin paths to all_fixpath_prefixes!
27935  else
27936    # Not in mixed or Windows style, start by that.
27937    new_path=`cmd //c echo $new_path`
27938
27939  input_path="$new_path"
27940  # Check if we need to convert this using DOS-style short mode. If the path
27941  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27942  # take no chances and rewrite it.
27943  # Note: m4 eats our [], so we need to use [ and ] instead.
27944  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27945  if test "x$has_forbidden_chars" != x; then
27946    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27947    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27948  fi
27949
27950    # Output is in $new_path
27951
27952  windows_path="$new_path"
27953  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27954    unix_path=`$CYGPATH -u "$windows_path"`
27955    new_path="$unix_path"
27956  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27957    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27958    new_path="$unix_path"
27959  fi
27960
27961    # remove trailing .exe if any
27962    new_path="${new_path/%.exe/}"
27963
27964    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27965    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27966  fi
27967
27968  else
27969    # We're on a posix platform. Hooray! :)
27970    # First separate the path from the arguments. This will split at the first
27971    # space.
27972    complete="$CC"
27973    path="${complete%% *}"
27974    tmp="$complete EOL"
27975    arguments="${tmp#* }"
27976
27977    # Cannot rely on the command "which" here since it doesn't always work.
27978    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27979    if test -z "$is_absolute_path"; then
27980      # Path to executable is not absolute. Find it.
27981      IFS_save="$IFS"
27982      IFS=:
27983      for p in $PATH; do
27984        if test -f "$p/$path" && test -x "$p/$path"; then
27985          new_path="$p/$path"
27986          break
27987        fi
27988      done
27989      IFS="$IFS_save"
27990    else
27991      # This is an absolute path, we can use it without further modifications.
27992      new_path="$path"
27993    fi
27994
27995    if test "x$new_path" = x; then
27996      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27997$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27998      has_space=`$ECHO "$complete" | $GREP " "`
27999      if test "x$has_space" != x; then
28000        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28001$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28002      fi
28003      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28004    fi
28005  fi
28006
28007  # Now join together the path and the arguments once again
28008  if test "x$arguments" != xEOL; then
28009    new_complete="$new_path ${arguments% *}"
28010  else
28011    new_complete="$new_path"
28012  fi
28013
28014  if test "x$complete" != "x$new_complete"; then
28015    CC="$new_complete"
28016    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
28017$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
28018  fi
28019
28020  TEST_COMPILER="$CC"
28021  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
28022  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
28023  if test "x$OPENJDK_BUILD_OS" != xaix; then
28024    # FIXME: This test should not be needed anymore; we don't do that for any platform.
28025    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
28026$as_echo_n "checking resolved symbolic links for CC... " >&6; }
28027
28028  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28029    # Follow a chain of symbolic links. Use readlink
28030    # where it exists, else fall back to horribly
28031    # complicated shell code.
28032    if test "x$READLINK_TESTED" != yes; then
28033      # On MacOSX there is a readlink tool with a different
28034      # purpose than the GNU readlink tool. Check the found readlink.
28035      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28036      if test "x$ISGNU" = x; then
28037        # A readlink that we do not know how to use.
28038        # Are there other non-GNU readlinks out there?
28039        READLINK_TESTED=yes
28040        READLINK=
28041      fi
28042    fi
28043
28044    if test "x$READLINK" != x; then
28045      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
28046    else
28047      # Save the current directory for restoring afterwards
28048      STARTDIR=$PWD
28049      COUNTER=0
28050      sym_link_dir=`$DIRNAME $TEST_COMPILER`
28051      sym_link_file=`$BASENAME $TEST_COMPILER`
28052      cd $sym_link_dir
28053      # Use -P flag to resolve symlinks in directories.
28054      cd `$THEPWDCMD -P`
28055      sym_link_dir=`$THEPWDCMD -P`
28056      # Resolve file symlinks
28057      while test $COUNTER -lt 20; do
28058        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28059        if test "x$ISLINK" == x; then
28060          # This is not a symbolic link! We are done!
28061          break
28062        fi
28063        # Again resolve directory symlinks since the target of the just found
28064        # link could be in a different directory
28065        cd `$DIRNAME $ISLINK`
28066        sym_link_dir=`$THEPWDCMD -P`
28067        sym_link_file=`$BASENAME $ISLINK`
28068        let COUNTER=COUNTER+1
28069      done
28070      cd $STARTDIR
28071      TEST_COMPILER=$sym_link_dir/$sym_link_file
28072    fi
28073  fi
28074
28075    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
28076$as_echo "$TEST_COMPILER" >&6; }
28077  fi
28078  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
28079$as_echo_n "checking if CC is disguised ccache... " >&6; }
28080
28081  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
28082  if test "x$COMPILER_BASENAME" = "xccache"; then
28083    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
28084$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
28085    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
28086    # We want to control ccache invocation ourselves, so ignore this cc and try
28087    # searching again.
28088
28089    # Remove the path to the fake ccache cc from the PATH
28090    RETRY_COMPILER_SAVED_PATH="$PATH"
28091    COMPILER_DIRNAME=`$DIRNAME $CC`
28092    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
28093
28094    # Try again looking for our compiler
28095    if test -n "$ac_tool_prefix"; then
28096  for ac_prog in $TOOLCHAIN_CC_BINARY
28097  do
28098    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28099set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28101$as_echo_n "checking for $ac_word... " >&6; }
28102if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
28103  $as_echo_n "(cached) " >&6
28104else
28105  if test -n "$PROPER_COMPILER_CC"; then
28106  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
28107else
28108as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28109for as_dir in $PATH
28110do
28111  IFS=$as_save_IFS
28112  test -z "$as_dir" && as_dir=.
28113    for ac_exec_ext in '' $ac_executable_extensions; do
28114  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28115    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
28116    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28117    break 2
28118  fi
28119done
28120  done
28121IFS=$as_save_IFS
28122
28123fi
28124fi
28125PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
28126if test -n "$PROPER_COMPILER_CC"; then
28127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28128$as_echo "$PROPER_COMPILER_CC" >&6; }
28129else
28130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28131$as_echo "no" >&6; }
28132fi
28133
28134
28135    test -n "$PROPER_COMPILER_CC" && break
28136  done
28137fi
28138if test -z "$PROPER_COMPILER_CC"; then
28139  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
28140  for ac_prog in $TOOLCHAIN_CC_BINARY
28141do
28142  # Extract the first word of "$ac_prog", so it can be a program name with args.
28143set dummy $ac_prog; ac_word=$2
28144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28145$as_echo_n "checking for $ac_word... " >&6; }
28146if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
28147  $as_echo_n "(cached) " >&6
28148else
28149  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28150  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
28151else
28152as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28153for as_dir in $PATH
28154do
28155  IFS=$as_save_IFS
28156  test -z "$as_dir" && as_dir=.
28157    for ac_exec_ext in '' $ac_executable_extensions; do
28158  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28159    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
28160    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28161    break 2
28162  fi
28163done
28164  done
28165IFS=$as_save_IFS
28166
28167fi
28168fi
28169ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
28170if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
28172$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
28173else
28174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28175$as_echo "no" >&6; }
28176fi
28177
28178
28179  test -n "$ac_ct_PROPER_COMPILER_CC" && break
28180done
28181
28182  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
28183    PROPER_COMPILER_CC=""
28184  else
28185    case $cross_compiling:$ac_tool_warned in
28186yes:)
28187{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28188$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28189ac_tool_warned=yes ;;
28190esac
28191    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
28192  fi
28193fi
28194
28195
28196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28197
28198  # First separate the path from the arguments. This will split at the first
28199  # space.
28200  complete="$PROPER_COMPILER_CC"
28201  path="${complete%% *}"
28202  tmp="$complete EOL"
28203  arguments="${tmp#* }"
28204
28205  # Input might be given as Windows format, start by converting to
28206  # unix format.
28207  new_path=`$CYGPATH -u "$path"`
28208
28209  # Now try to locate executable using which
28210  new_path=`$WHICH "$new_path" 2> /dev/null`
28211  # bat and cmd files are not always considered executable in cygwin causing which
28212  # to not find them
28213  if test "x$new_path" = x \
28214      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28215      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28216    new_path=`$CYGPATH -u "$path"`
28217  fi
28218  if test "x$new_path" = x; then
28219    # Oops. Which didn't find the executable.
28220    # The splitting of arguments from the executable at a space might have been incorrect,
28221    # since paths with space are more likely in Windows. Give it another try with the whole
28222    # argument.
28223    path="$complete"
28224    arguments="EOL"
28225    new_path=`$CYGPATH -u "$path"`
28226    new_path=`$WHICH "$new_path" 2> /dev/null`
28227    # bat and cmd files are not always considered executable in cygwin causing which
28228    # to not find them
28229    if test "x$new_path" = x \
28230        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28231        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28232      new_path=`$CYGPATH -u "$path"`
28233    fi
28234    if test "x$new_path" = x; then
28235      # It's still not found. Now this is an unrecoverable error.
28236      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28237$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28238      has_space=`$ECHO "$complete" | $GREP " "`
28239      if test "x$has_space" != x; then
28240        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28241$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28242      fi
28243      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28244    fi
28245  fi
28246
28247  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28248  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28249  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28250  # "foo.exe" is OK but "foo" is an error.
28251  #
28252  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28253  # It is also a way to make sure we got the proper file name for the real test later on.
28254  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28255  if test "x$test_shortpath" = x; then
28256    # Short path failed, file does not exist as specified.
28257    # Try adding .exe or .cmd
28258    if test -f "${new_path}.exe"; then
28259      input_to_shortpath="${new_path}.exe"
28260    elif test -f "${new_path}.cmd"; then
28261      input_to_shortpath="${new_path}.cmd"
28262    else
28263      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
28264$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
28265      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28266$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28267      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28268    fi
28269  else
28270    input_to_shortpath="$new_path"
28271  fi
28272
28273  # Call helper function which possibly converts this using DOS-style short mode.
28274  # If so, the updated path is stored in $new_path.
28275  new_path="$input_to_shortpath"
28276
28277  input_path="$input_to_shortpath"
28278  # Check if we need to convert this using DOS-style short mode. If the path
28279  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28280  # take no chances and rewrite it.
28281  # Note: m4 eats our [], so we need to use [ and ] instead.
28282  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28283  if test "x$has_forbidden_chars" != x; then
28284    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28285    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28286    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28287    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28288      # Going to short mode and back again did indeed matter. Since short mode is
28289      # case insensitive, let's make it lowercase to improve readability.
28290      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28291      # Now convert it back to Unix-stile (cygpath)
28292      input_path=`$CYGPATH -u "$shortmode_path"`
28293      new_path="$input_path"
28294    fi
28295  fi
28296
28297  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28298  if test "x$test_cygdrive_prefix" = x; then
28299    # As a simple fix, exclude /usr/bin since it's not a real path.
28300    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28301      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28302      # a path prefixed by /cygdrive for fixpath to work.
28303      new_path="$CYGWIN_ROOT_PATH$input_path"
28304    fi
28305  fi
28306
28307  # remove trailing .exe if any
28308  new_path="${new_path/%.exe/}"
28309
28310  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28311
28312  # First separate the path from the arguments. This will split at the first
28313  # space.
28314  complete="$PROPER_COMPILER_CC"
28315  path="${complete%% *}"
28316  tmp="$complete EOL"
28317  arguments="${tmp#* }"
28318
28319  # Input might be given as Windows format, start by converting to
28320  # unix format.
28321  new_path="$path"
28322
28323  windows_path="$new_path"
28324  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28325    unix_path=`$CYGPATH -u "$windows_path"`
28326    new_path="$unix_path"
28327  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28328    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28329    new_path="$unix_path"
28330  fi
28331
28332
28333  # Now try to locate executable using which
28334  new_path=`$WHICH "$new_path" 2> /dev/null`
28335
28336  if test "x$new_path" = x; then
28337    # Oops. Which didn't find the executable.
28338    # The splitting of arguments from the executable at a space might have been incorrect,
28339    # since paths with space are more likely in Windows. Give it another try with the whole
28340    # argument.
28341    path="$complete"
28342    arguments="EOL"
28343    new_path="$path"
28344
28345  windows_path="$new_path"
28346  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28347    unix_path=`$CYGPATH -u "$windows_path"`
28348    new_path="$unix_path"
28349  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28350    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28351    new_path="$unix_path"
28352  fi
28353
28354
28355    new_path=`$WHICH "$new_path" 2> /dev/null`
28356
28357    if test "x$new_path" = x; then
28358      # It's still not found. Now this is an unrecoverable error.
28359      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28360$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28361      has_space=`$ECHO "$complete" | $GREP " "`
28362      if test "x$has_space" != x; then
28363        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28364$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28365      fi
28366      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28367    fi
28368  fi
28369
28370  # Now new_path has a complete unix path to the binary
28371  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28372    # Keep paths in /bin as-is, but remove trailing .exe if any
28373    new_path="${new_path/%.exe/}"
28374    # Do not save /bin paths to all_fixpath_prefixes!
28375  else
28376    # Not in mixed or Windows style, start by that.
28377    new_path=`cmd //c echo $new_path`
28378
28379  input_path="$new_path"
28380  # Check if we need to convert this using DOS-style short mode. If the path
28381  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28382  # take no chances and rewrite it.
28383  # Note: m4 eats our [], so we need to use [ and ] instead.
28384  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28385  if test "x$has_forbidden_chars" != x; then
28386    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28387    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28388  fi
28389
28390    # Output is in $new_path
28391
28392  windows_path="$new_path"
28393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28394    unix_path=`$CYGPATH -u "$windows_path"`
28395    new_path="$unix_path"
28396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28397    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28398    new_path="$unix_path"
28399  fi
28400
28401    # remove trailing .exe if any
28402    new_path="${new_path/%.exe/}"
28403
28404    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28405    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28406  fi
28407
28408  else
28409    # We're on a posix platform. Hooray! :)
28410    # First separate the path from the arguments. This will split at the first
28411    # space.
28412    complete="$PROPER_COMPILER_CC"
28413    path="${complete%% *}"
28414    tmp="$complete EOL"
28415    arguments="${tmp#* }"
28416
28417    # Cannot rely on the command "which" here since it doesn't always work.
28418    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28419    if test -z "$is_absolute_path"; then
28420      # Path to executable is not absolute. Find it.
28421      IFS_save="$IFS"
28422      IFS=:
28423      for p in $PATH; do
28424        if test -f "$p/$path" && test -x "$p/$path"; then
28425          new_path="$p/$path"
28426          break
28427        fi
28428      done
28429      IFS="$IFS_save"
28430    else
28431      # This is an absolute path, we can use it without further modifications.
28432      new_path="$path"
28433    fi
28434
28435    if test "x$new_path" = x; then
28436      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28437$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28438      has_space=`$ECHO "$complete" | $GREP " "`
28439      if test "x$has_space" != x; then
28440        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28441$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28442      fi
28443      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28444    fi
28445  fi
28446
28447  # Now join together the path and the arguments once again
28448  if test "x$arguments" != xEOL; then
28449    new_complete="$new_path ${arguments% *}"
28450  else
28451    new_complete="$new_path"
28452  fi
28453
28454  if test "x$complete" != "x$new_complete"; then
28455    PROPER_COMPILER_CC="$new_complete"
28456    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
28457$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
28458  fi
28459
28460    PATH="$RETRY_COMPILER_SAVED_PATH"
28461
28462    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
28463$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
28464
28465  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28466    # Follow a chain of symbolic links. Use readlink
28467    # where it exists, else fall back to horribly
28468    # complicated shell code.
28469    if test "x$READLINK_TESTED" != yes; then
28470      # On MacOSX there is a readlink tool with a different
28471      # purpose than the GNU readlink tool. Check the found readlink.
28472      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28473      if test "x$ISGNU" = x; then
28474        # A readlink that we do not know how to use.
28475        # Are there other non-GNU readlinks out there?
28476        READLINK_TESTED=yes
28477        READLINK=
28478      fi
28479    fi
28480
28481    if test "x$READLINK" != x; then
28482      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
28483    else
28484      # Save the current directory for restoring afterwards
28485      STARTDIR=$PWD
28486      COUNTER=0
28487      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
28488      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
28489      cd $sym_link_dir
28490      # Use -P flag to resolve symlinks in directories.
28491      cd `$THEPWDCMD -P`
28492      sym_link_dir=`$THEPWDCMD -P`
28493      # Resolve file symlinks
28494      while test $COUNTER -lt 20; do
28495        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28496        if test "x$ISLINK" == x; then
28497          # This is not a symbolic link! We are done!
28498          break
28499        fi
28500        # Again resolve directory symlinks since the target of the just found
28501        # link could be in a different directory
28502        cd `$DIRNAME $ISLINK`
28503        sym_link_dir=`$THEPWDCMD -P`
28504        sym_link_file=`$BASENAME $ISLINK`
28505        let COUNTER=COUNTER+1
28506      done
28507      cd $STARTDIR
28508      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
28509    fi
28510  fi
28511
28512    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28513$as_echo "$PROPER_COMPILER_CC" >&6; }
28514    CC="$PROPER_COMPILER_CC"
28515  else
28516    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
28517$as_echo "no, keeping CC" >&6; }
28518  fi
28519
28520
28521  COMPILER=$CC
28522  COMPILER_NAME=$COMPILER_NAME
28523
28524  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
28525    # cc -V output typically looks like
28526    #     cc: Sun C 5.12 Linux_i386 2011/11/16
28527    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
28528    # Check that this is likely to be the Solaris Studio cc.
28529    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
28530    if test $? -ne 0; then
28531      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28532      { $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
28533$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28534      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28535$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28536      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28537$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28538      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28539    fi
28540    # Remove usage instructions (if present), and
28541    # collapse compiler output into a single line
28542    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28543        $SED -e 's/ *[Uu]sage:.*//'`
28544    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28545        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
28546  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
28547    # xlc -qversion output typically looks like
28548    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
28549    #     Version: 11.01.0000.0015
28550    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
28551    # Check that this is likely to be the IBM XL C compiler.
28552    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
28553    if test $? -ne 0; then
28554      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28555      { $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
28556$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28557      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28558$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28559      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28560$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28561      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28562    fi
28563    # Collapse compiler output into a single line
28564    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28565    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28566        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
28567  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
28568    # There is no specific version flag, but all output starts with a version string.
28569    # First line typically looks something like:
28570    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
28571    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
28572    # Check that this is likely to be Microsoft CL.EXE.
28573    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
28574    if test $? -ne 0; then
28575      { $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
28576$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28577      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28578$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28579      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28580    fi
28581    # Collapse compiler output into a single line
28582    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28583    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28584        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
28585  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
28586    # gcc --version output typically looks like
28587    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
28588    #     Copyright (C) 2013 Free Software Foundation, Inc.
28589    #     This is free software; see the source for copying conditions.  There is NO
28590    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
28591    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28592    # Check that this is likely to be GCC.
28593    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
28594    if test $? -ne 0; then
28595      { $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
28596$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28597      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
28598$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
28599      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28600    fi
28601    # Remove Copyright and legalese from version string, and
28602    # collapse into a single line
28603    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28604        $SED -e 's/ *Copyright .*//'`
28605    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28606        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
28607  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
28608    # clang --version output typically looks like
28609    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
28610    #    clang version 3.3 (tags/RELEASE_33/final)
28611    # or
28612    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
28613    #    Target: x86_64-pc-linux-gnu
28614    #    Thread model: posix
28615    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28616    # Check that this is likely to be clang
28617    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
28618    if test $? -ne 0; then
28619      { $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
28620$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28621      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28622$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28623      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28624    fi
28625    # Collapse compiler output into a single line
28626    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28627    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28628        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
28629  else
28630      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
28631  fi
28632  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
28633  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
28634  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
28635  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
28636
28637  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
28638$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
28639
28640
28641  # Now that we have resolved CC ourself, let autoconf have its go at it
28642  ac_ext=c
28643ac_cpp='$CPP $CPPFLAGS'
28644ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28645ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28646ac_compiler_gnu=$ac_cv_c_compiler_gnu
28647if test -n "$ac_tool_prefix"; then
28648  for ac_prog in $CC
28649  do
28650    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28651set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28653$as_echo_n "checking for $ac_word... " >&6; }
28654if ${ac_cv_prog_CC+:} false; then :
28655  $as_echo_n "(cached) " >&6
28656else
28657  if test -n "$CC"; then
28658  ac_cv_prog_CC="$CC" # Let the user override the test.
28659else
28660as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28661for as_dir in $PATH
28662do
28663  IFS=$as_save_IFS
28664  test -z "$as_dir" && as_dir=.
28665    for ac_exec_ext in '' $ac_executable_extensions; do
28666  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28667    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
28668    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28669    break 2
28670  fi
28671done
28672  done
28673IFS=$as_save_IFS
28674
28675fi
28676fi
28677CC=$ac_cv_prog_CC
28678if test -n "$CC"; then
28679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
28680$as_echo "$CC" >&6; }
28681else
28682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28683$as_echo "no" >&6; }
28684fi
28685
28686
28687    test -n "$CC" && break
28688  done
28689fi
28690if test -z "$CC"; then
28691  ac_ct_CC=$CC
28692  for ac_prog in $CC
28693do
28694  # Extract the first word of "$ac_prog", so it can be a program name with args.
28695set dummy $ac_prog; ac_word=$2
28696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28697$as_echo_n "checking for $ac_word... " >&6; }
28698if ${ac_cv_prog_ac_ct_CC+:} false; then :
28699  $as_echo_n "(cached) " >&6
28700else
28701  if test -n "$ac_ct_CC"; then
28702  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
28703else
28704as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28705for as_dir in $PATH
28706do
28707  IFS=$as_save_IFS
28708  test -z "$as_dir" && as_dir=.
28709    for ac_exec_ext in '' $ac_executable_extensions; do
28710  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28711    ac_cv_prog_ac_ct_CC="$ac_prog"
28712    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28713    break 2
28714  fi
28715done
28716  done
28717IFS=$as_save_IFS
28718
28719fi
28720fi
28721ac_ct_CC=$ac_cv_prog_ac_ct_CC
28722if test -n "$ac_ct_CC"; then
28723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
28724$as_echo "$ac_ct_CC" >&6; }
28725else
28726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28727$as_echo "no" >&6; }
28728fi
28729
28730
28731  test -n "$ac_ct_CC" && break
28732done
28733
28734  if test "x$ac_ct_CC" = x; then
28735    CC=""
28736  else
28737    case $cross_compiling:$ac_tool_warned in
28738yes:)
28739{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28740$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28741ac_tool_warned=yes ;;
28742esac
28743    CC=$ac_ct_CC
28744  fi
28745fi
28746
28747
28748test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28749$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28750as_fn_error $? "no acceptable C compiler found in \$PATH
28751See \`config.log' for more details" "$LINENO" 5; }
28752
28753# Provide some information about the compiler.
28754$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
28755set X $ac_compile
28756ac_compiler=$2
28757for ac_option in --version -v -V -qversion; do
28758  { { ac_try="$ac_compiler $ac_option >&5"
28759case "(($ac_try" in
28760  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28761  *) ac_try_echo=$ac_try;;
28762esac
28763eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28764$as_echo "$ac_try_echo"; } >&5
28765  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
28766  ac_status=$?
28767  if test -s conftest.err; then
28768    sed '10a\
28769... rest of stderr output deleted ...
28770         10q' conftest.err >conftest.er1
28771    cat conftest.er1 >&5
28772  fi
28773  rm -f conftest.er1 conftest.err
28774  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28775  test $ac_status = 0; }
28776done
28777
28778cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28779/* end confdefs.h.  */
28780
28781int
28782main ()
28783{
28784
28785  ;
28786  return 0;
28787}
28788_ACEOF
28789ac_clean_files_save=$ac_clean_files
28790ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
28791# Try to create an executable without -o first, disregard a.out.
28792# It will help us diagnose broken compilers, and finding out an intuition
28793# of exeext.
28794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
28795$as_echo_n "checking whether the C compiler works... " >&6; }
28796ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
28797
28798# The possible output files:
28799ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
28800
28801ac_rmfiles=
28802for ac_file in $ac_files
28803do
28804  case $ac_file in
28805    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
28806    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
28807  esac
28808done
28809rm -f $ac_rmfiles
28810
28811if { { ac_try="$ac_link_default"
28812case "(($ac_try" in
28813  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28814  *) ac_try_echo=$ac_try;;
28815esac
28816eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28817$as_echo "$ac_try_echo"; } >&5
28818  (eval "$ac_link_default") 2>&5
28819  ac_status=$?
28820  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28821  test $ac_status = 0; }; then :
28822  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
28823# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
28824# in a Makefile.  We should not override ac_cv_exeext if it was cached,
28825# so that the user can short-circuit this test for compilers unknown to
28826# Autoconf.
28827for ac_file in $ac_files ''
28828do
28829  test -f "$ac_file" || continue
28830  case $ac_file in
28831    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
28832	;;
28833    [ab].out )
28834	# We found the default executable, but exeext='' is most
28835	# certainly right.
28836	break;;
28837    *.* )
28838	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
28839	then :; else
28840	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
28841	fi
28842	# We set ac_cv_exeext here because the later test for it is not
28843	# safe: cross compilers may not add the suffix if given an `-o'
28844	# argument, so we may need to know it at that point already.
28845	# Even if this section looks crufty: it has the advantage of
28846	# actually working.
28847	break;;
28848    * )
28849	break;;
28850  esac
28851done
28852test "$ac_cv_exeext" = no && ac_cv_exeext=
28853
28854else
28855  ac_file=''
28856fi
28857if test -z "$ac_file"; then :
28858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28859$as_echo "no" >&6; }
28860$as_echo "$as_me: failed program was:" >&5
28861sed 's/^/| /' conftest.$ac_ext >&5
28862
28863{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28864$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28865as_fn_error 77 "C compiler cannot create executables
28866See \`config.log' for more details" "$LINENO" 5; }
28867else
28868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28869$as_echo "yes" >&6; }
28870fi
28871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
28872$as_echo_n "checking for C compiler default output file name... " >&6; }
28873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
28874$as_echo "$ac_file" >&6; }
28875ac_exeext=$ac_cv_exeext
28876
28877rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
28878ac_clean_files=$ac_clean_files_save
28879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
28880$as_echo_n "checking for suffix of executables... " >&6; }
28881if { { ac_try="$ac_link"
28882case "(($ac_try" in
28883  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28884  *) ac_try_echo=$ac_try;;
28885esac
28886eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28887$as_echo "$ac_try_echo"; } >&5
28888  (eval "$ac_link") 2>&5
28889  ac_status=$?
28890  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28891  test $ac_status = 0; }; then :
28892  # If both `conftest.exe' and `conftest' are `present' (well, observable)
28893# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
28894# work properly (i.e., refer to `conftest.exe'), while it won't with
28895# `rm'.
28896for ac_file in conftest.exe conftest conftest.*; do
28897  test -f "$ac_file" || continue
28898  case $ac_file in
28899    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
28900    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
28901	  break;;
28902    * ) break;;
28903  esac
28904done
28905else
28906  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28907$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28908as_fn_error $? "cannot compute suffix of executables: cannot compile and link
28909See \`config.log' for more details" "$LINENO" 5; }
28910fi
28911rm -f conftest conftest$ac_cv_exeext
28912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
28913$as_echo "$ac_cv_exeext" >&6; }
28914
28915rm -f conftest.$ac_ext
28916EXEEXT=$ac_cv_exeext
28917ac_exeext=$EXEEXT
28918cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28919/* end confdefs.h.  */
28920#include <stdio.h>
28921int
28922main ()
28923{
28924FILE *f = fopen ("conftest.out", "w");
28925 return ferror (f) || fclose (f) != 0;
28926
28927  ;
28928  return 0;
28929}
28930_ACEOF
28931ac_clean_files="$ac_clean_files conftest.out"
28932# Check that the compiler produces executables we can run.  If not, either
28933# the compiler is broken, or we cross compile.
28934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
28935$as_echo_n "checking whether we are cross compiling... " >&6; }
28936if test "$cross_compiling" != yes; then
28937  { { ac_try="$ac_link"
28938case "(($ac_try" in
28939  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28940  *) ac_try_echo=$ac_try;;
28941esac
28942eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28943$as_echo "$ac_try_echo"; } >&5
28944  (eval "$ac_link") 2>&5
28945  ac_status=$?
28946  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28947  test $ac_status = 0; }
28948  if { ac_try='./conftest$ac_cv_exeext'
28949  { { case "(($ac_try" in
28950  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28951  *) ac_try_echo=$ac_try;;
28952esac
28953eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28954$as_echo "$ac_try_echo"; } >&5
28955  (eval "$ac_try") 2>&5
28956  ac_status=$?
28957  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28958  test $ac_status = 0; }; }; then
28959    cross_compiling=no
28960  else
28961    if test "$cross_compiling" = maybe; then
28962	cross_compiling=yes
28963    else
28964	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28965$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28966as_fn_error $? "cannot run C compiled programs.
28967If you meant to cross compile, use \`--host'.
28968See \`config.log' for more details" "$LINENO" 5; }
28969    fi
28970  fi
28971fi
28972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
28973$as_echo "$cross_compiling" >&6; }
28974
28975rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
28976ac_clean_files=$ac_clean_files_save
28977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
28978$as_echo_n "checking for suffix of object files... " >&6; }
28979if ${ac_cv_objext+:} false; then :
28980  $as_echo_n "(cached) " >&6
28981else
28982  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28983/* end confdefs.h.  */
28984
28985int
28986main ()
28987{
28988
28989  ;
28990  return 0;
28991}
28992_ACEOF
28993rm -f conftest.o conftest.obj
28994if { { ac_try="$ac_compile"
28995case "(($ac_try" in
28996  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28997  *) ac_try_echo=$ac_try;;
28998esac
28999eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29000$as_echo "$ac_try_echo"; } >&5
29001  (eval "$ac_compile") 2>&5
29002  ac_status=$?
29003  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29004  test $ac_status = 0; }; then :
29005  for ac_file in conftest.o conftest.obj conftest.*; do
29006  test -f "$ac_file" || continue;
29007  case $ac_file in
29008    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
29009    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
29010       break;;
29011  esac
29012done
29013else
29014  $as_echo "$as_me: failed program was:" >&5
29015sed 's/^/| /' conftest.$ac_ext >&5
29016
29017{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29018$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29019as_fn_error $? "cannot compute suffix of object files: cannot compile
29020See \`config.log' for more details" "$LINENO" 5; }
29021fi
29022rm -f conftest.$ac_cv_objext conftest.$ac_ext
29023fi
29024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
29025$as_echo "$ac_cv_objext" >&6; }
29026OBJEXT=$ac_cv_objext
29027ac_objext=$OBJEXT
29028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
29029$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
29030if ${ac_cv_c_compiler_gnu+:} false; then :
29031  $as_echo_n "(cached) " >&6
29032else
29033  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29034/* end confdefs.h.  */
29035
29036int
29037main ()
29038{
29039#ifndef __GNUC__
29040       choke me
29041#endif
29042
29043  ;
29044  return 0;
29045}
29046_ACEOF
29047if ac_fn_c_try_compile "$LINENO"; then :
29048  ac_compiler_gnu=yes
29049else
29050  ac_compiler_gnu=no
29051fi
29052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29053ac_cv_c_compiler_gnu=$ac_compiler_gnu
29054
29055fi
29056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
29057$as_echo "$ac_cv_c_compiler_gnu" >&6; }
29058if test $ac_compiler_gnu = yes; then
29059  GCC=yes
29060else
29061  GCC=
29062fi
29063ac_test_CFLAGS=${CFLAGS+set}
29064ac_save_CFLAGS=$CFLAGS
29065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
29066$as_echo_n "checking whether $CC accepts -g... " >&6; }
29067if ${ac_cv_prog_cc_g+:} false; then :
29068  $as_echo_n "(cached) " >&6
29069else
29070  ac_save_c_werror_flag=$ac_c_werror_flag
29071   ac_c_werror_flag=yes
29072   ac_cv_prog_cc_g=no
29073   CFLAGS="-g"
29074   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29075/* end confdefs.h.  */
29076
29077int
29078main ()
29079{
29080
29081  ;
29082  return 0;
29083}
29084_ACEOF
29085if ac_fn_c_try_compile "$LINENO"; then :
29086  ac_cv_prog_cc_g=yes
29087else
29088  CFLAGS=""
29089      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29090/* end confdefs.h.  */
29091
29092int
29093main ()
29094{
29095
29096  ;
29097  return 0;
29098}
29099_ACEOF
29100if ac_fn_c_try_compile "$LINENO"; then :
29101
29102else
29103  ac_c_werror_flag=$ac_save_c_werror_flag
29104	 CFLAGS="-g"
29105	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29106/* end confdefs.h.  */
29107
29108int
29109main ()
29110{
29111
29112  ;
29113  return 0;
29114}
29115_ACEOF
29116if ac_fn_c_try_compile "$LINENO"; then :
29117  ac_cv_prog_cc_g=yes
29118fi
29119rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29120fi
29121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29122fi
29123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29124   ac_c_werror_flag=$ac_save_c_werror_flag
29125fi
29126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
29127$as_echo "$ac_cv_prog_cc_g" >&6; }
29128if test "$ac_test_CFLAGS" = set; then
29129  CFLAGS=$ac_save_CFLAGS
29130elif test $ac_cv_prog_cc_g = yes; then
29131  if test "$GCC" = yes; then
29132    CFLAGS="-g -O2"
29133  else
29134    CFLAGS="-g"
29135  fi
29136else
29137  if test "$GCC" = yes; then
29138    CFLAGS="-O2"
29139  else
29140    CFLAGS=
29141  fi
29142fi
29143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
29144$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
29145if ${ac_cv_prog_cc_c89+:} false; then :
29146  $as_echo_n "(cached) " >&6
29147else
29148  ac_cv_prog_cc_c89=no
29149ac_save_CC=$CC
29150cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29151/* end confdefs.h.  */
29152#include <stdarg.h>
29153#include <stdio.h>
29154struct stat;
29155/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
29156struct buf { int x; };
29157FILE * (*rcsopen) (struct buf *, struct stat *, int);
29158static char *e (p, i)
29159     char **p;
29160     int i;
29161{
29162  return p[i];
29163}
29164static char *f (char * (*g) (char **, int), char **p, ...)
29165{
29166  char *s;
29167  va_list v;
29168  va_start (v,p);
29169  s = g (p, va_arg (v,int));
29170  va_end (v);
29171  return s;
29172}
29173
29174/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
29175   function prototypes and stuff, but not '\xHH' hex character constants.
29176   These don't provoke an error unfortunately, instead are silently treated
29177   as 'x'.  The following induces an error, until -std is added to get
29178   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
29179   array size at least.  It's necessary to write '\x00'==0 to get something
29180   that's true only with -std.  */
29181int osf4_cc_array ['\x00' == 0 ? 1 : -1];
29182
29183/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
29184   inside strings and character constants.  */
29185#define FOO(x) 'x'
29186int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
29187
29188int test (int i, double x);
29189struct s1 {int (*f) (int a);};
29190struct s2 {int (*f) (double a);};
29191int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
29192int argc;
29193char **argv;
29194int
29195main ()
29196{
29197return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
29198  ;
29199  return 0;
29200}
29201_ACEOF
29202for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
29203	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
29204do
29205  CC="$ac_save_CC $ac_arg"
29206  if ac_fn_c_try_compile "$LINENO"; then :
29207  ac_cv_prog_cc_c89=$ac_arg
29208fi
29209rm -f core conftest.err conftest.$ac_objext
29210  test "x$ac_cv_prog_cc_c89" != "xno" && break
29211done
29212rm -f conftest.$ac_ext
29213CC=$ac_save_CC
29214
29215fi
29216# AC_CACHE_VAL
29217case "x$ac_cv_prog_cc_c89" in
29218  x)
29219    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
29220$as_echo "none needed" >&6; } ;;
29221  xno)
29222    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
29223$as_echo "unsupported" >&6; } ;;
29224  *)
29225    CC="$CC $ac_cv_prog_cc_c89"
29226    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
29227$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
29228esac
29229if test "x$ac_cv_prog_cc_c89" != xno; then :
29230
29231fi
29232
29233ac_ext=cpp
29234ac_cpp='$CXXCPP $CPPFLAGS'
29235ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29236ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29237ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29238
29239
29240
29241  COMPILER_NAME=C++
29242  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
29243
29244  if test "x$CXX" != x; then
29245    # User has supplied compiler name already, always let that override.
29246    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
29247$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
29248    if test "x`basename $CXX`" = "x$CXX"; then
29249      # A command without a complete path is provided, search $PATH.
29250
29251      for ac_prog in $CXX
29252do
29253  # Extract the first word of "$ac_prog", so it can be a program name with args.
29254set dummy $ac_prog; ac_word=$2
29255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29256$as_echo_n "checking for $ac_word... " >&6; }
29257if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29258  $as_echo_n "(cached) " >&6
29259else
29260  case $POTENTIAL_CXX in
29261  [\\/]* | ?:[\\/]*)
29262  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29263  ;;
29264  *)
29265  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29266for as_dir in $PATH
29267do
29268  IFS=$as_save_IFS
29269  test -z "$as_dir" && as_dir=.
29270    for ac_exec_ext in '' $ac_executable_extensions; do
29271  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29272    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29273    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29274    break 2
29275  fi
29276done
29277  done
29278IFS=$as_save_IFS
29279
29280  ;;
29281esac
29282fi
29283POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29284if test -n "$POTENTIAL_CXX"; then
29285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29286$as_echo "$POTENTIAL_CXX" >&6; }
29287else
29288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29289$as_echo "no" >&6; }
29290fi
29291
29292
29293  test -n "$POTENTIAL_CXX" && break
29294done
29295
29296      if test "x$POTENTIAL_CXX" != x; then
29297        CXX=$POTENTIAL_CXX
29298      else
29299        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
29300      fi
29301    else
29302      # Otherwise it might already be a complete path
29303      if test ! -x "$CXX"; then
29304        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
29305      fi
29306    fi
29307  else
29308    # No user supplied value. Locate compiler ourselves.
29309
29310    # If we are cross compiling, assume cross compilation tools follows the
29311    # cross compilation standard where they are prefixed with the autoconf
29312    # standard name for the target. For example the binary
29313    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
29314    # If we are not cross compiling, then the default compiler name will be
29315    # used.
29316
29317    CXX=
29318    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
29319    # before checking the rest of the PATH.
29320    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
29321    # step, this should not be necessary.
29322    if test -n "$TOOLCHAIN_PATH"; then
29323      PATH_save="$PATH"
29324      PATH="$TOOLCHAIN_PATH"
29325      for ac_prog in $SEARCH_LIST
29326do
29327  # Extract the first word of "$ac_prog", so it can be a program name with args.
29328set dummy $ac_prog; ac_word=$2
29329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29330$as_echo_n "checking for $ac_word... " >&6; }
29331if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
29332  $as_echo_n "(cached) " >&6
29333else
29334  case $TOOLCHAIN_PATH_CXX in
29335  [\\/]* | ?:[\\/]*)
29336  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
29337  ;;
29338  *)
29339  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29340for as_dir in $PATH
29341do
29342  IFS=$as_save_IFS
29343  test -z "$as_dir" && as_dir=.
29344    for ac_exec_ext in '' $ac_executable_extensions; do
29345  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29346    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
29347    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29348    break 2
29349  fi
29350done
29351  done
29352IFS=$as_save_IFS
29353
29354  ;;
29355esac
29356fi
29357TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
29358if test -n "$TOOLCHAIN_PATH_CXX"; then
29359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
29360$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
29361else
29362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29363$as_echo "no" >&6; }
29364fi
29365
29366
29367  test -n "$TOOLCHAIN_PATH_CXX" && break
29368done
29369
29370      CXX=$TOOLCHAIN_PATH_CXX
29371      PATH="$PATH_save"
29372    fi
29373
29374    # AC_PATH_PROGS can't be run multiple times with the same variable,
29375    # so create a new name for this run.
29376    if test "x$CXX" = x; then
29377      for ac_prog in $SEARCH_LIST
29378do
29379  # Extract the first word of "$ac_prog", so it can be a program name with args.
29380set dummy $ac_prog; ac_word=$2
29381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29382$as_echo_n "checking for $ac_word... " >&6; }
29383if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29384  $as_echo_n "(cached) " >&6
29385else
29386  case $POTENTIAL_CXX in
29387  [\\/]* | ?:[\\/]*)
29388  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29389  ;;
29390  *)
29391  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29392for as_dir in $PATH
29393do
29394  IFS=$as_save_IFS
29395  test -z "$as_dir" && as_dir=.
29396    for ac_exec_ext in '' $ac_executable_extensions; do
29397  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29398    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29399    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29400    break 2
29401  fi
29402done
29403  done
29404IFS=$as_save_IFS
29405
29406  ;;
29407esac
29408fi
29409POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29410if test -n "$POTENTIAL_CXX"; then
29411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29412$as_echo "$POTENTIAL_CXX" >&6; }
29413else
29414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29415$as_echo "no" >&6; }
29416fi
29417
29418
29419  test -n "$POTENTIAL_CXX" && break
29420done
29421
29422      CXX=$POTENTIAL_CXX
29423    fi
29424
29425    if test "x$CXX" = x; then
29426
29427  # Print a helpful message on how to acquire the necessary build dependency.
29428  # devkit is the help tag: freetype, cups, pulse, alsa etc
29429  MISSING_DEPENDENCY=devkit
29430
29431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29432    cygwin_help $MISSING_DEPENDENCY
29433  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29434    msys_help $MISSING_DEPENDENCY
29435  else
29436    PKGHANDLER_COMMAND=
29437
29438    case $PKGHANDLER in
29439      apt-get)
29440        apt_help     $MISSING_DEPENDENCY ;;
29441      yum)
29442        yum_help     $MISSING_DEPENDENCY ;;
29443      port)
29444        port_help    $MISSING_DEPENDENCY ;;
29445      pkgutil)
29446        pkgutil_help $MISSING_DEPENDENCY ;;
29447      pkgadd)
29448        pkgadd_help  $MISSING_DEPENDENCY ;;
29449    esac
29450
29451    if test "x$PKGHANDLER_COMMAND" != x; then
29452      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29453    fi
29454  fi
29455
29456      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
29457    fi
29458  fi
29459
29460  # Now we have a compiler binary in CXX. Make sure it's okay.
29461
29462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29463
29464  # First separate the path from the arguments. This will split at the first
29465  # space.
29466  complete="$CXX"
29467  path="${complete%% *}"
29468  tmp="$complete EOL"
29469  arguments="${tmp#* }"
29470
29471  # Input might be given as Windows format, start by converting to
29472  # unix format.
29473  new_path=`$CYGPATH -u "$path"`
29474
29475  # Now try to locate executable using which
29476  new_path=`$WHICH "$new_path" 2> /dev/null`
29477  # bat and cmd files are not always considered executable in cygwin causing which
29478  # to not find them
29479  if test "x$new_path" = x \
29480      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29481      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29482    new_path=`$CYGPATH -u "$path"`
29483  fi
29484  if test "x$new_path" = x; then
29485    # Oops. Which didn't find the executable.
29486    # The splitting of arguments from the executable at a space might have been incorrect,
29487    # since paths with space are more likely in Windows. Give it another try with the whole
29488    # argument.
29489    path="$complete"
29490    arguments="EOL"
29491    new_path=`$CYGPATH -u "$path"`
29492    new_path=`$WHICH "$new_path" 2> /dev/null`
29493    # bat and cmd files are not always considered executable in cygwin causing which
29494    # to not find them
29495    if test "x$new_path" = x \
29496        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29497        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29498      new_path=`$CYGPATH -u "$path"`
29499    fi
29500    if test "x$new_path" = x; then
29501      # It's still not found. Now this is an unrecoverable error.
29502      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29503$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29504      has_space=`$ECHO "$complete" | $GREP " "`
29505      if test "x$has_space" != x; then
29506        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29507$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29508      fi
29509      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29510    fi
29511  fi
29512
29513  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29514  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29515  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29516  # "foo.exe" is OK but "foo" is an error.
29517  #
29518  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29519  # It is also a way to make sure we got the proper file name for the real test later on.
29520  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29521  if test "x$test_shortpath" = x; then
29522    # Short path failed, file does not exist as specified.
29523    # Try adding .exe or .cmd
29524    if test -f "${new_path}.exe"; then
29525      input_to_shortpath="${new_path}.exe"
29526    elif test -f "${new_path}.cmd"; then
29527      input_to_shortpath="${new_path}.cmd"
29528    else
29529      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
29530$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
29531      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29532$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29533      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29534    fi
29535  else
29536    input_to_shortpath="$new_path"
29537  fi
29538
29539  # Call helper function which possibly converts this using DOS-style short mode.
29540  # If so, the updated path is stored in $new_path.
29541  new_path="$input_to_shortpath"
29542
29543  input_path="$input_to_shortpath"
29544  # Check if we need to convert this using DOS-style short mode. If the path
29545  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29546  # take no chances and rewrite it.
29547  # Note: m4 eats our [], so we need to use [ and ] instead.
29548  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29549  if test "x$has_forbidden_chars" != x; then
29550    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29551    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29552    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29553    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29554      # Going to short mode and back again did indeed matter. Since short mode is
29555      # case insensitive, let's make it lowercase to improve readability.
29556      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29557      # Now convert it back to Unix-stile (cygpath)
29558      input_path=`$CYGPATH -u "$shortmode_path"`
29559      new_path="$input_path"
29560    fi
29561  fi
29562
29563  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29564  if test "x$test_cygdrive_prefix" = x; then
29565    # As a simple fix, exclude /usr/bin since it's not a real path.
29566    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29567      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29568      # a path prefixed by /cygdrive for fixpath to work.
29569      new_path="$CYGWIN_ROOT_PATH$input_path"
29570    fi
29571  fi
29572
29573  # remove trailing .exe if any
29574  new_path="${new_path/%.exe/}"
29575
29576  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29577
29578  # First separate the path from the arguments. This will split at the first
29579  # space.
29580  complete="$CXX"
29581  path="${complete%% *}"
29582  tmp="$complete EOL"
29583  arguments="${tmp#* }"
29584
29585  # Input might be given as Windows format, start by converting to
29586  # unix format.
29587  new_path="$path"
29588
29589  windows_path="$new_path"
29590  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29591    unix_path=`$CYGPATH -u "$windows_path"`
29592    new_path="$unix_path"
29593  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29594    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29595    new_path="$unix_path"
29596  fi
29597
29598
29599  # Now try to locate executable using which
29600  new_path=`$WHICH "$new_path" 2> /dev/null`
29601
29602  if test "x$new_path" = x; then
29603    # Oops. Which didn't find the executable.
29604    # The splitting of arguments from the executable at a space might have been incorrect,
29605    # since paths with space are more likely in Windows. Give it another try with the whole
29606    # argument.
29607    path="$complete"
29608    arguments="EOL"
29609    new_path="$path"
29610
29611  windows_path="$new_path"
29612  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29613    unix_path=`$CYGPATH -u "$windows_path"`
29614    new_path="$unix_path"
29615  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29616    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29617    new_path="$unix_path"
29618  fi
29619
29620
29621    new_path=`$WHICH "$new_path" 2> /dev/null`
29622
29623    if test "x$new_path" = x; then
29624      # It's still not found. Now this is an unrecoverable error.
29625      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29626$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29627      has_space=`$ECHO "$complete" | $GREP " "`
29628      if test "x$has_space" != x; then
29629        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29630$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29631      fi
29632      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29633    fi
29634  fi
29635
29636  # Now new_path has a complete unix path to the binary
29637  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29638    # Keep paths in /bin as-is, but remove trailing .exe if any
29639    new_path="${new_path/%.exe/}"
29640    # Do not save /bin paths to all_fixpath_prefixes!
29641  else
29642    # Not in mixed or Windows style, start by that.
29643    new_path=`cmd //c echo $new_path`
29644
29645  input_path="$new_path"
29646  # Check if we need to convert this using DOS-style short mode. If the path
29647  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29648  # take no chances and rewrite it.
29649  # Note: m4 eats our [], so we need to use [ and ] instead.
29650  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29651  if test "x$has_forbidden_chars" != x; then
29652    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29653    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29654  fi
29655
29656    # Output is in $new_path
29657
29658  windows_path="$new_path"
29659  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29660    unix_path=`$CYGPATH -u "$windows_path"`
29661    new_path="$unix_path"
29662  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29663    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29664    new_path="$unix_path"
29665  fi
29666
29667    # remove trailing .exe if any
29668    new_path="${new_path/%.exe/}"
29669
29670    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29671    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29672  fi
29673
29674  else
29675    # We're on a posix platform. Hooray! :)
29676    # First separate the path from the arguments. This will split at the first
29677    # space.
29678    complete="$CXX"
29679    path="${complete%% *}"
29680    tmp="$complete EOL"
29681    arguments="${tmp#* }"
29682
29683    # Cannot rely on the command "which" here since it doesn't always work.
29684    is_absolute_path=`$ECHO "$path" | $GREP ^/`
29685    if test -z "$is_absolute_path"; then
29686      # Path to executable is not absolute. Find it.
29687      IFS_save="$IFS"
29688      IFS=:
29689      for p in $PATH; do
29690        if test -f "$p/$path" && test -x "$p/$path"; then
29691          new_path="$p/$path"
29692          break
29693        fi
29694      done
29695      IFS="$IFS_save"
29696    else
29697      # This is an absolute path, we can use it without further modifications.
29698      new_path="$path"
29699    fi
29700
29701    if test "x$new_path" = x; then
29702      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29703$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29704      has_space=`$ECHO "$complete" | $GREP " "`
29705      if test "x$has_space" != x; then
29706        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29707$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29708      fi
29709      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29710    fi
29711  fi
29712
29713  # Now join together the path and the arguments once again
29714  if test "x$arguments" != xEOL; then
29715    new_complete="$new_path ${arguments% *}"
29716  else
29717    new_complete="$new_path"
29718  fi
29719
29720  if test "x$complete" != "x$new_complete"; then
29721    CXX="$new_complete"
29722    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
29723$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
29724  fi
29725
29726  TEST_COMPILER="$CXX"
29727  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
29728  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
29729  if test "x$OPENJDK_BUILD_OS" != xaix; then
29730    # FIXME: This test should not be needed anymore; we don't do that for any platform.
29731    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
29732$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
29733
29734  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29735    # Follow a chain of symbolic links. Use readlink
29736    # where it exists, else fall back to horribly
29737    # complicated shell code.
29738    if test "x$READLINK_TESTED" != yes; then
29739      # On MacOSX there is a readlink tool with a different
29740      # purpose than the GNU readlink tool. Check the found readlink.
29741      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29742      if test "x$ISGNU" = x; then
29743        # A readlink that we do not know how to use.
29744        # Are there other non-GNU readlinks out there?
29745        READLINK_TESTED=yes
29746        READLINK=
29747      fi
29748    fi
29749
29750    if test "x$READLINK" != x; then
29751      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
29752    else
29753      # Save the current directory for restoring afterwards
29754      STARTDIR=$PWD
29755      COUNTER=0
29756      sym_link_dir=`$DIRNAME $TEST_COMPILER`
29757      sym_link_file=`$BASENAME $TEST_COMPILER`
29758      cd $sym_link_dir
29759      # Use -P flag to resolve symlinks in directories.
29760      cd `$THEPWDCMD -P`
29761      sym_link_dir=`$THEPWDCMD -P`
29762      # Resolve file symlinks
29763      while test $COUNTER -lt 20; do
29764        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29765        if test "x$ISLINK" == x; then
29766          # This is not a symbolic link! We are done!
29767          break
29768        fi
29769        # Again resolve directory symlinks since the target of the just found
29770        # link could be in a different directory
29771        cd `$DIRNAME $ISLINK`
29772        sym_link_dir=`$THEPWDCMD -P`
29773        sym_link_file=`$BASENAME $ISLINK`
29774        let COUNTER=COUNTER+1
29775      done
29776      cd $STARTDIR
29777      TEST_COMPILER=$sym_link_dir/$sym_link_file
29778    fi
29779  fi
29780
29781    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
29782$as_echo "$TEST_COMPILER" >&6; }
29783  fi
29784  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
29785$as_echo_n "checking if CXX is disguised ccache... " >&6; }
29786
29787  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
29788  if test "x$COMPILER_BASENAME" = "xccache"; then
29789    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
29790$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
29791    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
29792    # We want to control ccache invocation ourselves, so ignore this cc and try
29793    # searching again.
29794
29795    # Remove the path to the fake ccache cc from the PATH
29796    RETRY_COMPILER_SAVED_PATH="$PATH"
29797    COMPILER_DIRNAME=`$DIRNAME $CXX`
29798    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
29799
29800    # Try again looking for our compiler
29801    if test -n "$ac_tool_prefix"; then
29802  for ac_prog in $TOOLCHAIN_CXX_BINARY
29803  do
29804    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29805set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29807$as_echo_n "checking for $ac_word... " >&6; }
29808if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
29809  $as_echo_n "(cached) " >&6
29810else
29811  if test -n "$PROPER_COMPILER_CXX"; then
29812  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
29813else
29814as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29815for as_dir in $PATH
29816do
29817  IFS=$as_save_IFS
29818  test -z "$as_dir" && as_dir=.
29819    for ac_exec_ext in '' $ac_executable_extensions; do
29820  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29821    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
29822    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29823    break 2
29824  fi
29825done
29826  done
29827IFS=$as_save_IFS
29828
29829fi
29830fi
29831PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
29832if test -n "$PROPER_COMPILER_CXX"; then
29833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
29834$as_echo "$PROPER_COMPILER_CXX" >&6; }
29835else
29836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29837$as_echo "no" >&6; }
29838fi
29839
29840
29841    test -n "$PROPER_COMPILER_CXX" && break
29842  done
29843fi
29844if test -z "$PROPER_COMPILER_CXX"; then
29845  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
29846  for ac_prog in $TOOLCHAIN_CXX_BINARY
29847do
29848  # Extract the first word of "$ac_prog", so it can be a program name with args.
29849set dummy $ac_prog; ac_word=$2
29850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29851$as_echo_n "checking for $ac_word... " >&6; }
29852if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
29853  $as_echo_n "(cached) " >&6
29854else
29855  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
29856  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
29857else
29858as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29859for as_dir in $PATH
29860do
29861  IFS=$as_save_IFS
29862  test -z "$as_dir" && as_dir=.
29863    for ac_exec_ext in '' $ac_executable_extensions; do
29864  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29865    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
29866    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29867    break 2
29868  fi
29869done
29870  done
29871IFS=$as_save_IFS
29872
29873fi
29874fi
29875ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
29876if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
29877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
29878$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
29879else
29880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29881$as_echo "no" >&6; }
29882fi
29883
29884
29885  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
29886done
29887
29888  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
29889    PROPER_COMPILER_CXX=""
29890  else
29891    case $cross_compiling:$ac_tool_warned in
29892yes:)
29893{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29894$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29895ac_tool_warned=yes ;;
29896esac
29897    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
29898  fi
29899fi
29900
29901
29902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29903
29904  # First separate the path from the arguments. This will split at the first
29905  # space.
29906  complete="$PROPER_COMPILER_CXX"
29907  path="${complete%% *}"
29908  tmp="$complete EOL"
29909  arguments="${tmp#* }"
29910
29911  # Input might be given as Windows format, start by converting to
29912  # unix format.
29913  new_path=`$CYGPATH -u "$path"`
29914
29915  # Now try to locate executable using which
29916  new_path=`$WHICH "$new_path" 2> /dev/null`
29917  # bat and cmd files are not always considered executable in cygwin causing which
29918  # to not find them
29919  if test "x$new_path" = x \
29920      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29921      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29922    new_path=`$CYGPATH -u "$path"`
29923  fi
29924  if test "x$new_path" = x; then
29925    # Oops. Which didn't find the executable.
29926    # The splitting of arguments from the executable at a space might have been incorrect,
29927    # since paths with space are more likely in Windows. Give it another try with the whole
29928    # argument.
29929    path="$complete"
29930    arguments="EOL"
29931    new_path=`$CYGPATH -u "$path"`
29932    new_path=`$WHICH "$new_path" 2> /dev/null`
29933    # bat and cmd files are not always considered executable in cygwin causing which
29934    # to not find them
29935    if test "x$new_path" = x \
29936        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29937        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29938      new_path=`$CYGPATH -u "$path"`
29939    fi
29940    if test "x$new_path" = x; then
29941      # It's still not found. Now this is an unrecoverable error.
29942      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
29943$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
29944      has_space=`$ECHO "$complete" | $GREP " "`
29945      if test "x$has_space" != x; then
29946        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29947$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29948      fi
29949      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
29950    fi
29951  fi
29952
29953  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29954  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29955  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29956  # "foo.exe" is OK but "foo" is an error.
29957  #
29958  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29959  # It is also a way to make sure we got the proper file name for the real test later on.
29960  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29961  if test "x$test_shortpath" = x; then
29962    # Short path failed, file does not exist as specified.
29963    # Try adding .exe or .cmd
29964    if test -f "${new_path}.exe"; then
29965      input_to_shortpath="${new_path}.exe"
29966    elif test -f "${new_path}.cmd"; then
29967      input_to_shortpath="${new_path}.cmd"
29968    else
29969      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
29970$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
29971      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29972$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29973      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
29974    fi
29975  else
29976    input_to_shortpath="$new_path"
29977  fi
29978
29979  # Call helper function which possibly converts this using DOS-style short mode.
29980  # If so, the updated path is stored in $new_path.
29981  new_path="$input_to_shortpath"
29982
29983  input_path="$input_to_shortpath"
29984  # Check if we need to convert this using DOS-style short mode. If the path
29985  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29986  # take no chances and rewrite it.
29987  # Note: m4 eats our [], so we need to use [ and ] instead.
29988  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29989  if test "x$has_forbidden_chars" != x; then
29990    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29991    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29992    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29993    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29994      # Going to short mode and back again did indeed matter. Since short mode is
29995      # case insensitive, let's make it lowercase to improve readability.
29996      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29997      # Now convert it back to Unix-stile (cygpath)
29998      input_path=`$CYGPATH -u "$shortmode_path"`
29999      new_path="$input_path"
30000    fi
30001  fi
30002
30003  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30004  if test "x$test_cygdrive_prefix" = x; then
30005    # As a simple fix, exclude /usr/bin since it's not a real path.
30006    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30007      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30008      # a path prefixed by /cygdrive for fixpath to work.
30009      new_path="$CYGWIN_ROOT_PATH$input_path"
30010    fi
30011  fi
30012
30013  # remove trailing .exe if any
30014  new_path="${new_path/%.exe/}"
30015
30016  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30017
30018  # First separate the path from the arguments. This will split at the first
30019  # space.
30020  complete="$PROPER_COMPILER_CXX"
30021  path="${complete%% *}"
30022  tmp="$complete EOL"
30023  arguments="${tmp#* }"
30024
30025  # Input might be given as Windows format, start by converting to
30026  # unix format.
30027  new_path="$path"
30028
30029  windows_path="$new_path"
30030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30031    unix_path=`$CYGPATH -u "$windows_path"`
30032    new_path="$unix_path"
30033  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30034    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30035    new_path="$unix_path"
30036  fi
30037
30038
30039  # Now try to locate executable using which
30040  new_path=`$WHICH "$new_path" 2> /dev/null`
30041
30042  if test "x$new_path" = x; then
30043    # Oops. Which didn't find the executable.
30044    # The splitting of arguments from the executable at a space might have been incorrect,
30045    # since paths with space are more likely in Windows. Give it another try with the whole
30046    # argument.
30047    path="$complete"
30048    arguments="EOL"
30049    new_path="$path"
30050
30051  windows_path="$new_path"
30052  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30053    unix_path=`$CYGPATH -u "$windows_path"`
30054    new_path="$unix_path"
30055  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30056    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30057    new_path="$unix_path"
30058  fi
30059
30060
30061    new_path=`$WHICH "$new_path" 2> /dev/null`
30062
30063    if test "x$new_path" = x; then
30064      # It's still not found. Now this is an unrecoverable error.
30065      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30066$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30067      has_space=`$ECHO "$complete" | $GREP " "`
30068      if test "x$has_space" != x; then
30069        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30070$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30071      fi
30072      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30073    fi
30074  fi
30075
30076  # Now new_path has a complete unix path to the binary
30077  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30078    # Keep paths in /bin as-is, but remove trailing .exe if any
30079    new_path="${new_path/%.exe/}"
30080    # Do not save /bin paths to all_fixpath_prefixes!
30081  else
30082    # Not in mixed or Windows style, start by that.
30083    new_path=`cmd //c echo $new_path`
30084
30085  input_path="$new_path"
30086  # Check if we need to convert this using DOS-style short mode. If the path
30087  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30088  # take no chances and rewrite it.
30089  # Note: m4 eats our [], so we need to use [ and ] instead.
30090  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30091  if test "x$has_forbidden_chars" != x; then
30092    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30093    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30094  fi
30095
30096    # Output is in $new_path
30097
30098  windows_path="$new_path"
30099  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30100    unix_path=`$CYGPATH -u "$windows_path"`
30101    new_path="$unix_path"
30102  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30103    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30104    new_path="$unix_path"
30105  fi
30106
30107    # remove trailing .exe if any
30108    new_path="${new_path/%.exe/}"
30109
30110    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30111    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30112  fi
30113
30114  else
30115    # We're on a posix platform. Hooray! :)
30116    # First separate the path from the arguments. This will split at the first
30117    # space.
30118    complete="$PROPER_COMPILER_CXX"
30119    path="${complete%% *}"
30120    tmp="$complete EOL"
30121    arguments="${tmp#* }"
30122
30123    # Cannot rely on the command "which" here since it doesn't always work.
30124    is_absolute_path=`$ECHO "$path" | $GREP ^/`
30125    if test -z "$is_absolute_path"; then
30126      # Path to executable is not absolute. Find it.
30127      IFS_save="$IFS"
30128      IFS=:
30129      for p in $PATH; do
30130        if test -f "$p/$path" && test -x "$p/$path"; then
30131          new_path="$p/$path"
30132          break
30133        fi
30134      done
30135      IFS="$IFS_save"
30136    else
30137      # This is an absolute path, we can use it without further modifications.
30138      new_path="$path"
30139    fi
30140
30141    if test "x$new_path" = x; then
30142      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30143$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30144      has_space=`$ECHO "$complete" | $GREP " "`
30145      if test "x$has_space" != x; then
30146        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30147$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30148      fi
30149      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30150    fi
30151  fi
30152
30153  # Now join together the path and the arguments once again
30154  if test "x$arguments" != xEOL; then
30155    new_complete="$new_path ${arguments% *}"
30156  else
30157    new_complete="$new_path"
30158  fi
30159
30160  if test "x$complete" != "x$new_complete"; then
30161    PROPER_COMPILER_CXX="$new_complete"
30162    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
30163$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
30164  fi
30165
30166    PATH="$RETRY_COMPILER_SAVED_PATH"
30167
30168    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
30169$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
30170
30171  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30172    # Follow a chain of symbolic links. Use readlink
30173    # where it exists, else fall back to horribly
30174    # complicated shell code.
30175    if test "x$READLINK_TESTED" != yes; then
30176      # On MacOSX there is a readlink tool with a different
30177      # purpose than the GNU readlink tool. Check the found readlink.
30178      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30179      if test "x$ISGNU" = x; then
30180        # A readlink that we do not know how to use.
30181        # Are there other non-GNU readlinks out there?
30182        READLINK_TESTED=yes
30183        READLINK=
30184      fi
30185    fi
30186
30187    if test "x$READLINK" != x; then
30188      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
30189    else
30190      # Save the current directory for restoring afterwards
30191      STARTDIR=$PWD
30192      COUNTER=0
30193      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
30194      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
30195      cd $sym_link_dir
30196      # Use -P flag to resolve symlinks in directories.
30197      cd `$THEPWDCMD -P`
30198      sym_link_dir=`$THEPWDCMD -P`
30199      # Resolve file symlinks
30200      while test $COUNTER -lt 20; do
30201        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30202        if test "x$ISLINK" == x; then
30203          # This is not a symbolic link! We are done!
30204          break
30205        fi
30206        # Again resolve directory symlinks since the target of the just found
30207        # link could be in a different directory
30208        cd `$DIRNAME $ISLINK`
30209        sym_link_dir=`$THEPWDCMD -P`
30210        sym_link_file=`$BASENAME $ISLINK`
30211        let COUNTER=COUNTER+1
30212      done
30213      cd $STARTDIR
30214      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
30215    fi
30216  fi
30217
30218    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30219$as_echo "$PROPER_COMPILER_CXX" >&6; }
30220    CXX="$PROPER_COMPILER_CXX"
30221  else
30222    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
30223$as_echo "no, keeping CXX" >&6; }
30224  fi
30225
30226
30227  COMPILER=$CXX
30228  COMPILER_NAME=$COMPILER_NAME
30229
30230  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30231    # cc -V output typically looks like
30232    #     cc: Sun C 5.12 Linux_i386 2011/11/16
30233    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
30234    # Check that this is likely to be the Solaris Studio cc.
30235    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
30236    if test $? -ne 0; then
30237      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30238      { $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
30239$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30240      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30241$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30242      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30243$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30244      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30245    fi
30246    # Remove usage instructions (if present), and
30247    # collapse compiler output into a single line
30248    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30249        $SED -e 's/ *[Uu]sage:.*//'`
30250    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30251        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
30252  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
30253    # xlc -qversion output typically looks like
30254    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
30255    #     Version: 11.01.0000.0015
30256    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
30257    # Check that this is likely to be the IBM XL C compiler.
30258    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
30259    if test $? -ne 0; then
30260      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30261      { $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
30262$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30263      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30264$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30265      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30266$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30267      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30268    fi
30269    # Collapse compiler output into a single line
30270    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30271    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30272        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
30273  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
30274    # There is no specific version flag, but all output starts with a version string.
30275    # First line typically looks something like:
30276    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
30277    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
30278    # Check that this is likely to be Microsoft CL.EXE.
30279    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
30280    if test $? -ne 0; then
30281      { $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
30282$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30283      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30284$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30285      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30286    fi
30287    # Collapse compiler output into a single line
30288    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30289    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30290        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
30291  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
30292    # gcc --version output typically looks like
30293    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
30294    #     Copyright (C) 2013 Free Software Foundation, Inc.
30295    #     This is free software; see the source for copying conditions.  There is NO
30296    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
30297    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30298    # Check that this is likely to be GCC.
30299    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
30300    if test $? -ne 0; then
30301      { $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
30302$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30303      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
30304$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
30305      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30306    fi
30307    # Remove Copyright and legalese from version string, and
30308    # collapse into a single line
30309    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30310        $SED -e 's/ *Copyright .*//'`
30311    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30312        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
30313  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
30314    # clang --version output typically looks like
30315    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
30316    #    clang version 3.3 (tags/RELEASE_33/final)
30317    # or
30318    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
30319    #    Target: x86_64-pc-linux-gnu
30320    #    Thread model: posix
30321    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30322    # Check that this is likely to be clang
30323    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
30324    if test $? -ne 0; then
30325      { $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
30326$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30327      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30328$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30329      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30330    fi
30331    # Collapse compiler output into a single line
30332    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30333    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30334        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
30335  else
30336      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
30337  fi
30338  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
30339  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
30340  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
30341  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
30342
30343  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
30344$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
30345
30346
30347  # Now that we have resolved CXX ourself, let autoconf have its go at it
30348  ac_ext=cpp
30349ac_cpp='$CXXCPP $CPPFLAGS'
30350ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30351ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30352ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30353if test -z "$CXX"; then
30354  if test -n "$CCC"; then
30355    CXX=$CCC
30356  else
30357    if test -n "$ac_tool_prefix"; then
30358  for ac_prog in $CXX
30359  do
30360    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30361set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30363$as_echo_n "checking for $ac_word... " >&6; }
30364if ${ac_cv_prog_CXX+:} false; then :
30365  $as_echo_n "(cached) " >&6
30366else
30367  if test -n "$CXX"; then
30368  ac_cv_prog_CXX="$CXX" # Let the user override the test.
30369else
30370as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30371for as_dir in $PATH
30372do
30373  IFS=$as_save_IFS
30374  test -z "$as_dir" && as_dir=.
30375    for ac_exec_ext in '' $ac_executable_extensions; do
30376  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30377    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
30378    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30379    break 2
30380  fi
30381done
30382  done
30383IFS=$as_save_IFS
30384
30385fi
30386fi
30387CXX=$ac_cv_prog_CXX
30388if test -n "$CXX"; then
30389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
30390$as_echo "$CXX" >&6; }
30391else
30392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30393$as_echo "no" >&6; }
30394fi
30395
30396
30397    test -n "$CXX" && break
30398  done
30399fi
30400if test -z "$CXX"; then
30401  ac_ct_CXX=$CXX
30402  for ac_prog in $CXX
30403do
30404  # Extract the first word of "$ac_prog", so it can be a program name with args.
30405set dummy $ac_prog; ac_word=$2
30406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30407$as_echo_n "checking for $ac_word... " >&6; }
30408if ${ac_cv_prog_ac_ct_CXX+:} false; then :
30409  $as_echo_n "(cached) " >&6
30410else
30411  if test -n "$ac_ct_CXX"; then
30412  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
30413else
30414as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30415for as_dir in $PATH
30416do
30417  IFS=$as_save_IFS
30418  test -z "$as_dir" && as_dir=.
30419    for ac_exec_ext in '' $ac_executable_extensions; do
30420  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30421    ac_cv_prog_ac_ct_CXX="$ac_prog"
30422    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30423    break 2
30424  fi
30425done
30426  done
30427IFS=$as_save_IFS
30428
30429fi
30430fi
30431ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
30432if test -n "$ac_ct_CXX"; then
30433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
30434$as_echo "$ac_ct_CXX" >&6; }
30435else
30436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30437$as_echo "no" >&6; }
30438fi
30439
30440
30441  test -n "$ac_ct_CXX" && break
30442done
30443
30444  if test "x$ac_ct_CXX" = x; then
30445    CXX="g++"
30446  else
30447    case $cross_compiling:$ac_tool_warned in
30448yes:)
30449{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30450$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30451ac_tool_warned=yes ;;
30452esac
30453    CXX=$ac_ct_CXX
30454  fi
30455fi
30456
30457  fi
30458fi
30459# Provide some information about the compiler.
30460$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
30461set X $ac_compile
30462ac_compiler=$2
30463for ac_option in --version -v -V -qversion; do
30464  { { ac_try="$ac_compiler $ac_option >&5"
30465case "(($ac_try" in
30466  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30467  *) ac_try_echo=$ac_try;;
30468esac
30469eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30470$as_echo "$ac_try_echo"; } >&5
30471  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
30472  ac_status=$?
30473  if test -s conftest.err; then
30474    sed '10a\
30475... rest of stderr output deleted ...
30476         10q' conftest.err >conftest.er1
30477    cat conftest.er1 >&5
30478  fi
30479  rm -f conftest.er1 conftest.err
30480  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30481  test $ac_status = 0; }
30482done
30483
30484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
30485$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
30486if ${ac_cv_cxx_compiler_gnu+:} false; then :
30487  $as_echo_n "(cached) " >&6
30488else
30489  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30490/* end confdefs.h.  */
30491
30492int
30493main ()
30494{
30495#ifndef __GNUC__
30496       choke me
30497#endif
30498
30499  ;
30500  return 0;
30501}
30502_ACEOF
30503if ac_fn_cxx_try_compile "$LINENO"; then :
30504  ac_compiler_gnu=yes
30505else
30506  ac_compiler_gnu=no
30507fi
30508rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30509ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
30510
30511fi
30512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
30513$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
30514if test $ac_compiler_gnu = yes; then
30515  GXX=yes
30516else
30517  GXX=
30518fi
30519ac_test_CXXFLAGS=${CXXFLAGS+set}
30520ac_save_CXXFLAGS=$CXXFLAGS
30521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
30522$as_echo_n "checking whether $CXX accepts -g... " >&6; }
30523if ${ac_cv_prog_cxx_g+:} false; then :
30524  $as_echo_n "(cached) " >&6
30525else
30526  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
30527   ac_cxx_werror_flag=yes
30528   ac_cv_prog_cxx_g=no
30529   CXXFLAGS="-g"
30530   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30531/* end confdefs.h.  */
30532
30533int
30534main ()
30535{
30536
30537  ;
30538  return 0;
30539}
30540_ACEOF
30541if ac_fn_cxx_try_compile "$LINENO"; then :
30542  ac_cv_prog_cxx_g=yes
30543else
30544  CXXFLAGS=""
30545      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30546/* end confdefs.h.  */
30547
30548int
30549main ()
30550{
30551
30552  ;
30553  return 0;
30554}
30555_ACEOF
30556if ac_fn_cxx_try_compile "$LINENO"; then :
30557
30558else
30559  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30560	 CXXFLAGS="-g"
30561	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30562/* end confdefs.h.  */
30563
30564int
30565main ()
30566{
30567
30568  ;
30569  return 0;
30570}
30571_ACEOF
30572if ac_fn_cxx_try_compile "$LINENO"; then :
30573  ac_cv_prog_cxx_g=yes
30574fi
30575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30576fi
30577rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30578fi
30579rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30580   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30581fi
30582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
30583$as_echo "$ac_cv_prog_cxx_g" >&6; }
30584if test "$ac_test_CXXFLAGS" = set; then
30585  CXXFLAGS=$ac_save_CXXFLAGS
30586elif test $ac_cv_prog_cxx_g = yes; then
30587  if test "$GXX" = yes; then
30588    CXXFLAGS="-g -O2"
30589  else
30590    CXXFLAGS="-g"
30591  fi
30592else
30593  if test "$GXX" = yes; then
30594    CXXFLAGS="-O2"
30595  else
30596    CXXFLAGS=
30597  fi
30598fi
30599ac_ext=cpp
30600ac_cpp='$CXXCPP $CPPFLAGS'
30601ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30602ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30603ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30604
30605
30606  #
30607  # Setup the preprocessor (CPP and CXXCPP)
30608  #
30609  ac_ext=c
30610ac_cpp='$CPP $CPPFLAGS'
30611ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30612ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30613ac_compiler_gnu=$ac_cv_c_compiler_gnu
30614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
30615$as_echo_n "checking how to run the C preprocessor... " >&6; }
30616# On Suns, sometimes $CPP names a directory.
30617if test -n "$CPP" && test -d "$CPP"; then
30618  CPP=
30619fi
30620if test -z "$CPP"; then
30621  if ${ac_cv_prog_CPP+:} false; then :
30622  $as_echo_n "(cached) " >&6
30623else
30624      # Double quotes because CPP needs to be expanded
30625    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
30626    do
30627      ac_preproc_ok=false
30628for ac_c_preproc_warn_flag in '' yes
30629do
30630  # Use a header file that comes with gcc, so configuring glibc
30631  # with a fresh cross-compiler works.
30632  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30633  # <limits.h> exists even on freestanding compilers.
30634  # On the NeXT, cc -E runs the code through the compiler's parser,
30635  # not just through cpp. "Syntax error" is here to catch this case.
30636  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30637/* end confdefs.h.  */
30638#ifdef __STDC__
30639# include <limits.h>
30640#else
30641# include <assert.h>
30642#endif
30643		     Syntax error
30644_ACEOF
30645if ac_fn_c_try_cpp "$LINENO"; then :
30646
30647else
30648  # Broken: fails on valid input.
30649continue
30650fi
30651rm -f conftest.err conftest.i conftest.$ac_ext
30652
30653  # OK, works on sane cases.  Now check whether nonexistent headers
30654  # can be detected and how.
30655  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30656/* end confdefs.h.  */
30657#include <ac_nonexistent.h>
30658_ACEOF
30659if ac_fn_c_try_cpp "$LINENO"; then :
30660  # Broken: success on invalid input.
30661continue
30662else
30663  # Passes both tests.
30664ac_preproc_ok=:
30665break
30666fi
30667rm -f conftest.err conftest.i conftest.$ac_ext
30668
30669done
30670# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30671rm -f conftest.i conftest.err conftest.$ac_ext
30672if $ac_preproc_ok; then :
30673  break
30674fi
30675
30676    done
30677    ac_cv_prog_CPP=$CPP
30678
30679fi
30680  CPP=$ac_cv_prog_CPP
30681else
30682  ac_cv_prog_CPP=$CPP
30683fi
30684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
30685$as_echo "$CPP" >&6; }
30686ac_preproc_ok=false
30687for ac_c_preproc_warn_flag in '' yes
30688do
30689  # Use a header file that comes with gcc, so configuring glibc
30690  # with a fresh cross-compiler works.
30691  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30692  # <limits.h> exists even on freestanding compilers.
30693  # On the NeXT, cc -E runs the code through the compiler's parser,
30694  # not just through cpp. "Syntax error" is here to catch this case.
30695  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30696/* end confdefs.h.  */
30697#ifdef __STDC__
30698# include <limits.h>
30699#else
30700# include <assert.h>
30701#endif
30702		     Syntax error
30703_ACEOF
30704if ac_fn_c_try_cpp "$LINENO"; then :
30705
30706else
30707  # Broken: fails on valid input.
30708continue
30709fi
30710rm -f conftest.err conftest.i conftest.$ac_ext
30711
30712  # OK, works on sane cases.  Now check whether nonexistent headers
30713  # can be detected and how.
30714  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30715/* end confdefs.h.  */
30716#include <ac_nonexistent.h>
30717_ACEOF
30718if ac_fn_c_try_cpp "$LINENO"; then :
30719  # Broken: success on invalid input.
30720continue
30721else
30722  # Passes both tests.
30723ac_preproc_ok=:
30724break
30725fi
30726rm -f conftest.err conftest.i conftest.$ac_ext
30727
30728done
30729# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30730rm -f conftest.i conftest.err conftest.$ac_ext
30731if $ac_preproc_ok; then :
30732
30733else
30734  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30735$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30736as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
30737See \`config.log' for more details" "$LINENO" 5; }
30738fi
30739
30740ac_ext=cpp
30741ac_cpp='$CXXCPP $CPPFLAGS'
30742ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30743ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30744ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30745
30746
30747  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30748
30749  # First separate the path from the arguments. This will split at the first
30750  # space.
30751  complete="$CPP"
30752  path="${complete%% *}"
30753  tmp="$complete EOL"
30754  arguments="${tmp#* }"
30755
30756  # Input might be given as Windows format, start by converting to
30757  # unix format.
30758  new_path=`$CYGPATH -u "$path"`
30759
30760  # Now try to locate executable using which
30761  new_path=`$WHICH "$new_path" 2> /dev/null`
30762  # bat and cmd files are not always considered executable in cygwin causing which
30763  # to not find them
30764  if test "x$new_path" = x \
30765      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30766      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30767    new_path=`$CYGPATH -u "$path"`
30768  fi
30769  if test "x$new_path" = x; then
30770    # Oops. Which didn't find the executable.
30771    # The splitting of arguments from the executable at a space might have been incorrect,
30772    # since paths with space are more likely in Windows. Give it another try with the whole
30773    # argument.
30774    path="$complete"
30775    arguments="EOL"
30776    new_path=`$CYGPATH -u "$path"`
30777    new_path=`$WHICH "$new_path" 2> /dev/null`
30778    # bat and cmd files are not always considered executable in cygwin causing which
30779    # to not find them
30780    if test "x$new_path" = x \
30781        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30782        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30783      new_path=`$CYGPATH -u "$path"`
30784    fi
30785    if test "x$new_path" = x; then
30786      # It's still not found. Now this is an unrecoverable error.
30787      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30788$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30789      has_space=`$ECHO "$complete" | $GREP " "`
30790      if test "x$has_space" != x; then
30791        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30792$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30793      fi
30794      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30795    fi
30796  fi
30797
30798  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30799  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30800  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30801  # "foo.exe" is OK but "foo" is an error.
30802  #
30803  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30804  # It is also a way to make sure we got the proper file name for the real test later on.
30805  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30806  if test "x$test_shortpath" = x; then
30807    # Short path failed, file does not exist as specified.
30808    # Try adding .exe or .cmd
30809    if test -f "${new_path}.exe"; then
30810      input_to_shortpath="${new_path}.exe"
30811    elif test -f "${new_path}.cmd"; then
30812      input_to_shortpath="${new_path}.cmd"
30813    else
30814      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
30815$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
30816      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30817$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30818      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30819    fi
30820  else
30821    input_to_shortpath="$new_path"
30822  fi
30823
30824  # Call helper function which possibly converts this using DOS-style short mode.
30825  # If so, the updated path is stored in $new_path.
30826  new_path="$input_to_shortpath"
30827
30828  input_path="$input_to_shortpath"
30829  # Check if we need to convert this using DOS-style short mode. If the path
30830  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30831  # take no chances and rewrite it.
30832  # Note: m4 eats our [], so we need to use [ and ] instead.
30833  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30834  if test "x$has_forbidden_chars" != x; then
30835    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30836    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30837    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30838    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30839      # Going to short mode and back again did indeed matter. Since short mode is
30840      # case insensitive, let's make it lowercase to improve readability.
30841      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30842      # Now convert it back to Unix-stile (cygpath)
30843      input_path=`$CYGPATH -u "$shortmode_path"`
30844      new_path="$input_path"
30845    fi
30846  fi
30847
30848  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30849  if test "x$test_cygdrive_prefix" = x; then
30850    # As a simple fix, exclude /usr/bin since it's not a real path.
30851    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30852      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30853      # a path prefixed by /cygdrive for fixpath to work.
30854      new_path="$CYGWIN_ROOT_PATH$input_path"
30855    fi
30856  fi
30857
30858  # remove trailing .exe if any
30859  new_path="${new_path/%.exe/}"
30860
30861  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30862
30863  # First separate the path from the arguments. This will split at the first
30864  # space.
30865  complete="$CPP"
30866  path="${complete%% *}"
30867  tmp="$complete EOL"
30868  arguments="${tmp#* }"
30869
30870  # Input might be given as Windows format, start by converting to
30871  # unix format.
30872  new_path="$path"
30873
30874  windows_path="$new_path"
30875  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30876    unix_path=`$CYGPATH -u "$windows_path"`
30877    new_path="$unix_path"
30878  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30879    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30880    new_path="$unix_path"
30881  fi
30882
30883
30884  # Now try to locate executable using which
30885  new_path=`$WHICH "$new_path" 2> /dev/null`
30886
30887  if test "x$new_path" = x; then
30888    # Oops. Which didn't find the executable.
30889    # The splitting of arguments from the executable at a space might have been incorrect,
30890    # since paths with space are more likely in Windows. Give it another try with the whole
30891    # argument.
30892    path="$complete"
30893    arguments="EOL"
30894    new_path="$path"
30895
30896  windows_path="$new_path"
30897  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30898    unix_path=`$CYGPATH -u "$windows_path"`
30899    new_path="$unix_path"
30900  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30901    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30902    new_path="$unix_path"
30903  fi
30904
30905
30906    new_path=`$WHICH "$new_path" 2> /dev/null`
30907
30908    if test "x$new_path" = x; then
30909      # It's still not found. Now this is an unrecoverable error.
30910      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30911$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30912      has_space=`$ECHO "$complete" | $GREP " "`
30913      if test "x$has_space" != x; then
30914        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30915$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30916      fi
30917      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30918    fi
30919  fi
30920
30921  # Now new_path has a complete unix path to the binary
30922  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30923    # Keep paths in /bin as-is, but remove trailing .exe if any
30924    new_path="${new_path/%.exe/}"
30925    # Do not save /bin paths to all_fixpath_prefixes!
30926  else
30927    # Not in mixed or Windows style, start by that.
30928    new_path=`cmd //c echo $new_path`
30929
30930  input_path="$new_path"
30931  # Check if we need to convert this using DOS-style short mode. If the path
30932  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30933  # take no chances and rewrite it.
30934  # Note: m4 eats our [], so we need to use [ and ] instead.
30935  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30936  if test "x$has_forbidden_chars" != x; then
30937    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30938    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30939  fi
30940
30941    # Output is in $new_path
30942
30943  windows_path="$new_path"
30944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30945    unix_path=`$CYGPATH -u "$windows_path"`
30946    new_path="$unix_path"
30947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30948    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30949    new_path="$unix_path"
30950  fi
30951
30952    # remove trailing .exe if any
30953    new_path="${new_path/%.exe/}"
30954
30955    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30956    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30957  fi
30958
30959  else
30960    # We're on a posix platform. Hooray! :)
30961    # First separate the path from the arguments. This will split at the first
30962    # space.
30963    complete="$CPP"
30964    path="${complete%% *}"
30965    tmp="$complete EOL"
30966    arguments="${tmp#* }"
30967
30968    # Cannot rely on the command "which" here since it doesn't always work.
30969    is_absolute_path=`$ECHO "$path" | $GREP ^/`
30970    if test -z "$is_absolute_path"; then
30971      # Path to executable is not absolute. Find it.
30972      IFS_save="$IFS"
30973      IFS=:
30974      for p in $PATH; do
30975        if test -f "$p/$path" && test -x "$p/$path"; then
30976          new_path="$p/$path"
30977          break
30978        fi
30979      done
30980      IFS="$IFS_save"
30981    else
30982      # This is an absolute path, we can use it without further modifications.
30983      new_path="$path"
30984    fi
30985
30986    if test "x$new_path" = x; then
30987      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30988$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30989      has_space=`$ECHO "$complete" | $GREP " "`
30990      if test "x$has_space" != x; then
30991        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30992$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30993      fi
30994      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30995    fi
30996  fi
30997
30998  # Now join together the path and the arguments once again
30999  if test "x$arguments" != xEOL; then
31000    new_complete="$new_path ${arguments% *}"
31001  else
31002    new_complete="$new_path"
31003  fi
31004
31005  if test "x$complete" != "x$new_complete"; then
31006    CPP="$new_complete"
31007    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
31008$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
31009  fi
31010
31011  ac_ext=cpp
31012ac_cpp='$CXXCPP $CPPFLAGS'
31013ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31014ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31015ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
31017$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
31018if test -z "$CXXCPP"; then
31019  if ${ac_cv_prog_CXXCPP+:} false; then :
31020  $as_echo_n "(cached) " >&6
31021else
31022      # Double quotes because CXXCPP needs to be expanded
31023    for CXXCPP in "$CXX -E" "/lib/cpp"
31024    do
31025      ac_preproc_ok=false
31026for ac_cxx_preproc_warn_flag in '' yes
31027do
31028  # Use a header file that comes with gcc, so configuring glibc
31029  # with a fresh cross-compiler works.
31030  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31031  # <limits.h> exists even on freestanding compilers.
31032  # On the NeXT, cc -E runs the code through the compiler's parser,
31033  # not just through cpp. "Syntax error" is here to catch this case.
31034  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31035/* end confdefs.h.  */
31036#ifdef __STDC__
31037# include <limits.h>
31038#else
31039# include <assert.h>
31040#endif
31041		     Syntax error
31042_ACEOF
31043if ac_fn_cxx_try_cpp "$LINENO"; then :
31044
31045else
31046  # Broken: fails on valid input.
31047continue
31048fi
31049rm -f conftest.err conftest.i conftest.$ac_ext
31050
31051  # OK, works on sane cases.  Now check whether nonexistent headers
31052  # can be detected and how.
31053  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31054/* end confdefs.h.  */
31055#include <ac_nonexistent.h>
31056_ACEOF
31057if ac_fn_cxx_try_cpp "$LINENO"; then :
31058  # Broken: success on invalid input.
31059continue
31060else
31061  # Passes both tests.
31062ac_preproc_ok=:
31063break
31064fi
31065rm -f conftest.err conftest.i conftest.$ac_ext
31066
31067done
31068# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31069rm -f conftest.i conftest.err conftest.$ac_ext
31070if $ac_preproc_ok; then :
31071  break
31072fi
31073
31074    done
31075    ac_cv_prog_CXXCPP=$CXXCPP
31076
31077fi
31078  CXXCPP=$ac_cv_prog_CXXCPP
31079else
31080  ac_cv_prog_CXXCPP=$CXXCPP
31081fi
31082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
31083$as_echo "$CXXCPP" >&6; }
31084ac_preproc_ok=false
31085for ac_cxx_preproc_warn_flag in '' yes
31086do
31087  # Use a header file that comes with gcc, so configuring glibc
31088  # with a fresh cross-compiler works.
31089  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31090  # <limits.h> exists even on freestanding compilers.
31091  # On the NeXT, cc -E runs the code through the compiler's parser,
31092  # not just through cpp. "Syntax error" is here to catch this case.
31093  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31094/* end confdefs.h.  */
31095#ifdef __STDC__
31096# include <limits.h>
31097#else
31098# include <assert.h>
31099#endif
31100		     Syntax error
31101_ACEOF
31102if ac_fn_cxx_try_cpp "$LINENO"; then :
31103
31104else
31105  # Broken: fails on valid input.
31106continue
31107fi
31108rm -f conftest.err conftest.i conftest.$ac_ext
31109
31110  # OK, works on sane cases.  Now check whether nonexistent headers
31111  # can be detected and how.
31112  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31113/* end confdefs.h.  */
31114#include <ac_nonexistent.h>
31115_ACEOF
31116if ac_fn_cxx_try_cpp "$LINENO"; then :
31117  # Broken: success on invalid input.
31118continue
31119else
31120  # Passes both tests.
31121ac_preproc_ok=:
31122break
31123fi
31124rm -f conftest.err conftest.i conftest.$ac_ext
31125
31126done
31127# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31128rm -f conftest.i conftest.err conftest.$ac_ext
31129if $ac_preproc_ok; then :
31130
31131else
31132  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31133$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31134as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
31135See \`config.log' for more details" "$LINENO" 5; }
31136fi
31137
31138ac_ext=cpp
31139ac_cpp='$CXXCPP $CPPFLAGS'
31140ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31141ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31142ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31143
31144
31145  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31146
31147  # First separate the path from the arguments. This will split at the first
31148  # space.
31149  complete="$CXXCPP"
31150  path="${complete%% *}"
31151  tmp="$complete EOL"
31152  arguments="${tmp#* }"
31153
31154  # Input might be given as Windows format, start by converting to
31155  # unix format.
31156  new_path=`$CYGPATH -u "$path"`
31157
31158  # Now try to locate executable using which
31159  new_path=`$WHICH "$new_path" 2> /dev/null`
31160  # bat and cmd files are not always considered executable in cygwin causing which
31161  # to not find them
31162  if test "x$new_path" = x \
31163      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31164      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31165    new_path=`$CYGPATH -u "$path"`
31166  fi
31167  if test "x$new_path" = x; then
31168    # Oops. Which didn't find the executable.
31169    # The splitting of arguments from the executable at a space might have been incorrect,
31170    # since paths with space are more likely in Windows. Give it another try with the whole
31171    # argument.
31172    path="$complete"
31173    arguments="EOL"
31174    new_path=`$CYGPATH -u "$path"`
31175    new_path=`$WHICH "$new_path" 2> /dev/null`
31176    # bat and cmd files are not always considered executable in cygwin causing which
31177    # to not find them
31178    if test "x$new_path" = x \
31179        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31180        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31181      new_path=`$CYGPATH -u "$path"`
31182    fi
31183    if test "x$new_path" = x; then
31184      # It's still not found. Now this is an unrecoverable error.
31185      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31186$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31187      has_space=`$ECHO "$complete" | $GREP " "`
31188      if test "x$has_space" != x; then
31189        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31190$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31191      fi
31192      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31193    fi
31194  fi
31195
31196  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31197  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31198  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31199  # "foo.exe" is OK but "foo" is an error.
31200  #
31201  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31202  # It is also a way to make sure we got the proper file name for the real test later on.
31203  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31204  if test "x$test_shortpath" = x; then
31205    # Short path failed, file does not exist as specified.
31206    # Try adding .exe or .cmd
31207    if test -f "${new_path}.exe"; then
31208      input_to_shortpath="${new_path}.exe"
31209    elif test -f "${new_path}.cmd"; then
31210      input_to_shortpath="${new_path}.cmd"
31211    else
31212      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
31213$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
31214      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31215$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31216      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31217    fi
31218  else
31219    input_to_shortpath="$new_path"
31220  fi
31221
31222  # Call helper function which possibly converts this using DOS-style short mode.
31223  # If so, the updated path is stored in $new_path.
31224  new_path="$input_to_shortpath"
31225
31226  input_path="$input_to_shortpath"
31227  # Check if we need to convert this using DOS-style short mode. If the path
31228  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31229  # take no chances and rewrite it.
31230  # Note: m4 eats our [], so we need to use [ and ] instead.
31231  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31232  if test "x$has_forbidden_chars" != x; then
31233    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31234    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31235    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31236    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31237      # Going to short mode and back again did indeed matter. Since short mode is
31238      # case insensitive, let's make it lowercase to improve readability.
31239      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31240      # Now convert it back to Unix-stile (cygpath)
31241      input_path=`$CYGPATH -u "$shortmode_path"`
31242      new_path="$input_path"
31243    fi
31244  fi
31245
31246  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31247  if test "x$test_cygdrive_prefix" = x; then
31248    # As a simple fix, exclude /usr/bin since it's not a real path.
31249    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31250      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31251      # a path prefixed by /cygdrive for fixpath to work.
31252      new_path="$CYGWIN_ROOT_PATH$input_path"
31253    fi
31254  fi
31255
31256  # remove trailing .exe if any
31257  new_path="${new_path/%.exe/}"
31258
31259  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31260
31261  # First separate the path from the arguments. This will split at the first
31262  # space.
31263  complete="$CXXCPP"
31264  path="${complete%% *}"
31265  tmp="$complete EOL"
31266  arguments="${tmp#* }"
31267
31268  # Input might be given as Windows format, start by converting to
31269  # unix format.
31270  new_path="$path"
31271
31272  windows_path="$new_path"
31273  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31274    unix_path=`$CYGPATH -u "$windows_path"`
31275    new_path="$unix_path"
31276  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31277    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31278    new_path="$unix_path"
31279  fi
31280
31281
31282  # Now try to locate executable using which
31283  new_path=`$WHICH "$new_path" 2> /dev/null`
31284
31285  if test "x$new_path" = x; then
31286    # Oops. Which didn't find the executable.
31287    # The splitting of arguments from the executable at a space might have been incorrect,
31288    # since paths with space are more likely in Windows. Give it another try with the whole
31289    # argument.
31290    path="$complete"
31291    arguments="EOL"
31292    new_path="$path"
31293
31294  windows_path="$new_path"
31295  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31296    unix_path=`$CYGPATH -u "$windows_path"`
31297    new_path="$unix_path"
31298  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31299    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31300    new_path="$unix_path"
31301  fi
31302
31303
31304    new_path=`$WHICH "$new_path" 2> /dev/null`
31305
31306    if test "x$new_path" = x; then
31307      # It's still not found. Now this is an unrecoverable error.
31308      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31309$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31310      has_space=`$ECHO "$complete" | $GREP " "`
31311      if test "x$has_space" != x; then
31312        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31313$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31314      fi
31315      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31316    fi
31317  fi
31318
31319  # Now new_path has a complete unix path to the binary
31320  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31321    # Keep paths in /bin as-is, but remove trailing .exe if any
31322    new_path="${new_path/%.exe/}"
31323    # Do not save /bin paths to all_fixpath_prefixes!
31324  else
31325    # Not in mixed or Windows style, start by that.
31326    new_path=`cmd //c echo $new_path`
31327
31328  input_path="$new_path"
31329  # Check if we need to convert this using DOS-style short mode. If the path
31330  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31331  # take no chances and rewrite it.
31332  # Note: m4 eats our [], so we need to use [ and ] instead.
31333  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31334  if test "x$has_forbidden_chars" != x; then
31335    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31336    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31337  fi
31338
31339    # Output is in $new_path
31340
31341  windows_path="$new_path"
31342  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31343    unix_path=`$CYGPATH -u "$windows_path"`
31344    new_path="$unix_path"
31345  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31346    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31347    new_path="$unix_path"
31348  fi
31349
31350    # remove trailing .exe if any
31351    new_path="${new_path/%.exe/}"
31352
31353    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31354    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31355  fi
31356
31357  else
31358    # We're on a posix platform. Hooray! :)
31359    # First separate the path from the arguments. This will split at the first
31360    # space.
31361    complete="$CXXCPP"
31362    path="${complete%% *}"
31363    tmp="$complete EOL"
31364    arguments="${tmp#* }"
31365
31366    # Cannot rely on the command "which" here since it doesn't always work.
31367    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31368    if test -z "$is_absolute_path"; then
31369      # Path to executable is not absolute. Find it.
31370      IFS_save="$IFS"
31371      IFS=:
31372      for p in $PATH; do
31373        if test -f "$p/$path" && test -x "$p/$path"; then
31374          new_path="$p/$path"
31375          break
31376        fi
31377      done
31378      IFS="$IFS_save"
31379    else
31380      # This is an absolute path, we can use it without further modifications.
31381      new_path="$path"
31382    fi
31383
31384    if test "x$new_path" = x; then
31385      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31386$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31387      has_space=`$ECHO "$complete" | $GREP " "`
31388      if test "x$has_space" != x; then
31389        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31390$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31391      fi
31392      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31393    fi
31394  fi
31395
31396  # Now join together the path and the arguments once again
31397  if test "x$arguments" != xEOL; then
31398    new_complete="$new_path ${arguments% *}"
31399  else
31400    new_complete="$new_path"
31401  fi
31402
31403  if test "x$complete" != "x$new_complete"; then
31404    CXXCPP="$new_complete"
31405    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
31406$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
31407  fi
31408
31409
31410  #
31411  # Setup the linker (LD)
31412  #
31413  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31414    # In the Microsoft toolchain we have a separate LD command "link".
31415    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
31416    # a cygwin program for something completely different.
31417    # Extract the first word of "link", so it can be a program name with args.
31418set dummy link; ac_word=$2
31419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31420$as_echo_n "checking for $ac_word... " >&6; }
31421if ${ac_cv_prog_LD+:} false; then :
31422  $as_echo_n "(cached) " >&6
31423else
31424  if test -n "$LD"; then
31425  ac_cv_prog_LD="$LD" # Let the user override the test.
31426else
31427  ac_prog_rejected=no
31428as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31429for as_dir in $PATH
31430do
31431  IFS=$as_save_IFS
31432  test -z "$as_dir" && as_dir=.
31433    for ac_exec_ext in '' $ac_executable_extensions; do
31434  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31435    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
31436       ac_prog_rejected=yes
31437       continue
31438     fi
31439    ac_cv_prog_LD="link"
31440    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31441    break 2
31442  fi
31443done
31444  done
31445IFS=$as_save_IFS
31446
31447if test $ac_prog_rejected = yes; then
31448  # We found a bogon in the path, so make sure we never use it.
31449  set dummy $ac_cv_prog_LD
31450  shift
31451  if test $# != 0; then
31452    # We chose a different compiler from the bogus one.
31453    # However, it has the same basename, so the bogon will be chosen
31454    # first if we set LD to just the basename; use the full file name.
31455    shift
31456    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
31457  fi
31458fi
31459fi
31460fi
31461LD=$ac_cv_prog_LD
31462if test -n "$LD"; then
31463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
31464$as_echo "$LD" >&6; }
31465else
31466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31467$as_echo "no" >&6; }
31468fi
31469
31470
31471
31472  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31473
31474  # First separate the path from the arguments. This will split at the first
31475  # space.
31476  complete="$LD"
31477  path="${complete%% *}"
31478  tmp="$complete EOL"
31479  arguments="${tmp#* }"
31480
31481  # Input might be given as Windows format, start by converting to
31482  # unix format.
31483  new_path=`$CYGPATH -u "$path"`
31484
31485  # Now try to locate executable using which
31486  new_path=`$WHICH "$new_path" 2> /dev/null`
31487  # bat and cmd files are not always considered executable in cygwin causing which
31488  # to not find them
31489  if test "x$new_path" = x \
31490      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31491      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31492    new_path=`$CYGPATH -u "$path"`
31493  fi
31494  if test "x$new_path" = x; then
31495    # Oops. Which didn't find the executable.
31496    # The splitting of arguments from the executable at a space might have been incorrect,
31497    # since paths with space are more likely in Windows. Give it another try with the whole
31498    # argument.
31499    path="$complete"
31500    arguments="EOL"
31501    new_path=`$CYGPATH -u "$path"`
31502    new_path=`$WHICH "$new_path" 2> /dev/null`
31503    # bat and cmd files are not always considered executable in cygwin causing which
31504    # to not find them
31505    if test "x$new_path" = x \
31506        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31507        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31508      new_path=`$CYGPATH -u "$path"`
31509    fi
31510    if test "x$new_path" = x; then
31511      # It's still not found. Now this is an unrecoverable error.
31512      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31513$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31514      has_space=`$ECHO "$complete" | $GREP " "`
31515      if test "x$has_space" != x; then
31516        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31517$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31518      fi
31519      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31520    fi
31521  fi
31522
31523  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31524  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31525  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31526  # "foo.exe" is OK but "foo" is an error.
31527  #
31528  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31529  # It is also a way to make sure we got the proper file name for the real test later on.
31530  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31531  if test "x$test_shortpath" = x; then
31532    # Short path failed, file does not exist as specified.
31533    # Try adding .exe or .cmd
31534    if test -f "${new_path}.exe"; then
31535      input_to_shortpath="${new_path}.exe"
31536    elif test -f "${new_path}.cmd"; then
31537      input_to_shortpath="${new_path}.cmd"
31538    else
31539      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
31540$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
31541      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31542$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31543      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31544    fi
31545  else
31546    input_to_shortpath="$new_path"
31547  fi
31548
31549  # Call helper function which possibly converts this using DOS-style short mode.
31550  # If so, the updated path is stored in $new_path.
31551  new_path="$input_to_shortpath"
31552
31553  input_path="$input_to_shortpath"
31554  # Check if we need to convert this using DOS-style short mode. If the path
31555  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31556  # take no chances and rewrite it.
31557  # Note: m4 eats our [], so we need to use [ and ] instead.
31558  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31559  if test "x$has_forbidden_chars" != x; then
31560    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31561    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31562    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31563    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31564      # Going to short mode and back again did indeed matter. Since short mode is
31565      # case insensitive, let's make it lowercase to improve readability.
31566      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31567      # Now convert it back to Unix-stile (cygpath)
31568      input_path=`$CYGPATH -u "$shortmode_path"`
31569      new_path="$input_path"
31570    fi
31571  fi
31572
31573  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31574  if test "x$test_cygdrive_prefix" = x; then
31575    # As a simple fix, exclude /usr/bin since it's not a real path.
31576    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31577      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31578      # a path prefixed by /cygdrive for fixpath to work.
31579      new_path="$CYGWIN_ROOT_PATH$input_path"
31580    fi
31581  fi
31582
31583  # remove trailing .exe if any
31584  new_path="${new_path/%.exe/}"
31585
31586  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31587
31588  # First separate the path from the arguments. This will split at the first
31589  # space.
31590  complete="$LD"
31591  path="${complete%% *}"
31592  tmp="$complete EOL"
31593  arguments="${tmp#* }"
31594
31595  # Input might be given as Windows format, start by converting to
31596  # unix format.
31597  new_path="$path"
31598
31599  windows_path="$new_path"
31600  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31601    unix_path=`$CYGPATH -u "$windows_path"`
31602    new_path="$unix_path"
31603  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31604    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31605    new_path="$unix_path"
31606  fi
31607
31608
31609  # Now try to locate executable using which
31610  new_path=`$WHICH "$new_path" 2> /dev/null`
31611
31612  if test "x$new_path" = x; then
31613    # Oops. Which didn't find the executable.
31614    # The splitting of arguments from the executable at a space might have been incorrect,
31615    # since paths with space are more likely in Windows. Give it another try with the whole
31616    # argument.
31617    path="$complete"
31618    arguments="EOL"
31619    new_path="$path"
31620
31621  windows_path="$new_path"
31622  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31623    unix_path=`$CYGPATH -u "$windows_path"`
31624    new_path="$unix_path"
31625  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31626    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31627    new_path="$unix_path"
31628  fi
31629
31630
31631    new_path=`$WHICH "$new_path" 2> /dev/null`
31632
31633    if test "x$new_path" = x; then
31634      # It's still not found. Now this is an unrecoverable error.
31635      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31636$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31637      has_space=`$ECHO "$complete" | $GREP " "`
31638      if test "x$has_space" != x; then
31639        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31640$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31641      fi
31642      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31643    fi
31644  fi
31645
31646  # Now new_path has a complete unix path to the binary
31647  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31648    # Keep paths in /bin as-is, but remove trailing .exe if any
31649    new_path="${new_path/%.exe/}"
31650    # Do not save /bin paths to all_fixpath_prefixes!
31651  else
31652    # Not in mixed or Windows style, start by that.
31653    new_path=`cmd //c echo $new_path`
31654
31655  input_path="$new_path"
31656  # Check if we need to convert this using DOS-style short mode. If the path
31657  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31658  # take no chances and rewrite it.
31659  # Note: m4 eats our [], so we need to use [ and ] instead.
31660  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31661  if test "x$has_forbidden_chars" != x; then
31662    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31663    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31664  fi
31665
31666    # Output is in $new_path
31667
31668  windows_path="$new_path"
31669  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31670    unix_path=`$CYGPATH -u "$windows_path"`
31671    new_path="$unix_path"
31672  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31673    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31674    new_path="$unix_path"
31675  fi
31676
31677    # remove trailing .exe if any
31678    new_path="${new_path/%.exe/}"
31679
31680    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31681    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31682  fi
31683
31684  else
31685    # We're on a posix platform. Hooray! :)
31686    # First separate the path from the arguments. This will split at the first
31687    # space.
31688    complete="$LD"
31689    path="${complete%% *}"
31690    tmp="$complete EOL"
31691    arguments="${tmp#* }"
31692
31693    # Cannot rely on the command "which" here since it doesn't always work.
31694    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31695    if test -z "$is_absolute_path"; then
31696      # Path to executable is not absolute. Find it.
31697      IFS_save="$IFS"
31698      IFS=:
31699      for p in $PATH; do
31700        if test -f "$p/$path" && test -x "$p/$path"; then
31701          new_path="$p/$path"
31702          break
31703        fi
31704      done
31705      IFS="$IFS_save"
31706    else
31707      # This is an absolute path, we can use it without further modifications.
31708      new_path="$path"
31709    fi
31710
31711    if test "x$new_path" = x; then
31712      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31713$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31714      has_space=`$ECHO "$complete" | $GREP " "`
31715      if test "x$has_space" != x; then
31716        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31717$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31718      fi
31719      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31720    fi
31721  fi
31722
31723  # Now join together the path and the arguments once again
31724  if test "x$arguments" != xEOL; then
31725    new_complete="$new_path ${arguments% *}"
31726  else
31727    new_complete="$new_path"
31728  fi
31729
31730  if test "x$complete" != "x$new_complete"; then
31731    LD="$new_complete"
31732    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
31733$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
31734  fi
31735
31736    # Verify that we indeed succeeded with this trick.
31737    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
31738$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
31739    "$LD" --version > /dev/null
31740    if test $? -eq 0 ; then
31741      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31742$as_echo "no" >&6; }
31743      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
31744    else
31745      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31746$as_echo "yes" >&6; }
31747    fi
31748    LDCXX="$LD"
31749  else
31750    # All other toolchains use the compiler to link.
31751    LD="$CC"
31752    LDCXX="$CXX"
31753  fi
31754
31755  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
31756
31757
31758  #
31759  # Setup the assembler (AS)
31760  #
31761  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31762    # FIXME: should this really be solaris, or solstudio?
31763
31764
31765  # Publish this variable in the help.
31766
31767
31768  if test "x$AS" = x; then
31769    # The variable is not set by user, try to locate tool using the code snippet
31770    for ac_prog in as
31771do
31772  # Extract the first word of "$ac_prog", so it can be a program name with args.
31773set dummy $ac_prog; ac_word=$2
31774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31775$as_echo_n "checking for $ac_word... " >&6; }
31776if ${ac_cv_path_AS+:} false; then :
31777  $as_echo_n "(cached) " >&6
31778else
31779  case $AS in
31780  [\\/]* | ?:[\\/]*)
31781  ac_cv_path_AS="$AS" # Let the user override the test with a path.
31782  ;;
31783  *)
31784  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31785for as_dir in $PATH
31786do
31787  IFS=$as_save_IFS
31788  test -z "$as_dir" && as_dir=.
31789    for ac_exec_ext in '' $ac_executable_extensions; do
31790  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31791    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31792    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31793    break 2
31794  fi
31795done
31796  done
31797IFS=$as_save_IFS
31798
31799  ;;
31800esac
31801fi
31802AS=$ac_cv_path_AS
31803if test -n "$AS"; then
31804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31805$as_echo "$AS" >&6; }
31806else
31807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31808$as_echo "no" >&6; }
31809fi
31810
31811
31812  test -n "$AS" && break
31813done
31814
31815  else
31816    # The variable is set, but is it from the command line or the environment?
31817
31818    # Try to remove the string !AS! from our list.
31819    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
31820    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31821      # If it failed, the variable was not from the command line. Ignore it,
31822      # but warn the user (except for BASH, which is always set by the calling BASH).
31823      if test "xAS" != xBASH; then
31824        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
31825$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
31826      fi
31827      # Try to locate tool using the code snippet
31828      for ac_prog in as
31829do
31830  # Extract the first word of "$ac_prog", so it can be a program name with args.
31831set dummy $ac_prog; ac_word=$2
31832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31833$as_echo_n "checking for $ac_word... " >&6; }
31834if ${ac_cv_path_AS+:} false; then :
31835  $as_echo_n "(cached) " >&6
31836else
31837  case $AS in
31838  [\\/]* | ?:[\\/]*)
31839  ac_cv_path_AS="$AS" # Let the user override the test with a path.
31840  ;;
31841  *)
31842  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31843for as_dir in $PATH
31844do
31845  IFS=$as_save_IFS
31846  test -z "$as_dir" && as_dir=.
31847    for ac_exec_ext in '' $ac_executable_extensions; do
31848  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31849    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31850    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31851    break 2
31852  fi
31853done
31854  done
31855IFS=$as_save_IFS
31856
31857  ;;
31858esac
31859fi
31860AS=$ac_cv_path_AS
31861if test -n "$AS"; then
31862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31863$as_echo "$AS" >&6; }
31864else
31865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31866$as_echo "no" >&6; }
31867fi
31868
31869
31870  test -n "$AS" && break
31871done
31872
31873    else
31874      # If it succeeded, then it was overridden by the user. We will use it
31875      # for the tool.
31876
31877      # First remove it from the list of overridden variables, so we can test
31878      # for unknown variables in the end.
31879      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31880
31881      # Check if the provided tool contains a complete path.
31882      tool_specified="$AS"
31883      tool_basename="${tool_specified##*/}"
31884      if test "x$tool_basename" = "x$tool_specified"; then
31885        # A command without a complete path is provided, search $PATH.
31886        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
31887$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
31888        # Extract the first word of "$tool_basename", so it can be a program name with args.
31889set dummy $tool_basename; ac_word=$2
31890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31891$as_echo_n "checking for $ac_word... " >&6; }
31892if ${ac_cv_path_AS+:} false; then :
31893  $as_echo_n "(cached) " >&6
31894else
31895  case $AS in
31896  [\\/]* | ?:[\\/]*)
31897  ac_cv_path_AS="$AS" # Let the user override the test with a path.
31898  ;;
31899  *)
31900  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31901for as_dir in $PATH
31902do
31903  IFS=$as_save_IFS
31904  test -z "$as_dir" && as_dir=.
31905    for ac_exec_ext in '' $ac_executable_extensions; do
31906  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31907    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31908    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31909    break 2
31910  fi
31911done
31912  done
31913IFS=$as_save_IFS
31914
31915  ;;
31916esac
31917fi
31918AS=$ac_cv_path_AS
31919if test -n "$AS"; then
31920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31921$as_echo "$AS" >&6; }
31922else
31923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31924$as_echo "no" >&6; }
31925fi
31926
31927
31928        if test "x$AS" = x; then
31929          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31930        fi
31931      else
31932        # Otherwise we believe it is a complete path. Use it as it is.
31933        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
31934$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
31935        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
31936$as_echo_n "checking for AS... " >&6; }
31937        if test ! -x "$tool_specified"; then
31938          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31939$as_echo "not found" >&6; }
31940          as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
31941        fi
31942        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31943$as_echo "$tool_specified" >&6; }
31944      fi
31945    fi
31946  fi
31947
31948
31949
31950  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31951
31952  # First separate the path from the arguments. This will split at the first
31953  # space.
31954  complete="$AS"
31955  path="${complete%% *}"
31956  tmp="$complete EOL"
31957  arguments="${tmp#* }"
31958
31959  # Input might be given as Windows format, start by converting to
31960  # unix format.
31961  new_path=`$CYGPATH -u "$path"`
31962
31963  # Now try to locate executable using which
31964  new_path=`$WHICH "$new_path" 2> /dev/null`
31965  # bat and cmd files are not always considered executable in cygwin causing which
31966  # to not find them
31967  if test "x$new_path" = x \
31968      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31969      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31970    new_path=`$CYGPATH -u "$path"`
31971  fi
31972  if test "x$new_path" = x; then
31973    # Oops. Which didn't find the executable.
31974    # The splitting of arguments from the executable at a space might have been incorrect,
31975    # since paths with space are more likely in Windows. Give it another try with the whole
31976    # argument.
31977    path="$complete"
31978    arguments="EOL"
31979    new_path=`$CYGPATH -u "$path"`
31980    new_path=`$WHICH "$new_path" 2> /dev/null`
31981    # bat and cmd files are not always considered executable in cygwin causing which
31982    # to not find them
31983    if test "x$new_path" = x \
31984        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31985        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31986      new_path=`$CYGPATH -u "$path"`
31987    fi
31988    if test "x$new_path" = x; then
31989      # It's still not found. Now this is an unrecoverable error.
31990      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
31991$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
31992      has_space=`$ECHO "$complete" | $GREP " "`
31993      if test "x$has_space" != x; then
31994        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31995$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31996      fi
31997      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
31998    fi
31999  fi
32000
32001  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32002  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32003  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32004  # "foo.exe" is OK but "foo" is an error.
32005  #
32006  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32007  # It is also a way to make sure we got the proper file name for the real test later on.
32008  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32009  if test "x$test_shortpath" = x; then
32010    # Short path failed, file does not exist as specified.
32011    # Try adding .exe or .cmd
32012    if test -f "${new_path}.exe"; then
32013      input_to_shortpath="${new_path}.exe"
32014    elif test -f "${new_path}.cmd"; then
32015      input_to_shortpath="${new_path}.cmd"
32016    else
32017      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
32018$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
32019      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32020$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32021      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32022    fi
32023  else
32024    input_to_shortpath="$new_path"
32025  fi
32026
32027  # Call helper function which possibly converts this using DOS-style short mode.
32028  # If so, the updated path is stored in $new_path.
32029  new_path="$input_to_shortpath"
32030
32031  input_path="$input_to_shortpath"
32032  # Check if we need to convert this using DOS-style short mode. If the path
32033  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32034  # take no chances and rewrite it.
32035  # Note: m4 eats our [], so we need to use [ and ] instead.
32036  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32037  if test "x$has_forbidden_chars" != x; then
32038    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32039    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32040    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32041    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32042      # Going to short mode and back again did indeed matter. Since short mode is
32043      # case insensitive, let's make it lowercase to improve readability.
32044      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32045      # Now convert it back to Unix-stile (cygpath)
32046      input_path=`$CYGPATH -u "$shortmode_path"`
32047      new_path="$input_path"
32048    fi
32049  fi
32050
32051  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32052  if test "x$test_cygdrive_prefix" = x; then
32053    # As a simple fix, exclude /usr/bin since it's not a real path.
32054    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32055      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32056      # a path prefixed by /cygdrive for fixpath to work.
32057      new_path="$CYGWIN_ROOT_PATH$input_path"
32058    fi
32059  fi
32060
32061  # remove trailing .exe if any
32062  new_path="${new_path/%.exe/}"
32063
32064  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32065
32066  # First separate the path from the arguments. This will split at the first
32067  # space.
32068  complete="$AS"
32069  path="${complete%% *}"
32070  tmp="$complete EOL"
32071  arguments="${tmp#* }"
32072
32073  # Input might be given as Windows format, start by converting to
32074  # unix format.
32075  new_path="$path"
32076
32077  windows_path="$new_path"
32078  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32079    unix_path=`$CYGPATH -u "$windows_path"`
32080    new_path="$unix_path"
32081  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32082    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32083    new_path="$unix_path"
32084  fi
32085
32086
32087  # Now try to locate executable using which
32088  new_path=`$WHICH "$new_path" 2> /dev/null`
32089
32090  if test "x$new_path" = x; then
32091    # Oops. Which didn't find the executable.
32092    # The splitting of arguments from the executable at a space might have been incorrect,
32093    # since paths with space are more likely in Windows. Give it another try with the whole
32094    # argument.
32095    path="$complete"
32096    arguments="EOL"
32097    new_path="$path"
32098
32099  windows_path="$new_path"
32100  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32101    unix_path=`$CYGPATH -u "$windows_path"`
32102    new_path="$unix_path"
32103  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32104    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32105    new_path="$unix_path"
32106  fi
32107
32108
32109    new_path=`$WHICH "$new_path" 2> /dev/null`
32110
32111    if test "x$new_path" = x; then
32112      # It's still not found. Now this is an unrecoverable error.
32113      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32114$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32115      has_space=`$ECHO "$complete" | $GREP " "`
32116      if test "x$has_space" != x; then
32117        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32118$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32119      fi
32120      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32121    fi
32122  fi
32123
32124  # Now new_path has a complete unix path to the binary
32125  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32126    # Keep paths in /bin as-is, but remove trailing .exe if any
32127    new_path="${new_path/%.exe/}"
32128    # Do not save /bin paths to all_fixpath_prefixes!
32129  else
32130    # Not in mixed or Windows style, start by that.
32131    new_path=`cmd //c echo $new_path`
32132
32133  input_path="$new_path"
32134  # Check if we need to convert this using DOS-style short mode. If the path
32135  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32136  # take no chances and rewrite it.
32137  # Note: m4 eats our [], so we need to use [ and ] instead.
32138  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32139  if test "x$has_forbidden_chars" != x; then
32140    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32141    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32142  fi
32143
32144    # Output is in $new_path
32145
32146  windows_path="$new_path"
32147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32148    unix_path=`$CYGPATH -u "$windows_path"`
32149    new_path="$unix_path"
32150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32151    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32152    new_path="$unix_path"
32153  fi
32154
32155    # remove trailing .exe if any
32156    new_path="${new_path/%.exe/}"
32157
32158    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32159    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32160  fi
32161
32162  else
32163    # We're on a posix platform. Hooray! :)
32164    # First separate the path from the arguments. This will split at the first
32165    # space.
32166    complete="$AS"
32167    path="${complete%% *}"
32168    tmp="$complete EOL"
32169    arguments="${tmp#* }"
32170
32171    # Cannot rely on the command "which" here since it doesn't always work.
32172    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32173    if test -z "$is_absolute_path"; then
32174      # Path to executable is not absolute. Find it.
32175      IFS_save="$IFS"
32176      IFS=:
32177      for p in $PATH; do
32178        if test -f "$p/$path" && test -x "$p/$path"; then
32179          new_path="$p/$path"
32180          break
32181        fi
32182      done
32183      IFS="$IFS_save"
32184    else
32185      # This is an absolute path, we can use it without further modifications.
32186      new_path="$path"
32187    fi
32188
32189    if test "x$new_path" = x; then
32190      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32191$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32192      has_space=`$ECHO "$complete" | $GREP " "`
32193      if test "x$has_space" != x; then
32194        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32195$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32196      fi
32197      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32198    fi
32199  fi
32200
32201  # Now join together the path and the arguments once again
32202  if test "x$arguments" != xEOL; then
32203    new_complete="$new_path ${arguments% *}"
32204  else
32205    new_complete="$new_path"
32206  fi
32207
32208  if test "x$complete" != "x$new_complete"; then
32209    AS="$new_complete"
32210    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
32211$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
32212  fi
32213
32214  else
32215    # FIXME: is this correct for microsoft?
32216    AS="$CC -c"
32217  fi
32218
32219
32220  #
32221  # Setup the archiver (AR)
32222  #
32223  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32224    # The corresponding ar tool is lib.exe (used to create static libraries)
32225    # Extract the first word of "lib", so it can be a program name with args.
32226set dummy lib; ac_word=$2
32227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32228$as_echo_n "checking for $ac_word... " >&6; }
32229if ${ac_cv_prog_AR+:} false; then :
32230  $as_echo_n "(cached) " >&6
32231else
32232  if test -n "$AR"; then
32233  ac_cv_prog_AR="$AR" # Let the user override the test.
32234else
32235as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32236for as_dir in $PATH
32237do
32238  IFS=$as_save_IFS
32239  test -z "$as_dir" && as_dir=.
32240    for ac_exec_ext in '' $ac_executable_extensions; do
32241  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32242    ac_cv_prog_AR="lib"
32243    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32244    break 2
32245  fi
32246done
32247  done
32248IFS=$as_save_IFS
32249
32250fi
32251fi
32252AR=$ac_cv_prog_AR
32253if test -n "$AR"; then
32254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32255$as_echo "$AR" >&6; }
32256else
32257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32258$as_echo "no" >&6; }
32259fi
32260
32261
32262  else
32263
32264
32265  # Publish this variable in the help.
32266
32267
32268  if test "x$AR" = x; then
32269    # The variable is not set by user, try to locate tool using the code snippet
32270    if test -n "$ac_tool_prefix"; then
32271  for ac_prog in ar
32272  do
32273    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32274set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32276$as_echo_n "checking for $ac_word... " >&6; }
32277if ${ac_cv_prog_AR+:} false; then :
32278  $as_echo_n "(cached) " >&6
32279else
32280  if test -n "$AR"; then
32281  ac_cv_prog_AR="$AR" # Let the user override the test.
32282else
32283as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32284for as_dir in $PATH
32285do
32286  IFS=$as_save_IFS
32287  test -z "$as_dir" && as_dir=.
32288    for ac_exec_ext in '' $ac_executable_extensions; do
32289  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32290    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32291    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32292    break 2
32293  fi
32294done
32295  done
32296IFS=$as_save_IFS
32297
32298fi
32299fi
32300AR=$ac_cv_prog_AR
32301if test -n "$AR"; then
32302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32303$as_echo "$AR" >&6; }
32304else
32305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32306$as_echo "no" >&6; }
32307fi
32308
32309
32310    test -n "$AR" && break
32311  done
32312fi
32313if test -z "$AR"; then
32314  ac_ct_AR=$AR
32315  for ac_prog in ar
32316do
32317  # Extract the first word of "$ac_prog", so it can be a program name with args.
32318set dummy $ac_prog; ac_word=$2
32319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32320$as_echo_n "checking for $ac_word... " >&6; }
32321if ${ac_cv_prog_ac_ct_AR+:} false; then :
32322  $as_echo_n "(cached) " >&6
32323else
32324  if test -n "$ac_ct_AR"; then
32325  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32326else
32327as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32328for as_dir in $PATH
32329do
32330  IFS=$as_save_IFS
32331  test -z "$as_dir" && as_dir=.
32332    for ac_exec_ext in '' $ac_executable_extensions; do
32333  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32334    ac_cv_prog_ac_ct_AR="$ac_prog"
32335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32336    break 2
32337  fi
32338done
32339  done
32340IFS=$as_save_IFS
32341
32342fi
32343fi
32344ac_ct_AR=$ac_cv_prog_ac_ct_AR
32345if test -n "$ac_ct_AR"; then
32346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32347$as_echo "$ac_ct_AR" >&6; }
32348else
32349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32350$as_echo "no" >&6; }
32351fi
32352
32353
32354  test -n "$ac_ct_AR" && break
32355done
32356
32357  if test "x$ac_ct_AR" = x; then
32358    AR=""
32359  else
32360    case $cross_compiling:$ac_tool_warned in
32361yes:)
32362{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32363$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32364ac_tool_warned=yes ;;
32365esac
32366    AR=$ac_ct_AR
32367  fi
32368fi
32369
32370  else
32371    # The variable is set, but is it from the command line or the environment?
32372
32373    # Try to remove the string !AR! from our list.
32374    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
32375    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32376      # If it failed, the variable was not from the command line. Ignore it,
32377      # but warn the user (except for BASH, which is always set by the calling BASH).
32378      if test "xAR" != xBASH; then
32379        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
32380$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
32381      fi
32382      # Try to locate tool using the code snippet
32383      if test -n "$ac_tool_prefix"; then
32384  for ac_prog in ar
32385  do
32386    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32387set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32389$as_echo_n "checking for $ac_word... " >&6; }
32390if ${ac_cv_prog_AR+:} false; then :
32391  $as_echo_n "(cached) " >&6
32392else
32393  if test -n "$AR"; then
32394  ac_cv_prog_AR="$AR" # Let the user override the test.
32395else
32396as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32397for as_dir in $PATH
32398do
32399  IFS=$as_save_IFS
32400  test -z "$as_dir" && as_dir=.
32401    for ac_exec_ext in '' $ac_executable_extensions; do
32402  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32403    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32404    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32405    break 2
32406  fi
32407done
32408  done
32409IFS=$as_save_IFS
32410
32411fi
32412fi
32413AR=$ac_cv_prog_AR
32414if test -n "$AR"; then
32415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32416$as_echo "$AR" >&6; }
32417else
32418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32419$as_echo "no" >&6; }
32420fi
32421
32422
32423    test -n "$AR" && break
32424  done
32425fi
32426if test -z "$AR"; then
32427  ac_ct_AR=$AR
32428  for ac_prog in ar
32429do
32430  # Extract the first word of "$ac_prog", so it can be a program name with args.
32431set dummy $ac_prog; ac_word=$2
32432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32433$as_echo_n "checking for $ac_word... " >&6; }
32434if ${ac_cv_prog_ac_ct_AR+:} false; then :
32435  $as_echo_n "(cached) " >&6
32436else
32437  if test -n "$ac_ct_AR"; then
32438  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32439else
32440as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32441for as_dir in $PATH
32442do
32443  IFS=$as_save_IFS
32444  test -z "$as_dir" && as_dir=.
32445    for ac_exec_ext in '' $ac_executable_extensions; do
32446  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32447    ac_cv_prog_ac_ct_AR="$ac_prog"
32448    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32449    break 2
32450  fi
32451done
32452  done
32453IFS=$as_save_IFS
32454
32455fi
32456fi
32457ac_ct_AR=$ac_cv_prog_ac_ct_AR
32458if test -n "$ac_ct_AR"; then
32459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32460$as_echo "$ac_ct_AR" >&6; }
32461else
32462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32463$as_echo "no" >&6; }
32464fi
32465
32466
32467  test -n "$ac_ct_AR" && break
32468done
32469
32470  if test "x$ac_ct_AR" = x; then
32471    AR=""
32472  else
32473    case $cross_compiling:$ac_tool_warned in
32474yes:)
32475{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32476$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32477ac_tool_warned=yes ;;
32478esac
32479    AR=$ac_ct_AR
32480  fi
32481fi
32482
32483    else
32484      # If it succeeded, then it was overridden by the user. We will use it
32485      # for the tool.
32486
32487      # First remove it from the list of overridden variables, so we can test
32488      # for unknown variables in the end.
32489      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32490
32491      # Check if the provided tool contains a complete path.
32492      tool_specified="$AR"
32493      tool_basename="${tool_specified##*/}"
32494      if test "x$tool_basename" = "x$tool_specified"; then
32495        # A command without a complete path is provided, search $PATH.
32496        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
32497$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
32498        # Extract the first word of "$tool_basename", so it can be a program name with args.
32499set dummy $tool_basename; ac_word=$2
32500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32501$as_echo_n "checking for $ac_word... " >&6; }
32502if ${ac_cv_path_AR+:} false; then :
32503  $as_echo_n "(cached) " >&6
32504else
32505  case $AR in
32506  [\\/]* | ?:[\\/]*)
32507  ac_cv_path_AR="$AR" # Let the user override the test with a path.
32508  ;;
32509  *)
32510  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32511for as_dir in $PATH
32512do
32513  IFS=$as_save_IFS
32514  test -z "$as_dir" && as_dir=.
32515    for ac_exec_ext in '' $ac_executable_extensions; do
32516  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32517    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
32518    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32519    break 2
32520  fi
32521done
32522  done
32523IFS=$as_save_IFS
32524
32525  ;;
32526esac
32527fi
32528AR=$ac_cv_path_AR
32529if test -n "$AR"; then
32530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32531$as_echo "$AR" >&6; }
32532else
32533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32534$as_echo "no" >&6; }
32535fi
32536
32537
32538        if test "x$AR" = x; then
32539          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32540        fi
32541      else
32542        # Otherwise we believe it is a complete path. Use it as it is.
32543        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
32544$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
32545        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
32546$as_echo_n "checking for AR... " >&6; }
32547        if test ! -x "$tool_specified"; then
32548          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32549$as_echo "not found" >&6; }
32550          as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
32551        fi
32552        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32553$as_echo "$tool_specified" >&6; }
32554      fi
32555    fi
32556  fi
32557
32558
32559  fi
32560
32561  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32562
32563  # First separate the path from the arguments. This will split at the first
32564  # space.
32565  complete="$AR"
32566  path="${complete%% *}"
32567  tmp="$complete EOL"
32568  arguments="${tmp#* }"
32569
32570  # Input might be given as Windows format, start by converting to
32571  # unix format.
32572  new_path=`$CYGPATH -u "$path"`
32573
32574  # Now try to locate executable using which
32575  new_path=`$WHICH "$new_path" 2> /dev/null`
32576  # bat and cmd files are not always considered executable in cygwin causing which
32577  # to not find them
32578  if test "x$new_path" = x \
32579      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32580      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32581    new_path=`$CYGPATH -u "$path"`
32582  fi
32583  if test "x$new_path" = x; then
32584    # Oops. Which didn't find the executable.
32585    # The splitting of arguments from the executable at a space might have been incorrect,
32586    # since paths with space are more likely in Windows. Give it another try with the whole
32587    # argument.
32588    path="$complete"
32589    arguments="EOL"
32590    new_path=`$CYGPATH -u "$path"`
32591    new_path=`$WHICH "$new_path" 2> /dev/null`
32592    # bat and cmd files are not always considered executable in cygwin causing which
32593    # to not find them
32594    if test "x$new_path" = x \
32595        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32596        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32597      new_path=`$CYGPATH -u "$path"`
32598    fi
32599    if test "x$new_path" = x; then
32600      # It's still not found. Now this is an unrecoverable error.
32601      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32602$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32603      has_space=`$ECHO "$complete" | $GREP " "`
32604      if test "x$has_space" != x; then
32605        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32606$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32607      fi
32608      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32609    fi
32610  fi
32611
32612  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32613  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32614  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32615  # "foo.exe" is OK but "foo" is an error.
32616  #
32617  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32618  # It is also a way to make sure we got the proper file name for the real test later on.
32619  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32620  if test "x$test_shortpath" = x; then
32621    # Short path failed, file does not exist as specified.
32622    # Try adding .exe or .cmd
32623    if test -f "${new_path}.exe"; then
32624      input_to_shortpath="${new_path}.exe"
32625    elif test -f "${new_path}.cmd"; then
32626      input_to_shortpath="${new_path}.cmd"
32627    else
32628      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
32629$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
32630      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32631$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32632      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32633    fi
32634  else
32635    input_to_shortpath="$new_path"
32636  fi
32637
32638  # Call helper function which possibly converts this using DOS-style short mode.
32639  # If so, the updated path is stored in $new_path.
32640  new_path="$input_to_shortpath"
32641
32642  input_path="$input_to_shortpath"
32643  # Check if we need to convert this using DOS-style short mode. If the path
32644  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32645  # take no chances and rewrite it.
32646  # Note: m4 eats our [], so we need to use [ and ] instead.
32647  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32648  if test "x$has_forbidden_chars" != x; then
32649    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32650    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32651    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32652    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32653      # Going to short mode and back again did indeed matter. Since short mode is
32654      # case insensitive, let's make it lowercase to improve readability.
32655      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32656      # Now convert it back to Unix-stile (cygpath)
32657      input_path=`$CYGPATH -u "$shortmode_path"`
32658      new_path="$input_path"
32659    fi
32660  fi
32661
32662  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32663  if test "x$test_cygdrive_prefix" = x; then
32664    # As a simple fix, exclude /usr/bin since it's not a real path.
32665    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32666      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32667      # a path prefixed by /cygdrive for fixpath to work.
32668      new_path="$CYGWIN_ROOT_PATH$input_path"
32669    fi
32670  fi
32671
32672  # remove trailing .exe if any
32673  new_path="${new_path/%.exe/}"
32674
32675  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32676
32677  # First separate the path from the arguments. This will split at the first
32678  # space.
32679  complete="$AR"
32680  path="${complete%% *}"
32681  tmp="$complete EOL"
32682  arguments="${tmp#* }"
32683
32684  # Input might be given as Windows format, start by converting to
32685  # unix format.
32686  new_path="$path"
32687
32688  windows_path="$new_path"
32689  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32690    unix_path=`$CYGPATH -u "$windows_path"`
32691    new_path="$unix_path"
32692  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32693    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32694    new_path="$unix_path"
32695  fi
32696
32697
32698  # Now try to locate executable using which
32699  new_path=`$WHICH "$new_path" 2> /dev/null`
32700
32701  if test "x$new_path" = x; then
32702    # Oops. Which didn't find the executable.
32703    # The splitting of arguments from the executable at a space might have been incorrect,
32704    # since paths with space are more likely in Windows. Give it another try with the whole
32705    # argument.
32706    path="$complete"
32707    arguments="EOL"
32708    new_path="$path"
32709
32710  windows_path="$new_path"
32711  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32712    unix_path=`$CYGPATH -u "$windows_path"`
32713    new_path="$unix_path"
32714  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32715    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32716    new_path="$unix_path"
32717  fi
32718
32719
32720    new_path=`$WHICH "$new_path" 2> /dev/null`
32721
32722    if test "x$new_path" = x; then
32723      # It's still not found. Now this is an unrecoverable error.
32724      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32725$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32726      has_space=`$ECHO "$complete" | $GREP " "`
32727      if test "x$has_space" != x; then
32728        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32729$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32730      fi
32731      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32732    fi
32733  fi
32734
32735  # Now new_path has a complete unix path to the binary
32736  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32737    # Keep paths in /bin as-is, but remove trailing .exe if any
32738    new_path="${new_path/%.exe/}"
32739    # Do not save /bin paths to all_fixpath_prefixes!
32740  else
32741    # Not in mixed or Windows style, start by that.
32742    new_path=`cmd //c echo $new_path`
32743
32744  input_path="$new_path"
32745  # Check if we need to convert this using DOS-style short mode. If the path
32746  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32747  # take no chances and rewrite it.
32748  # Note: m4 eats our [], so we need to use [ and ] instead.
32749  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32750  if test "x$has_forbidden_chars" != x; then
32751    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32752    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32753  fi
32754
32755    # Output is in $new_path
32756
32757  windows_path="$new_path"
32758  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32759    unix_path=`$CYGPATH -u "$windows_path"`
32760    new_path="$unix_path"
32761  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32762    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32763    new_path="$unix_path"
32764  fi
32765
32766    # remove trailing .exe if any
32767    new_path="${new_path/%.exe/}"
32768
32769    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32770    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32771  fi
32772
32773  else
32774    # We're on a posix platform. Hooray! :)
32775    # First separate the path from the arguments. This will split at the first
32776    # space.
32777    complete="$AR"
32778    path="${complete%% *}"
32779    tmp="$complete EOL"
32780    arguments="${tmp#* }"
32781
32782    # Cannot rely on the command "which" here since it doesn't always work.
32783    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32784    if test -z "$is_absolute_path"; then
32785      # Path to executable is not absolute. Find it.
32786      IFS_save="$IFS"
32787      IFS=:
32788      for p in $PATH; do
32789        if test -f "$p/$path" && test -x "$p/$path"; then
32790          new_path="$p/$path"
32791          break
32792        fi
32793      done
32794      IFS="$IFS_save"
32795    else
32796      # This is an absolute path, we can use it without further modifications.
32797      new_path="$path"
32798    fi
32799
32800    if test "x$new_path" = x; then
32801      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32802$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32803      has_space=`$ECHO "$complete" | $GREP " "`
32804      if test "x$has_space" != x; then
32805        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32806$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32807      fi
32808      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32809    fi
32810  fi
32811
32812  # Now join together the path and the arguments once again
32813  if test "x$arguments" != xEOL; then
32814    new_complete="$new_path ${arguments% *}"
32815  else
32816    new_complete="$new_path"
32817  fi
32818
32819  if test "x$complete" != "x$new_complete"; then
32820    AR="$new_complete"
32821    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
32822$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
32823  fi
32824
32825
32826
32827  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
32828    ac_ext=m
32829ac_cpp='$OBJCPP $CPPFLAGS'
32830ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32831ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32832ac_compiler_gnu=$ac_cv_objc_compiler_gnu
32833if test -n "$ac_tool_prefix"; then
32834  for ac_prog in gcc objcc objc cc CC
32835  do
32836    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32837set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32839$as_echo_n "checking for $ac_word... " >&6; }
32840if ${ac_cv_prog_OBJC+:} false; then :
32841  $as_echo_n "(cached) " >&6
32842else
32843  if test -n "$OBJC"; then
32844  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
32845else
32846as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32847for as_dir in $PATH
32848do
32849  IFS=$as_save_IFS
32850  test -z "$as_dir" && as_dir=.
32851    for ac_exec_ext in '' $ac_executable_extensions; do
32852  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32853    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
32854    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32855    break 2
32856  fi
32857done
32858  done
32859IFS=$as_save_IFS
32860
32861fi
32862fi
32863OBJC=$ac_cv_prog_OBJC
32864if test -n "$OBJC"; then
32865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
32866$as_echo "$OBJC" >&6; }
32867else
32868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32869$as_echo "no" >&6; }
32870fi
32871
32872
32873    test -n "$OBJC" && break
32874  done
32875fi
32876if test -z "$OBJC"; then
32877  ac_ct_OBJC=$OBJC
32878  for ac_prog in gcc objcc objc cc CC
32879do
32880  # Extract the first word of "$ac_prog", so it can be a program name with args.
32881set dummy $ac_prog; ac_word=$2
32882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32883$as_echo_n "checking for $ac_word... " >&6; }
32884if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
32885  $as_echo_n "(cached) " >&6
32886else
32887  if test -n "$ac_ct_OBJC"; then
32888  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
32889else
32890as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32891for as_dir in $PATH
32892do
32893  IFS=$as_save_IFS
32894  test -z "$as_dir" && as_dir=.
32895    for ac_exec_ext in '' $ac_executable_extensions; do
32896  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32897    ac_cv_prog_ac_ct_OBJC="$ac_prog"
32898    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32899    break 2
32900  fi
32901done
32902  done
32903IFS=$as_save_IFS
32904
32905fi
32906fi
32907ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
32908if test -n "$ac_ct_OBJC"; then
32909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
32910$as_echo "$ac_ct_OBJC" >&6; }
32911else
32912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32913$as_echo "no" >&6; }
32914fi
32915
32916
32917  test -n "$ac_ct_OBJC" && break
32918done
32919
32920  if test "x$ac_ct_OBJC" = x; then
32921    OBJC="gcc"
32922  else
32923    case $cross_compiling:$ac_tool_warned in
32924yes:)
32925{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32926$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32927ac_tool_warned=yes ;;
32928esac
32929    OBJC=$ac_ct_OBJC
32930  fi
32931fi
32932
32933# Provide some information about the compiler.
32934$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
32935set X $ac_compile
32936ac_compiler=$2
32937for ac_option in --version -v -V -qversion; do
32938  { { ac_try="$ac_compiler $ac_option >&5"
32939case "(($ac_try" in
32940  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32941  *) ac_try_echo=$ac_try;;
32942esac
32943eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32944$as_echo "$ac_try_echo"; } >&5
32945  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
32946  ac_status=$?
32947  if test -s conftest.err; then
32948    sed '10a\
32949... rest of stderr output deleted ...
32950         10q' conftest.err >conftest.er1
32951    cat conftest.er1 >&5
32952  fi
32953  rm -f conftest.er1 conftest.err
32954  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32955  test $ac_status = 0; }
32956done
32957
32958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
32959$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
32960if ${ac_cv_objc_compiler_gnu+:} false; then :
32961  $as_echo_n "(cached) " >&6
32962else
32963  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32964/* end confdefs.h.  */
32965
32966int
32967main ()
32968{
32969#ifndef __GNUC__
32970       choke me
32971#endif
32972
32973  ;
32974  return 0;
32975}
32976_ACEOF
32977if ac_fn_objc_try_compile "$LINENO"; then :
32978  ac_compiler_gnu=yes
32979else
32980  ac_compiler_gnu=no
32981fi
32982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32983ac_cv_objc_compiler_gnu=$ac_compiler_gnu
32984
32985fi
32986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
32987$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
32988if test $ac_compiler_gnu = yes; then
32989  GOBJC=yes
32990else
32991  GOBJC=
32992fi
32993ac_test_OBJCFLAGS=${OBJCFLAGS+set}
32994ac_save_OBJCFLAGS=$OBJCFLAGS
32995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
32996$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
32997if ${ac_cv_prog_objc_g+:} false; then :
32998  $as_echo_n "(cached) " >&6
32999else
33000  ac_save_objc_werror_flag=$ac_objc_werror_flag
33001   ac_objc_werror_flag=yes
33002   ac_cv_prog_objc_g=no
33003   OBJCFLAGS="-g"
33004   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33005/* end confdefs.h.  */
33006
33007int
33008main ()
33009{
33010
33011  ;
33012  return 0;
33013}
33014_ACEOF
33015if ac_fn_objc_try_compile "$LINENO"; then :
33016  ac_cv_prog_objc_g=yes
33017else
33018  OBJCFLAGS=""
33019      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33020/* end confdefs.h.  */
33021
33022int
33023main ()
33024{
33025
33026  ;
33027  return 0;
33028}
33029_ACEOF
33030if ac_fn_objc_try_compile "$LINENO"; then :
33031
33032else
33033  ac_objc_werror_flag=$ac_save_objc_werror_flag
33034	 OBJCFLAGS="-g"
33035	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33036/* end confdefs.h.  */
33037
33038int
33039main ()
33040{
33041
33042  ;
33043  return 0;
33044}
33045_ACEOF
33046if ac_fn_objc_try_compile "$LINENO"; then :
33047  ac_cv_prog_objc_g=yes
33048fi
33049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33050fi
33051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33052fi
33053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33054   ac_objc_werror_flag=$ac_save_objc_werror_flag
33055fi
33056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
33057$as_echo "$ac_cv_prog_objc_g" >&6; }
33058if test "$ac_test_OBJCFLAGS" = set; then
33059  OBJCFLAGS=$ac_save_OBJCFLAGS
33060elif test $ac_cv_prog_objc_g = yes; then
33061  if test "$GOBJC" = yes; then
33062    OBJCFLAGS="-g -O2"
33063  else
33064    OBJCFLAGS="-g"
33065  fi
33066else
33067  if test "$GOBJC" = yes; then
33068    OBJCFLAGS="-O2"
33069  else
33070    OBJCFLAGS=
33071  fi
33072fi
33073ac_ext=cpp
33074ac_cpp='$CXXCPP $CPPFLAGS'
33075ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33076ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33077ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33078
33079
33080  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33081
33082  # First separate the path from the arguments. This will split at the first
33083  # space.
33084  complete="$OBJC"
33085  path="${complete%% *}"
33086  tmp="$complete EOL"
33087  arguments="${tmp#* }"
33088
33089  # Input might be given as Windows format, start by converting to
33090  # unix format.
33091  new_path=`$CYGPATH -u "$path"`
33092
33093  # Now try to locate executable using which
33094  new_path=`$WHICH "$new_path" 2> /dev/null`
33095  # bat and cmd files are not always considered executable in cygwin causing which
33096  # to not find them
33097  if test "x$new_path" = x \
33098      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33099      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33100    new_path=`$CYGPATH -u "$path"`
33101  fi
33102  if test "x$new_path" = x; then
33103    # Oops. Which didn't find the executable.
33104    # The splitting of arguments from the executable at a space might have been incorrect,
33105    # since paths with space are more likely in Windows. Give it another try with the whole
33106    # argument.
33107    path="$complete"
33108    arguments="EOL"
33109    new_path=`$CYGPATH -u "$path"`
33110    new_path=`$WHICH "$new_path" 2> /dev/null`
33111    # bat and cmd files are not always considered executable in cygwin causing which
33112    # to not find them
33113    if test "x$new_path" = x \
33114        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33115        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33116      new_path=`$CYGPATH -u "$path"`
33117    fi
33118    if test "x$new_path" = x; then
33119      # It's still not found. Now this is an unrecoverable error.
33120      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33121$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33122      has_space=`$ECHO "$complete" | $GREP " "`
33123      if test "x$has_space" != x; then
33124        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33125$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33126      fi
33127      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33128    fi
33129  fi
33130
33131  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33132  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33133  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33134  # "foo.exe" is OK but "foo" is an error.
33135  #
33136  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33137  # It is also a way to make sure we got the proper file name for the real test later on.
33138  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33139  if test "x$test_shortpath" = x; then
33140    # Short path failed, file does not exist as specified.
33141    # Try adding .exe or .cmd
33142    if test -f "${new_path}.exe"; then
33143      input_to_shortpath="${new_path}.exe"
33144    elif test -f "${new_path}.cmd"; then
33145      input_to_shortpath="${new_path}.cmd"
33146    else
33147      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
33148$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
33149      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33150$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33151      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33152    fi
33153  else
33154    input_to_shortpath="$new_path"
33155  fi
33156
33157  # Call helper function which possibly converts this using DOS-style short mode.
33158  # If so, the updated path is stored in $new_path.
33159  new_path="$input_to_shortpath"
33160
33161  input_path="$input_to_shortpath"
33162  # Check if we need to convert this using DOS-style short mode. If the path
33163  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33164  # take no chances and rewrite it.
33165  # Note: m4 eats our [], so we need to use [ and ] instead.
33166  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33167  if test "x$has_forbidden_chars" != x; then
33168    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33169    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33170    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33171    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33172      # Going to short mode and back again did indeed matter. Since short mode is
33173      # case insensitive, let's make it lowercase to improve readability.
33174      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33175      # Now convert it back to Unix-stile (cygpath)
33176      input_path=`$CYGPATH -u "$shortmode_path"`
33177      new_path="$input_path"
33178    fi
33179  fi
33180
33181  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33182  if test "x$test_cygdrive_prefix" = x; then
33183    # As a simple fix, exclude /usr/bin since it's not a real path.
33184    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33185      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33186      # a path prefixed by /cygdrive for fixpath to work.
33187      new_path="$CYGWIN_ROOT_PATH$input_path"
33188    fi
33189  fi
33190
33191  # remove trailing .exe if any
33192  new_path="${new_path/%.exe/}"
33193
33194  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33195
33196  # First separate the path from the arguments. This will split at the first
33197  # space.
33198  complete="$OBJC"
33199  path="${complete%% *}"
33200  tmp="$complete EOL"
33201  arguments="${tmp#* }"
33202
33203  # Input might be given as Windows format, start by converting to
33204  # unix format.
33205  new_path="$path"
33206
33207  windows_path="$new_path"
33208  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33209    unix_path=`$CYGPATH -u "$windows_path"`
33210    new_path="$unix_path"
33211  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33212    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33213    new_path="$unix_path"
33214  fi
33215
33216
33217  # Now try to locate executable using which
33218  new_path=`$WHICH "$new_path" 2> /dev/null`
33219
33220  if test "x$new_path" = x; then
33221    # Oops. Which didn't find the executable.
33222    # The splitting of arguments from the executable at a space might have been incorrect,
33223    # since paths with space are more likely in Windows. Give it another try with the whole
33224    # argument.
33225    path="$complete"
33226    arguments="EOL"
33227    new_path="$path"
33228
33229  windows_path="$new_path"
33230  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33231    unix_path=`$CYGPATH -u "$windows_path"`
33232    new_path="$unix_path"
33233  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33234    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33235    new_path="$unix_path"
33236  fi
33237
33238
33239    new_path=`$WHICH "$new_path" 2> /dev/null`
33240
33241    if test "x$new_path" = x; then
33242      # It's still not found. Now this is an unrecoverable error.
33243      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33244$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33245      has_space=`$ECHO "$complete" | $GREP " "`
33246      if test "x$has_space" != x; then
33247        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33248$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33249      fi
33250      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33251    fi
33252  fi
33253
33254  # Now new_path has a complete unix path to the binary
33255  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33256    # Keep paths in /bin as-is, but remove trailing .exe if any
33257    new_path="${new_path/%.exe/}"
33258    # Do not save /bin paths to all_fixpath_prefixes!
33259  else
33260    # Not in mixed or Windows style, start by that.
33261    new_path=`cmd //c echo $new_path`
33262
33263  input_path="$new_path"
33264  # Check if we need to convert this using DOS-style short mode. If the path
33265  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33266  # take no chances and rewrite it.
33267  # Note: m4 eats our [], so we need to use [ and ] instead.
33268  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33269  if test "x$has_forbidden_chars" != x; then
33270    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33271    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33272  fi
33273
33274    # Output is in $new_path
33275
33276  windows_path="$new_path"
33277  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33278    unix_path=`$CYGPATH -u "$windows_path"`
33279    new_path="$unix_path"
33280  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33281    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33282    new_path="$unix_path"
33283  fi
33284
33285    # remove trailing .exe if any
33286    new_path="${new_path/%.exe/}"
33287
33288    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33289    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33290  fi
33291
33292  else
33293    # We're on a posix platform. Hooray! :)
33294    # First separate the path from the arguments. This will split at the first
33295    # space.
33296    complete="$OBJC"
33297    path="${complete%% *}"
33298    tmp="$complete EOL"
33299    arguments="${tmp#* }"
33300
33301    # Cannot rely on the command "which" here since it doesn't always work.
33302    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33303    if test -z "$is_absolute_path"; then
33304      # Path to executable is not absolute. Find it.
33305      IFS_save="$IFS"
33306      IFS=:
33307      for p in $PATH; do
33308        if test -f "$p/$path" && test -x "$p/$path"; then
33309          new_path="$p/$path"
33310          break
33311        fi
33312      done
33313      IFS="$IFS_save"
33314    else
33315      # This is an absolute path, we can use it without further modifications.
33316      new_path="$path"
33317    fi
33318
33319    if test "x$new_path" = x; then
33320      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33321$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33322      has_space=`$ECHO "$complete" | $GREP " "`
33323      if test "x$has_space" != x; then
33324        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33325$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33326      fi
33327      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33328    fi
33329  fi
33330
33331  # Now join together the path and the arguments once again
33332  if test "x$arguments" != xEOL; then
33333    new_complete="$new_path ${arguments% *}"
33334  else
33335    new_complete="$new_path"
33336  fi
33337
33338  if test "x$complete" != "x$new_complete"; then
33339    OBJC="$new_complete"
33340    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
33341$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
33342  fi
33343
33344
33345
33346  # Publish this variable in the help.
33347
33348
33349  if test "x$LIPO" = x; then
33350    # The variable is not set by user, try to locate tool using the code snippet
33351    for ac_prog in lipo
33352do
33353  # Extract the first word of "$ac_prog", so it can be a program name with args.
33354set dummy $ac_prog; ac_word=$2
33355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33356$as_echo_n "checking for $ac_word... " >&6; }
33357if ${ac_cv_path_LIPO+:} false; then :
33358  $as_echo_n "(cached) " >&6
33359else
33360  case $LIPO in
33361  [\\/]* | ?:[\\/]*)
33362  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33363  ;;
33364  *)
33365  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33366for as_dir in $PATH
33367do
33368  IFS=$as_save_IFS
33369  test -z "$as_dir" && as_dir=.
33370    for ac_exec_ext in '' $ac_executable_extensions; do
33371  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33372    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33373    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33374    break 2
33375  fi
33376done
33377  done
33378IFS=$as_save_IFS
33379
33380  ;;
33381esac
33382fi
33383LIPO=$ac_cv_path_LIPO
33384if test -n "$LIPO"; then
33385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33386$as_echo "$LIPO" >&6; }
33387else
33388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33389$as_echo "no" >&6; }
33390fi
33391
33392
33393  test -n "$LIPO" && break
33394done
33395
33396  else
33397    # The variable is set, but is it from the command line or the environment?
33398
33399    # Try to remove the string !LIPO! from our list.
33400    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
33401    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33402      # If it failed, the variable was not from the command line. Ignore it,
33403      # but warn the user (except for BASH, which is always set by the calling BASH).
33404      if test "xLIPO" != xBASH; then
33405        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
33406$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
33407      fi
33408      # Try to locate tool using the code snippet
33409      for ac_prog in lipo
33410do
33411  # Extract the first word of "$ac_prog", so it can be a program name with args.
33412set dummy $ac_prog; ac_word=$2
33413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33414$as_echo_n "checking for $ac_word... " >&6; }
33415if ${ac_cv_path_LIPO+:} false; then :
33416  $as_echo_n "(cached) " >&6
33417else
33418  case $LIPO in
33419  [\\/]* | ?:[\\/]*)
33420  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33421  ;;
33422  *)
33423  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33424for as_dir in $PATH
33425do
33426  IFS=$as_save_IFS
33427  test -z "$as_dir" && as_dir=.
33428    for ac_exec_ext in '' $ac_executable_extensions; do
33429  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33430    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33431    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33432    break 2
33433  fi
33434done
33435  done
33436IFS=$as_save_IFS
33437
33438  ;;
33439esac
33440fi
33441LIPO=$ac_cv_path_LIPO
33442if test -n "$LIPO"; then
33443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33444$as_echo "$LIPO" >&6; }
33445else
33446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33447$as_echo "no" >&6; }
33448fi
33449
33450
33451  test -n "$LIPO" && break
33452done
33453
33454    else
33455      # If it succeeded, then it was overridden by the user. We will use it
33456      # for the tool.
33457
33458      # First remove it from the list of overridden variables, so we can test
33459      # for unknown variables in the end.
33460      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33461
33462      # Check if the provided tool contains a complete path.
33463      tool_specified="$LIPO"
33464      tool_basename="${tool_specified##*/}"
33465      if test "x$tool_basename" = "x$tool_specified"; then
33466        # A command without a complete path is provided, search $PATH.
33467        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
33468$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
33469        # Extract the first word of "$tool_basename", so it can be a program name with args.
33470set dummy $tool_basename; ac_word=$2
33471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33472$as_echo_n "checking for $ac_word... " >&6; }
33473if ${ac_cv_path_LIPO+:} false; then :
33474  $as_echo_n "(cached) " >&6
33475else
33476  case $LIPO in
33477  [\\/]* | ?:[\\/]*)
33478  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33479  ;;
33480  *)
33481  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33482for as_dir in $PATH
33483do
33484  IFS=$as_save_IFS
33485  test -z "$as_dir" && as_dir=.
33486    for ac_exec_ext in '' $ac_executable_extensions; do
33487  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33488    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33489    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33490    break 2
33491  fi
33492done
33493  done
33494IFS=$as_save_IFS
33495
33496  ;;
33497esac
33498fi
33499LIPO=$ac_cv_path_LIPO
33500if test -n "$LIPO"; then
33501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33502$as_echo "$LIPO" >&6; }
33503else
33504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33505$as_echo "no" >&6; }
33506fi
33507
33508
33509        if test "x$LIPO" = x; then
33510          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33511        fi
33512      else
33513        # Otherwise we believe it is a complete path. Use it as it is.
33514        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
33515$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
33516        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
33517$as_echo_n "checking for LIPO... " >&6; }
33518        if test ! -x "$tool_specified"; then
33519          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33520$as_echo "not found" >&6; }
33521          as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
33522        fi
33523        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33524$as_echo "$tool_specified" >&6; }
33525      fi
33526    fi
33527  fi
33528
33529
33530
33531  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33532
33533  # First separate the path from the arguments. This will split at the first
33534  # space.
33535  complete="$LIPO"
33536  path="${complete%% *}"
33537  tmp="$complete EOL"
33538  arguments="${tmp#* }"
33539
33540  # Input might be given as Windows format, start by converting to
33541  # unix format.
33542  new_path=`$CYGPATH -u "$path"`
33543
33544  # Now try to locate executable using which
33545  new_path=`$WHICH "$new_path" 2> /dev/null`
33546  # bat and cmd files are not always considered executable in cygwin causing which
33547  # to not find them
33548  if test "x$new_path" = x \
33549      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33550      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33551    new_path=`$CYGPATH -u "$path"`
33552  fi
33553  if test "x$new_path" = x; then
33554    # Oops. Which didn't find the executable.
33555    # The splitting of arguments from the executable at a space might have been incorrect,
33556    # since paths with space are more likely in Windows. Give it another try with the whole
33557    # argument.
33558    path="$complete"
33559    arguments="EOL"
33560    new_path=`$CYGPATH -u "$path"`
33561    new_path=`$WHICH "$new_path" 2> /dev/null`
33562    # bat and cmd files are not always considered executable in cygwin causing which
33563    # to not find them
33564    if test "x$new_path" = x \
33565        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33566        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33567      new_path=`$CYGPATH -u "$path"`
33568    fi
33569    if test "x$new_path" = x; then
33570      # It's still not found. Now this is an unrecoverable error.
33571      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33572$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33573      has_space=`$ECHO "$complete" | $GREP " "`
33574      if test "x$has_space" != x; then
33575        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33576$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33577      fi
33578      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33579    fi
33580  fi
33581
33582  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33583  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33584  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33585  # "foo.exe" is OK but "foo" is an error.
33586  #
33587  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33588  # It is also a way to make sure we got the proper file name for the real test later on.
33589  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33590  if test "x$test_shortpath" = x; then
33591    # Short path failed, file does not exist as specified.
33592    # Try adding .exe or .cmd
33593    if test -f "${new_path}.exe"; then
33594      input_to_shortpath="${new_path}.exe"
33595    elif test -f "${new_path}.cmd"; then
33596      input_to_shortpath="${new_path}.cmd"
33597    else
33598      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
33599$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
33600      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33601$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33602      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33603    fi
33604  else
33605    input_to_shortpath="$new_path"
33606  fi
33607
33608  # Call helper function which possibly converts this using DOS-style short mode.
33609  # If so, the updated path is stored in $new_path.
33610  new_path="$input_to_shortpath"
33611
33612  input_path="$input_to_shortpath"
33613  # Check if we need to convert this using DOS-style short mode. If the path
33614  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33615  # take no chances and rewrite it.
33616  # Note: m4 eats our [], so we need to use [ and ] instead.
33617  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33618  if test "x$has_forbidden_chars" != x; then
33619    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33620    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33621    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33622    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33623      # Going to short mode and back again did indeed matter. Since short mode is
33624      # case insensitive, let's make it lowercase to improve readability.
33625      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33626      # Now convert it back to Unix-stile (cygpath)
33627      input_path=`$CYGPATH -u "$shortmode_path"`
33628      new_path="$input_path"
33629    fi
33630  fi
33631
33632  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33633  if test "x$test_cygdrive_prefix" = x; then
33634    # As a simple fix, exclude /usr/bin since it's not a real path.
33635    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33636      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33637      # a path prefixed by /cygdrive for fixpath to work.
33638      new_path="$CYGWIN_ROOT_PATH$input_path"
33639    fi
33640  fi
33641
33642  # remove trailing .exe if any
33643  new_path="${new_path/%.exe/}"
33644
33645  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33646
33647  # First separate the path from the arguments. This will split at the first
33648  # space.
33649  complete="$LIPO"
33650  path="${complete%% *}"
33651  tmp="$complete EOL"
33652  arguments="${tmp#* }"
33653
33654  # Input might be given as Windows format, start by converting to
33655  # unix format.
33656  new_path="$path"
33657
33658  windows_path="$new_path"
33659  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33660    unix_path=`$CYGPATH -u "$windows_path"`
33661    new_path="$unix_path"
33662  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33663    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33664    new_path="$unix_path"
33665  fi
33666
33667
33668  # Now try to locate executable using which
33669  new_path=`$WHICH "$new_path" 2> /dev/null`
33670
33671  if test "x$new_path" = x; then
33672    # Oops. Which didn't find the executable.
33673    # The splitting of arguments from the executable at a space might have been incorrect,
33674    # since paths with space are more likely in Windows. Give it another try with the whole
33675    # argument.
33676    path="$complete"
33677    arguments="EOL"
33678    new_path="$path"
33679
33680  windows_path="$new_path"
33681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33682    unix_path=`$CYGPATH -u "$windows_path"`
33683    new_path="$unix_path"
33684  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33685    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33686    new_path="$unix_path"
33687  fi
33688
33689
33690    new_path=`$WHICH "$new_path" 2> /dev/null`
33691
33692    if test "x$new_path" = x; then
33693      # It's still not found. Now this is an unrecoverable error.
33694      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33695$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33696      has_space=`$ECHO "$complete" | $GREP " "`
33697      if test "x$has_space" != x; then
33698        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33699$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33700      fi
33701      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33702    fi
33703  fi
33704
33705  # Now new_path has a complete unix path to the binary
33706  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33707    # Keep paths in /bin as-is, but remove trailing .exe if any
33708    new_path="${new_path/%.exe/}"
33709    # Do not save /bin paths to all_fixpath_prefixes!
33710  else
33711    # Not in mixed or Windows style, start by that.
33712    new_path=`cmd //c echo $new_path`
33713
33714  input_path="$new_path"
33715  # Check if we need to convert this using DOS-style short mode. If the path
33716  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33717  # take no chances and rewrite it.
33718  # Note: m4 eats our [], so we need to use [ and ] instead.
33719  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33720  if test "x$has_forbidden_chars" != x; then
33721    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33722    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33723  fi
33724
33725    # Output is in $new_path
33726
33727  windows_path="$new_path"
33728  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33729    unix_path=`$CYGPATH -u "$windows_path"`
33730    new_path="$unix_path"
33731  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33732    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33733    new_path="$unix_path"
33734  fi
33735
33736    # remove trailing .exe if any
33737    new_path="${new_path/%.exe/}"
33738
33739    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33740    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33741  fi
33742
33743  else
33744    # We're on a posix platform. Hooray! :)
33745    # First separate the path from the arguments. This will split at the first
33746    # space.
33747    complete="$LIPO"
33748    path="${complete%% *}"
33749    tmp="$complete EOL"
33750    arguments="${tmp#* }"
33751
33752    # Cannot rely on the command "which" here since it doesn't always work.
33753    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33754    if test -z "$is_absolute_path"; then
33755      # Path to executable is not absolute. Find it.
33756      IFS_save="$IFS"
33757      IFS=:
33758      for p in $PATH; do
33759        if test -f "$p/$path" && test -x "$p/$path"; then
33760          new_path="$p/$path"
33761          break
33762        fi
33763      done
33764      IFS="$IFS_save"
33765    else
33766      # This is an absolute path, we can use it without further modifications.
33767      new_path="$path"
33768    fi
33769
33770    if test "x$new_path" = x; then
33771      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33772$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33773      has_space=`$ECHO "$complete" | $GREP " "`
33774      if test "x$has_space" != x; then
33775        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33776$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33777      fi
33778      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33779    fi
33780  fi
33781
33782  # Now join together the path and the arguments once again
33783  if test "x$arguments" != xEOL; then
33784    new_complete="$new_path ${arguments% *}"
33785  else
33786    new_complete="$new_path"
33787  fi
33788
33789  if test "x$complete" != "x$new_complete"; then
33790    LIPO="$new_complete"
33791    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
33792$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
33793  fi
33794
33795  else
33796    OBJC=
33797  fi
33798
33799  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33800    # Extract the first word of "mt", so it can be a program name with args.
33801set dummy mt; ac_word=$2
33802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33803$as_echo_n "checking for $ac_word... " >&6; }
33804if ${ac_cv_prog_MT+:} false; then :
33805  $as_echo_n "(cached) " >&6
33806else
33807  if test -n "$MT"; then
33808  ac_cv_prog_MT="$MT" # Let the user override the test.
33809else
33810  ac_prog_rejected=no
33811as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33812for as_dir in $PATH
33813do
33814  IFS=$as_save_IFS
33815  test -z "$as_dir" && as_dir=.
33816    for ac_exec_ext in '' $ac_executable_extensions; do
33817  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33818    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
33819       ac_prog_rejected=yes
33820       continue
33821     fi
33822    ac_cv_prog_MT="mt"
33823    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33824    break 2
33825  fi
33826done
33827  done
33828IFS=$as_save_IFS
33829
33830if test $ac_prog_rejected = yes; then
33831  # We found a bogon in the path, so make sure we never use it.
33832  set dummy $ac_cv_prog_MT
33833  shift
33834  if test $# != 0; then
33835    # We chose a different compiler from the bogus one.
33836    # However, it has the same basename, so the bogon will be chosen
33837    # first if we set MT to just the basename; use the full file name.
33838    shift
33839    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
33840  fi
33841fi
33842fi
33843fi
33844MT=$ac_cv_prog_MT
33845if test -n "$MT"; then
33846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
33847$as_echo "$MT" >&6; }
33848else
33849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33850$as_echo "no" >&6; }
33851fi
33852
33853
33854
33855  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33856
33857  # First separate the path from the arguments. This will split at the first
33858  # space.
33859  complete="$MT"
33860  path="${complete%% *}"
33861  tmp="$complete EOL"
33862  arguments="${tmp#* }"
33863
33864  # Input might be given as Windows format, start by converting to
33865  # unix format.
33866  new_path=`$CYGPATH -u "$path"`
33867
33868  # Now try to locate executable using which
33869  new_path=`$WHICH "$new_path" 2> /dev/null`
33870  # bat and cmd files are not always considered executable in cygwin causing which
33871  # to not find them
33872  if test "x$new_path" = x \
33873      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33874      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33875    new_path=`$CYGPATH -u "$path"`
33876  fi
33877  if test "x$new_path" = x; then
33878    # Oops. Which didn't find the executable.
33879    # The splitting of arguments from the executable at a space might have been incorrect,
33880    # since paths with space are more likely in Windows. Give it another try with the whole
33881    # argument.
33882    path="$complete"
33883    arguments="EOL"
33884    new_path=`$CYGPATH -u "$path"`
33885    new_path=`$WHICH "$new_path" 2> /dev/null`
33886    # bat and cmd files are not always considered executable in cygwin causing which
33887    # to not find them
33888    if test "x$new_path" = x \
33889        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33890        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33891      new_path=`$CYGPATH -u "$path"`
33892    fi
33893    if test "x$new_path" = x; then
33894      # It's still not found. Now this is an unrecoverable error.
33895      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
33896$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
33897      has_space=`$ECHO "$complete" | $GREP " "`
33898      if test "x$has_space" != x; then
33899        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33900$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33901      fi
33902      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33903    fi
33904  fi
33905
33906  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33907  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33908  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33909  # "foo.exe" is OK but "foo" is an error.
33910  #
33911  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33912  # It is also a way to make sure we got the proper file name for the real test later on.
33913  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33914  if test "x$test_shortpath" = x; then
33915    # Short path failed, file does not exist as specified.
33916    # Try adding .exe or .cmd
33917    if test -f "${new_path}.exe"; then
33918      input_to_shortpath="${new_path}.exe"
33919    elif test -f "${new_path}.cmd"; then
33920      input_to_shortpath="${new_path}.cmd"
33921    else
33922      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
33923$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
33924      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33925$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33926      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33927    fi
33928  else
33929    input_to_shortpath="$new_path"
33930  fi
33931
33932  # Call helper function which possibly converts this using DOS-style short mode.
33933  # If so, the updated path is stored in $new_path.
33934  new_path="$input_to_shortpath"
33935
33936  input_path="$input_to_shortpath"
33937  # Check if we need to convert this using DOS-style short mode. If the path
33938  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33939  # take no chances and rewrite it.
33940  # Note: m4 eats our [], so we need to use [ and ] instead.
33941  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33942  if test "x$has_forbidden_chars" != x; then
33943    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33944    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33945    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33946    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33947      # Going to short mode and back again did indeed matter. Since short mode is
33948      # case insensitive, let's make it lowercase to improve readability.
33949      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33950      # Now convert it back to Unix-stile (cygpath)
33951      input_path=`$CYGPATH -u "$shortmode_path"`
33952      new_path="$input_path"
33953    fi
33954  fi
33955
33956  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33957  if test "x$test_cygdrive_prefix" = x; then
33958    # As a simple fix, exclude /usr/bin since it's not a real path.
33959    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33960      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33961      # a path prefixed by /cygdrive for fixpath to work.
33962      new_path="$CYGWIN_ROOT_PATH$input_path"
33963    fi
33964  fi
33965
33966  # remove trailing .exe if any
33967  new_path="${new_path/%.exe/}"
33968
33969  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33970
33971  # First separate the path from the arguments. This will split at the first
33972  # space.
33973  complete="$MT"
33974  path="${complete%% *}"
33975  tmp="$complete EOL"
33976  arguments="${tmp#* }"
33977
33978  # Input might be given as Windows format, start by converting to
33979  # unix format.
33980  new_path="$path"
33981
33982  windows_path="$new_path"
33983  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33984    unix_path=`$CYGPATH -u "$windows_path"`
33985    new_path="$unix_path"
33986  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33987    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33988    new_path="$unix_path"
33989  fi
33990
33991
33992  # Now try to locate executable using which
33993  new_path=`$WHICH "$new_path" 2> /dev/null`
33994
33995  if test "x$new_path" = x; then
33996    # Oops. Which didn't find the executable.
33997    # The splitting of arguments from the executable at a space might have been incorrect,
33998    # since paths with space are more likely in Windows. Give it another try with the whole
33999    # argument.
34000    path="$complete"
34001    arguments="EOL"
34002    new_path="$path"
34003
34004  windows_path="$new_path"
34005  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34006    unix_path=`$CYGPATH -u "$windows_path"`
34007    new_path="$unix_path"
34008  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34009    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34010    new_path="$unix_path"
34011  fi
34012
34013
34014    new_path=`$WHICH "$new_path" 2> /dev/null`
34015
34016    if test "x$new_path" = x; then
34017      # It's still not found. Now this is an unrecoverable error.
34018      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34019$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34020      has_space=`$ECHO "$complete" | $GREP " "`
34021      if test "x$has_space" != x; then
34022        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34023$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34024      fi
34025      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34026    fi
34027  fi
34028
34029  # Now new_path has a complete unix path to the binary
34030  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34031    # Keep paths in /bin as-is, but remove trailing .exe if any
34032    new_path="${new_path/%.exe/}"
34033    # Do not save /bin paths to all_fixpath_prefixes!
34034  else
34035    # Not in mixed or Windows style, start by that.
34036    new_path=`cmd //c echo $new_path`
34037
34038  input_path="$new_path"
34039  # Check if we need to convert this using DOS-style short mode. If the path
34040  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34041  # take no chances and rewrite it.
34042  # Note: m4 eats our [], so we need to use [ and ] instead.
34043  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34044  if test "x$has_forbidden_chars" != x; then
34045    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34046    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34047  fi
34048
34049    # Output is in $new_path
34050
34051  windows_path="$new_path"
34052  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34053    unix_path=`$CYGPATH -u "$windows_path"`
34054    new_path="$unix_path"
34055  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34056    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34057    new_path="$unix_path"
34058  fi
34059
34060    # remove trailing .exe if any
34061    new_path="${new_path/%.exe/}"
34062
34063    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34064    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34065  fi
34066
34067  else
34068    # We're on a posix platform. Hooray! :)
34069    # First separate the path from the arguments. This will split at the first
34070    # space.
34071    complete="$MT"
34072    path="${complete%% *}"
34073    tmp="$complete EOL"
34074    arguments="${tmp#* }"
34075
34076    # Cannot rely on the command "which" here since it doesn't always work.
34077    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34078    if test -z "$is_absolute_path"; then
34079      # Path to executable is not absolute. Find it.
34080      IFS_save="$IFS"
34081      IFS=:
34082      for p in $PATH; do
34083        if test -f "$p/$path" && test -x "$p/$path"; then
34084          new_path="$p/$path"
34085          break
34086        fi
34087      done
34088      IFS="$IFS_save"
34089    else
34090      # This is an absolute path, we can use it without further modifications.
34091      new_path="$path"
34092    fi
34093
34094    if test "x$new_path" = x; then
34095      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34096$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34097      has_space=`$ECHO "$complete" | $GREP " "`
34098      if test "x$has_space" != x; then
34099        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34100$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34101      fi
34102      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34103    fi
34104  fi
34105
34106  # Now join together the path and the arguments once again
34107  if test "x$arguments" != xEOL; then
34108    new_complete="$new_path ${arguments% *}"
34109  else
34110    new_complete="$new_path"
34111  fi
34112
34113  if test "x$complete" != "x$new_complete"; then
34114    MT="$new_complete"
34115    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
34116$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
34117  fi
34118
34119    # Setup the resource compiler (RC)
34120    # Extract the first word of "rc", so it can be a program name with args.
34121set dummy rc; ac_word=$2
34122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34123$as_echo_n "checking for $ac_word... " >&6; }
34124if ${ac_cv_prog_RC+:} false; then :
34125  $as_echo_n "(cached) " >&6
34126else
34127  if test -n "$RC"; then
34128  ac_cv_prog_RC="$RC" # Let the user override the test.
34129else
34130  ac_prog_rejected=no
34131as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34132for as_dir in $PATH
34133do
34134  IFS=$as_save_IFS
34135  test -z "$as_dir" && as_dir=.
34136    for ac_exec_ext in '' $ac_executable_extensions; do
34137  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34138    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
34139       ac_prog_rejected=yes
34140       continue
34141     fi
34142    ac_cv_prog_RC="rc"
34143    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34144    break 2
34145  fi
34146done
34147  done
34148IFS=$as_save_IFS
34149
34150if test $ac_prog_rejected = yes; then
34151  # We found a bogon in the path, so make sure we never use it.
34152  set dummy $ac_cv_prog_RC
34153  shift
34154  if test $# != 0; then
34155    # We chose a different compiler from the bogus one.
34156    # However, it has the same basename, so the bogon will be chosen
34157    # first if we set RC to just the basename; use the full file name.
34158    shift
34159    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
34160  fi
34161fi
34162fi
34163fi
34164RC=$ac_cv_prog_RC
34165if test -n "$RC"; then
34166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34167$as_echo "$RC" >&6; }
34168else
34169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34170$as_echo "no" >&6; }
34171fi
34172
34173
34174
34175  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34176
34177  # First separate the path from the arguments. This will split at the first
34178  # space.
34179  complete="$RC"
34180  path="${complete%% *}"
34181  tmp="$complete EOL"
34182  arguments="${tmp#* }"
34183
34184  # Input might be given as Windows format, start by converting to
34185  # unix format.
34186  new_path=`$CYGPATH -u "$path"`
34187
34188  # Now try to locate executable using which
34189  new_path=`$WHICH "$new_path" 2> /dev/null`
34190  # bat and cmd files are not always considered executable in cygwin causing which
34191  # to not find them
34192  if test "x$new_path" = x \
34193      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34194      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34195    new_path=`$CYGPATH -u "$path"`
34196  fi
34197  if test "x$new_path" = x; then
34198    # Oops. Which didn't find the executable.
34199    # The splitting of arguments from the executable at a space might have been incorrect,
34200    # since paths with space are more likely in Windows. Give it another try with the whole
34201    # argument.
34202    path="$complete"
34203    arguments="EOL"
34204    new_path=`$CYGPATH -u "$path"`
34205    new_path=`$WHICH "$new_path" 2> /dev/null`
34206    # bat and cmd files are not always considered executable in cygwin causing which
34207    # to not find them
34208    if test "x$new_path" = x \
34209        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34210        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34211      new_path=`$CYGPATH -u "$path"`
34212    fi
34213    if test "x$new_path" = x; then
34214      # It's still not found. Now this is an unrecoverable error.
34215      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34216$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34217      has_space=`$ECHO "$complete" | $GREP " "`
34218      if test "x$has_space" != x; then
34219        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34220$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34221      fi
34222      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34223    fi
34224  fi
34225
34226  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34227  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34228  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34229  # "foo.exe" is OK but "foo" is an error.
34230  #
34231  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34232  # It is also a way to make sure we got the proper file name for the real test later on.
34233  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34234  if test "x$test_shortpath" = x; then
34235    # Short path failed, file does not exist as specified.
34236    # Try adding .exe or .cmd
34237    if test -f "${new_path}.exe"; then
34238      input_to_shortpath="${new_path}.exe"
34239    elif test -f "${new_path}.cmd"; then
34240      input_to_shortpath="${new_path}.cmd"
34241    else
34242      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
34243$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
34244      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34245$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34246      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34247    fi
34248  else
34249    input_to_shortpath="$new_path"
34250  fi
34251
34252  # Call helper function which possibly converts this using DOS-style short mode.
34253  # If so, the updated path is stored in $new_path.
34254  new_path="$input_to_shortpath"
34255
34256  input_path="$input_to_shortpath"
34257  # Check if we need to convert this using DOS-style short mode. If the path
34258  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34259  # take no chances and rewrite it.
34260  # Note: m4 eats our [], so we need to use [ and ] instead.
34261  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34262  if test "x$has_forbidden_chars" != x; then
34263    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34264    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34265    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34266    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34267      # Going to short mode and back again did indeed matter. Since short mode is
34268      # case insensitive, let's make it lowercase to improve readability.
34269      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34270      # Now convert it back to Unix-stile (cygpath)
34271      input_path=`$CYGPATH -u "$shortmode_path"`
34272      new_path="$input_path"
34273    fi
34274  fi
34275
34276  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34277  if test "x$test_cygdrive_prefix" = x; then
34278    # As a simple fix, exclude /usr/bin since it's not a real path.
34279    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34280      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34281      # a path prefixed by /cygdrive for fixpath to work.
34282      new_path="$CYGWIN_ROOT_PATH$input_path"
34283    fi
34284  fi
34285
34286  # remove trailing .exe if any
34287  new_path="${new_path/%.exe/}"
34288
34289  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34290
34291  # First separate the path from the arguments. This will split at the first
34292  # space.
34293  complete="$RC"
34294  path="${complete%% *}"
34295  tmp="$complete EOL"
34296  arguments="${tmp#* }"
34297
34298  # Input might be given as Windows format, start by converting to
34299  # unix format.
34300  new_path="$path"
34301
34302  windows_path="$new_path"
34303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34304    unix_path=`$CYGPATH -u "$windows_path"`
34305    new_path="$unix_path"
34306  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34307    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34308    new_path="$unix_path"
34309  fi
34310
34311
34312  # Now try to locate executable using which
34313  new_path=`$WHICH "$new_path" 2> /dev/null`
34314
34315  if test "x$new_path" = x; then
34316    # Oops. Which didn't find the executable.
34317    # The splitting of arguments from the executable at a space might have been incorrect,
34318    # since paths with space are more likely in Windows. Give it another try with the whole
34319    # argument.
34320    path="$complete"
34321    arguments="EOL"
34322    new_path="$path"
34323
34324  windows_path="$new_path"
34325  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34326    unix_path=`$CYGPATH -u "$windows_path"`
34327    new_path="$unix_path"
34328  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34329    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34330    new_path="$unix_path"
34331  fi
34332
34333
34334    new_path=`$WHICH "$new_path" 2> /dev/null`
34335
34336    if test "x$new_path" = x; then
34337      # It's still not found. Now this is an unrecoverable error.
34338      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34339$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34340      has_space=`$ECHO "$complete" | $GREP " "`
34341      if test "x$has_space" != x; then
34342        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34343$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34344      fi
34345      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34346    fi
34347  fi
34348
34349  # Now new_path has a complete unix path to the binary
34350  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34351    # Keep paths in /bin as-is, but remove trailing .exe if any
34352    new_path="${new_path/%.exe/}"
34353    # Do not save /bin paths to all_fixpath_prefixes!
34354  else
34355    # Not in mixed or Windows style, start by that.
34356    new_path=`cmd //c echo $new_path`
34357
34358  input_path="$new_path"
34359  # Check if we need to convert this using DOS-style short mode. If the path
34360  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34361  # take no chances and rewrite it.
34362  # Note: m4 eats our [], so we need to use [ and ] instead.
34363  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34364  if test "x$has_forbidden_chars" != x; then
34365    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34366    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34367  fi
34368
34369    # Output is in $new_path
34370
34371  windows_path="$new_path"
34372  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34373    unix_path=`$CYGPATH -u "$windows_path"`
34374    new_path="$unix_path"
34375  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34376    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34377    new_path="$unix_path"
34378  fi
34379
34380    # remove trailing .exe if any
34381    new_path="${new_path/%.exe/}"
34382
34383    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34384    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34385  fi
34386
34387  else
34388    # We're on a posix platform. Hooray! :)
34389    # First separate the path from the arguments. This will split at the first
34390    # space.
34391    complete="$RC"
34392    path="${complete%% *}"
34393    tmp="$complete EOL"
34394    arguments="${tmp#* }"
34395
34396    # Cannot rely on the command "which" here since it doesn't always work.
34397    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34398    if test -z "$is_absolute_path"; then
34399      # Path to executable is not absolute. Find it.
34400      IFS_save="$IFS"
34401      IFS=:
34402      for p in $PATH; do
34403        if test -f "$p/$path" && test -x "$p/$path"; then
34404          new_path="$p/$path"
34405          break
34406        fi
34407      done
34408      IFS="$IFS_save"
34409    else
34410      # This is an absolute path, we can use it without further modifications.
34411      new_path="$path"
34412    fi
34413
34414    if test "x$new_path" = x; then
34415      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34416$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34417      has_space=`$ECHO "$complete" | $GREP " "`
34418      if test "x$has_space" != x; then
34419        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34420$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34421      fi
34422      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34423    fi
34424  fi
34425
34426  # Now join together the path and the arguments once again
34427  if test "x$arguments" != xEOL; then
34428    new_complete="$new_path ${arguments% *}"
34429  else
34430    new_complete="$new_path"
34431  fi
34432
34433  if test "x$complete" != "x$new_complete"; then
34434    RC="$new_complete"
34435    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
34436$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
34437  fi
34438
34439    # Extract the first word of "dumpbin", so it can be a program name with args.
34440set dummy dumpbin; ac_word=$2
34441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34442$as_echo_n "checking for $ac_word... " >&6; }
34443if ${ac_cv_prog_DUMPBIN+:} false; then :
34444  $as_echo_n "(cached) " >&6
34445else
34446  if test -n "$DUMPBIN"; then
34447  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
34448else
34449as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34450for as_dir in $PATH
34451do
34452  IFS=$as_save_IFS
34453  test -z "$as_dir" && as_dir=.
34454    for ac_exec_ext in '' $ac_executable_extensions; do
34455  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34456    ac_cv_prog_DUMPBIN="dumpbin"
34457    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34458    break 2
34459  fi
34460done
34461  done
34462IFS=$as_save_IFS
34463
34464fi
34465fi
34466DUMPBIN=$ac_cv_prog_DUMPBIN
34467if test -n "$DUMPBIN"; then
34468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
34469$as_echo "$DUMPBIN" >&6; }
34470else
34471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34472$as_echo "no" >&6; }
34473fi
34474
34475
34476
34477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34478
34479  # First separate the path from the arguments. This will split at the first
34480  # space.
34481  complete="$DUMPBIN"
34482  path="${complete%% *}"
34483  tmp="$complete EOL"
34484  arguments="${tmp#* }"
34485
34486  # Input might be given as Windows format, start by converting to
34487  # unix format.
34488  new_path=`$CYGPATH -u "$path"`
34489
34490  # Now try to locate executable using which
34491  new_path=`$WHICH "$new_path" 2> /dev/null`
34492  # bat and cmd files are not always considered executable in cygwin causing which
34493  # to not find them
34494  if test "x$new_path" = x \
34495      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34496      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34497    new_path=`$CYGPATH -u "$path"`
34498  fi
34499  if test "x$new_path" = x; then
34500    # Oops. Which didn't find the executable.
34501    # The splitting of arguments from the executable at a space might have been incorrect,
34502    # since paths with space are more likely in Windows. Give it another try with the whole
34503    # argument.
34504    path="$complete"
34505    arguments="EOL"
34506    new_path=`$CYGPATH -u "$path"`
34507    new_path=`$WHICH "$new_path" 2> /dev/null`
34508    # bat and cmd files are not always considered executable in cygwin causing which
34509    # to not find them
34510    if test "x$new_path" = x \
34511        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34512        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34513      new_path=`$CYGPATH -u "$path"`
34514    fi
34515    if test "x$new_path" = x; then
34516      # It's still not found. Now this is an unrecoverable error.
34517      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34518$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34519      has_space=`$ECHO "$complete" | $GREP " "`
34520      if test "x$has_space" != x; then
34521        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34522$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34523      fi
34524      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34525    fi
34526  fi
34527
34528  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34529  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34530  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34531  # "foo.exe" is OK but "foo" is an error.
34532  #
34533  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34534  # It is also a way to make sure we got the proper file name for the real test later on.
34535  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34536  if test "x$test_shortpath" = x; then
34537    # Short path failed, file does not exist as specified.
34538    # Try adding .exe or .cmd
34539    if test -f "${new_path}.exe"; then
34540      input_to_shortpath="${new_path}.exe"
34541    elif test -f "${new_path}.cmd"; then
34542      input_to_shortpath="${new_path}.cmd"
34543    else
34544      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
34545$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
34546      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34547$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34548      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34549    fi
34550  else
34551    input_to_shortpath="$new_path"
34552  fi
34553
34554  # Call helper function which possibly converts this using DOS-style short mode.
34555  # If so, the updated path is stored in $new_path.
34556  new_path="$input_to_shortpath"
34557
34558  input_path="$input_to_shortpath"
34559  # Check if we need to convert this using DOS-style short mode. If the path
34560  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34561  # take no chances and rewrite it.
34562  # Note: m4 eats our [], so we need to use [ and ] instead.
34563  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34564  if test "x$has_forbidden_chars" != x; then
34565    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34566    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34567    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34568    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34569      # Going to short mode and back again did indeed matter. Since short mode is
34570      # case insensitive, let's make it lowercase to improve readability.
34571      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34572      # Now convert it back to Unix-stile (cygpath)
34573      input_path=`$CYGPATH -u "$shortmode_path"`
34574      new_path="$input_path"
34575    fi
34576  fi
34577
34578  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34579  if test "x$test_cygdrive_prefix" = x; then
34580    # As a simple fix, exclude /usr/bin since it's not a real path.
34581    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34582      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34583      # a path prefixed by /cygdrive for fixpath to work.
34584      new_path="$CYGWIN_ROOT_PATH$input_path"
34585    fi
34586  fi
34587
34588  # remove trailing .exe if any
34589  new_path="${new_path/%.exe/}"
34590
34591  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34592
34593  # First separate the path from the arguments. This will split at the first
34594  # space.
34595  complete="$DUMPBIN"
34596  path="${complete%% *}"
34597  tmp="$complete EOL"
34598  arguments="${tmp#* }"
34599
34600  # Input might be given as Windows format, start by converting to
34601  # unix format.
34602  new_path="$path"
34603
34604  windows_path="$new_path"
34605  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34606    unix_path=`$CYGPATH -u "$windows_path"`
34607    new_path="$unix_path"
34608  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34609    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34610    new_path="$unix_path"
34611  fi
34612
34613
34614  # Now try to locate executable using which
34615  new_path=`$WHICH "$new_path" 2> /dev/null`
34616
34617  if test "x$new_path" = x; then
34618    # Oops. Which didn't find the executable.
34619    # The splitting of arguments from the executable at a space might have been incorrect,
34620    # since paths with space are more likely in Windows. Give it another try with the whole
34621    # argument.
34622    path="$complete"
34623    arguments="EOL"
34624    new_path="$path"
34625
34626  windows_path="$new_path"
34627  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34628    unix_path=`$CYGPATH -u "$windows_path"`
34629    new_path="$unix_path"
34630  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34631    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34632    new_path="$unix_path"
34633  fi
34634
34635
34636    new_path=`$WHICH "$new_path" 2> /dev/null`
34637
34638    if test "x$new_path" = x; then
34639      # It's still not found. Now this is an unrecoverable error.
34640      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34641$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34642      has_space=`$ECHO "$complete" | $GREP " "`
34643      if test "x$has_space" != x; then
34644        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34645$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34646      fi
34647      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34648    fi
34649  fi
34650
34651  # Now new_path has a complete unix path to the binary
34652  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34653    # Keep paths in /bin as-is, but remove trailing .exe if any
34654    new_path="${new_path/%.exe/}"
34655    # Do not save /bin paths to all_fixpath_prefixes!
34656  else
34657    # Not in mixed or Windows style, start by that.
34658    new_path=`cmd //c echo $new_path`
34659
34660  input_path="$new_path"
34661  # Check if we need to convert this using DOS-style short mode. If the path
34662  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34663  # take no chances and rewrite it.
34664  # Note: m4 eats our [], so we need to use [ and ] instead.
34665  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34666  if test "x$has_forbidden_chars" != x; then
34667    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34668    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34669  fi
34670
34671    # Output is in $new_path
34672
34673  windows_path="$new_path"
34674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34675    unix_path=`$CYGPATH -u "$windows_path"`
34676    new_path="$unix_path"
34677  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34678    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34679    new_path="$unix_path"
34680  fi
34681
34682    # remove trailing .exe if any
34683    new_path="${new_path/%.exe/}"
34684
34685    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34686    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34687  fi
34688
34689  else
34690    # We're on a posix platform. Hooray! :)
34691    # First separate the path from the arguments. This will split at the first
34692    # space.
34693    complete="$DUMPBIN"
34694    path="${complete%% *}"
34695    tmp="$complete EOL"
34696    arguments="${tmp#* }"
34697
34698    # Cannot rely on the command "which" here since it doesn't always work.
34699    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34700    if test -z "$is_absolute_path"; then
34701      # Path to executable is not absolute. Find it.
34702      IFS_save="$IFS"
34703      IFS=:
34704      for p in $PATH; do
34705        if test -f "$p/$path" && test -x "$p/$path"; then
34706          new_path="$p/$path"
34707          break
34708        fi
34709      done
34710      IFS="$IFS_save"
34711    else
34712      # This is an absolute path, we can use it without further modifications.
34713      new_path="$path"
34714    fi
34715
34716    if test "x$new_path" = x; then
34717      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34718$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34719      has_space=`$ECHO "$complete" | $GREP " "`
34720      if test "x$has_space" != x; then
34721        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34722$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34723      fi
34724      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34725    fi
34726  fi
34727
34728  # Now join together the path and the arguments once again
34729  if test "x$arguments" != xEOL; then
34730    new_complete="$new_path ${arguments% *}"
34731  else
34732    new_complete="$new_path"
34733  fi
34734
34735  if test "x$complete" != "x$new_complete"; then
34736    DUMPBIN="$new_complete"
34737    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
34738$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
34739  fi
34740
34741  fi
34742
34743  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
34744
34745
34746  # Publish this variable in the help.
34747
34748
34749  if test "x$STRIP" = x; then
34750    # The variable is not set by user, try to locate tool using the code snippet
34751    for ac_prog in strip
34752do
34753  # Extract the first word of "$ac_prog", so it can be a program name with args.
34754set dummy $ac_prog; ac_word=$2
34755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34756$as_echo_n "checking for $ac_word... " >&6; }
34757if ${ac_cv_path_STRIP+:} false; then :
34758  $as_echo_n "(cached) " >&6
34759else
34760  case $STRIP in
34761  [\\/]* | ?:[\\/]*)
34762  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34763  ;;
34764  *)
34765  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34766for as_dir in $PATH
34767do
34768  IFS=$as_save_IFS
34769  test -z "$as_dir" && as_dir=.
34770    for ac_exec_ext in '' $ac_executable_extensions; do
34771  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34772    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
34773    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34774    break 2
34775  fi
34776done
34777  done
34778IFS=$as_save_IFS
34779
34780  ;;
34781esac
34782fi
34783STRIP=$ac_cv_path_STRIP
34784if test -n "$STRIP"; then
34785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
34786$as_echo "$STRIP" >&6; }
34787else
34788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34789$as_echo "no" >&6; }
34790fi
34791
34792
34793  test -n "$STRIP" && break
34794done
34795
34796  else
34797    # The variable is set, but is it from the command line or the environment?
34798
34799    # Try to remove the string !STRIP! from our list.
34800    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
34801    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
34802      # If it failed, the variable was not from the command line. Ignore it,
34803      # but warn the user (except for BASH, which is always set by the calling BASH).
34804      if test "xSTRIP" != xBASH; then
34805        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
34806$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
34807      fi
34808      # Try to locate tool using the code snippet
34809      for ac_prog in strip
34810do
34811  # Extract the first word of "$ac_prog", so it can be a program name with args.
34812set dummy $ac_prog; ac_word=$2
34813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34814$as_echo_n "checking for $ac_word... " >&6; }
34815if ${ac_cv_path_STRIP+:} false; then :
34816  $as_echo_n "(cached) " >&6
34817else
34818  case $STRIP in
34819  [\\/]* | ?:[\\/]*)
34820  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34821  ;;
34822  *)
34823  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34824for as_dir in $PATH
34825do
34826  IFS=$as_save_IFS
34827  test -z "$as_dir" && as_dir=.
34828    for ac_exec_ext in '' $ac_executable_extensions; do
34829  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34830    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
34831    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34832    break 2
34833  fi
34834done
34835  done
34836IFS=$as_save_IFS
34837
34838  ;;
34839esac
34840fi
34841STRIP=$ac_cv_path_STRIP
34842if test -n "$STRIP"; then
34843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
34844$as_echo "$STRIP" >&6; }
34845else
34846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34847$as_echo "no" >&6; }
34848fi
34849
34850
34851  test -n "$STRIP" && break
34852done
34853
34854    else
34855      # If it succeeded, then it was overridden by the user. We will use it
34856      # for the tool.
34857
34858      # First remove it from the list of overridden variables, so we can test
34859      # for unknown variables in the end.
34860      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
34861
34862      # Check if the provided tool contains a complete path.
34863      tool_specified="$STRIP"
34864      tool_basename="${tool_specified##*/}"
34865      if test "x$tool_basename" = "x$tool_specified"; then
34866        # A command without a complete path is provided, search $PATH.
34867        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
34868$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
34869        # Extract the first word of "$tool_basename", so it can be a program name with args.
34870set dummy $tool_basename; ac_word=$2
34871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34872$as_echo_n "checking for $ac_word... " >&6; }
34873if ${ac_cv_path_STRIP+:} false; then :
34874  $as_echo_n "(cached) " >&6
34875else
34876  case $STRIP in
34877  [\\/]* | ?:[\\/]*)
34878  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34879  ;;
34880  *)
34881  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34882for as_dir in $PATH
34883do
34884  IFS=$as_save_IFS
34885  test -z "$as_dir" && as_dir=.
34886    for ac_exec_ext in '' $ac_executable_extensions; do
34887  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34888    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
34889    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34890    break 2
34891  fi
34892done
34893  done
34894IFS=$as_save_IFS
34895
34896  ;;
34897esac
34898fi
34899STRIP=$ac_cv_path_STRIP
34900if test -n "$STRIP"; then
34901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
34902$as_echo "$STRIP" >&6; }
34903else
34904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34905$as_echo "no" >&6; }
34906fi
34907
34908
34909        if test "x$STRIP" = x; then
34910          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
34911        fi
34912      else
34913        # Otherwise we believe it is a complete path. Use it as it is.
34914        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
34915$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
34916        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
34917$as_echo_n "checking for STRIP... " >&6; }
34918        if test ! -x "$tool_specified"; then
34919          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
34920$as_echo "not found" >&6; }
34921          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
34922        fi
34923        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
34924$as_echo "$tool_specified" >&6; }
34925      fi
34926    fi
34927  fi
34928
34929
34930
34931  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34932
34933  # First separate the path from the arguments. This will split at the first
34934  # space.
34935  complete="$STRIP"
34936  path="${complete%% *}"
34937  tmp="$complete EOL"
34938  arguments="${tmp#* }"
34939
34940  # Input might be given as Windows format, start by converting to
34941  # unix format.
34942  new_path=`$CYGPATH -u "$path"`
34943
34944  # Now try to locate executable using which
34945  new_path=`$WHICH "$new_path" 2> /dev/null`
34946  # bat and cmd files are not always considered executable in cygwin causing which
34947  # to not find them
34948  if test "x$new_path" = x \
34949      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34950      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34951    new_path=`$CYGPATH -u "$path"`
34952  fi
34953  if test "x$new_path" = x; then
34954    # Oops. Which didn't find the executable.
34955    # The splitting of arguments from the executable at a space might have been incorrect,
34956    # since paths with space are more likely in Windows. Give it another try with the whole
34957    # argument.
34958    path="$complete"
34959    arguments="EOL"
34960    new_path=`$CYGPATH -u "$path"`
34961    new_path=`$WHICH "$new_path" 2> /dev/null`
34962    # bat and cmd files are not always considered executable in cygwin causing which
34963    # to not find them
34964    if test "x$new_path" = x \
34965        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34966        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34967      new_path=`$CYGPATH -u "$path"`
34968    fi
34969    if test "x$new_path" = x; then
34970      # It's still not found. Now this is an unrecoverable error.
34971      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
34972$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
34973      has_space=`$ECHO "$complete" | $GREP " "`
34974      if test "x$has_space" != x; then
34975        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34976$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34977      fi
34978      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
34979    fi
34980  fi
34981
34982  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34983  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34984  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34985  # "foo.exe" is OK but "foo" is an error.
34986  #
34987  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34988  # It is also a way to make sure we got the proper file name for the real test later on.
34989  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34990  if test "x$test_shortpath" = x; then
34991    # Short path failed, file does not exist as specified.
34992    # Try adding .exe or .cmd
34993    if test -f "${new_path}.exe"; then
34994      input_to_shortpath="${new_path}.exe"
34995    elif test -f "${new_path}.cmd"; then
34996      input_to_shortpath="${new_path}.cmd"
34997    else
34998      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
34999$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
35000      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35001$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35002      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35003    fi
35004  else
35005    input_to_shortpath="$new_path"
35006  fi
35007
35008  # Call helper function which possibly converts this using DOS-style short mode.
35009  # If so, the updated path is stored in $new_path.
35010  new_path="$input_to_shortpath"
35011
35012  input_path="$input_to_shortpath"
35013  # Check if we need to convert this using DOS-style short mode. If the path
35014  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35015  # take no chances and rewrite it.
35016  # Note: m4 eats our [], so we need to use [ and ] instead.
35017  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35018  if test "x$has_forbidden_chars" != x; then
35019    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35020    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35021    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35022    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35023      # Going to short mode and back again did indeed matter. Since short mode is
35024      # case insensitive, let's make it lowercase to improve readability.
35025      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35026      # Now convert it back to Unix-stile (cygpath)
35027      input_path=`$CYGPATH -u "$shortmode_path"`
35028      new_path="$input_path"
35029    fi
35030  fi
35031
35032  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35033  if test "x$test_cygdrive_prefix" = x; then
35034    # As a simple fix, exclude /usr/bin since it's not a real path.
35035    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35036      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35037      # a path prefixed by /cygdrive for fixpath to work.
35038      new_path="$CYGWIN_ROOT_PATH$input_path"
35039    fi
35040  fi
35041
35042  # remove trailing .exe if any
35043  new_path="${new_path/%.exe/}"
35044
35045  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35046
35047  # First separate the path from the arguments. This will split at the first
35048  # space.
35049  complete="$STRIP"
35050  path="${complete%% *}"
35051  tmp="$complete EOL"
35052  arguments="${tmp#* }"
35053
35054  # Input might be given as Windows format, start by converting to
35055  # unix format.
35056  new_path="$path"
35057
35058  windows_path="$new_path"
35059  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35060    unix_path=`$CYGPATH -u "$windows_path"`
35061    new_path="$unix_path"
35062  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35063    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35064    new_path="$unix_path"
35065  fi
35066
35067
35068  # Now try to locate executable using which
35069  new_path=`$WHICH "$new_path" 2> /dev/null`
35070
35071  if test "x$new_path" = x; then
35072    # Oops. Which didn't find the executable.
35073    # The splitting of arguments from the executable at a space might have been incorrect,
35074    # since paths with space are more likely in Windows. Give it another try with the whole
35075    # argument.
35076    path="$complete"
35077    arguments="EOL"
35078    new_path="$path"
35079
35080  windows_path="$new_path"
35081  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35082    unix_path=`$CYGPATH -u "$windows_path"`
35083    new_path="$unix_path"
35084  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35085    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35086    new_path="$unix_path"
35087  fi
35088
35089
35090    new_path=`$WHICH "$new_path" 2> /dev/null`
35091
35092    if test "x$new_path" = x; then
35093      # It's still not found. Now this is an unrecoverable error.
35094      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35095$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35096      has_space=`$ECHO "$complete" | $GREP " "`
35097      if test "x$has_space" != x; then
35098        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35099$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35100      fi
35101      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35102    fi
35103  fi
35104
35105  # Now new_path has a complete unix path to the binary
35106  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35107    # Keep paths in /bin as-is, but remove trailing .exe if any
35108    new_path="${new_path/%.exe/}"
35109    # Do not save /bin paths to all_fixpath_prefixes!
35110  else
35111    # Not in mixed or Windows style, start by that.
35112    new_path=`cmd //c echo $new_path`
35113
35114  input_path="$new_path"
35115  # Check if we need to convert this using DOS-style short mode. If the path
35116  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35117  # take no chances and rewrite it.
35118  # Note: m4 eats our [], so we need to use [ and ] instead.
35119  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35120  if test "x$has_forbidden_chars" != x; then
35121    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35122    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35123  fi
35124
35125    # Output is in $new_path
35126
35127  windows_path="$new_path"
35128  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35129    unix_path=`$CYGPATH -u "$windows_path"`
35130    new_path="$unix_path"
35131  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35132    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35133    new_path="$unix_path"
35134  fi
35135
35136    # remove trailing .exe if any
35137    new_path="${new_path/%.exe/}"
35138
35139    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35140    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35141  fi
35142
35143  else
35144    # We're on a posix platform. Hooray! :)
35145    # First separate the path from the arguments. This will split at the first
35146    # space.
35147    complete="$STRIP"
35148    path="${complete%% *}"
35149    tmp="$complete EOL"
35150    arguments="${tmp#* }"
35151
35152    # Cannot rely on the command "which" here since it doesn't always work.
35153    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35154    if test -z "$is_absolute_path"; then
35155      # Path to executable is not absolute. Find it.
35156      IFS_save="$IFS"
35157      IFS=:
35158      for p in $PATH; do
35159        if test -f "$p/$path" && test -x "$p/$path"; then
35160          new_path="$p/$path"
35161          break
35162        fi
35163      done
35164      IFS="$IFS_save"
35165    else
35166      # This is an absolute path, we can use it without further modifications.
35167      new_path="$path"
35168    fi
35169
35170    if test "x$new_path" = x; then
35171      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35172$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35173      has_space=`$ECHO "$complete" | $GREP " "`
35174      if test "x$has_space" != x; then
35175        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35176$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35177      fi
35178      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35179    fi
35180  fi
35181
35182  # Now join together the path and the arguments once again
35183  if test "x$arguments" != xEOL; then
35184    new_complete="$new_path ${arguments% *}"
35185  else
35186    new_complete="$new_path"
35187  fi
35188
35189  if test "x$complete" != "x$new_complete"; then
35190    STRIP="$new_complete"
35191    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
35192$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
35193  fi
35194
35195
35196
35197  # Publish this variable in the help.
35198
35199
35200  if test "x$NM" = x; then
35201    # The variable is not set by user, try to locate tool using the code snippet
35202    for ac_prog in nm
35203do
35204  # Extract the first word of "$ac_prog", so it can be a program name with args.
35205set dummy $ac_prog; ac_word=$2
35206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35207$as_echo_n "checking for $ac_word... " >&6; }
35208if ${ac_cv_path_NM+:} false; then :
35209  $as_echo_n "(cached) " >&6
35210else
35211  case $NM in
35212  [\\/]* | ?:[\\/]*)
35213  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35214  ;;
35215  *)
35216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35217for as_dir in $PATH
35218do
35219  IFS=$as_save_IFS
35220  test -z "$as_dir" && as_dir=.
35221    for ac_exec_ext in '' $ac_executable_extensions; do
35222  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35223    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35224    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35225    break 2
35226  fi
35227done
35228  done
35229IFS=$as_save_IFS
35230
35231  ;;
35232esac
35233fi
35234NM=$ac_cv_path_NM
35235if test -n "$NM"; then
35236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35237$as_echo "$NM" >&6; }
35238else
35239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35240$as_echo "no" >&6; }
35241fi
35242
35243
35244  test -n "$NM" && break
35245done
35246
35247  else
35248    # The variable is set, but is it from the command line or the environment?
35249
35250    # Try to remove the string !NM! from our list.
35251    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
35252    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35253      # If it failed, the variable was not from the command line. Ignore it,
35254      # but warn the user (except for BASH, which is always set by the calling BASH).
35255      if test "xNM" != xBASH; then
35256        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
35257$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
35258      fi
35259      # Try to locate tool using the code snippet
35260      for ac_prog in nm
35261do
35262  # Extract the first word of "$ac_prog", so it can be a program name with args.
35263set dummy $ac_prog; ac_word=$2
35264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35265$as_echo_n "checking for $ac_word... " >&6; }
35266if ${ac_cv_path_NM+:} false; then :
35267  $as_echo_n "(cached) " >&6
35268else
35269  case $NM in
35270  [\\/]* | ?:[\\/]*)
35271  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35272  ;;
35273  *)
35274  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35275for as_dir in $PATH
35276do
35277  IFS=$as_save_IFS
35278  test -z "$as_dir" && as_dir=.
35279    for ac_exec_ext in '' $ac_executable_extensions; do
35280  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35281    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35283    break 2
35284  fi
35285done
35286  done
35287IFS=$as_save_IFS
35288
35289  ;;
35290esac
35291fi
35292NM=$ac_cv_path_NM
35293if test -n "$NM"; then
35294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35295$as_echo "$NM" >&6; }
35296else
35297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35298$as_echo "no" >&6; }
35299fi
35300
35301
35302  test -n "$NM" && break
35303done
35304
35305    else
35306      # If it succeeded, then it was overridden by the user. We will use it
35307      # for the tool.
35308
35309      # First remove it from the list of overridden variables, so we can test
35310      # for unknown variables in the end.
35311      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35312
35313      # Check if the provided tool contains a complete path.
35314      tool_specified="$NM"
35315      tool_basename="${tool_specified##*/}"
35316      if test "x$tool_basename" = "x$tool_specified"; then
35317        # A command without a complete path is provided, search $PATH.
35318        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
35319$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
35320        # Extract the first word of "$tool_basename", so it can be a program name with args.
35321set dummy $tool_basename; ac_word=$2
35322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35323$as_echo_n "checking for $ac_word... " >&6; }
35324if ${ac_cv_path_NM+:} false; then :
35325  $as_echo_n "(cached) " >&6
35326else
35327  case $NM in
35328  [\\/]* | ?:[\\/]*)
35329  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35330  ;;
35331  *)
35332  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35333for as_dir in $PATH
35334do
35335  IFS=$as_save_IFS
35336  test -z "$as_dir" && as_dir=.
35337    for ac_exec_ext in '' $ac_executable_extensions; do
35338  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35339    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35340    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35341    break 2
35342  fi
35343done
35344  done
35345IFS=$as_save_IFS
35346
35347  ;;
35348esac
35349fi
35350NM=$ac_cv_path_NM
35351if test -n "$NM"; then
35352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35353$as_echo "$NM" >&6; }
35354else
35355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35356$as_echo "no" >&6; }
35357fi
35358
35359
35360        if test "x$NM" = x; then
35361          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35362        fi
35363      else
35364        # Otherwise we believe it is a complete path. Use it as it is.
35365        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
35366$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
35367        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
35368$as_echo_n "checking for NM... " >&6; }
35369        if test ! -x "$tool_specified"; then
35370          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35371$as_echo "not found" >&6; }
35372          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
35373        fi
35374        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35375$as_echo "$tool_specified" >&6; }
35376      fi
35377    fi
35378  fi
35379
35380
35381
35382  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35383
35384  # First separate the path from the arguments. This will split at the first
35385  # space.
35386  complete="$NM"
35387  path="${complete%% *}"
35388  tmp="$complete EOL"
35389  arguments="${tmp#* }"
35390
35391  # Input might be given as Windows format, start by converting to
35392  # unix format.
35393  new_path=`$CYGPATH -u "$path"`
35394
35395  # Now try to locate executable using which
35396  new_path=`$WHICH "$new_path" 2> /dev/null`
35397  # bat and cmd files are not always considered executable in cygwin causing which
35398  # to not find them
35399  if test "x$new_path" = x \
35400      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35401      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35402    new_path=`$CYGPATH -u "$path"`
35403  fi
35404  if test "x$new_path" = x; then
35405    # Oops. Which didn't find the executable.
35406    # The splitting of arguments from the executable at a space might have been incorrect,
35407    # since paths with space are more likely in Windows. Give it another try with the whole
35408    # argument.
35409    path="$complete"
35410    arguments="EOL"
35411    new_path=`$CYGPATH -u "$path"`
35412    new_path=`$WHICH "$new_path" 2> /dev/null`
35413    # bat and cmd files are not always considered executable in cygwin causing which
35414    # to not find them
35415    if test "x$new_path" = x \
35416        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35417        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35418      new_path=`$CYGPATH -u "$path"`
35419    fi
35420    if test "x$new_path" = x; then
35421      # It's still not found. Now this is an unrecoverable error.
35422      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35423$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35424      has_space=`$ECHO "$complete" | $GREP " "`
35425      if test "x$has_space" != x; then
35426        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35427$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35428      fi
35429      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35430    fi
35431  fi
35432
35433  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35434  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35435  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35436  # "foo.exe" is OK but "foo" is an error.
35437  #
35438  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35439  # It is also a way to make sure we got the proper file name for the real test later on.
35440  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35441  if test "x$test_shortpath" = x; then
35442    # Short path failed, file does not exist as specified.
35443    # Try adding .exe or .cmd
35444    if test -f "${new_path}.exe"; then
35445      input_to_shortpath="${new_path}.exe"
35446    elif test -f "${new_path}.cmd"; then
35447      input_to_shortpath="${new_path}.cmd"
35448    else
35449      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
35450$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
35451      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35452$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35453      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35454    fi
35455  else
35456    input_to_shortpath="$new_path"
35457  fi
35458
35459  # Call helper function which possibly converts this using DOS-style short mode.
35460  # If so, the updated path is stored in $new_path.
35461  new_path="$input_to_shortpath"
35462
35463  input_path="$input_to_shortpath"
35464  # Check if we need to convert this using DOS-style short mode. If the path
35465  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35466  # take no chances and rewrite it.
35467  # Note: m4 eats our [], so we need to use [ and ] instead.
35468  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35469  if test "x$has_forbidden_chars" != x; then
35470    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35471    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35472    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35473    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35474      # Going to short mode and back again did indeed matter. Since short mode is
35475      # case insensitive, let's make it lowercase to improve readability.
35476      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35477      # Now convert it back to Unix-stile (cygpath)
35478      input_path=`$CYGPATH -u "$shortmode_path"`
35479      new_path="$input_path"
35480    fi
35481  fi
35482
35483  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35484  if test "x$test_cygdrive_prefix" = x; then
35485    # As a simple fix, exclude /usr/bin since it's not a real path.
35486    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35487      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35488      # a path prefixed by /cygdrive for fixpath to work.
35489      new_path="$CYGWIN_ROOT_PATH$input_path"
35490    fi
35491  fi
35492
35493  # remove trailing .exe if any
35494  new_path="${new_path/%.exe/}"
35495
35496  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35497
35498  # First separate the path from the arguments. This will split at the first
35499  # space.
35500  complete="$NM"
35501  path="${complete%% *}"
35502  tmp="$complete EOL"
35503  arguments="${tmp#* }"
35504
35505  # Input might be given as Windows format, start by converting to
35506  # unix format.
35507  new_path="$path"
35508
35509  windows_path="$new_path"
35510  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35511    unix_path=`$CYGPATH -u "$windows_path"`
35512    new_path="$unix_path"
35513  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35514    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35515    new_path="$unix_path"
35516  fi
35517
35518
35519  # Now try to locate executable using which
35520  new_path=`$WHICH "$new_path" 2> /dev/null`
35521
35522  if test "x$new_path" = x; then
35523    # Oops. Which didn't find the executable.
35524    # The splitting of arguments from the executable at a space might have been incorrect,
35525    # since paths with space are more likely in Windows. Give it another try with the whole
35526    # argument.
35527    path="$complete"
35528    arguments="EOL"
35529    new_path="$path"
35530
35531  windows_path="$new_path"
35532  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35533    unix_path=`$CYGPATH -u "$windows_path"`
35534    new_path="$unix_path"
35535  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35536    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35537    new_path="$unix_path"
35538  fi
35539
35540
35541    new_path=`$WHICH "$new_path" 2> /dev/null`
35542
35543    if test "x$new_path" = x; then
35544      # It's still not found. Now this is an unrecoverable error.
35545      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35546$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35547      has_space=`$ECHO "$complete" | $GREP " "`
35548      if test "x$has_space" != x; then
35549        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35550$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35551      fi
35552      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35553    fi
35554  fi
35555
35556  # Now new_path has a complete unix path to the binary
35557  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35558    # Keep paths in /bin as-is, but remove trailing .exe if any
35559    new_path="${new_path/%.exe/}"
35560    # Do not save /bin paths to all_fixpath_prefixes!
35561  else
35562    # Not in mixed or Windows style, start by that.
35563    new_path=`cmd //c echo $new_path`
35564
35565  input_path="$new_path"
35566  # Check if we need to convert this using DOS-style short mode. If the path
35567  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35568  # take no chances and rewrite it.
35569  # Note: m4 eats our [], so we need to use [ and ] instead.
35570  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35571  if test "x$has_forbidden_chars" != x; then
35572    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35573    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35574  fi
35575
35576    # Output is in $new_path
35577
35578  windows_path="$new_path"
35579  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35580    unix_path=`$CYGPATH -u "$windows_path"`
35581    new_path="$unix_path"
35582  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35583    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35584    new_path="$unix_path"
35585  fi
35586
35587    # remove trailing .exe if any
35588    new_path="${new_path/%.exe/}"
35589
35590    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35591    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35592  fi
35593
35594  else
35595    # We're on a posix platform. Hooray! :)
35596    # First separate the path from the arguments. This will split at the first
35597    # space.
35598    complete="$NM"
35599    path="${complete%% *}"
35600    tmp="$complete EOL"
35601    arguments="${tmp#* }"
35602
35603    # Cannot rely on the command "which" here since it doesn't always work.
35604    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35605    if test -z "$is_absolute_path"; then
35606      # Path to executable is not absolute. Find it.
35607      IFS_save="$IFS"
35608      IFS=:
35609      for p in $PATH; do
35610        if test -f "$p/$path" && test -x "$p/$path"; then
35611          new_path="$p/$path"
35612          break
35613        fi
35614      done
35615      IFS="$IFS_save"
35616    else
35617      # This is an absolute path, we can use it without further modifications.
35618      new_path="$path"
35619    fi
35620
35621    if test "x$new_path" = x; then
35622      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35623$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35624      has_space=`$ECHO "$complete" | $GREP " "`
35625      if test "x$has_space" != x; then
35626        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35627$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35628      fi
35629      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35630    fi
35631  fi
35632
35633  # Now join together the path and the arguments once again
35634  if test "x$arguments" != xEOL; then
35635    new_complete="$new_path ${arguments% *}"
35636  else
35637    new_complete="$new_path"
35638  fi
35639
35640  if test "x$complete" != "x$new_complete"; then
35641    NM="$new_complete"
35642    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
35643$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
35644  fi
35645
35646
35647
35648  # Publish this variable in the help.
35649
35650
35651  if test "x$GNM" = x; then
35652    # The variable is not set by user, try to locate tool using the code snippet
35653    for ac_prog in gnm
35654do
35655  # Extract the first word of "$ac_prog", so it can be a program name with args.
35656set dummy $ac_prog; ac_word=$2
35657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35658$as_echo_n "checking for $ac_word... " >&6; }
35659if ${ac_cv_path_GNM+:} false; then :
35660  $as_echo_n "(cached) " >&6
35661else
35662  case $GNM in
35663  [\\/]* | ?:[\\/]*)
35664  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35665  ;;
35666  *)
35667  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35668for as_dir in $PATH
35669do
35670  IFS=$as_save_IFS
35671  test -z "$as_dir" && as_dir=.
35672    for ac_exec_ext in '' $ac_executable_extensions; do
35673  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35674    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35675    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35676    break 2
35677  fi
35678done
35679  done
35680IFS=$as_save_IFS
35681
35682  ;;
35683esac
35684fi
35685GNM=$ac_cv_path_GNM
35686if test -n "$GNM"; then
35687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35688$as_echo "$GNM" >&6; }
35689else
35690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35691$as_echo "no" >&6; }
35692fi
35693
35694
35695  test -n "$GNM" && break
35696done
35697
35698  else
35699    # The variable is set, but is it from the command line or the environment?
35700
35701    # Try to remove the string !GNM! from our list.
35702    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
35703    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35704      # If it failed, the variable was not from the command line. Ignore it,
35705      # but warn the user (except for BASH, which is always set by the calling BASH).
35706      if test "xGNM" != xBASH; then
35707        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
35708$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
35709      fi
35710      # Try to locate tool using the code snippet
35711      for ac_prog in gnm
35712do
35713  # Extract the first word of "$ac_prog", so it can be a program name with args.
35714set dummy $ac_prog; ac_word=$2
35715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35716$as_echo_n "checking for $ac_word... " >&6; }
35717if ${ac_cv_path_GNM+:} false; then :
35718  $as_echo_n "(cached) " >&6
35719else
35720  case $GNM in
35721  [\\/]* | ?:[\\/]*)
35722  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35723  ;;
35724  *)
35725  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35726for as_dir in $PATH
35727do
35728  IFS=$as_save_IFS
35729  test -z "$as_dir" && as_dir=.
35730    for ac_exec_ext in '' $ac_executable_extensions; do
35731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35732    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35734    break 2
35735  fi
35736done
35737  done
35738IFS=$as_save_IFS
35739
35740  ;;
35741esac
35742fi
35743GNM=$ac_cv_path_GNM
35744if test -n "$GNM"; then
35745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35746$as_echo "$GNM" >&6; }
35747else
35748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35749$as_echo "no" >&6; }
35750fi
35751
35752
35753  test -n "$GNM" && break
35754done
35755
35756    else
35757      # If it succeeded, then it was overridden by the user. We will use it
35758      # for the tool.
35759
35760      # First remove it from the list of overridden variables, so we can test
35761      # for unknown variables in the end.
35762      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35763
35764      # Check if the provided tool contains a complete path.
35765      tool_specified="$GNM"
35766      tool_basename="${tool_specified##*/}"
35767      if test "x$tool_basename" = "x$tool_specified"; then
35768        # A command without a complete path is provided, search $PATH.
35769        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
35770$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
35771        # Extract the first word of "$tool_basename", so it can be a program name with args.
35772set dummy $tool_basename; ac_word=$2
35773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35774$as_echo_n "checking for $ac_word... " >&6; }
35775if ${ac_cv_path_GNM+:} false; then :
35776  $as_echo_n "(cached) " >&6
35777else
35778  case $GNM in
35779  [\\/]* | ?:[\\/]*)
35780  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35781  ;;
35782  *)
35783  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35784for as_dir in $PATH
35785do
35786  IFS=$as_save_IFS
35787  test -z "$as_dir" && as_dir=.
35788    for ac_exec_ext in '' $ac_executable_extensions; do
35789  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35790    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35791    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35792    break 2
35793  fi
35794done
35795  done
35796IFS=$as_save_IFS
35797
35798  ;;
35799esac
35800fi
35801GNM=$ac_cv_path_GNM
35802if test -n "$GNM"; then
35803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35804$as_echo "$GNM" >&6; }
35805else
35806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35807$as_echo "no" >&6; }
35808fi
35809
35810
35811        if test "x$GNM" = x; then
35812          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35813        fi
35814      else
35815        # Otherwise we believe it is a complete path. Use it as it is.
35816        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
35817$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
35818        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
35819$as_echo_n "checking for GNM... " >&6; }
35820        if test ! -x "$tool_specified"; then
35821          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35822$as_echo "not found" >&6; }
35823          as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
35824        fi
35825        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35826$as_echo "$tool_specified" >&6; }
35827      fi
35828    fi
35829  fi
35830
35831
35832
35833  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35834
35835  # First separate the path from the arguments. This will split at the first
35836  # space.
35837  complete="$GNM"
35838  path="${complete%% *}"
35839  tmp="$complete EOL"
35840  arguments="${tmp#* }"
35841
35842  # Input might be given as Windows format, start by converting to
35843  # unix format.
35844  new_path=`$CYGPATH -u "$path"`
35845
35846  # Now try to locate executable using which
35847  new_path=`$WHICH "$new_path" 2> /dev/null`
35848  # bat and cmd files are not always considered executable in cygwin causing which
35849  # to not find them
35850  if test "x$new_path" = x \
35851      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35852      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35853    new_path=`$CYGPATH -u "$path"`
35854  fi
35855  if test "x$new_path" = x; then
35856    # Oops. Which didn't find the executable.
35857    # The splitting of arguments from the executable at a space might have been incorrect,
35858    # since paths with space are more likely in Windows. Give it another try with the whole
35859    # argument.
35860    path="$complete"
35861    arguments="EOL"
35862    new_path=`$CYGPATH -u "$path"`
35863    new_path=`$WHICH "$new_path" 2> /dev/null`
35864    # bat and cmd files are not always considered executable in cygwin causing which
35865    # to not find them
35866    if test "x$new_path" = x \
35867        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35868        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35869      new_path=`$CYGPATH -u "$path"`
35870    fi
35871    if test "x$new_path" = x; then
35872      # It's still not found. Now this is an unrecoverable error.
35873      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
35874$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
35875      has_space=`$ECHO "$complete" | $GREP " "`
35876      if test "x$has_space" != x; then
35877        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35878$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35879      fi
35880      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35881    fi
35882  fi
35883
35884  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35885  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35886  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35887  # "foo.exe" is OK but "foo" is an error.
35888  #
35889  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35890  # It is also a way to make sure we got the proper file name for the real test later on.
35891  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35892  if test "x$test_shortpath" = x; then
35893    # Short path failed, file does not exist as specified.
35894    # Try adding .exe or .cmd
35895    if test -f "${new_path}.exe"; then
35896      input_to_shortpath="${new_path}.exe"
35897    elif test -f "${new_path}.cmd"; then
35898      input_to_shortpath="${new_path}.cmd"
35899    else
35900      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
35901$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
35902      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35903$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35904      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35905    fi
35906  else
35907    input_to_shortpath="$new_path"
35908  fi
35909
35910  # Call helper function which possibly converts this using DOS-style short mode.
35911  # If so, the updated path is stored in $new_path.
35912  new_path="$input_to_shortpath"
35913
35914  input_path="$input_to_shortpath"
35915  # Check if we need to convert this using DOS-style short mode. If the path
35916  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35917  # take no chances and rewrite it.
35918  # Note: m4 eats our [], so we need to use [ and ] instead.
35919  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35920  if test "x$has_forbidden_chars" != x; then
35921    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35922    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35923    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35924    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35925      # Going to short mode and back again did indeed matter. Since short mode is
35926      # case insensitive, let's make it lowercase to improve readability.
35927      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35928      # Now convert it back to Unix-stile (cygpath)
35929      input_path=`$CYGPATH -u "$shortmode_path"`
35930      new_path="$input_path"
35931    fi
35932  fi
35933
35934  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35935  if test "x$test_cygdrive_prefix" = x; then
35936    # As a simple fix, exclude /usr/bin since it's not a real path.
35937    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35938      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35939      # a path prefixed by /cygdrive for fixpath to work.
35940      new_path="$CYGWIN_ROOT_PATH$input_path"
35941    fi
35942  fi
35943
35944  # remove trailing .exe if any
35945  new_path="${new_path/%.exe/}"
35946
35947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35948
35949  # First separate the path from the arguments. This will split at the first
35950  # space.
35951  complete="$GNM"
35952  path="${complete%% *}"
35953  tmp="$complete EOL"
35954  arguments="${tmp#* }"
35955
35956  # Input might be given as Windows format, start by converting to
35957  # unix format.
35958  new_path="$path"
35959
35960  windows_path="$new_path"
35961  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35962    unix_path=`$CYGPATH -u "$windows_path"`
35963    new_path="$unix_path"
35964  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35965    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35966    new_path="$unix_path"
35967  fi
35968
35969
35970  # Now try to locate executable using which
35971  new_path=`$WHICH "$new_path" 2> /dev/null`
35972
35973  if test "x$new_path" = x; then
35974    # Oops. Which didn't find the executable.
35975    # The splitting of arguments from the executable at a space might have been incorrect,
35976    # since paths with space are more likely in Windows. Give it another try with the whole
35977    # argument.
35978    path="$complete"
35979    arguments="EOL"
35980    new_path="$path"
35981
35982  windows_path="$new_path"
35983  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35984    unix_path=`$CYGPATH -u "$windows_path"`
35985    new_path="$unix_path"
35986  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35987    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35988    new_path="$unix_path"
35989  fi
35990
35991
35992    new_path=`$WHICH "$new_path" 2> /dev/null`
35993
35994    if test "x$new_path" = x; then
35995      # It's still not found. Now this is an unrecoverable error.
35996      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
35997$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
35998      has_space=`$ECHO "$complete" | $GREP " "`
35999      if test "x$has_space" != x; then
36000        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36001$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36002      fi
36003      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36004    fi
36005  fi
36006
36007  # Now new_path has a complete unix path to the binary
36008  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36009    # Keep paths in /bin as-is, but remove trailing .exe if any
36010    new_path="${new_path/%.exe/}"
36011    # Do not save /bin paths to all_fixpath_prefixes!
36012  else
36013    # Not in mixed or Windows style, start by that.
36014    new_path=`cmd //c echo $new_path`
36015
36016  input_path="$new_path"
36017  # Check if we need to convert this using DOS-style short mode. If the path
36018  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36019  # take no chances and rewrite it.
36020  # Note: m4 eats our [], so we need to use [ and ] instead.
36021  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36022  if test "x$has_forbidden_chars" != x; then
36023    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36024    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36025  fi
36026
36027    # Output is in $new_path
36028
36029  windows_path="$new_path"
36030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36031    unix_path=`$CYGPATH -u "$windows_path"`
36032    new_path="$unix_path"
36033  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36034    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36035    new_path="$unix_path"
36036  fi
36037
36038    # remove trailing .exe if any
36039    new_path="${new_path/%.exe/}"
36040
36041    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36042    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36043  fi
36044
36045  else
36046    # We're on a posix platform. Hooray! :)
36047    # First separate the path from the arguments. This will split at the first
36048    # space.
36049    complete="$GNM"
36050    path="${complete%% *}"
36051    tmp="$complete EOL"
36052    arguments="${tmp#* }"
36053
36054    # Cannot rely on the command "which" here since it doesn't always work.
36055    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36056    if test -z "$is_absolute_path"; then
36057      # Path to executable is not absolute. Find it.
36058      IFS_save="$IFS"
36059      IFS=:
36060      for p in $PATH; do
36061        if test -f "$p/$path" && test -x "$p/$path"; then
36062          new_path="$p/$path"
36063          break
36064        fi
36065      done
36066      IFS="$IFS_save"
36067    else
36068      # This is an absolute path, we can use it without further modifications.
36069      new_path="$path"
36070    fi
36071
36072    if test "x$new_path" = x; then
36073      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36074$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36075      has_space=`$ECHO "$complete" | $GREP " "`
36076      if test "x$has_space" != x; then
36077        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36078$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36079      fi
36080      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36081    fi
36082  fi
36083
36084  # Now join together the path and the arguments once again
36085  if test "x$arguments" != xEOL; then
36086    new_complete="$new_path ${arguments% *}"
36087  else
36088    new_complete="$new_path"
36089  fi
36090
36091  if test "x$complete" != "x$new_complete"; then
36092    GNM="$new_complete"
36093    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
36094$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
36095  fi
36096
36097
36098
36099
36100  # Publish this variable in the help.
36101
36102
36103  if test "x$MCS" = x; then
36104    # The variable is not set by user, try to locate tool using the code snippet
36105    for ac_prog in mcs
36106do
36107  # Extract the first word of "$ac_prog", so it can be a program name with args.
36108set dummy $ac_prog; ac_word=$2
36109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36110$as_echo_n "checking for $ac_word... " >&6; }
36111if ${ac_cv_path_MCS+:} false; then :
36112  $as_echo_n "(cached) " >&6
36113else
36114  case $MCS in
36115  [\\/]* | ?:[\\/]*)
36116  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36117  ;;
36118  *)
36119  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36120for as_dir in $PATH
36121do
36122  IFS=$as_save_IFS
36123  test -z "$as_dir" && as_dir=.
36124    for ac_exec_ext in '' $ac_executable_extensions; do
36125  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36126    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36127    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36128    break 2
36129  fi
36130done
36131  done
36132IFS=$as_save_IFS
36133
36134  ;;
36135esac
36136fi
36137MCS=$ac_cv_path_MCS
36138if test -n "$MCS"; then
36139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36140$as_echo "$MCS" >&6; }
36141else
36142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36143$as_echo "no" >&6; }
36144fi
36145
36146
36147  test -n "$MCS" && break
36148done
36149
36150  else
36151    # The variable is set, but is it from the command line or the environment?
36152
36153    # Try to remove the string !MCS! from our list.
36154    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MCS!/}
36155    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36156      # If it failed, the variable was not from the command line. Ignore it,
36157      # but warn the user (except for BASH, which is always set by the calling BASH).
36158      if test "xMCS" != xBASH; then
36159        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&5
36160$as_echo "$as_me: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&2;}
36161      fi
36162      # Try to locate tool using the code snippet
36163      for ac_prog in mcs
36164do
36165  # Extract the first word of "$ac_prog", so it can be a program name with args.
36166set dummy $ac_prog; ac_word=$2
36167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36168$as_echo_n "checking for $ac_word... " >&6; }
36169if ${ac_cv_path_MCS+:} false; then :
36170  $as_echo_n "(cached) " >&6
36171else
36172  case $MCS in
36173  [\\/]* | ?:[\\/]*)
36174  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36175  ;;
36176  *)
36177  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36178for as_dir in $PATH
36179do
36180  IFS=$as_save_IFS
36181  test -z "$as_dir" && as_dir=.
36182    for ac_exec_ext in '' $ac_executable_extensions; do
36183  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36184    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36185    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36186    break 2
36187  fi
36188done
36189  done
36190IFS=$as_save_IFS
36191
36192  ;;
36193esac
36194fi
36195MCS=$ac_cv_path_MCS
36196if test -n "$MCS"; then
36197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36198$as_echo "$MCS" >&6; }
36199else
36200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36201$as_echo "no" >&6; }
36202fi
36203
36204
36205  test -n "$MCS" && break
36206done
36207
36208    else
36209      # If it succeeded, then it was overridden by the user. We will use it
36210      # for the tool.
36211
36212      # First remove it from the list of overridden variables, so we can test
36213      # for unknown variables in the end.
36214      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36215
36216      # Check if the provided tool contains a complete path.
36217      tool_specified="$MCS"
36218      tool_basename="${tool_specified##*/}"
36219      if test "x$tool_basename" = "x$tool_specified"; then
36220        # A command without a complete path is provided, search $PATH.
36221        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MCS=$tool_basename" >&5
36222$as_echo "$as_me: Will search for user supplied tool MCS=$tool_basename" >&6;}
36223        # Extract the first word of "$tool_basename", so it can be a program name with args.
36224set dummy $tool_basename; ac_word=$2
36225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36226$as_echo_n "checking for $ac_word... " >&6; }
36227if ${ac_cv_path_MCS+:} false; then :
36228  $as_echo_n "(cached) " >&6
36229else
36230  case $MCS in
36231  [\\/]* | ?:[\\/]*)
36232  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36233  ;;
36234  *)
36235  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36236for as_dir in $PATH
36237do
36238  IFS=$as_save_IFS
36239  test -z "$as_dir" && as_dir=.
36240    for ac_exec_ext in '' $ac_executable_extensions; do
36241  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36242    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36243    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36244    break 2
36245  fi
36246done
36247  done
36248IFS=$as_save_IFS
36249
36250  ;;
36251esac
36252fi
36253MCS=$ac_cv_path_MCS
36254if test -n "$MCS"; then
36255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36256$as_echo "$MCS" >&6; }
36257else
36258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36259$as_echo "no" >&6; }
36260fi
36261
36262
36263        if test "x$MCS" = x; then
36264          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36265        fi
36266      else
36267        # Otherwise we believe it is a complete path. Use it as it is.
36268        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MCS=$tool_specified" >&5
36269$as_echo "$as_me: Will use user supplied tool MCS=$tool_specified" >&6;}
36270        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MCS" >&5
36271$as_echo_n "checking for MCS... " >&6; }
36272        if test ! -x "$tool_specified"; then
36273          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36274$as_echo "not found" >&6; }
36275          as_fn_error $? "User supplied tool MCS=$tool_specified does not exist or is not executable" "$LINENO" 5
36276        fi
36277        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36278$as_echo "$tool_specified" >&6; }
36279      fi
36280    fi
36281  fi
36282
36283
36284
36285  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36286
36287  # First separate the path from the arguments. This will split at the first
36288  # space.
36289  complete="$MCS"
36290  path="${complete%% *}"
36291  tmp="$complete EOL"
36292  arguments="${tmp#* }"
36293
36294  # Input might be given as Windows format, start by converting to
36295  # unix format.
36296  new_path=`$CYGPATH -u "$path"`
36297
36298  # Now try to locate executable using which
36299  new_path=`$WHICH "$new_path" 2> /dev/null`
36300  # bat and cmd files are not always considered executable in cygwin causing which
36301  # to not find them
36302  if test "x$new_path" = x \
36303      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36304      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36305    new_path=`$CYGPATH -u "$path"`
36306  fi
36307  if test "x$new_path" = x; then
36308    # Oops. Which didn't find the executable.
36309    # The splitting of arguments from the executable at a space might have been incorrect,
36310    # since paths with space are more likely in Windows. Give it another try with the whole
36311    # argument.
36312    path="$complete"
36313    arguments="EOL"
36314    new_path=`$CYGPATH -u "$path"`
36315    new_path=`$WHICH "$new_path" 2> /dev/null`
36316    # bat and cmd files are not always considered executable in cygwin causing which
36317    # to not find them
36318    if test "x$new_path" = x \
36319        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36320        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36321      new_path=`$CYGPATH -u "$path"`
36322    fi
36323    if test "x$new_path" = x; then
36324      # It's still not found. Now this is an unrecoverable error.
36325      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36326$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36327      has_space=`$ECHO "$complete" | $GREP " "`
36328      if test "x$has_space" != x; then
36329        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36330$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36331      fi
36332      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36333    fi
36334  fi
36335
36336  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36337  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36338  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36339  # "foo.exe" is OK but "foo" is an error.
36340  #
36341  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36342  # It is also a way to make sure we got the proper file name for the real test later on.
36343  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36344  if test "x$test_shortpath" = x; then
36345    # Short path failed, file does not exist as specified.
36346    # Try adding .exe or .cmd
36347    if test -f "${new_path}.exe"; then
36348      input_to_shortpath="${new_path}.exe"
36349    elif test -f "${new_path}.cmd"; then
36350      input_to_shortpath="${new_path}.cmd"
36351    else
36352      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
36353$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
36354      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36355$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36356      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36357    fi
36358  else
36359    input_to_shortpath="$new_path"
36360  fi
36361
36362  # Call helper function which possibly converts this using DOS-style short mode.
36363  # If so, the updated path is stored in $new_path.
36364  new_path="$input_to_shortpath"
36365
36366  input_path="$input_to_shortpath"
36367  # Check if we need to convert this using DOS-style short mode. If the path
36368  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36369  # take no chances and rewrite it.
36370  # Note: m4 eats our [], so we need to use [ and ] instead.
36371  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36372  if test "x$has_forbidden_chars" != x; then
36373    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36374    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36375    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36376    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36377      # Going to short mode and back again did indeed matter. Since short mode is
36378      # case insensitive, let's make it lowercase to improve readability.
36379      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36380      # Now convert it back to Unix-stile (cygpath)
36381      input_path=`$CYGPATH -u "$shortmode_path"`
36382      new_path="$input_path"
36383    fi
36384  fi
36385
36386  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36387  if test "x$test_cygdrive_prefix" = x; then
36388    # As a simple fix, exclude /usr/bin since it's not a real path.
36389    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36390      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36391      # a path prefixed by /cygdrive for fixpath to work.
36392      new_path="$CYGWIN_ROOT_PATH$input_path"
36393    fi
36394  fi
36395
36396  # remove trailing .exe if any
36397  new_path="${new_path/%.exe/}"
36398
36399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36400
36401  # First separate the path from the arguments. This will split at the first
36402  # space.
36403  complete="$MCS"
36404  path="${complete%% *}"
36405  tmp="$complete EOL"
36406  arguments="${tmp#* }"
36407
36408  # Input might be given as Windows format, start by converting to
36409  # unix format.
36410  new_path="$path"
36411
36412  windows_path="$new_path"
36413  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36414    unix_path=`$CYGPATH -u "$windows_path"`
36415    new_path="$unix_path"
36416  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36417    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36418    new_path="$unix_path"
36419  fi
36420
36421
36422  # Now try to locate executable using which
36423  new_path=`$WHICH "$new_path" 2> /dev/null`
36424
36425  if test "x$new_path" = x; then
36426    # Oops. Which didn't find the executable.
36427    # The splitting of arguments from the executable at a space might have been incorrect,
36428    # since paths with space are more likely in Windows. Give it another try with the whole
36429    # argument.
36430    path="$complete"
36431    arguments="EOL"
36432    new_path="$path"
36433
36434  windows_path="$new_path"
36435  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36436    unix_path=`$CYGPATH -u "$windows_path"`
36437    new_path="$unix_path"
36438  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36439    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36440    new_path="$unix_path"
36441  fi
36442
36443
36444    new_path=`$WHICH "$new_path" 2> /dev/null`
36445
36446    if test "x$new_path" = x; then
36447      # It's still not found. Now this is an unrecoverable error.
36448      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36449$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36450      has_space=`$ECHO "$complete" | $GREP " "`
36451      if test "x$has_space" != x; then
36452        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36453$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36454      fi
36455      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36456    fi
36457  fi
36458
36459  # Now new_path has a complete unix path to the binary
36460  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36461    # Keep paths in /bin as-is, but remove trailing .exe if any
36462    new_path="${new_path/%.exe/}"
36463    # Do not save /bin paths to all_fixpath_prefixes!
36464  else
36465    # Not in mixed or Windows style, start by that.
36466    new_path=`cmd //c echo $new_path`
36467
36468  input_path="$new_path"
36469  # Check if we need to convert this using DOS-style short mode. If the path
36470  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36471  # take no chances and rewrite it.
36472  # Note: m4 eats our [], so we need to use [ and ] instead.
36473  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36474  if test "x$has_forbidden_chars" != x; then
36475    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36476    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36477  fi
36478
36479    # Output is in $new_path
36480
36481  windows_path="$new_path"
36482  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36483    unix_path=`$CYGPATH -u "$windows_path"`
36484    new_path="$unix_path"
36485  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36486    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36487    new_path="$unix_path"
36488  fi
36489
36490    # remove trailing .exe if any
36491    new_path="${new_path/%.exe/}"
36492
36493    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36494    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36495  fi
36496
36497  else
36498    # We're on a posix platform. Hooray! :)
36499    # First separate the path from the arguments. This will split at the first
36500    # space.
36501    complete="$MCS"
36502    path="${complete%% *}"
36503    tmp="$complete EOL"
36504    arguments="${tmp#* }"
36505
36506    # Cannot rely on the command "which" here since it doesn't always work.
36507    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36508    if test -z "$is_absolute_path"; then
36509      # Path to executable is not absolute. Find it.
36510      IFS_save="$IFS"
36511      IFS=:
36512      for p in $PATH; do
36513        if test -f "$p/$path" && test -x "$p/$path"; then
36514          new_path="$p/$path"
36515          break
36516        fi
36517      done
36518      IFS="$IFS_save"
36519    else
36520      # This is an absolute path, we can use it without further modifications.
36521      new_path="$path"
36522    fi
36523
36524    if test "x$new_path" = x; then
36525      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36526$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36527      has_space=`$ECHO "$complete" | $GREP " "`
36528      if test "x$has_space" != x; then
36529        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36530$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36531      fi
36532      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36533    fi
36534  fi
36535
36536  # Now join together the path and the arguments once again
36537  if test "x$arguments" != xEOL; then
36538    new_complete="$new_path ${arguments% *}"
36539  else
36540    new_complete="$new_path"
36541  fi
36542
36543  if test "x$complete" != "x$new_complete"; then
36544    MCS="$new_complete"
36545    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
36546$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
36547  fi
36548
36549  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
36550    # FIXME: we should unify this with the solaris case above.
36551
36552
36553  # Publish this variable in the help.
36554
36555
36556  if test "x$STRIP" = x; then
36557    # The variable is not set by user, try to locate tool using the code snippet
36558    if test -n "$ac_tool_prefix"; then
36559  for ac_prog in strip
36560  do
36561    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36562set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36564$as_echo_n "checking for $ac_word... " >&6; }
36565if ${ac_cv_prog_STRIP+:} false; then :
36566  $as_echo_n "(cached) " >&6
36567else
36568  if test -n "$STRIP"; then
36569  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36570else
36571as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36572for as_dir in $PATH
36573do
36574  IFS=$as_save_IFS
36575  test -z "$as_dir" && as_dir=.
36576    for ac_exec_ext in '' $ac_executable_extensions; do
36577  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36578    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36579    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36580    break 2
36581  fi
36582done
36583  done
36584IFS=$as_save_IFS
36585
36586fi
36587fi
36588STRIP=$ac_cv_prog_STRIP
36589if test -n "$STRIP"; then
36590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36591$as_echo "$STRIP" >&6; }
36592else
36593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36594$as_echo "no" >&6; }
36595fi
36596
36597
36598    test -n "$STRIP" && break
36599  done
36600fi
36601if test -z "$STRIP"; then
36602  ac_ct_STRIP=$STRIP
36603  for ac_prog in strip
36604do
36605  # Extract the first word of "$ac_prog", so it can be a program name with args.
36606set dummy $ac_prog; ac_word=$2
36607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36608$as_echo_n "checking for $ac_word... " >&6; }
36609if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36610  $as_echo_n "(cached) " >&6
36611else
36612  if test -n "$ac_ct_STRIP"; then
36613  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36614else
36615as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36616for as_dir in $PATH
36617do
36618  IFS=$as_save_IFS
36619  test -z "$as_dir" && as_dir=.
36620    for ac_exec_ext in '' $ac_executable_extensions; do
36621  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36622    ac_cv_prog_ac_ct_STRIP="$ac_prog"
36623    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36624    break 2
36625  fi
36626done
36627  done
36628IFS=$as_save_IFS
36629
36630fi
36631fi
36632ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36633if test -n "$ac_ct_STRIP"; then
36634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36635$as_echo "$ac_ct_STRIP" >&6; }
36636else
36637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36638$as_echo "no" >&6; }
36639fi
36640
36641
36642  test -n "$ac_ct_STRIP" && break
36643done
36644
36645  if test "x$ac_ct_STRIP" = x; then
36646    STRIP=""
36647  else
36648    case $cross_compiling:$ac_tool_warned in
36649yes:)
36650{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36651$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36652ac_tool_warned=yes ;;
36653esac
36654    STRIP=$ac_ct_STRIP
36655  fi
36656fi
36657
36658  else
36659    # The variable is set, but is it from the command line or the environment?
36660
36661    # Try to remove the string !STRIP! from our list.
36662    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
36663    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36664      # If it failed, the variable was not from the command line. Ignore it,
36665      # but warn the user (except for BASH, which is always set by the calling BASH).
36666      if test "xSTRIP" != xBASH; then
36667        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
36668$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
36669      fi
36670      # Try to locate tool using the code snippet
36671      if test -n "$ac_tool_prefix"; then
36672  for ac_prog in strip
36673  do
36674    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36675set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36677$as_echo_n "checking for $ac_word... " >&6; }
36678if ${ac_cv_prog_STRIP+:} false; then :
36679  $as_echo_n "(cached) " >&6
36680else
36681  if test -n "$STRIP"; then
36682  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36683else
36684as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36685for as_dir in $PATH
36686do
36687  IFS=$as_save_IFS
36688  test -z "$as_dir" && as_dir=.
36689    for ac_exec_ext in '' $ac_executable_extensions; do
36690  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36691    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36692    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36693    break 2
36694  fi
36695done
36696  done
36697IFS=$as_save_IFS
36698
36699fi
36700fi
36701STRIP=$ac_cv_prog_STRIP
36702if test -n "$STRIP"; then
36703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36704$as_echo "$STRIP" >&6; }
36705else
36706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36707$as_echo "no" >&6; }
36708fi
36709
36710
36711    test -n "$STRIP" && break
36712  done
36713fi
36714if test -z "$STRIP"; then
36715  ac_ct_STRIP=$STRIP
36716  for ac_prog in strip
36717do
36718  # Extract the first word of "$ac_prog", so it can be a program name with args.
36719set dummy $ac_prog; ac_word=$2
36720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36721$as_echo_n "checking for $ac_word... " >&6; }
36722if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36723  $as_echo_n "(cached) " >&6
36724else
36725  if test -n "$ac_ct_STRIP"; then
36726  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36727else
36728as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36729for as_dir in $PATH
36730do
36731  IFS=$as_save_IFS
36732  test -z "$as_dir" && as_dir=.
36733    for ac_exec_ext in '' $ac_executable_extensions; do
36734  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36735    ac_cv_prog_ac_ct_STRIP="$ac_prog"
36736    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36737    break 2
36738  fi
36739done
36740  done
36741IFS=$as_save_IFS
36742
36743fi
36744fi
36745ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36746if test -n "$ac_ct_STRIP"; then
36747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36748$as_echo "$ac_ct_STRIP" >&6; }
36749else
36750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36751$as_echo "no" >&6; }
36752fi
36753
36754
36755  test -n "$ac_ct_STRIP" && break
36756done
36757
36758  if test "x$ac_ct_STRIP" = x; then
36759    STRIP=""
36760  else
36761    case $cross_compiling:$ac_tool_warned in
36762yes:)
36763{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36764$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36765ac_tool_warned=yes ;;
36766esac
36767    STRIP=$ac_ct_STRIP
36768  fi
36769fi
36770
36771    else
36772      # If it succeeded, then it was overridden by the user. We will use it
36773      # for the tool.
36774
36775      # First remove it from the list of overridden variables, so we can test
36776      # for unknown variables in the end.
36777      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36778
36779      # Check if the provided tool contains a complete path.
36780      tool_specified="$STRIP"
36781      tool_basename="${tool_specified##*/}"
36782      if test "x$tool_basename" = "x$tool_specified"; then
36783        # A command without a complete path is provided, search $PATH.
36784        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
36785$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
36786        # Extract the first word of "$tool_basename", so it can be a program name with args.
36787set dummy $tool_basename; ac_word=$2
36788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36789$as_echo_n "checking for $ac_word... " >&6; }
36790if ${ac_cv_path_STRIP+:} false; then :
36791  $as_echo_n "(cached) " >&6
36792else
36793  case $STRIP in
36794  [\\/]* | ?:[\\/]*)
36795  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
36796  ;;
36797  *)
36798  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36799for as_dir in $PATH
36800do
36801  IFS=$as_save_IFS
36802  test -z "$as_dir" && as_dir=.
36803    for ac_exec_ext in '' $ac_executable_extensions; do
36804  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36805    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
36806    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36807    break 2
36808  fi
36809done
36810  done
36811IFS=$as_save_IFS
36812
36813  ;;
36814esac
36815fi
36816STRIP=$ac_cv_path_STRIP
36817if test -n "$STRIP"; then
36818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36819$as_echo "$STRIP" >&6; }
36820else
36821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36822$as_echo "no" >&6; }
36823fi
36824
36825
36826        if test "x$STRIP" = x; then
36827          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36828        fi
36829      else
36830        # Otherwise we believe it is a complete path. Use it as it is.
36831        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
36832$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
36833        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
36834$as_echo_n "checking for STRIP... " >&6; }
36835        if test ! -x "$tool_specified"; then
36836          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36837$as_echo "not found" >&6; }
36838          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
36839        fi
36840        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36841$as_echo "$tool_specified" >&6; }
36842      fi
36843    fi
36844  fi
36845
36846
36847
36848  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36849
36850  # First separate the path from the arguments. This will split at the first
36851  # space.
36852  complete="$STRIP"
36853  path="${complete%% *}"
36854  tmp="$complete EOL"
36855  arguments="${tmp#* }"
36856
36857  # Input might be given as Windows format, start by converting to
36858  # unix format.
36859  new_path=`$CYGPATH -u "$path"`
36860
36861  # Now try to locate executable using which
36862  new_path=`$WHICH "$new_path" 2> /dev/null`
36863  # bat and cmd files are not always considered executable in cygwin causing which
36864  # to not find them
36865  if test "x$new_path" = x \
36866      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36867      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36868    new_path=`$CYGPATH -u "$path"`
36869  fi
36870  if test "x$new_path" = x; then
36871    # Oops. Which didn't find the executable.
36872    # The splitting of arguments from the executable at a space might have been incorrect,
36873    # since paths with space are more likely in Windows. Give it another try with the whole
36874    # argument.
36875    path="$complete"
36876    arguments="EOL"
36877    new_path=`$CYGPATH -u "$path"`
36878    new_path=`$WHICH "$new_path" 2> /dev/null`
36879    # bat and cmd files are not always considered executable in cygwin causing which
36880    # to not find them
36881    if test "x$new_path" = x \
36882        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36883        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36884      new_path=`$CYGPATH -u "$path"`
36885    fi
36886    if test "x$new_path" = x; then
36887      # It's still not found. Now this is an unrecoverable error.
36888      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36889$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36890      has_space=`$ECHO "$complete" | $GREP " "`
36891      if test "x$has_space" != x; then
36892        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36893$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36894      fi
36895      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36896    fi
36897  fi
36898
36899  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36900  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36901  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36902  # "foo.exe" is OK but "foo" is an error.
36903  #
36904  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36905  # It is also a way to make sure we got the proper file name for the real test later on.
36906  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36907  if test "x$test_shortpath" = x; then
36908    # Short path failed, file does not exist as specified.
36909    # Try adding .exe or .cmd
36910    if test -f "${new_path}.exe"; then
36911      input_to_shortpath="${new_path}.exe"
36912    elif test -f "${new_path}.cmd"; then
36913      input_to_shortpath="${new_path}.cmd"
36914    else
36915      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
36916$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
36917      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36918$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36919      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36920    fi
36921  else
36922    input_to_shortpath="$new_path"
36923  fi
36924
36925  # Call helper function which possibly converts this using DOS-style short mode.
36926  # If so, the updated path is stored in $new_path.
36927  new_path="$input_to_shortpath"
36928
36929  input_path="$input_to_shortpath"
36930  # Check if we need to convert this using DOS-style short mode. If the path
36931  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36932  # take no chances and rewrite it.
36933  # Note: m4 eats our [], so we need to use [ and ] instead.
36934  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36935  if test "x$has_forbidden_chars" != x; then
36936    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36937    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36938    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36939    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36940      # Going to short mode and back again did indeed matter. Since short mode is
36941      # case insensitive, let's make it lowercase to improve readability.
36942      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36943      # Now convert it back to Unix-stile (cygpath)
36944      input_path=`$CYGPATH -u "$shortmode_path"`
36945      new_path="$input_path"
36946    fi
36947  fi
36948
36949  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36950  if test "x$test_cygdrive_prefix" = x; then
36951    # As a simple fix, exclude /usr/bin since it's not a real path.
36952    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36953      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36954      # a path prefixed by /cygdrive for fixpath to work.
36955      new_path="$CYGWIN_ROOT_PATH$input_path"
36956    fi
36957  fi
36958
36959  # remove trailing .exe if any
36960  new_path="${new_path/%.exe/}"
36961
36962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36963
36964  # First separate the path from the arguments. This will split at the first
36965  # space.
36966  complete="$STRIP"
36967  path="${complete%% *}"
36968  tmp="$complete EOL"
36969  arguments="${tmp#* }"
36970
36971  # Input might be given as Windows format, start by converting to
36972  # unix format.
36973  new_path="$path"
36974
36975  windows_path="$new_path"
36976  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36977    unix_path=`$CYGPATH -u "$windows_path"`
36978    new_path="$unix_path"
36979  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36980    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36981    new_path="$unix_path"
36982  fi
36983
36984
36985  # Now try to locate executable using which
36986  new_path=`$WHICH "$new_path" 2> /dev/null`
36987
36988  if test "x$new_path" = x; then
36989    # Oops. Which didn't find the executable.
36990    # The splitting of arguments from the executable at a space might have been incorrect,
36991    # since paths with space are more likely in Windows. Give it another try with the whole
36992    # argument.
36993    path="$complete"
36994    arguments="EOL"
36995    new_path="$path"
36996
36997  windows_path="$new_path"
36998  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36999    unix_path=`$CYGPATH -u "$windows_path"`
37000    new_path="$unix_path"
37001  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37002    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37003    new_path="$unix_path"
37004  fi
37005
37006
37007    new_path=`$WHICH "$new_path" 2> /dev/null`
37008
37009    if test "x$new_path" = x; then
37010      # It's still not found. Now this is an unrecoverable error.
37011      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37012$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37013      has_space=`$ECHO "$complete" | $GREP " "`
37014      if test "x$has_space" != x; then
37015        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37016$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37017      fi
37018      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37019    fi
37020  fi
37021
37022  # Now new_path has a complete unix path to the binary
37023  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37024    # Keep paths in /bin as-is, but remove trailing .exe if any
37025    new_path="${new_path/%.exe/}"
37026    # Do not save /bin paths to all_fixpath_prefixes!
37027  else
37028    # Not in mixed or Windows style, start by that.
37029    new_path=`cmd //c echo $new_path`
37030
37031  input_path="$new_path"
37032  # Check if we need to convert this using DOS-style short mode. If the path
37033  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37034  # take no chances and rewrite it.
37035  # Note: m4 eats our [], so we need to use [ and ] instead.
37036  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37037  if test "x$has_forbidden_chars" != x; then
37038    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37039    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37040  fi
37041
37042    # Output is in $new_path
37043
37044  windows_path="$new_path"
37045  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37046    unix_path=`$CYGPATH -u "$windows_path"`
37047    new_path="$unix_path"
37048  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37049    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37050    new_path="$unix_path"
37051  fi
37052
37053    # remove trailing .exe if any
37054    new_path="${new_path/%.exe/}"
37055
37056    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37057    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37058  fi
37059
37060  else
37061    # We're on a posix platform. Hooray! :)
37062    # First separate the path from the arguments. This will split at the first
37063    # space.
37064    complete="$STRIP"
37065    path="${complete%% *}"
37066    tmp="$complete EOL"
37067    arguments="${tmp#* }"
37068
37069    # Cannot rely on the command "which" here since it doesn't always work.
37070    is_absolute_path=`$ECHO "$path" | $GREP ^/`
37071    if test -z "$is_absolute_path"; then
37072      # Path to executable is not absolute. Find it.
37073      IFS_save="$IFS"
37074      IFS=:
37075      for p in $PATH; do
37076        if test -f "$p/$path" && test -x "$p/$path"; then
37077          new_path="$p/$path"
37078          break
37079        fi
37080      done
37081      IFS="$IFS_save"
37082    else
37083      # This is an absolute path, we can use it without further modifications.
37084      new_path="$path"
37085    fi
37086
37087    if test "x$new_path" = x; then
37088      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37089$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37090      has_space=`$ECHO "$complete" | $GREP " "`
37091      if test "x$has_space" != x; then
37092        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37093$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37094      fi
37095      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37096    fi
37097  fi
37098
37099  # Now join together the path and the arguments once again
37100  if test "x$arguments" != xEOL; then
37101    new_complete="$new_path ${arguments% *}"
37102  else
37103    new_complete="$new_path"
37104  fi
37105
37106  if test "x$complete" != "x$new_complete"; then
37107    STRIP="$new_complete"
37108    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
37109$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
37110  fi
37111
37112
37113
37114  # Publish this variable in the help.
37115
37116
37117  if test "x$NM" = x; then
37118    # The variable is not set by user, try to locate tool using the code snippet
37119    if test -n "$ac_tool_prefix"; then
37120  for ac_prog in nm
37121  do
37122    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37123set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37125$as_echo_n "checking for $ac_word... " >&6; }
37126if ${ac_cv_prog_NM+:} false; then :
37127  $as_echo_n "(cached) " >&6
37128else
37129  if test -n "$NM"; then
37130  ac_cv_prog_NM="$NM" # Let the user override the test.
37131else
37132as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37133for as_dir in $PATH
37134do
37135  IFS=$as_save_IFS
37136  test -z "$as_dir" && as_dir=.
37137    for ac_exec_ext in '' $ac_executable_extensions; do
37138  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37139    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37140    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37141    break 2
37142  fi
37143done
37144  done
37145IFS=$as_save_IFS
37146
37147fi
37148fi
37149NM=$ac_cv_prog_NM
37150if test -n "$NM"; then
37151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37152$as_echo "$NM" >&6; }
37153else
37154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37155$as_echo "no" >&6; }
37156fi
37157
37158
37159    test -n "$NM" && break
37160  done
37161fi
37162if test -z "$NM"; then
37163  ac_ct_NM=$NM
37164  for ac_prog in nm
37165do
37166  # Extract the first word of "$ac_prog", so it can be a program name with args.
37167set dummy $ac_prog; ac_word=$2
37168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37169$as_echo_n "checking for $ac_word... " >&6; }
37170if ${ac_cv_prog_ac_ct_NM+:} false; then :
37171  $as_echo_n "(cached) " >&6
37172else
37173  if test -n "$ac_ct_NM"; then
37174  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37175else
37176as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37177for as_dir in $PATH
37178do
37179  IFS=$as_save_IFS
37180  test -z "$as_dir" && as_dir=.
37181    for ac_exec_ext in '' $ac_executable_extensions; do
37182  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37183    ac_cv_prog_ac_ct_NM="$ac_prog"
37184    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37185    break 2
37186  fi
37187done
37188  done
37189IFS=$as_save_IFS
37190
37191fi
37192fi
37193ac_ct_NM=$ac_cv_prog_ac_ct_NM
37194if test -n "$ac_ct_NM"; then
37195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37196$as_echo "$ac_ct_NM" >&6; }
37197else
37198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37199$as_echo "no" >&6; }
37200fi
37201
37202
37203  test -n "$ac_ct_NM" && break
37204done
37205
37206  if test "x$ac_ct_NM" = x; then
37207    NM=""
37208  else
37209    case $cross_compiling:$ac_tool_warned in
37210yes:)
37211{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37212$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37213ac_tool_warned=yes ;;
37214esac
37215    NM=$ac_ct_NM
37216  fi
37217fi
37218
37219  else
37220    # The variable is set, but is it from the command line or the environment?
37221
37222    # Try to remove the string !NM! from our list.
37223    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
37224    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37225      # If it failed, the variable was not from the command line. Ignore it,
37226      # but warn the user (except for BASH, which is always set by the calling BASH).
37227      if test "xNM" != xBASH; then
37228        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
37229$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
37230      fi
37231      # Try to locate tool using the code snippet
37232      if test -n "$ac_tool_prefix"; then
37233  for ac_prog in nm
37234  do
37235    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37236set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37238$as_echo_n "checking for $ac_word... " >&6; }
37239if ${ac_cv_prog_NM+:} false; then :
37240  $as_echo_n "(cached) " >&6
37241else
37242  if test -n "$NM"; then
37243  ac_cv_prog_NM="$NM" # Let the user override the test.
37244else
37245as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37246for as_dir in $PATH
37247do
37248  IFS=$as_save_IFS
37249  test -z "$as_dir" && as_dir=.
37250    for ac_exec_ext in '' $ac_executable_extensions; do
37251  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37252    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37253    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37254    break 2
37255  fi
37256done
37257  done
37258IFS=$as_save_IFS
37259
37260fi
37261fi
37262NM=$ac_cv_prog_NM
37263if test -n "$NM"; then
37264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37265$as_echo "$NM" >&6; }
37266else
37267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37268$as_echo "no" >&6; }
37269fi
37270
37271
37272    test -n "$NM" && break
37273  done
37274fi
37275if test -z "$NM"; then
37276  ac_ct_NM=$NM
37277  for ac_prog in nm
37278do
37279  # Extract the first word of "$ac_prog", so it can be a program name with args.
37280set dummy $ac_prog; ac_word=$2
37281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37282$as_echo_n "checking for $ac_word... " >&6; }
37283if ${ac_cv_prog_ac_ct_NM+:} false; then :
37284  $as_echo_n "(cached) " >&6
37285else
37286  if test -n "$ac_ct_NM"; then
37287  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37288else
37289as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37290for as_dir in $PATH
37291do
37292  IFS=$as_save_IFS
37293  test -z "$as_dir" && as_dir=.
37294    for ac_exec_ext in '' $ac_executable_extensions; do
37295  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37296    ac_cv_prog_ac_ct_NM="$ac_prog"
37297    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37298    break 2
37299  fi
37300done
37301  done
37302IFS=$as_save_IFS
37303
37304fi
37305fi
37306ac_ct_NM=$ac_cv_prog_ac_ct_NM
37307if test -n "$ac_ct_NM"; then
37308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37309$as_echo "$ac_ct_NM" >&6; }
37310else
37311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37312$as_echo "no" >&6; }
37313fi
37314
37315
37316  test -n "$ac_ct_NM" && break
37317done
37318
37319  if test "x$ac_ct_NM" = x; then
37320    NM=""
37321  else
37322    case $cross_compiling:$ac_tool_warned in
37323yes:)
37324{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37325$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37326ac_tool_warned=yes ;;
37327esac
37328    NM=$ac_ct_NM
37329  fi
37330fi
37331
37332    else
37333      # If it succeeded, then it was overridden by the user. We will use it
37334      # for the tool.
37335
37336      # First remove it from the list of overridden variables, so we can test
37337      # for unknown variables in the end.
37338      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37339
37340      # Check if the provided tool contains a complete path.
37341      tool_specified="$NM"
37342      tool_basename="${tool_specified##*/}"
37343      if test "x$tool_basename" = "x$tool_specified"; then
37344        # A command without a complete path is provided, search $PATH.
37345        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
37346$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
37347        # Extract the first word of "$tool_basename", so it can be a program name with args.
37348set dummy $tool_basename; ac_word=$2
37349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37350$as_echo_n "checking for $ac_word... " >&6; }
37351if ${ac_cv_path_NM+:} false; then :
37352  $as_echo_n "(cached) " >&6
37353else
37354  case $NM in
37355  [\\/]* | ?:[\\/]*)
37356  ac_cv_path_NM="$NM" # Let the user override the test with a path.
37357  ;;
37358  *)
37359  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37360for as_dir in $PATH
37361do
37362  IFS=$as_save_IFS
37363  test -z "$as_dir" && as_dir=.
37364    for ac_exec_ext in '' $ac_executable_extensions; do
37365  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37366    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
37367    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37368    break 2
37369  fi
37370done
37371  done
37372IFS=$as_save_IFS
37373
37374  ;;
37375esac
37376fi
37377NM=$ac_cv_path_NM
37378if test -n "$NM"; then
37379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37380$as_echo "$NM" >&6; }
37381else
37382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37383$as_echo "no" >&6; }
37384fi
37385
37386
37387        if test "x$NM" = x; then
37388          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37389        fi
37390      else
37391        # Otherwise we believe it is a complete path. Use it as it is.
37392        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
37393$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
37394        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
37395$as_echo_n "checking for NM... " >&6; }
37396        if test ! -x "$tool_specified"; then
37397          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37398$as_echo "not found" >&6; }
37399          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
37400        fi
37401        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37402$as_echo "$tool_specified" >&6; }
37403      fi
37404    fi
37405  fi
37406
37407
37408
37409  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37410
37411  # First separate the path from the arguments. This will split at the first
37412  # space.
37413  complete="$NM"
37414  path="${complete%% *}"
37415  tmp="$complete EOL"
37416  arguments="${tmp#* }"
37417
37418  # Input might be given as Windows format, start by converting to
37419  # unix format.
37420  new_path=`$CYGPATH -u "$path"`
37421
37422  # Now try to locate executable using which
37423  new_path=`$WHICH "$new_path" 2> /dev/null`
37424  # bat and cmd files are not always considered executable in cygwin causing which
37425  # to not find them
37426  if test "x$new_path" = x \
37427      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37428      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37429    new_path=`$CYGPATH -u "$path"`
37430  fi
37431  if test "x$new_path" = x; then
37432    # Oops. Which didn't find the executable.
37433    # The splitting of arguments from the executable at a space might have been incorrect,
37434    # since paths with space are more likely in Windows. Give it another try with the whole
37435    # argument.
37436    path="$complete"
37437    arguments="EOL"
37438    new_path=`$CYGPATH -u "$path"`
37439    new_path=`$WHICH "$new_path" 2> /dev/null`
37440    # bat and cmd files are not always considered executable in cygwin causing which
37441    # to not find them
37442    if test "x$new_path" = x \
37443        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37444        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37445      new_path=`$CYGPATH -u "$path"`
37446    fi
37447    if test "x$new_path" = x; then
37448      # It's still not found. Now this is an unrecoverable error.
37449      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37450$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37451      has_space=`$ECHO "$complete" | $GREP " "`
37452      if test "x$has_space" != x; then
37453        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37454$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37455      fi
37456      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37457    fi
37458  fi
37459
37460  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37461  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37462  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37463  # "foo.exe" is OK but "foo" is an error.
37464  #
37465  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37466  # It is also a way to make sure we got the proper file name for the real test later on.
37467  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37468  if test "x$test_shortpath" = x; then
37469    # Short path failed, file does not exist as specified.
37470    # Try adding .exe or .cmd
37471    if test -f "${new_path}.exe"; then
37472      input_to_shortpath="${new_path}.exe"
37473    elif test -f "${new_path}.cmd"; then
37474      input_to_shortpath="${new_path}.cmd"
37475    else
37476      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
37477$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
37478      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37479$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37480      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37481    fi
37482  else
37483    input_to_shortpath="$new_path"
37484  fi
37485
37486  # Call helper function which possibly converts this using DOS-style short mode.
37487  # If so, the updated path is stored in $new_path.
37488  new_path="$input_to_shortpath"
37489
37490  input_path="$input_to_shortpath"
37491  # Check if we need to convert this using DOS-style short mode. If the path
37492  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37493  # take no chances and rewrite it.
37494  # Note: m4 eats our [], so we need to use [ and ] instead.
37495  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37496  if test "x$has_forbidden_chars" != x; then
37497    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37498    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37499    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37500    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37501      # Going to short mode and back again did indeed matter. Since short mode is
37502      # case insensitive, let's make it lowercase to improve readability.
37503      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37504      # Now convert it back to Unix-stile (cygpath)
37505      input_path=`$CYGPATH -u "$shortmode_path"`
37506      new_path="$input_path"
37507    fi
37508  fi
37509
37510  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37511  if test "x$test_cygdrive_prefix" = x; then
37512    # As a simple fix, exclude /usr/bin since it's not a real path.
37513    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37514      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37515      # a path prefixed by /cygdrive for fixpath to work.
37516      new_path="$CYGWIN_ROOT_PATH$input_path"
37517    fi
37518  fi
37519
37520  # remove trailing .exe if any
37521  new_path="${new_path/%.exe/}"
37522
37523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37524
37525  # First separate the path from the arguments. This will split at the first
37526  # space.
37527  complete="$NM"
37528  path="${complete%% *}"
37529  tmp="$complete EOL"
37530  arguments="${tmp#* }"
37531
37532  # Input might be given as Windows format, start by converting to
37533  # unix format.
37534  new_path="$path"
37535
37536  windows_path="$new_path"
37537  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37538    unix_path=`$CYGPATH -u "$windows_path"`
37539    new_path="$unix_path"
37540  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37541    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37542    new_path="$unix_path"
37543  fi
37544
37545
37546  # Now try to locate executable using which
37547  new_path=`$WHICH "$new_path" 2> /dev/null`
37548
37549  if test "x$new_path" = x; then
37550    # Oops. Which didn't find the executable.
37551    # The splitting of arguments from the executable at a space might have been incorrect,
37552    # since paths with space are more likely in Windows. Give it another try with the whole
37553    # argument.
37554    path="$complete"
37555    arguments="EOL"
37556    new_path="$path"
37557
37558  windows_path="$new_path"
37559  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37560    unix_path=`$CYGPATH -u "$windows_path"`
37561    new_path="$unix_path"
37562  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37563    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37564    new_path="$unix_path"
37565  fi
37566
37567
37568    new_path=`$WHICH "$new_path" 2> /dev/null`
37569
37570    if test "x$new_path" = x; then
37571      # It's still not found. Now this is an unrecoverable error.
37572      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37573$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37574      has_space=`$ECHO "$complete" | $GREP " "`
37575      if test "x$has_space" != x; then
37576        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37577$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37578      fi
37579      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37580    fi
37581  fi
37582
37583  # Now new_path has a complete unix path to the binary
37584  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37585    # Keep paths in /bin as-is, but remove trailing .exe if any
37586    new_path="${new_path/%.exe/}"
37587    # Do not save /bin paths to all_fixpath_prefixes!
37588  else
37589    # Not in mixed or Windows style, start by that.
37590    new_path=`cmd //c echo $new_path`
37591
37592  input_path="$new_path"
37593  # Check if we need to convert this using DOS-style short mode. If the path
37594  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37595  # take no chances and rewrite it.
37596  # Note: m4 eats our [], so we need to use [ and ] instead.
37597  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37598  if test "x$has_forbidden_chars" != x; then
37599    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37600    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37601  fi
37602
37603    # Output is in $new_path
37604
37605  windows_path="$new_path"
37606  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37607    unix_path=`$CYGPATH -u "$windows_path"`
37608    new_path="$unix_path"
37609  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37610    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37611    new_path="$unix_path"
37612  fi
37613
37614    # remove trailing .exe if any
37615    new_path="${new_path/%.exe/}"
37616
37617    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37618    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37619  fi
37620
37621  else
37622    # We're on a posix platform. Hooray! :)
37623    # First separate the path from the arguments. This will split at the first
37624    # space.
37625    complete="$NM"
37626    path="${complete%% *}"
37627    tmp="$complete EOL"
37628    arguments="${tmp#* }"
37629
37630    # Cannot rely on the command "which" here since it doesn't always work.
37631    is_absolute_path=`$ECHO "$path" | $GREP ^/`
37632    if test -z "$is_absolute_path"; then
37633      # Path to executable is not absolute. Find it.
37634      IFS_save="$IFS"
37635      IFS=:
37636      for p in $PATH; do
37637        if test -f "$p/$path" && test -x "$p/$path"; then
37638          new_path="$p/$path"
37639          break
37640        fi
37641      done
37642      IFS="$IFS_save"
37643    else
37644      # This is an absolute path, we can use it without further modifications.
37645      new_path="$path"
37646    fi
37647
37648    if test "x$new_path" = x; then
37649      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37650$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37651      has_space=`$ECHO "$complete" | $GREP " "`
37652      if test "x$has_space" != x; then
37653        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37654$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37655      fi
37656      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37657    fi
37658  fi
37659
37660  # Now join together the path and the arguments once again
37661  if test "x$arguments" != xEOL; then
37662    new_complete="$new_path ${arguments% *}"
37663  else
37664    new_complete="$new_path"
37665  fi
37666
37667  if test "x$complete" != "x$new_complete"; then
37668    NM="$new_complete"
37669    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
37670$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
37671  fi
37672
37673    GNM="$NM"
37674
37675  fi
37676
37677  # objcopy is used for moving debug symbols to separate files when
37678  # full debug symbols are enabled.
37679  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
37680
37681
37682  # Publish this variable in the help.
37683
37684
37685  if test "x$OBJCOPY" = x; then
37686    # The variable is not set by user, try to locate tool using the code snippet
37687    if test -n "$ac_tool_prefix"; then
37688  for ac_prog in gobjcopy objcopy
37689  do
37690    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37691set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37693$as_echo_n "checking for $ac_word... " >&6; }
37694if ${ac_cv_prog_OBJCOPY+:} false; then :
37695  $as_echo_n "(cached) " >&6
37696else
37697  if test -n "$OBJCOPY"; then
37698  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37699else
37700as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37701for as_dir in $PATH
37702do
37703  IFS=$as_save_IFS
37704  test -z "$as_dir" && as_dir=.
37705    for ac_exec_ext in '' $ac_executable_extensions; do
37706  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37707    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37708    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37709    break 2
37710  fi
37711done
37712  done
37713IFS=$as_save_IFS
37714
37715fi
37716fi
37717OBJCOPY=$ac_cv_prog_OBJCOPY
37718if test -n "$OBJCOPY"; then
37719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37720$as_echo "$OBJCOPY" >&6; }
37721else
37722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37723$as_echo "no" >&6; }
37724fi
37725
37726
37727    test -n "$OBJCOPY" && break
37728  done
37729fi
37730if test -z "$OBJCOPY"; then
37731  ac_ct_OBJCOPY=$OBJCOPY
37732  for ac_prog in gobjcopy objcopy
37733do
37734  # Extract the first word of "$ac_prog", so it can be a program name with args.
37735set dummy $ac_prog; ac_word=$2
37736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37737$as_echo_n "checking for $ac_word... " >&6; }
37738if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
37739  $as_echo_n "(cached) " >&6
37740else
37741  if test -n "$ac_ct_OBJCOPY"; then
37742  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
37743else
37744as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37745for as_dir in $PATH
37746do
37747  IFS=$as_save_IFS
37748  test -z "$as_dir" && as_dir=.
37749    for ac_exec_ext in '' $ac_executable_extensions; do
37750  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37751    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
37752    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37753    break 2
37754  fi
37755done
37756  done
37757IFS=$as_save_IFS
37758
37759fi
37760fi
37761ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
37762if test -n "$ac_ct_OBJCOPY"; then
37763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
37764$as_echo "$ac_ct_OBJCOPY" >&6; }
37765else
37766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37767$as_echo "no" >&6; }
37768fi
37769
37770
37771  test -n "$ac_ct_OBJCOPY" && break
37772done
37773
37774  if test "x$ac_ct_OBJCOPY" = x; then
37775    OBJCOPY=""
37776  else
37777    case $cross_compiling:$ac_tool_warned in
37778yes:)
37779{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37780$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37781ac_tool_warned=yes ;;
37782esac
37783    OBJCOPY=$ac_ct_OBJCOPY
37784  fi
37785fi
37786
37787  else
37788    # The variable is set, but is it from the command line or the environment?
37789
37790    # Try to remove the string !OBJCOPY! from our list.
37791    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
37792    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37793      # If it failed, the variable was not from the command line. Ignore it,
37794      # but warn the user (except for BASH, which is always set by the calling BASH).
37795      if test "xOBJCOPY" != xBASH; then
37796        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
37797$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
37798      fi
37799      # Try to locate tool using the code snippet
37800      if test -n "$ac_tool_prefix"; then
37801  for ac_prog in gobjcopy objcopy
37802  do
37803    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37804set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37806$as_echo_n "checking for $ac_word... " >&6; }
37807if ${ac_cv_prog_OBJCOPY+:} false; then :
37808  $as_echo_n "(cached) " >&6
37809else
37810  if test -n "$OBJCOPY"; then
37811  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37812else
37813as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37814for as_dir in $PATH
37815do
37816  IFS=$as_save_IFS
37817  test -z "$as_dir" && as_dir=.
37818    for ac_exec_ext in '' $ac_executable_extensions; do
37819  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37820    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37821    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37822    break 2
37823  fi
37824done
37825  done
37826IFS=$as_save_IFS
37827
37828fi
37829fi
37830OBJCOPY=$ac_cv_prog_OBJCOPY
37831if test -n "$OBJCOPY"; then
37832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37833$as_echo "$OBJCOPY" >&6; }
37834else
37835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37836$as_echo "no" >&6; }
37837fi
37838
37839
37840    test -n "$OBJCOPY" && break
37841  done
37842fi
37843if test -z "$OBJCOPY"; then
37844  ac_ct_OBJCOPY=$OBJCOPY
37845  for ac_prog in gobjcopy objcopy
37846do
37847  # Extract the first word of "$ac_prog", so it can be a program name with args.
37848set dummy $ac_prog; ac_word=$2
37849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37850$as_echo_n "checking for $ac_word... " >&6; }
37851if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
37852  $as_echo_n "(cached) " >&6
37853else
37854  if test -n "$ac_ct_OBJCOPY"; then
37855  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
37856else
37857as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37858for as_dir in $PATH
37859do
37860  IFS=$as_save_IFS
37861  test -z "$as_dir" && as_dir=.
37862    for ac_exec_ext in '' $ac_executable_extensions; do
37863  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37864    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
37865    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37866    break 2
37867  fi
37868done
37869  done
37870IFS=$as_save_IFS
37871
37872fi
37873fi
37874ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
37875if test -n "$ac_ct_OBJCOPY"; then
37876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
37877$as_echo "$ac_ct_OBJCOPY" >&6; }
37878else
37879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37880$as_echo "no" >&6; }
37881fi
37882
37883
37884  test -n "$ac_ct_OBJCOPY" && break
37885done
37886
37887  if test "x$ac_ct_OBJCOPY" = x; then
37888    OBJCOPY=""
37889  else
37890    case $cross_compiling:$ac_tool_warned in
37891yes:)
37892{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37893$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37894ac_tool_warned=yes ;;
37895esac
37896    OBJCOPY=$ac_ct_OBJCOPY
37897  fi
37898fi
37899
37900    else
37901      # If it succeeded, then it was overridden by the user. We will use it
37902      # for the tool.
37903
37904      # First remove it from the list of overridden variables, so we can test
37905      # for unknown variables in the end.
37906      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37907
37908      # Check if the provided tool contains a complete path.
37909      tool_specified="$OBJCOPY"
37910      tool_basename="${tool_specified##*/}"
37911      if test "x$tool_basename" = "x$tool_specified"; then
37912        # A command without a complete path is provided, search $PATH.
37913        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
37914$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
37915        # Extract the first word of "$tool_basename", so it can be a program name with args.
37916set dummy $tool_basename; ac_word=$2
37917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37918$as_echo_n "checking for $ac_word... " >&6; }
37919if ${ac_cv_path_OBJCOPY+:} false; then :
37920  $as_echo_n "(cached) " >&6
37921else
37922  case $OBJCOPY in
37923  [\\/]* | ?:[\\/]*)
37924  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
37925  ;;
37926  *)
37927  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37928for as_dir in $PATH
37929do
37930  IFS=$as_save_IFS
37931  test -z "$as_dir" && as_dir=.
37932    for ac_exec_ext in '' $ac_executable_extensions; do
37933  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37934    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
37935    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37936    break 2
37937  fi
37938done
37939  done
37940IFS=$as_save_IFS
37941
37942  ;;
37943esac
37944fi
37945OBJCOPY=$ac_cv_path_OBJCOPY
37946if test -n "$OBJCOPY"; then
37947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37948$as_echo "$OBJCOPY" >&6; }
37949else
37950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37951$as_echo "no" >&6; }
37952fi
37953
37954
37955        if test "x$OBJCOPY" = x; then
37956          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37957        fi
37958      else
37959        # Otherwise we believe it is a complete path. Use it as it is.
37960        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
37961$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
37962        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
37963$as_echo_n "checking for OBJCOPY... " >&6; }
37964        if test ! -x "$tool_specified"; then
37965          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37966$as_echo "not found" >&6; }
37967          as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
37968        fi
37969        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37970$as_echo "$tool_specified" >&6; }
37971      fi
37972    fi
37973  fi
37974
37975
37976    # Only call fixup if objcopy was found.
37977    if test -n "$OBJCOPY"; then
37978
37979  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37980
37981  # First separate the path from the arguments. This will split at the first
37982  # space.
37983  complete="$OBJCOPY"
37984  path="${complete%% *}"
37985  tmp="$complete EOL"
37986  arguments="${tmp#* }"
37987
37988  # Input might be given as Windows format, start by converting to
37989  # unix format.
37990  new_path=`$CYGPATH -u "$path"`
37991
37992  # Now try to locate executable using which
37993  new_path=`$WHICH "$new_path" 2> /dev/null`
37994  # bat and cmd files are not always considered executable in cygwin causing which
37995  # to not find them
37996  if test "x$new_path" = x \
37997      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37998      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37999    new_path=`$CYGPATH -u "$path"`
38000  fi
38001  if test "x$new_path" = x; then
38002    # Oops. Which didn't find the executable.
38003    # The splitting of arguments from the executable at a space might have been incorrect,
38004    # since paths with space are more likely in Windows. Give it another try with the whole
38005    # argument.
38006    path="$complete"
38007    arguments="EOL"
38008    new_path=`$CYGPATH -u "$path"`
38009    new_path=`$WHICH "$new_path" 2> /dev/null`
38010    # bat and cmd files are not always considered executable in cygwin causing which
38011    # to not find them
38012    if test "x$new_path" = x \
38013        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38014        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38015      new_path=`$CYGPATH -u "$path"`
38016    fi
38017    if test "x$new_path" = x; then
38018      # It's still not found. Now this is an unrecoverable error.
38019      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38020$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38021      has_space=`$ECHO "$complete" | $GREP " "`
38022      if test "x$has_space" != x; then
38023        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38024$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38025      fi
38026      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38027    fi
38028  fi
38029
38030  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38031  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38032  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38033  # "foo.exe" is OK but "foo" is an error.
38034  #
38035  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38036  # It is also a way to make sure we got the proper file name for the real test later on.
38037  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38038  if test "x$test_shortpath" = x; then
38039    # Short path failed, file does not exist as specified.
38040    # Try adding .exe or .cmd
38041    if test -f "${new_path}.exe"; then
38042      input_to_shortpath="${new_path}.exe"
38043    elif test -f "${new_path}.cmd"; then
38044      input_to_shortpath="${new_path}.cmd"
38045    else
38046      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
38047$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
38048      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38049$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38050      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38051    fi
38052  else
38053    input_to_shortpath="$new_path"
38054  fi
38055
38056  # Call helper function which possibly converts this using DOS-style short mode.
38057  # If so, the updated path is stored in $new_path.
38058  new_path="$input_to_shortpath"
38059
38060  input_path="$input_to_shortpath"
38061  # Check if we need to convert this using DOS-style short mode. If the path
38062  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38063  # take no chances and rewrite it.
38064  # Note: m4 eats our [], so we need to use [ and ] instead.
38065  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38066  if test "x$has_forbidden_chars" != x; then
38067    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38068    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38069    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38070    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38071      # Going to short mode and back again did indeed matter. Since short mode is
38072      # case insensitive, let's make it lowercase to improve readability.
38073      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38074      # Now convert it back to Unix-stile (cygpath)
38075      input_path=`$CYGPATH -u "$shortmode_path"`
38076      new_path="$input_path"
38077    fi
38078  fi
38079
38080  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38081  if test "x$test_cygdrive_prefix" = x; then
38082    # As a simple fix, exclude /usr/bin since it's not a real path.
38083    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38084      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38085      # a path prefixed by /cygdrive for fixpath to work.
38086      new_path="$CYGWIN_ROOT_PATH$input_path"
38087    fi
38088  fi
38089
38090  # remove trailing .exe if any
38091  new_path="${new_path/%.exe/}"
38092
38093  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38094
38095  # First separate the path from the arguments. This will split at the first
38096  # space.
38097  complete="$OBJCOPY"
38098  path="${complete%% *}"
38099  tmp="$complete EOL"
38100  arguments="${tmp#* }"
38101
38102  # Input might be given as Windows format, start by converting to
38103  # unix format.
38104  new_path="$path"
38105
38106  windows_path="$new_path"
38107  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38108    unix_path=`$CYGPATH -u "$windows_path"`
38109    new_path="$unix_path"
38110  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38111    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38112    new_path="$unix_path"
38113  fi
38114
38115
38116  # Now try to locate executable using which
38117  new_path=`$WHICH "$new_path" 2> /dev/null`
38118
38119  if test "x$new_path" = x; then
38120    # Oops. Which didn't find the executable.
38121    # The splitting of arguments from the executable at a space might have been incorrect,
38122    # since paths with space are more likely in Windows. Give it another try with the whole
38123    # argument.
38124    path="$complete"
38125    arguments="EOL"
38126    new_path="$path"
38127
38128  windows_path="$new_path"
38129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38130    unix_path=`$CYGPATH -u "$windows_path"`
38131    new_path="$unix_path"
38132  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38133    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38134    new_path="$unix_path"
38135  fi
38136
38137
38138    new_path=`$WHICH "$new_path" 2> /dev/null`
38139
38140    if test "x$new_path" = x; then
38141      # It's still not found. Now this is an unrecoverable error.
38142      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38143$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38144      has_space=`$ECHO "$complete" | $GREP " "`
38145      if test "x$has_space" != x; then
38146        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38147$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38148      fi
38149      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38150    fi
38151  fi
38152
38153  # Now new_path has a complete unix path to the binary
38154  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38155    # Keep paths in /bin as-is, but remove trailing .exe if any
38156    new_path="${new_path/%.exe/}"
38157    # Do not save /bin paths to all_fixpath_prefixes!
38158  else
38159    # Not in mixed or Windows style, start by that.
38160    new_path=`cmd //c echo $new_path`
38161
38162  input_path="$new_path"
38163  # Check if we need to convert this using DOS-style short mode. If the path
38164  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38165  # take no chances and rewrite it.
38166  # Note: m4 eats our [], so we need to use [ and ] instead.
38167  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38168  if test "x$has_forbidden_chars" != x; then
38169    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38170    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38171  fi
38172
38173    # Output is in $new_path
38174
38175  windows_path="$new_path"
38176  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38177    unix_path=`$CYGPATH -u "$windows_path"`
38178    new_path="$unix_path"
38179  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38180    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38181    new_path="$unix_path"
38182  fi
38183
38184    # remove trailing .exe if any
38185    new_path="${new_path/%.exe/}"
38186
38187    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38188    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38189  fi
38190
38191  else
38192    # We're on a posix platform. Hooray! :)
38193    # First separate the path from the arguments. This will split at the first
38194    # space.
38195    complete="$OBJCOPY"
38196    path="${complete%% *}"
38197    tmp="$complete EOL"
38198    arguments="${tmp#* }"
38199
38200    # Cannot rely on the command "which" here since it doesn't always work.
38201    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38202    if test -z "$is_absolute_path"; then
38203      # Path to executable is not absolute. Find it.
38204      IFS_save="$IFS"
38205      IFS=:
38206      for p in $PATH; do
38207        if test -f "$p/$path" && test -x "$p/$path"; then
38208          new_path="$p/$path"
38209          break
38210        fi
38211      done
38212      IFS="$IFS_save"
38213    else
38214      # This is an absolute path, we can use it without further modifications.
38215      new_path="$path"
38216    fi
38217
38218    if test "x$new_path" = x; then
38219      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38220$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38221      has_space=`$ECHO "$complete" | $GREP " "`
38222      if test "x$has_space" != x; then
38223        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38224$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38225      fi
38226      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38227    fi
38228  fi
38229
38230  # Now join together the path and the arguments once again
38231  if test "x$arguments" != xEOL; then
38232    new_complete="$new_path ${arguments% *}"
38233  else
38234    new_complete="$new_path"
38235  fi
38236
38237  if test "x$complete" != "x$new_complete"; then
38238    OBJCOPY="$new_complete"
38239    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38240$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38241  fi
38242
38243    fi
38244  fi
38245
38246
38247
38248  # Publish this variable in the help.
38249
38250
38251  if test "x$OBJDUMP" = x; then
38252    # The variable is not set by user, try to locate tool using the code snippet
38253    if test -n "$ac_tool_prefix"; then
38254  for ac_prog in gobjdump objdump
38255  do
38256    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38257set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38259$as_echo_n "checking for $ac_word... " >&6; }
38260if ${ac_cv_prog_OBJDUMP+:} false; then :
38261  $as_echo_n "(cached) " >&6
38262else
38263  if test -n "$OBJDUMP"; then
38264  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38265else
38266as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38267for as_dir in $PATH
38268do
38269  IFS=$as_save_IFS
38270  test -z "$as_dir" && as_dir=.
38271    for ac_exec_ext in '' $ac_executable_extensions; do
38272  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38273    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38274    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38275    break 2
38276  fi
38277done
38278  done
38279IFS=$as_save_IFS
38280
38281fi
38282fi
38283OBJDUMP=$ac_cv_prog_OBJDUMP
38284if test -n "$OBJDUMP"; then
38285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38286$as_echo "$OBJDUMP" >&6; }
38287else
38288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38289$as_echo "no" >&6; }
38290fi
38291
38292
38293    test -n "$OBJDUMP" && break
38294  done
38295fi
38296if test -z "$OBJDUMP"; then
38297  ac_ct_OBJDUMP=$OBJDUMP
38298  for ac_prog in gobjdump objdump
38299do
38300  # Extract the first word of "$ac_prog", so it can be a program name with args.
38301set dummy $ac_prog; ac_word=$2
38302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38303$as_echo_n "checking for $ac_word... " >&6; }
38304if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38305  $as_echo_n "(cached) " >&6
38306else
38307  if test -n "$ac_ct_OBJDUMP"; then
38308  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38309else
38310as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38311for as_dir in $PATH
38312do
38313  IFS=$as_save_IFS
38314  test -z "$as_dir" && as_dir=.
38315    for ac_exec_ext in '' $ac_executable_extensions; do
38316  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38317    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38318    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38319    break 2
38320  fi
38321done
38322  done
38323IFS=$as_save_IFS
38324
38325fi
38326fi
38327ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38328if test -n "$ac_ct_OBJDUMP"; then
38329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38330$as_echo "$ac_ct_OBJDUMP" >&6; }
38331else
38332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38333$as_echo "no" >&6; }
38334fi
38335
38336
38337  test -n "$ac_ct_OBJDUMP" && break
38338done
38339
38340  if test "x$ac_ct_OBJDUMP" = x; then
38341    OBJDUMP=""
38342  else
38343    case $cross_compiling:$ac_tool_warned in
38344yes:)
38345{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38346$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38347ac_tool_warned=yes ;;
38348esac
38349    OBJDUMP=$ac_ct_OBJDUMP
38350  fi
38351fi
38352
38353  else
38354    # The variable is set, but is it from the command line or the environment?
38355
38356    # Try to remove the string !OBJDUMP! from our list.
38357    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
38358    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38359      # If it failed, the variable was not from the command line. Ignore it,
38360      # but warn the user (except for BASH, which is always set by the calling BASH).
38361      if test "xOBJDUMP" != xBASH; then
38362        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
38363$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
38364      fi
38365      # Try to locate tool using the code snippet
38366      if test -n "$ac_tool_prefix"; then
38367  for ac_prog in gobjdump objdump
38368  do
38369    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38370set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38372$as_echo_n "checking for $ac_word... " >&6; }
38373if ${ac_cv_prog_OBJDUMP+:} false; then :
38374  $as_echo_n "(cached) " >&6
38375else
38376  if test -n "$OBJDUMP"; then
38377  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38378else
38379as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38380for as_dir in $PATH
38381do
38382  IFS=$as_save_IFS
38383  test -z "$as_dir" && as_dir=.
38384    for ac_exec_ext in '' $ac_executable_extensions; do
38385  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38386    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38387    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38388    break 2
38389  fi
38390done
38391  done
38392IFS=$as_save_IFS
38393
38394fi
38395fi
38396OBJDUMP=$ac_cv_prog_OBJDUMP
38397if test -n "$OBJDUMP"; then
38398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38399$as_echo "$OBJDUMP" >&6; }
38400else
38401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38402$as_echo "no" >&6; }
38403fi
38404
38405
38406    test -n "$OBJDUMP" && break
38407  done
38408fi
38409if test -z "$OBJDUMP"; then
38410  ac_ct_OBJDUMP=$OBJDUMP
38411  for ac_prog in gobjdump objdump
38412do
38413  # Extract the first word of "$ac_prog", so it can be a program name with args.
38414set dummy $ac_prog; ac_word=$2
38415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38416$as_echo_n "checking for $ac_word... " >&6; }
38417if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38418  $as_echo_n "(cached) " >&6
38419else
38420  if test -n "$ac_ct_OBJDUMP"; then
38421  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38422else
38423as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38424for as_dir in $PATH
38425do
38426  IFS=$as_save_IFS
38427  test -z "$as_dir" && as_dir=.
38428    for ac_exec_ext in '' $ac_executable_extensions; do
38429  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38430    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38431    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38432    break 2
38433  fi
38434done
38435  done
38436IFS=$as_save_IFS
38437
38438fi
38439fi
38440ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38441if test -n "$ac_ct_OBJDUMP"; then
38442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38443$as_echo "$ac_ct_OBJDUMP" >&6; }
38444else
38445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38446$as_echo "no" >&6; }
38447fi
38448
38449
38450  test -n "$ac_ct_OBJDUMP" && break
38451done
38452
38453  if test "x$ac_ct_OBJDUMP" = x; then
38454    OBJDUMP=""
38455  else
38456    case $cross_compiling:$ac_tool_warned in
38457yes:)
38458{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38459$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38460ac_tool_warned=yes ;;
38461esac
38462    OBJDUMP=$ac_ct_OBJDUMP
38463  fi
38464fi
38465
38466    else
38467      # If it succeeded, then it was overridden by the user. We will use it
38468      # for the tool.
38469
38470      # First remove it from the list of overridden variables, so we can test
38471      # for unknown variables in the end.
38472      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38473
38474      # Check if the provided tool contains a complete path.
38475      tool_specified="$OBJDUMP"
38476      tool_basename="${tool_specified##*/}"
38477      if test "x$tool_basename" = "x$tool_specified"; then
38478        # A command without a complete path is provided, search $PATH.
38479        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
38480$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
38481        # Extract the first word of "$tool_basename", so it can be a program name with args.
38482set dummy $tool_basename; ac_word=$2
38483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38484$as_echo_n "checking for $ac_word... " >&6; }
38485if ${ac_cv_path_OBJDUMP+:} false; then :
38486  $as_echo_n "(cached) " >&6
38487else
38488  case $OBJDUMP in
38489  [\\/]* | ?:[\\/]*)
38490  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
38491  ;;
38492  *)
38493  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38494for as_dir in $PATH
38495do
38496  IFS=$as_save_IFS
38497  test -z "$as_dir" && as_dir=.
38498    for ac_exec_ext in '' $ac_executable_extensions; do
38499  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38500    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
38501    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38502    break 2
38503  fi
38504done
38505  done
38506IFS=$as_save_IFS
38507
38508  ;;
38509esac
38510fi
38511OBJDUMP=$ac_cv_path_OBJDUMP
38512if test -n "$OBJDUMP"; then
38513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38514$as_echo "$OBJDUMP" >&6; }
38515else
38516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38517$as_echo "no" >&6; }
38518fi
38519
38520
38521        if test "x$OBJDUMP" = x; then
38522          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38523        fi
38524      else
38525        # Otherwise we believe it is a complete path. Use it as it is.
38526        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
38527$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
38528        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
38529$as_echo_n "checking for OBJDUMP... " >&6; }
38530        if test ! -x "$tool_specified"; then
38531          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38532$as_echo "not found" >&6; }
38533          as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
38534        fi
38535        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38536$as_echo "$tool_specified" >&6; }
38537      fi
38538    fi
38539  fi
38540
38541
38542  if test "x$OBJDUMP" != x; then
38543    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
38544    # bails if argument is missing.
38545
38546  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38547
38548  # First separate the path from the arguments. This will split at the first
38549  # space.
38550  complete="$OBJDUMP"
38551  path="${complete%% *}"
38552  tmp="$complete EOL"
38553  arguments="${tmp#* }"
38554
38555  # Input might be given as Windows format, start by converting to
38556  # unix format.
38557  new_path=`$CYGPATH -u "$path"`
38558
38559  # Now try to locate executable using which
38560  new_path=`$WHICH "$new_path" 2> /dev/null`
38561  # bat and cmd files are not always considered executable in cygwin causing which
38562  # to not find them
38563  if test "x$new_path" = x \
38564      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38565      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38566    new_path=`$CYGPATH -u "$path"`
38567  fi
38568  if test "x$new_path" = x; then
38569    # Oops. Which didn't find the executable.
38570    # The splitting of arguments from the executable at a space might have been incorrect,
38571    # since paths with space are more likely in Windows. Give it another try with the whole
38572    # argument.
38573    path="$complete"
38574    arguments="EOL"
38575    new_path=`$CYGPATH -u "$path"`
38576    new_path=`$WHICH "$new_path" 2> /dev/null`
38577    # bat and cmd files are not always considered executable in cygwin causing which
38578    # to not find them
38579    if test "x$new_path" = x \
38580        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38581        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38582      new_path=`$CYGPATH -u "$path"`
38583    fi
38584    if test "x$new_path" = x; then
38585      # It's still not found. Now this is an unrecoverable error.
38586      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38587$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38588      has_space=`$ECHO "$complete" | $GREP " "`
38589      if test "x$has_space" != x; then
38590        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38591$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38592      fi
38593      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38594    fi
38595  fi
38596
38597  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38598  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38599  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38600  # "foo.exe" is OK but "foo" is an error.
38601  #
38602  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38603  # It is also a way to make sure we got the proper file name for the real test later on.
38604  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38605  if test "x$test_shortpath" = x; then
38606    # Short path failed, file does not exist as specified.
38607    # Try adding .exe or .cmd
38608    if test -f "${new_path}.exe"; then
38609      input_to_shortpath="${new_path}.exe"
38610    elif test -f "${new_path}.cmd"; then
38611      input_to_shortpath="${new_path}.cmd"
38612    else
38613      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
38614$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
38615      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38616$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38617      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38618    fi
38619  else
38620    input_to_shortpath="$new_path"
38621  fi
38622
38623  # Call helper function which possibly converts this using DOS-style short mode.
38624  # If so, the updated path is stored in $new_path.
38625  new_path="$input_to_shortpath"
38626
38627  input_path="$input_to_shortpath"
38628  # Check if we need to convert this using DOS-style short mode. If the path
38629  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38630  # take no chances and rewrite it.
38631  # Note: m4 eats our [], so we need to use [ and ] instead.
38632  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38633  if test "x$has_forbidden_chars" != x; then
38634    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38635    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38636    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38637    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38638      # Going to short mode and back again did indeed matter. Since short mode is
38639      # case insensitive, let's make it lowercase to improve readability.
38640      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38641      # Now convert it back to Unix-stile (cygpath)
38642      input_path=`$CYGPATH -u "$shortmode_path"`
38643      new_path="$input_path"
38644    fi
38645  fi
38646
38647  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38648  if test "x$test_cygdrive_prefix" = x; then
38649    # As a simple fix, exclude /usr/bin since it's not a real path.
38650    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38651      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38652      # a path prefixed by /cygdrive for fixpath to work.
38653      new_path="$CYGWIN_ROOT_PATH$input_path"
38654    fi
38655  fi
38656
38657  # remove trailing .exe if any
38658  new_path="${new_path/%.exe/}"
38659
38660  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38661
38662  # First separate the path from the arguments. This will split at the first
38663  # space.
38664  complete="$OBJDUMP"
38665  path="${complete%% *}"
38666  tmp="$complete EOL"
38667  arguments="${tmp#* }"
38668
38669  # Input might be given as Windows format, start by converting to
38670  # unix format.
38671  new_path="$path"
38672
38673  windows_path="$new_path"
38674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38675    unix_path=`$CYGPATH -u "$windows_path"`
38676    new_path="$unix_path"
38677  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38678    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38679    new_path="$unix_path"
38680  fi
38681
38682
38683  # Now try to locate executable using which
38684  new_path=`$WHICH "$new_path" 2> /dev/null`
38685
38686  if test "x$new_path" = x; then
38687    # Oops. Which didn't find the executable.
38688    # The splitting of arguments from the executable at a space might have been incorrect,
38689    # since paths with space are more likely in Windows. Give it another try with the whole
38690    # argument.
38691    path="$complete"
38692    arguments="EOL"
38693    new_path="$path"
38694
38695  windows_path="$new_path"
38696  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38697    unix_path=`$CYGPATH -u "$windows_path"`
38698    new_path="$unix_path"
38699  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38700    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38701    new_path="$unix_path"
38702  fi
38703
38704
38705    new_path=`$WHICH "$new_path" 2> /dev/null`
38706
38707    if test "x$new_path" = x; then
38708      # It's still not found. Now this is an unrecoverable error.
38709      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38710$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38711      has_space=`$ECHO "$complete" | $GREP " "`
38712      if test "x$has_space" != x; then
38713        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38714$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38715      fi
38716      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38717    fi
38718  fi
38719
38720  # Now new_path has a complete unix path to the binary
38721  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38722    # Keep paths in /bin as-is, but remove trailing .exe if any
38723    new_path="${new_path/%.exe/}"
38724    # Do not save /bin paths to all_fixpath_prefixes!
38725  else
38726    # Not in mixed or Windows style, start by that.
38727    new_path=`cmd //c echo $new_path`
38728
38729  input_path="$new_path"
38730  # Check if we need to convert this using DOS-style short mode. If the path
38731  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38732  # take no chances and rewrite it.
38733  # Note: m4 eats our [], so we need to use [ and ] instead.
38734  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38735  if test "x$has_forbidden_chars" != x; then
38736    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38737    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38738  fi
38739
38740    # Output is in $new_path
38741
38742  windows_path="$new_path"
38743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38744    unix_path=`$CYGPATH -u "$windows_path"`
38745    new_path="$unix_path"
38746  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38747    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38748    new_path="$unix_path"
38749  fi
38750
38751    # remove trailing .exe if any
38752    new_path="${new_path/%.exe/}"
38753
38754    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38755    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38756  fi
38757
38758  else
38759    # We're on a posix platform. Hooray! :)
38760    # First separate the path from the arguments. This will split at the first
38761    # space.
38762    complete="$OBJDUMP"
38763    path="${complete%% *}"
38764    tmp="$complete EOL"
38765    arguments="${tmp#* }"
38766
38767    # Cannot rely on the command "which" here since it doesn't always work.
38768    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38769    if test -z "$is_absolute_path"; then
38770      # Path to executable is not absolute. Find it.
38771      IFS_save="$IFS"
38772      IFS=:
38773      for p in $PATH; do
38774        if test -f "$p/$path" && test -x "$p/$path"; then
38775          new_path="$p/$path"
38776          break
38777        fi
38778      done
38779      IFS="$IFS_save"
38780    else
38781      # This is an absolute path, we can use it without further modifications.
38782      new_path="$path"
38783    fi
38784
38785    if test "x$new_path" = x; then
38786      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38787$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38788      has_space=`$ECHO "$complete" | $GREP " "`
38789      if test "x$has_space" != x; then
38790        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38791$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38792      fi
38793      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38794    fi
38795  fi
38796
38797  # Now join together the path and the arguments once again
38798  if test "x$arguments" != xEOL; then
38799    new_complete="$new_path ${arguments% *}"
38800  else
38801    new_complete="$new_path"
38802  fi
38803
38804  if test "x$complete" != "x$new_complete"; then
38805    OBJDUMP="$new_complete"
38806    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
38807$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
38808  fi
38809
38810  fi
38811
38812
38813  # Restore old path.
38814  PATH="$OLD_PATH"
38815
38816  # Restore the flags to the user specified values.
38817  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
38818  CFLAGS="$ORG_CFLAGS"
38819  CXXFLAGS="$ORG_CXXFLAGS"
38820  OBJCFLAGS="$ORG_OBJCFLAGS"
38821
38822
38823# Finally do some processing after the detection phase
38824
38825  if test "x$COMPILE_TYPE" = "xcross"; then
38826    # Now we need to find a C/C++ compiler that can build executables for the
38827    # build platform. We can't use the AC_PROG_CC macro, since it can only be
38828    # used once. Also, we need to do this without adding a tools dir to the
38829    # path, otherwise we might pick up cross-compilers which don't use standard
38830    # naming.
38831
38832    # FIXME: we should list the discovered compilers as an exclude pattern!
38833    # If we do that, we can do this detection before POST_DETECTION, and still
38834    # find the build compilers in the tools dir, if needed.
38835
38836
38837  # Publish this variable in the help.
38838
38839
38840  if test "x$BUILD_CC" = x; then
38841    # The variable is not set by user, try to locate tool using the code snippet
38842    for ac_prog in cl cc gcc
38843do
38844  # Extract the first word of "$ac_prog", so it can be a program name with args.
38845set dummy $ac_prog; ac_word=$2
38846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38847$as_echo_n "checking for $ac_word... " >&6; }
38848if ${ac_cv_path_BUILD_CC+:} false; then :
38849  $as_echo_n "(cached) " >&6
38850else
38851  case $BUILD_CC in
38852  [\\/]* | ?:[\\/]*)
38853  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38854  ;;
38855  *)
38856  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38857for as_dir in $PATH
38858do
38859  IFS=$as_save_IFS
38860  test -z "$as_dir" && as_dir=.
38861    for ac_exec_ext in '' $ac_executable_extensions; do
38862  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38863    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38864    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38865    break 2
38866  fi
38867done
38868  done
38869IFS=$as_save_IFS
38870
38871  ;;
38872esac
38873fi
38874BUILD_CC=$ac_cv_path_BUILD_CC
38875if test -n "$BUILD_CC"; then
38876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
38877$as_echo "$BUILD_CC" >&6; }
38878else
38879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38880$as_echo "no" >&6; }
38881fi
38882
38883
38884  test -n "$BUILD_CC" && break
38885done
38886
38887  else
38888    # The variable is set, but is it from the command line or the environment?
38889
38890    # Try to remove the string !BUILD_CC! from our list.
38891    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
38892    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38893      # If it failed, the variable was not from the command line. Ignore it,
38894      # but warn the user (except for BASH, which is always set by the calling BASH).
38895      if test "xBUILD_CC" != xBASH; then
38896        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
38897$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
38898      fi
38899      # Try to locate tool using the code snippet
38900      for ac_prog in cl cc gcc
38901do
38902  # Extract the first word of "$ac_prog", so it can be a program name with args.
38903set dummy $ac_prog; ac_word=$2
38904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38905$as_echo_n "checking for $ac_word... " >&6; }
38906if ${ac_cv_path_BUILD_CC+:} false; then :
38907  $as_echo_n "(cached) " >&6
38908else
38909  case $BUILD_CC in
38910  [\\/]* | ?:[\\/]*)
38911  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38912  ;;
38913  *)
38914  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38915for as_dir in $PATH
38916do
38917  IFS=$as_save_IFS
38918  test -z "$as_dir" && as_dir=.
38919    for ac_exec_ext in '' $ac_executable_extensions; do
38920  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38921    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38922    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38923    break 2
38924  fi
38925done
38926  done
38927IFS=$as_save_IFS
38928
38929  ;;
38930esac
38931fi
38932BUILD_CC=$ac_cv_path_BUILD_CC
38933if test -n "$BUILD_CC"; then
38934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
38935$as_echo "$BUILD_CC" >&6; }
38936else
38937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38938$as_echo "no" >&6; }
38939fi
38940
38941
38942  test -n "$BUILD_CC" && break
38943done
38944
38945    else
38946      # If it succeeded, then it was overridden by the user. We will use it
38947      # for the tool.
38948
38949      # First remove it from the list of overridden variables, so we can test
38950      # for unknown variables in the end.
38951      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38952
38953      # Check if the provided tool contains a complete path.
38954      tool_specified="$BUILD_CC"
38955      tool_basename="${tool_specified##*/}"
38956      if test "x$tool_basename" = "x$tool_specified"; then
38957        # A command without a complete path is provided, search $PATH.
38958        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
38959$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
38960        # Extract the first word of "$tool_basename", so it can be a program name with args.
38961set dummy $tool_basename; ac_word=$2
38962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38963$as_echo_n "checking for $ac_word... " >&6; }
38964if ${ac_cv_path_BUILD_CC+:} false; then :
38965  $as_echo_n "(cached) " >&6
38966else
38967  case $BUILD_CC in
38968  [\\/]* | ?:[\\/]*)
38969  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38970  ;;
38971  *)
38972  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38973for as_dir in $PATH
38974do
38975  IFS=$as_save_IFS
38976  test -z "$as_dir" && as_dir=.
38977    for ac_exec_ext in '' $ac_executable_extensions; do
38978  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38979    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38980    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38981    break 2
38982  fi
38983done
38984  done
38985IFS=$as_save_IFS
38986
38987  ;;
38988esac
38989fi
38990BUILD_CC=$ac_cv_path_BUILD_CC
38991if test -n "$BUILD_CC"; then
38992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
38993$as_echo "$BUILD_CC" >&6; }
38994else
38995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38996$as_echo "no" >&6; }
38997fi
38998
38999
39000        if test "x$BUILD_CC" = x; then
39001          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39002        fi
39003      else
39004        # Otherwise we believe it is a complete path. Use it as it is.
39005        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
39006$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
39007        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
39008$as_echo_n "checking for BUILD_CC... " >&6; }
39009        if test ! -x "$tool_specified"; then
39010          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39011$as_echo "not found" >&6; }
39012          as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
39013        fi
39014        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39015$as_echo "$tool_specified" >&6; }
39016      fi
39017    fi
39018  fi
39019
39020
39021
39022  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39023
39024  # First separate the path from the arguments. This will split at the first
39025  # space.
39026  complete="$BUILD_CC"
39027  path="${complete%% *}"
39028  tmp="$complete EOL"
39029  arguments="${tmp#* }"
39030
39031  # Input might be given as Windows format, start by converting to
39032  # unix format.
39033  new_path=`$CYGPATH -u "$path"`
39034
39035  # Now try to locate executable using which
39036  new_path=`$WHICH "$new_path" 2> /dev/null`
39037  # bat and cmd files are not always considered executable in cygwin causing which
39038  # to not find them
39039  if test "x$new_path" = x \
39040      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39041      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39042    new_path=`$CYGPATH -u "$path"`
39043  fi
39044  if test "x$new_path" = x; then
39045    # Oops. Which didn't find the executable.
39046    # The splitting of arguments from the executable at a space might have been incorrect,
39047    # since paths with space are more likely in Windows. Give it another try with the whole
39048    # argument.
39049    path="$complete"
39050    arguments="EOL"
39051    new_path=`$CYGPATH -u "$path"`
39052    new_path=`$WHICH "$new_path" 2> /dev/null`
39053    # bat and cmd files are not always considered executable in cygwin causing which
39054    # to not find them
39055    if test "x$new_path" = x \
39056        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39057        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39058      new_path=`$CYGPATH -u "$path"`
39059    fi
39060    if test "x$new_path" = x; then
39061      # It's still not found. Now this is an unrecoverable error.
39062      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39063$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39064      has_space=`$ECHO "$complete" | $GREP " "`
39065      if test "x$has_space" != x; then
39066        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39067$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39068      fi
39069      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39070    fi
39071  fi
39072
39073  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39074  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39075  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39076  # "foo.exe" is OK but "foo" is an error.
39077  #
39078  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39079  # It is also a way to make sure we got the proper file name for the real test later on.
39080  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39081  if test "x$test_shortpath" = x; then
39082    # Short path failed, file does not exist as specified.
39083    # Try adding .exe or .cmd
39084    if test -f "${new_path}.exe"; then
39085      input_to_shortpath="${new_path}.exe"
39086    elif test -f "${new_path}.cmd"; then
39087      input_to_shortpath="${new_path}.cmd"
39088    else
39089      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
39090$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
39091      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39092$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39093      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39094    fi
39095  else
39096    input_to_shortpath="$new_path"
39097  fi
39098
39099  # Call helper function which possibly converts this using DOS-style short mode.
39100  # If so, the updated path is stored in $new_path.
39101  new_path="$input_to_shortpath"
39102
39103  input_path="$input_to_shortpath"
39104  # Check if we need to convert this using DOS-style short mode. If the path
39105  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39106  # take no chances and rewrite it.
39107  # Note: m4 eats our [], so we need to use [ and ] instead.
39108  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39109  if test "x$has_forbidden_chars" != x; then
39110    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39111    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39112    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39113    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39114      # Going to short mode and back again did indeed matter. Since short mode is
39115      # case insensitive, let's make it lowercase to improve readability.
39116      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39117      # Now convert it back to Unix-stile (cygpath)
39118      input_path=`$CYGPATH -u "$shortmode_path"`
39119      new_path="$input_path"
39120    fi
39121  fi
39122
39123  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39124  if test "x$test_cygdrive_prefix" = x; then
39125    # As a simple fix, exclude /usr/bin since it's not a real path.
39126    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39127      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39128      # a path prefixed by /cygdrive for fixpath to work.
39129      new_path="$CYGWIN_ROOT_PATH$input_path"
39130    fi
39131  fi
39132
39133  # remove trailing .exe if any
39134  new_path="${new_path/%.exe/}"
39135
39136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39137
39138  # First separate the path from the arguments. This will split at the first
39139  # space.
39140  complete="$BUILD_CC"
39141  path="${complete%% *}"
39142  tmp="$complete EOL"
39143  arguments="${tmp#* }"
39144
39145  # Input might be given as Windows format, start by converting to
39146  # unix format.
39147  new_path="$path"
39148
39149  windows_path="$new_path"
39150  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39151    unix_path=`$CYGPATH -u "$windows_path"`
39152    new_path="$unix_path"
39153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39154    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39155    new_path="$unix_path"
39156  fi
39157
39158
39159  # Now try to locate executable using which
39160  new_path=`$WHICH "$new_path" 2> /dev/null`
39161
39162  if test "x$new_path" = x; then
39163    # Oops. Which didn't find the executable.
39164    # The splitting of arguments from the executable at a space might have been incorrect,
39165    # since paths with space are more likely in Windows. Give it another try with the whole
39166    # argument.
39167    path="$complete"
39168    arguments="EOL"
39169    new_path="$path"
39170
39171  windows_path="$new_path"
39172  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39173    unix_path=`$CYGPATH -u "$windows_path"`
39174    new_path="$unix_path"
39175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39176    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39177    new_path="$unix_path"
39178  fi
39179
39180
39181    new_path=`$WHICH "$new_path" 2> /dev/null`
39182
39183    if test "x$new_path" = x; then
39184      # It's still not found. Now this is an unrecoverable error.
39185      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39186$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39187      has_space=`$ECHO "$complete" | $GREP " "`
39188      if test "x$has_space" != x; then
39189        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39190$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39191      fi
39192      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39193    fi
39194  fi
39195
39196  # Now new_path has a complete unix path to the binary
39197  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39198    # Keep paths in /bin as-is, but remove trailing .exe if any
39199    new_path="${new_path/%.exe/}"
39200    # Do not save /bin paths to all_fixpath_prefixes!
39201  else
39202    # Not in mixed or Windows style, start by that.
39203    new_path=`cmd //c echo $new_path`
39204
39205  input_path="$new_path"
39206  # Check if we need to convert this using DOS-style short mode. If the path
39207  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39208  # take no chances and rewrite it.
39209  # Note: m4 eats our [], so we need to use [ and ] instead.
39210  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39211  if test "x$has_forbidden_chars" != x; then
39212    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39213    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39214  fi
39215
39216    # Output is in $new_path
39217
39218  windows_path="$new_path"
39219  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39220    unix_path=`$CYGPATH -u "$windows_path"`
39221    new_path="$unix_path"
39222  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39223    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39224    new_path="$unix_path"
39225  fi
39226
39227    # remove trailing .exe if any
39228    new_path="${new_path/%.exe/}"
39229
39230    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39231    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39232  fi
39233
39234  else
39235    # We're on a posix platform. Hooray! :)
39236    # First separate the path from the arguments. This will split at the first
39237    # space.
39238    complete="$BUILD_CC"
39239    path="${complete%% *}"
39240    tmp="$complete EOL"
39241    arguments="${tmp#* }"
39242
39243    # Cannot rely on the command "which" here since it doesn't always work.
39244    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39245    if test -z "$is_absolute_path"; then
39246      # Path to executable is not absolute. Find it.
39247      IFS_save="$IFS"
39248      IFS=:
39249      for p in $PATH; do
39250        if test -f "$p/$path" && test -x "$p/$path"; then
39251          new_path="$p/$path"
39252          break
39253        fi
39254      done
39255      IFS="$IFS_save"
39256    else
39257      # This is an absolute path, we can use it without further modifications.
39258      new_path="$path"
39259    fi
39260
39261    if test "x$new_path" = x; then
39262      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39263$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39264      has_space=`$ECHO "$complete" | $GREP " "`
39265      if test "x$has_space" != x; then
39266        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39267$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39268      fi
39269      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39270    fi
39271  fi
39272
39273  # Now join together the path and the arguments once again
39274  if test "x$arguments" != xEOL; then
39275    new_complete="$new_path ${arguments% *}"
39276  else
39277    new_complete="$new_path"
39278  fi
39279
39280  if test "x$complete" != "x$new_complete"; then
39281    BUILD_CC="$new_complete"
39282    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
39283$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
39284  fi
39285
39286
39287
39288  # Publish this variable in the help.
39289
39290
39291  if test "x$BUILD_CXX" = x; then
39292    # The variable is not set by user, try to locate tool using the code snippet
39293    for ac_prog in cl CC g++
39294do
39295  # Extract the first word of "$ac_prog", so it can be a program name with args.
39296set dummy $ac_prog; ac_word=$2
39297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39298$as_echo_n "checking for $ac_word... " >&6; }
39299if ${ac_cv_path_BUILD_CXX+:} false; then :
39300  $as_echo_n "(cached) " >&6
39301else
39302  case $BUILD_CXX in
39303  [\\/]* | ?:[\\/]*)
39304  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39305  ;;
39306  *)
39307  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39308for as_dir in $PATH
39309do
39310  IFS=$as_save_IFS
39311  test -z "$as_dir" && as_dir=.
39312    for ac_exec_ext in '' $ac_executable_extensions; do
39313  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39314    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39315    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39316    break 2
39317  fi
39318done
39319  done
39320IFS=$as_save_IFS
39321
39322  ;;
39323esac
39324fi
39325BUILD_CXX=$ac_cv_path_BUILD_CXX
39326if test -n "$BUILD_CXX"; then
39327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39328$as_echo "$BUILD_CXX" >&6; }
39329else
39330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39331$as_echo "no" >&6; }
39332fi
39333
39334
39335  test -n "$BUILD_CXX" && break
39336done
39337
39338  else
39339    # The variable is set, but is it from the command line or the environment?
39340
39341    # Try to remove the string !BUILD_CXX! from our list.
39342    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
39343    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39344      # If it failed, the variable was not from the command line. Ignore it,
39345      # but warn the user (except for BASH, which is always set by the calling BASH).
39346      if test "xBUILD_CXX" != xBASH; then
39347        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
39348$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
39349      fi
39350      # Try to locate tool using the code snippet
39351      for ac_prog in cl CC g++
39352do
39353  # Extract the first word of "$ac_prog", so it can be a program name with args.
39354set dummy $ac_prog; ac_word=$2
39355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39356$as_echo_n "checking for $ac_word... " >&6; }
39357if ${ac_cv_path_BUILD_CXX+:} false; then :
39358  $as_echo_n "(cached) " >&6
39359else
39360  case $BUILD_CXX in
39361  [\\/]* | ?:[\\/]*)
39362  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39363  ;;
39364  *)
39365  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39366for as_dir in $PATH
39367do
39368  IFS=$as_save_IFS
39369  test -z "$as_dir" && as_dir=.
39370    for ac_exec_ext in '' $ac_executable_extensions; do
39371  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39372    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39373    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39374    break 2
39375  fi
39376done
39377  done
39378IFS=$as_save_IFS
39379
39380  ;;
39381esac
39382fi
39383BUILD_CXX=$ac_cv_path_BUILD_CXX
39384if test -n "$BUILD_CXX"; then
39385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39386$as_echo "$BUILD_CXX" >&6; }
39387else
39388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39389$as_echo "no" >&6; }
39390fi
39391
39392
39393  test -n "$BUILD_CXX" && break
39394done
39395
39396    else
39397      # If it succeeded, then it was overridden by the user. We will use it
39398      # for the tool.
39399
39400      # First remove it from the list of overridden variables, so we can test
39401      # for unknown variables in the end.
39402      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39403
39404      # Check if the provided tool contains a complete path.
39405      tool_specified="$BUILD_CXX"
39406      tool_basename="${tool_specified##*/}"
39407      if test "x$tool_basename" = "x$tool_specified"; then
39408        # A command without a complete path is provided, search $PATH.
39409        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
39410$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
39411        # Extract the first word of "$tool_basename", so it can be a program name with args.
39412set dummy $tool_basename; ac_word=$2
39413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39414$as_echo_n "checking for $ac_word... " >&6; }
39415if ${ac_cv_path_BUILD_CXX+:} false; then :
39416  $as_echo_n "(cached) " >&6
39417else
39418  case $BUILD_CXX in
39419  [\\/]* | ?:[\\/]*)
39420  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39421  ;;
39422  *)
39423  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39424for as_dir in $PATH
39425do
39426  IFS=$as_save_IFS
39427  test -z "$as_dir" && as_dir=.
39428    for ac_exec_ext in '' $ac_executable_extensions; do
39429  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39430    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39431    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39432    break 2
39433  fi
39434done
39435  done
39436IFS=$as_save_IFS
39437
39438  ;;
39439esac
39440fi
39441BUILD_CXX=$ac_cv_path_BUILD_CXX
39442if test -n "$BUILD_CXX"; then
39443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39444$as_echo "$BUILD_CXX" >&6; }
39445else
39446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39447$as_echo "no" >&6; }
39448fi
39449
39450
39451        if test "x$BUILD_CXX" = x; then
39452          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39453        fi
39454      else
39455        # Otherwise we believe it is a complete path. Use it as it is.
39456        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
39457$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
39458        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
39459$as_echo_n "checking for BUILD_CXX... " >&6; }
39460        if test ! -x "$tool_specified"; then
39461          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39462$as_echo "not found" >&6; }
39463          as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
39464        fi
39465        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39466$as_echo "$tool_specified" >&6; }
39467      fi
39468    fi
39469  fi
39470
39471
39472
39473  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39474
39475  # First separate the path from the arguments. This will split at the first
39476  # space.
39477  complete="$BUILD_CXX"
39478  path="${complete%% *}"
39479  tmp="$complete EOL"
39480  arguments="${tmp#* }"
39481
39482  # Input might be given as Windows format, start by converting to
39483  # unix format.
39484  new_path=`$CYGPATH -u "$path"`
39485
39486  # Now try to locate executable using which
39487  new_path=`$WHICH "$new_path" 2> /dev/null`
39488  # bat and cmd files are not always considered executable in cygwin causing which
39489  # to not find them
39490  if test "x$new_path" = x \
39491      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39492      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39493    new_path=`$CYGPATH -u "$path"`
39494  fi
39495  if test "x$new_path" = x; then
39496    # Oops. Which didn't find the executable.
39497    # The splitting of arguments from the executable at a space might have been incorrect,
39498    # since paths with space are more likely in Windows. Give it another try with the whole
39499    # argument.
39500    path="$complete"
39501    arguments="EOL"
39502    new_path=`$CYGPATH -u "$path"`
39503    new_path=`$WHICH "$new_path" 2> /dev/null`
39504    # bat and cmd files are not always considered executable in cygwin causing which
39505    # to not find them
39506    if test "x$new_path" = x \
39507        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39508        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39509      new_path=`$CYGPATH -u "$path"`
39510    fi
39511    if test "x$new_path" = x; then
39512      # It's still not found. Now this is an unrecoverable error.
39513      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39514$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39515      has_space=`$ECHO "$complete" | $GREP " "`
39516      if test "x$has_space" != x; then
39517        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39518$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39519      fi
39520      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39521    fi
39522  fi
39523
39524  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39525  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39526  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39527  # "foo.exe" is OK but "foo" is an error.
39528  #
39529  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39530  # It is also a way to make sure we got the proper file name for the real test later on.
39531  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39532  if test "x$test_shortpath" = x; then
39533    # Short path failed, file does not exist as specified.
39534    # Try adding .exe or .cmd
39535    if test -f "${new_path}.exe"; then
39536      input_to_shortpath="${new_path}.exe"
39537    elif test -f "${new_path}.cmd"; then
39538      input_to_shortpath="${new_path}.cmd"
39539    else
39540      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
39541$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
39542      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39543$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39544      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39545    fi
39546  else
39547    input_to_shortpath="$new_path"
39548  fi
39549
39550  # Call helper function which possibly converts this using DOS-style short mode.
39551  # If so, the updated path is stored in $new_path.
39552  new_path="$input_to_shortpath"
39553
39554  input_path="$input_to_shortpath"
39555  # Check if we need to convert this using DOS-style short mode. If the path
39556  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39557  # take no chances and rewrite it.
39558  # Note: m4 eats our [], so we need to use [ and ] instead.
39559  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39560  if test "x$has_forbidden_chars" != x; then
39561    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39562    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39563    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39564    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39565      # Going to short mode and back again did indeed matter. Since short mode is
39566      # case insensitive, let's make it lowercase to improve readability.
39567      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39568      # Now convert it back to Unix-stile (cygpath)
39569      input_path=`$CYGPATH -u "$shortmode_path"`
39570      new_path="$input_path"
39571    fi
39572  fi
39573
39574  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39575  if test "x$test_cygdrive_prefix" = x; then
39576    # As a simple fix, exclude /usr/bin since it's not a real path.
39577    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39578      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39579      # a path prefixed by /cygdrive for fixpath to work.
39580      new_path="$CYGWIN_ROOT_PATH$input_path"
39581    fi
39582  fi
39583
39584  # remove trailing .exe if any
39585  new_path="${new_path/%.exe/}"
39586
39587  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39588
39589  # First separate the path from the arguments. This will split at the first
39590  # space.
39591  complete="$BUILD_CXX"
39592  path="${complete%% *}"
39593  tmp="$complete EOL"
39594  arguments="${tmp#* }"
39595
39596  # Input might be given as Windows format, start by converting to
39597  # unix format.
39598  new_path="$path"
39599
39600  windows_path="$new_path"
39601  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39602    unix_path=`$CYGPATH -u "$windows_path"`
39603    new_path="$unix_path"
39604  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39605    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39606    new_path="$unix_path"
39607  fi
39608
39609
39610  # Now try to locate executable using which
39611  new_path=`$WHICH "$new_path" 2> /dev/null`
39612
39613  if test "x$new_path" = x; then
39614    # Oops. Which didn't find the executable.
39615    # The splitting of arguments from the executable at a space might have been incorrect,
39616    # since paths with space are more likely in Windows. Give it another try with the whole
39617    # argument.
39618    path="$complete"
39619    arguments="EOL"
39620    new_path="$path"
39621
39622  windows_path="$new_path"
39623  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39624    unix_path=`$CYGPATH -u "$windows_path"`
39625    new_path="$unix_path"
39626  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39627    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39628    new_path="$unix_path"
39629  fi
39630
39631
39632    new_path=`$WHICH "$new_path" 2> /dev/null`
39633
39634    if test "x$new_path" = x; then
39635      # It's still not found. Now this is an unrecoverable error.
39636      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39637$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39638      has_space=`$ECHO "$complete" | $GREP " "`
39639      if test "x$has_space" != x; then
39640        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39641$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39642      fi
39643      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39644    fi
39645  fi
39646
39647  # Now new_path has a complete unix path to the binary
39648  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39649    # Keep paths in /bin as-is, but remove trailing .exe if any
39650    new_path="${new_path/%.exe/}"
39651    # Do not save /bin paths to all_fixpath_prefixes!
39652  else
39653    # Not in mixed or Windows style, start by that.
39654    new_path=`cmd //c echo $new_path`
39655
39656  input_path="$new_path"
39657  # Check if we need to convert this using DOS-style short mode. If the path
39658  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39659  # take no chances and rewrite it.
39660  # Note: m4 eats our [], so we need to use [ and ] instead.
39661  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39662  if test "x$has_forbidden_chars" != x; then
39663    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39664    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39665  fi
39666
39667    # Output is in $new_path
39668
39669  windows_path="$new_path"
39670  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39671    unix_path=`$CYGPATH -u "$windows_path"`
39672    new_path="$unix_path"
39673  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39674    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39675    new_path="$unix_path"
39676  fi
39677
39678    # remove trailing .exe if any
39679    new_path="${new_path/%.exe/}"
39680
39681    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39682    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39683  fi
39684
39685  else
39686    # We're on a posix platform. Hooray! :)
39687    # First separate the path from the arguments. This will split at the first
39688    # space.
39689    complete="$BUILD_CXX"
39690    path="${complete%% *}"
39691    tmp="$complete EOL"
39692    arguments="${tmp#* }"
39693
39694    # Cannot rely on the command "which" here since it doesn't always work.
39695    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39696    if test -z "$is_absolute_path"; then
39697      # Path to executable is not absolute. Find it.
39698      IFS_save="$IFS"
39699      IFS=:
39700      for p in $PATH; do
39701        if test -f "$p/$path" && test -x "$p/$path"; then
39702          new_path="$p/$path"
39703          break
39704        fi
39705      done
39706      IFS="$IFS_save"
39707    else
39708      # This is an absolute path, we can use it without further modifications.
39709      new_path="$path"
39710    fi
39711
39712    if test "x$new_path" = x; then
39713      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39714$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39715      has_space=`$ECHO "$complete" | $GREP " "`
39716      if test "x$has_space" != x; then
39717        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39718$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39719      fi
39720      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39721    fi
39722  fi
39723
39724  # Now join together the path and the arguments once again
39725  if test "x$arguments" != xEOL; then
39726    new_complete="$new_path ${arguments% *}"
39727  else
39728    new_complete="$new_path"
39729  fi
39730
39731  if test "x$complete" != "x$new_complete"; then
39732    BUILD_CXX="$new_complete"
39733    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
39734$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
39735  fi
39736
39737
39738
39739  # Publish this variable in the help.
39740
39741
39742  if test "x$BUILD_LD" = x; then
39743    # The variable is not set by user, try to locate tool using the code snippet
39744    for ac_prog in ld
39745do
39746  # Extract the first word of "$ac_prog", so it can be a program name with args.
39747set dummy $ac_prog; ac_word=$2
39748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39749$as_echo_n "checking for $ac_word... " >&6; }
39750if ${ac_cv_path_BUILD_LD+:} false; then :
39751  $as_echo_n "(cached) " >&6
39752else
39753  case $BUILD_LD in
39754  [\\/]* | ?:[\\/]*)
39755  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39756  ;;
39757  *)
39758  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39759for as_dir in $PATH
39760do
39761  IFS=$as_save_IFS
39762  test -z "$as_dir" && as_dir=.
39763    for ac_exec_ext in '' $ac_executable_extensions; do
39764  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39765    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39766    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39767    break 2
39768  fi
39769done
39770  done
39771IFS=$as_save_IFS
39772
39773  ;;
39774esac
39775fi
39776BUILD_LD=$ac_cv_path_BUILD_LD
39777if test -n "$BUILD_LD"; then
39778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39779$as_echo "$BUILD_LD" >&6; }
39780else
39781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39782$as_echo "no" >&6; }
39783fi
39784
39785
39786  test -n "$BUILD_LD" && break
39787done
39788
39789  else
39790    # The variable is set, but is it from the command line or the environment?
39791
39792    # Try to remove the string !BUILD_LD! from our list.
39793    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
39794    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39795      # If it failed, the variable was not from the command line. Ignore it,
39796      # but warn the user (except for BASH, which is always set by the calling BASH).
39797      if test "xBUILD_LD" != xBASH; then
39798        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
39799$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
39800      fi
39801      # Try to locate tool using the code snippet
39802      for ac_prog in ld
39803do
39804  # Extract the first word of "$ac_prog", so it can be a program name with args.
39805set dummy $ac_prog; ac_word=$2
39806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39807$as_echo_n "checking for $ac_word... " >&6; }
39808if ${ac_cv_path_BUILD_LD+:} false; then :
39809  $as_echo_n "(cached) " >&6
39810else
39811  case $BUILD_LD in
39812  [\\/]* | ?:[\\/]*)
39813  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39814  ;;
39815  *)
39816  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39817for as_dir in $PATH
39818do
39819  IFS=$as_save_IFS
39820  test -z "$as_dir" && as_dir=.
39821    for ac_exec_ext in '' $ac_executable_extensions; do
39822  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39823    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39824    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39825    break 2
39826  fi
39827done
39828  done
39829IFS=$as_save_IFS
39830
39831  ;;
39832esac
39833fi
39834BUILD_LD=$ac_cv_path_BUILD_LD
39835if test -n "$BUILD_LD"; then
39836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39837$as_echo "$BUILD_LD" >&6; }
39838else
39839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39840$as_echo "no" >&6; }
39841fi
39842
39843
39844  test -n "$BUILD_LD" && break
39845done
39846
39847    else
39848      # If it succeeded, then it was overridden by the user. We will use it
39849      # for the tool.
39850
39851      # First remove it from the list of overridden variables, so we can test
39852      # for unknown variables in the end.
39853      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39854
39855      # Check if the provided tool contains a complete path.
39856      tool_specified="$BUILD_LD"
39857      tool_basename="${tool_specified##*/}"
39858      if test "x$tool_basename" = "x$tool_specified"; then
39859        # A command without a complete path is provided, search $PATH.
39860        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
39861$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
39862        # Extract the first word of "$tool_basename", so it can be a program name with args.
39863set dummy $tool_basename; ac_word=$2
39864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39865$as_echo_n "checking for $ac_word... " >&6; }
39866if ${ac_cv_path_BUILD_LD+:} false; then :
39867  $as_echo_n "(cached) " >&6
39868else
39869  case $BUILD_LD in
39870  [\\/]* | ?:[\\/]*)
39871  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39872  ;;
39873  *)
39874  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39875for as_dir in $PATH
39876do
39877  IFS=$as_save_IFS
39878  test -z "$as_dir" && as_dir=.
39879    for ac_exec_ext in '' $ac_executable_extensions; do
39880  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39881    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39882    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39883    break 2
39884  fi
39885done
39886  done
39887IFS=$as_save_IFS
39888
39889  ;;
39890esac
39891fi
39892BUILD_LD=$ac_cv_path_BUILD_LD
39893if test -n "$BUILD_LD"; then
39894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39895$as_echo "$BUILD_LD" >&6; }
39896else
39897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39898$as_echo "no" >&6; }
39899fi
39900
39901
39902        if test "x$BUILD_LD" = x; then
39903          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39904        fi
39905      else
39906        # Otherwise we believe it is a complete path. Use it as it is.
39907        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
39908$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
39909        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
39910$as_echo_n "checking for BUILD_LD... " >&6; }
39911        if test ! -x "$tool_specified"; then
39912          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39913$as_echo "not found" >&6; }
39914          as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
39915        fi
39916        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39917$as_echo "$tool_specified" >&6; }
39918      fi
39919    fi
39920  fi
39921
39922
39923
39924  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39925
39926  # First separate the path from the arguments. This will split at the first
39927  # space.
39928  complete="$BUILD_LD"
39929  path="${complete%% *}"
39930  tmp="$complete EOL"
39931  arguments="${tmp#* }"
39932
39933  # Input might be given as Windows format, start by converting to
39934  # unix format.
39935  new_path=`$CYGPATH -u "$path"`
39936
39937  # Now try to locate executable using which
39938  new_path=`$WHICH "$new_path" 2> /dev/null`
39939  # bat and cmd files are not always considered executable in cygwin causing which
39940  # to not find them
39941  if test "x$new_path" = x \
39942      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39943      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39944    new_path=`$CYGPATH -u "$path"`
39945  fi
39946  if test "x$new_path" = x; then
39947    # Oops. Which didn't find the executable.
39948    # The splitting of arguments from the executable at a space might have been incorrect,
39949    # since paths with space are more likely in Windows. Give it another try with the whole
39950    # argument.
39951    path="$complete"
39952    arguments="EOL"
39953    new_path=`$CYGPATH -u "$path"`
39954    new_path=`$WHICH "$new_path" 2> /dev/null`
39955    # bat and cmd files are not always considered executable in cygwin causing which
39956    # to not find them
39957    if test "x$new_path" = x \
39958        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39959        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39960      new_path=`$CYGPATH -u "$path"`
39961    fi
39962    if test "x$new_path" = x; then
39963      # It's still not found. Now this is an unrecoverable error.
39964      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
39965$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
39966      has_space=`$ECHO "$complete" | $GREP " "`
39967      if test "x$has_space" != x; then
39968        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39969$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39970      fi
39971      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
39972    fi
39973  fi
39974
39975  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39976  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39977  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39978  # "foo.exe" is OK but "foo" is an error.
39979  #
39980  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39981  # It is also a way to make sure we got the proper file name for the real test later on.
39982  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39983  if test "x$test_shortpath" = x; then
39984    # Short path failed, file does not exist as specified.
39985    # Try adding .exe or .cmd
39986    if test -f "${new_path}.exe"; then
39987      input_to_shortpath="${new_path}.exe"
39988    elif test -f "${new_path}.cmd"; then
39989      input_to_shortpath="${new_path}.cmd"
39990    else
39991      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
39992$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
39993      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39994$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39995      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
39996    fi
39997  else
39998    input_to_shortpath="$new_path"
39999  fi
40000
40001  # Call helper function which possibly converts this using DOS-style short mode.
40002  # If so, the updated path is stored in $new_path.
40003  new_path="$input_to_shortpath"
40004
40005  input_path="$input_to_shortpath"
40006  # Check if we need to convert this using DOS-style short mode. If the path
40007  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40008  # take no chances and rewrite it.
40009  # Note: m4 eats our [], so we need to use [ and ] instead.
40010  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40011  if test "x$has_forbidden_chars" != x; then
40012    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40013    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40014    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40015    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40016      # Going to short mode and back again did indeed matter. Since short mode is
40017      # case insensitive, let's make it lowercase to improve readability.
40018      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40019      # Now convert it back to Unix-stile (cygpath)
40020      input_path=`$CYGPATH -u "$shortmode_path"`
40021      new_path="$input_path"
40022    fi
40023  fi
40024
40025  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40026  if test "x$test_cygdrive_prefix" = x; then
40027    # As a simple fix, exclude /usr/bin since it's not a real path.
40028    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40029      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40030      # a path prefixed by /cygdrive for fixpath to work.
40031      new_path="$CYGWIN_ROOT_PATH$input_path"
40032    fi
40033  fi
40034
40035  # remove trailing .exe if any
40036  new_path="${new_path/%.exe/}"
40037
40038  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40039
40040  # First separate the path from the arguments. This will split at the first
40041  # space.
40042  complete="$BUILD_LD"
40043  path="${complete%% *}"
40044  tmp="$complete EOL"
40045  arguments="${tmp#* }"
40046
40047  # Input might be given as Windows format, start by converting to
40048  # unix format.
40049  new_path="$path"
40050
40051  windows_path="$new_path"
40052  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40053    unix_path=`$CYGPATH -u "$windows_path"`
40054    new_path="$unix_path"
40055  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40056    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40057    new_path="$unix_path"
40058  fi
40059
40060
40061  # Now try to locate executable using which
40062  new_path=`$WHICH "$new_path" 2> /dev/null`
40063
40064  if test "x$new_path" = x; then
40065    # Oops. Which didn't find the executable.
40066    # The splitting of arguments from the executable at a space might have been incorrect,
40067    # since paths with space are more likely in Windows. Give it another try with the whole
40068    # argument.
40069    path="$complete"
40070    arguments="EOL"
40071    new_path="$path"
40072
40073  windows_path="$new_path"
40074  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40075    unix_path=`$CYGPATH -u "$windows_path"`
40076    new_path="$unix_path"
40077  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40078    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40079    new_path="$unix_path"
40080  fi
40081
40082
40083    new_path=`$WHICH "$new_path" 2> /dev/null`
40084
40085    if test "x$new_path" = x; then
40086      # It's still not found. Now this is an unrecoverable error.
40087      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40088$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40089      has_space=`$ECHO "$complete" | $GREP " "`
40090      if test "x$has_space" != x; then
40091        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40092$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40093      fi
40094      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40095    fi
40096  fi
40097
40098  # Now new_path has a complete unix path to the binary
40099  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40100    # Keep paths in /bin as-is, but remove trailing .exe if any
40101    new_path="${new_path/%.exe/}"
40102    # Do not save /bin paths to all_fixpath_prefixes!
40103  else
40104    # Not in mixed or Windows style, start by that.
40105    new_path=`cmd //c echo $new_path`
40106
40107  input_path="$new_path"
40108  # Check if we need to convert this using DOS-style short mode. If the path
40109  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40110  # take no chances and rewrite it.
40111  # Note: m4 eats our [], so we need to use [ and ] instead.
40112  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40113  if test "x$has_forbidden_chars" != x; then
40114    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40115    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40116  fi
40117
40118    # Output is in $new_path
40119
40120  windows_path="$new_path"
40121  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40122    unix_path=`$CYGPATH -u "$windows_path"`
40123    new_path="$unix_path"
40124  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40125    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40126    new_path="$unix_path"
40127  fi
40128
40129    # remove trailing .exe if any
40130    new_path="${new_path/%.exe/}"
40131
40132    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40133    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40134  fi
40135
40136  else
40137    # We're on a posix platform. Hooray! :)
40138    # First separate the path from the arguments. This will split at the first
40139    # space.
40140    complete="$BUILD_LD"
40141    path="${complete%% *}"
40142    tmp="$complete EOL"
40143    arguments="${tmp#* }"
40144
40145    # Cannot rely on the command "which" here since it doesn't always work.
40146    is_absolute_path=`$ECHO "$path" | $GREP ^/`
40147    if test -z "$is_absolute_path"; then
40148      # Path to executable is not absolute. Find it.
40149      IFS_save="$IFS"
40150      IFS=:
40151      for p in $PATH; do
40152        if test -f "$p/$path" && test -x "$p/$path"; then
40153          new_path="$p/$path"
40154          break
40155        fi
40156      done
40157      IFS="$IFS_save"
40158    else
40159      # This is an absolute path, we can use it without further modifications.
40160      new_path="$path"
40161    fi
40162
40163    if test "x$new_path" = x; then
40164      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40165$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40166      has_space=`$ECHO "$complete" | $GREP " "`
40167      if test "x$has_space" != x; then
40168        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40169$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40170      fi
40171      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40172    fi
40173  fi
40174
40175  # Now join together the path and the arguments once again
40176  if test "x$arguments" != xEOL; then
40177    new_complete="$new_path ${arguments% *}"
40178  else
40179    new_complete="$new_path"
40180  fi
40181
40182  if test "x$complete" != "x$new_complete"; then
40183    BUILD_LD="$new_complete"
40184    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
40185$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
40186  fi
40187
40188  else
40189    # If we are not cross compiling, use the normal target compilers for
40190    # building the build platform executables.
40191    BUILD_CC="$CC"
40192    BUILD_CXX="$CXX"
40193    BUILD_LD="$LD"
40194  fi
40195
40196
40197
40198
40199
40200
40201  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40202    # For hotspot, we need these in Windows mixed path,
40203    # so rewrite them all. Need added .exe suffix.
40204    HOTSPOT_CXX="$CXX.exe"
40205    HOTSPOT_LD="$LD.exe"
40206    HOTSPOT_MT="$MT.exe"
40207    HOTSPOT_RC="$RC.exe"
40208
40209  unix_path="$HOTSPOT_CXX"
40210  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40211    windows_path=`$CYGPATH -m "$unix_path"`
40212    HOTSPOT_CXX="$windows_path"
40213  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40214    windows_path=`cmd //c echo $unix_path`
40215    HOTSPOT_CXX="$windows_path"
40216  fi
40217
40218
40219  unix_path="$HOTSPOT_LD"
40220  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40221    windows_path=`$CYGPATH -m "$unix_path"`
40222    HOTSPOT_LD="$windows_path"
40223  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40224    windows_path=`cmd //c echo $unix_path`
40225    HOTSPOT_LD="$windows_path"
40226  fi
40227
40228
40229  unix_path="$HOTSPOT_MT"
40230  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40231    windows_path=`$CYGPATH -m "$unix_path"`
40232    HOTSPOT_MT="$windows_path"
40233  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40234    windows_path=`cmd //c echo $unix_path`
40235    HOTSPOT_MT="$windows_path"
40236  fi
40237
40238
40239  unix_path="$HOTSPOT_RC"
40240  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40241    windows_path=`$CYGPATH -m "$unix_path"`
40242    HOTSPOT_RC="$windows_path"
40243  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40244    windows_path=`cmd //c echo $unix_path`
40245    HOTSPOT_RC="$windows_path"
40246  fi
40247
40248
40249
40250  else
40251    HOTSPOT_CXX="$CXX"
40252    HOTSPOT_LD="$LD"
40253  fi
40254
40255
40256
40257  if test  "x$TOOLCHAIN_TYPE" = xclang; then
40258    USE_CLANG=true
40259  fi
40260
40261
40262  # LDEXE is the linker to use, when creating executables. Not really used.
40263  # FIXME: These should just be removed!
40264  LDEXE="$LD"
40265  LDEXECXX="$LDCXX"
40266
40267
40268
40269
40270  # The package path is used only on macosx?
40271  # FIXME: clean this up, and/or move it elsewhere.
40272  PACKAGE_PATH=/opt/local
40273
40274
40275  # Check for extra potential brokenness.
40276  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40277    # On Windows, double-check that we got the right compiler.
40278    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
40279    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
40280    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
40281      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
40282        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
40283      fi
40284    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
40285      if test "x$COMPILER_CPU_TEST" != "xx64"; then
40286        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
40287      fi
40288    fi
40289  fi
40290
40291  if test "x$TOOLCHAIN_TYPE" = xgcc; then
40292    # If this is a --hash-style=gnu system, use --hash-style=both, why?
40293    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
40294    # This is later checked when setting flags.
40295  fi
40296
40297  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
40298  # in executable.'
40299  USING_BROKEN_SUSE_LD=no
40300  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
40301    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
40302$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
40303    echo "SUNWprivate_1.1 { local: *; };" > version-script.map
40304    echo "int main() { }" > main.c
40305    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
40306      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40307$as_echo "no" >&6; }
40308      USING_BROKEN_SUSE_LD=no
40309    else
40310      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40311$as_echo "yes" >&6; }
40312      USING_BROKEN_SUSE_LD=yes
40313    fi
40314    rm -rf version-script.map main.c a.out
40315  fi
40316
40317
40318
40319# Setup the JTReg Regression Test Harness.
40320
40321
40322# Check whether --with-jtreg was given.
40323if test "${with_jtreg+set}" = set; then :
40324  withval=$with_jtreg;
40325else
40326  with_jtreg=no
40327fi
40328
40329
40330  if test "x$with_jtreg" = xno; then
40331    # jtreg disabled
40332    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40333$as_echo_n "checking for jtreg... " >&6; }
40334    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40335$as_echo "no" >&6; }
40336  else
40337    if test "x$with_jtreg" != xyes; then
40338      # with path specified.
40339      JT_HOME="$with_jtreg"
40340    fi
40341
40342    if test "x$JT_HOME" != x; then
40343      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40344$as_echo_n "checking for jtreg... " >&6; }
40345
40346      # use JT_HOME enviroment var.
40347
40348  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40349
40350  # Input might be given as Windows format, start by converting to
40351  # unix format.
40352  path="$JT_HOME"
40353  new_path=`$CYGPATH -u "$path"`
40354
40355  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40356  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40357  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40358  # "foo.exe" is OK but "foo" is an error.
40359  #
40360  # This test is therefore slightly more accurate than "test -f" to check for file precense.
40361  # It is also a way to make sure we got the proper file name for the real test later on.
40362  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40363  if test "x$test_shortpath" = x; then
40364    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40365$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40366    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
40367  fi
40368
40369  # Call helper function which possibly converts this using DOS-style short mode.
40370  # If so, the updated path is stored in $new_path.
40371
40372  input_path="$new_path"
40373  # Check if we need to convert this using DOS-style short mode. If the path
40374  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40375  # take no chances and rewrite it.
40376  # Note: m4 eats our [], so we need to use [ and ] instead.
40377  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40378  if test "x$has_forbidden_chars" != x; then
40379    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40380    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40381    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40382    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40383      # Going to short mode and back again did indeed matter. Since short mode is
40384      # case insensitive, let's make it lowercase to improve readability.
40385      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40386      # Now convert it back to Unix-stile (cygpath)
40387      input_path=`$CYGPATH -u "$shortmode_path"`
40388      new_path="$input_path"
40389    fi
40390  fi
40391
40392  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40393  if test "x$test_cygdrive_prefix" = x; then
40394    # As a simple fix, exclude /usr/bin since it's not a real path.
40395    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
40396      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40397      # a path prefixed by /cygdrive for fixpath to work.
40398      new_path="$CYGWIN_ROOT_PATH$input_path"
40399    fi
40400  fi
40401
40402
40403  if test "x$path" != "x$new_path"; then
40404    JT_HOME="$new_path"
40405    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40406$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40407  fi
40408
40409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40410
40411  path="$JT_HOME"
40412  has_colon=`$ECHO $path | $GREP ^.:`
40413  new_path="$path"
40414  if test "x$has_colon" = x; then
40415    # Not in mixed or Windows style, start by that.
40416    new_path=`cmd //c echo $path`
40417  fi
40418
40419
40420  input_path="$new_path"
40421  # Check if we need to convert this using DOS-style short mode. If the path
40422  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40423  # take no chances and rewrite it.
40424  # Note: m4 eats our [], so we need to use [ and ] instead.
40425  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40426  if test "x$has_forbidden_chars" != x; then
40427    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40428    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40429  fi
40430
40431
40432  windows_path="$new_path"
40433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40434    unix_path=`$CYGPATH -u "$windows_path"`
40435    new_path="$unix_path"
40436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40437    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40438    new_path="$unix_path"
40439  fi
40440
40441  if test "x$path" != "x$new_path"; then
40442    JT_HOME="$new_path"
40443    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40444$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40445  fi
40446
40447  # Save the first 10 bytes of this path to the storage, so fixpath can work.
40448  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40449
40450  else
40451    # We're on a posix platform. Hooray! :)
40452    path="$JT_HOME"
40453    has_space=`$ECHO "$path" | $GREP " "`
40454    if test "x$has_space" != x; then
40455      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40456$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40457      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
40458    fi
40459
40460    # Use eval to expand a potential ~
40461    eval path="$path"
40462    if test ! -f "$path" && test ! -d "$path"; then
40463      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
40464    fi
40465
40466    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
40467  fi
40468
40469
40470      # jtreg win32 script works for everybody
40471      JTREGEXE="$JT_HOME/win32/bin/jtreg"
40472
40473      if test ! -f "$JTREGEXE"; then
40474        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
40475      fi
40476
40477      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40478$as_echo "$JTREGEXE" >&6; }
40479    else
40480      # try to find jtreg on path
40481
40482
40483
40484  # Publish this variable in the help.
40485
40486
40487  if test "x$JTREGEXE" = x; then
40488    # The variable is not set by user, try to locate tool using the code snippet
40489    for ac_prog in jtreg
40490do
40491  # Extract the first word of "$ac_prog", so it can be a program name with args.
40492set dummy $ac_prog; ac_word=$2
40493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40494$as_echo_n "checking for $ac_word... " >&6; }
40495if ${ac_cv_path_JTREGEXE+:} false; then :
40496  $as_echo_n "(cached) " >&6
40497else
40498  case $JTREGEXE in
40499  [\\/]* | ?:[\\/]*)
40500  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40501  ;;
40502  *)
40503  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40504for as_dir in $PATH
40505do
40506  IFS=$as_save_IFS
40507  test -z "$as_dir" && as_dir=.
40508    for ac_exec_ext in '' $ac_executable_extensions; do
40509  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40510    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40511    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40512    break 2
40513  fi
40514done
40515  done
40516IFS=$as_save_IFS
40517
40518  ;;
40519esac
40520fi
40521JTREGEXE=$ac_cv_path_JTREGEXE
40522if test -n "$JTREGEXE"; then
40523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40524$as_echo "$JTREGEXE" >&6; }
40525else
40526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40527$as_echo "no" >&6; }
40528fi
40529
40530
40531  test -n "$JTREGEXE" && break
40532done
40533
40534  else
40535    # The variable is set, but is it from the command line or the environment?
40536
40537    # Try to remove the string !JTREGEXE! from our list.
40538    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
40539    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40540      # If it failed, the variable was not from the command line. Ignore it,
40541      # but warn the user (except for BASH, which is always set by the calling BASH).
40542      if test "xJTREGEXE" != xBASH; then
40543        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
40544$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
40545      fi
40546      # Try to locate tool using the code snippet
40547      for ac_prog in jtreg
40548do
40549  # Extract the first word of "$ac_prog", so it can be a program name with args.
40550set dummy $ac_prog; ac_word=$2
40551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40552$as_echo_n "checking for $ac_word... " >&6; }
40553if ${ac_cv_path_JTREGEXE+:} false; then :
40554  $as_echo_n "(cached) " >&6
40555else
40556  case $JTREGEXE in
40557  [\\/]* | ?:[\\/]*)
40558  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40559  ;;
40560  *)
40561  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40562for as_dir in $PATH
40563do
40564  IFS=$as_save_IFS
40565  test -z "$as_dir" && as_dir=.
40566    for ac_exec_ext in '' $ac_executable_extensions; do
40567  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40568    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40569    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40570    break 2
40571  fi
40572done
40573  done
40574IFS=$as_save_IFS
40575
40576  ;;
40577esac
40578fi
40579JTREGEXE=$ac_cv_path_JTREGEXE
40580if test -n "$JTREGEXE"; then
40581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40582$as_echo "$JTREGEXE" >&6; }
40583else
40584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40585$as_echo "no" >&6; }
40586fi
40587
40588
40589  test -n "$JTREGEXE" && break
40590done
40591
40592    else
40593      # If it succeeded, then it was overridden by the user. We will use it
40594      # for the tool.
40595
40596      # First remove it from the list of overridden variables, so we can test
40597      # for unknown variables in the end.
40598      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40599
40600      # Check if the provided tool contains a complete path.
40601      tool_specified="$JTREGEXE"
40602      tool_basename="${tool_specified##*/}"
40603      if test "x$tool_basename" = "x$tool_specified"; then
40604        # A command without a complete path is provided, search $PATH.
40605        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
40606$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
40607        # Extract the first word of "$tool_basename", so it can be a program name with args.
40608set dummy $tool_basename; ac_word=$2
40609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40610$as_echo_n "checking for $ac_word... " >&6; }
40611if ${ac_cv_path_JTREGEXE+:} false; then :
40612  $as_echo_n "(cached) " >&6
40613else
40614  case $JTREGEXE in
40615  [\\/]* | ?:[\\/]*)
40616  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40617  ;;
40618  *)
40619  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40620for as_dir in $PATH
40621do
40622  IFS=$as_save_IFS
40623  test -z "$as_dir" && as_dir=.
40624    for ac_exec_ext in '' $ac_executable_extensions; do
40625  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40626    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40627    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40628    break 2
40629  fi
40630done
40631  done
40632IFS=$as_save_IFS
40633
40634  ;;
40635esac
40636fi
40637JTREGEXE=$ac_cv_path_JTREGEXE
40638if test -n "$JTREGEXE"; then
40639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40640$as_echo "$JTREGEXE" >&6; }
40641else
40642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40643$as_echo "no" >&6; }
40644fi
40645
40646
40647        if test "x$JTREGEXE" = x; then
40648          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40649        fi
40650      else
40651        # Otherwise we believe it is a complete path. Use it as it is.
40652        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
40653$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
40654        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
40655$as_echo_n "checking for JTREGEXE... " >&6; }
40656        if test ! -x "$tool_specified"; then
40657          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40658$as_echo "not found" >&6; }
40659          as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
40660        fi
40661        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40662$as_echo "$tool_specified" >&6; }
40663      fi
40664    fi
40665  fi
40666
40667
40668
40669  if test "x$JTREGEXE" = x; then
40670    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
40671  fi
40672
40673
40674      JT_HOME="`$DIRNAME $JTREGEXE`"
40675    fi
40676  fi
40677
40678
40679
40680
40681
40682
40683  # Option used to tell the compiler whether to create 32- or 64-bit executables
40684  if test "x$TOOLCHAIN_TYPE" = xxlc; then
40685    COMPILER_TARGET_BITS_FLAG="-q"
40686  else
40687    COMPILER_TARGET_BITS_FLAG="-m"
40688  fi
40689
40690
40691  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
40692  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
40693    ARFLAGS="-r"
40694  elif test "x$OPENJDK_TARGET_OS" = xaix; then
40695    ARFLAGS="-X64"
40696  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
40697    # lib.exe is used as AR to create static libraries.
40698    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
40699  else
40700    ARFLAGS=""
40701  fi
40702
40703
40704  ## Setup strip.
40705  # FIXME: should this really be per platform, or should it be per toolchain type?
40706  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
40707  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
40708  if test "x$OPENJDK_TARGET_OS" = xlinux; then
40709    STRIPFLAGS="-g"
40710  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
40711    STRIPFLAGS="-x"
40712  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
40713    STRIPFLAGS="-S"
40714  elif test "x$OPENJDK_TARGET_OS" = xaix; then
40715    STRIPFLAGS="-X32_64"
40716  fi
40717
40718  if test "x$OPENJDK_TARGET_OS" != xwindows; then
40719    POST_STRIP_CMD="$STRIP $STRIPFLAGS"
40720  fi
40721
40722
40723  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40724    # FIXME: break out into MCSFLAGS
40725    POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
40726  fi
40727
40728
40729  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40730    CC_OUT_OPTION=-Fo
40731    EXE_OUT_OPTION=-out:
40732    LD_OUT_OPTION=-out:
40733    AR_OUT_OPTION=-out:
40734  else
40735    # The option used to specify the target .o,.a or .so file.
40736    # When compiling, how to specify the to be created object file.
40737    CC_OUT_OPTION='-o$(SPACE)'
40738    # When linking, how to specify the to be created executable.
40739    EXE_OUT_OPTION='-o$(SPACE)'
40740    # When linking, how to specify the to be created dynamically linkable library.
40741    LD_OUT_OPTION='-o$(SPACE)'
40742    # When archiving, how to specify the to be create static archive for object files.
40743    AR_OUT_OPTION='rcs$(SPACE)'
40744  fi
40745
40746
40747
40748
40749
40750  # On Windows, we need to set RC flags.
40751  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40752    RC_FLAGS="-nologo -l 0x409 -r"
40753    if test "x$VARIANT" = xOPT; then
40754      RC_FLAGS="$RC_FLAGS -d NDEBUG"
40755    fi
40756
40757    # The version variables used to create RC_FLAGS may be overridden
40758    # in a custom configure script, or possibly the command line.
40759    # Let those variables be expanded at make time in spec.gmk.
40760    # The \$ are escaped to the shell, and the $(...) variables
40761    # are evaluated by make.
40762    RC_FLAGS="$RC_FLAGS \
40763        -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
40764        -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
40765        -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
40766        -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
40767        -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
40768        -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
40769        -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
40770  fi
40771
40772
40773  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40774    # FIXME: likely bug, should be CCXXFLAGS_JDK? or one for C or CXX.
40775    CCXXFLAGS="$CCXXFLAGS -nologo"
40776  fi
40777
40778  if test "x$SYSROOT" != "x"; then
40779    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
40780      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40781        # Solaris Studio does not have a concept of sysroot. Instead we must
40782        # make sure the default include and lib dirs are appended to each
40783        # compile and link command line.
40784        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
40785        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
40786            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
40787            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
40788      fi
40789    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
40790      SYSROOT_CFLAGS="--sysroot=\"$SYSROOT\""
40791      SYSROOT_LDFLAGS="--sysroot=\"$SYSROOT\""
40792    elif test "x$TOOLCHAIN_TYPE" = xclang; then
40793      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
40794      SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
40795    fi
40796    # Propagate the sysroot args to hotspot
40797    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
40798    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
40799    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
40800  fi
40801
40802
40803
40804
40805# FIXME: Currently we must test this after toolchain but before flags. Fix!
40806
40807# Now we can test some aspects on the target using configure macros.
40808
40809
40810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
40811$as_echo_n "checking for ANSI C header files... " >&6; }
40812if ${ac_cv_header_stdc+:} false; then :
40813  $as_echo_n "(cached) " >&6
40814else
40815  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40816/* end confdefs.h.  */
40817#include <stdlib.h>
40818#include <stdarg.h>
40819#include <string.h>
40820#include <float.h>
40821
40822int
40823main ()
40824{
40825
40826  ;
40827  return 0;
40828}
40829_ACEOF
40830if ac_fn_cxx_try_compile "$LINENO"; then :
40831  ac_cv_header_stdc=yes
40832else
40833  ac_cv_header_stdc=no
40834fi
40835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40836
40837if test $ac_cv_header_stdc = yes; then
40838  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
40839  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40840/* end confdefs.h.  */
40841#include <string.h>
40842
40843_ACEOF
40844if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
40845  $EGREP "memchr" >/dev/null 2>&1; then :
40846
40847else
40848  ac_cv_header_stdc=no
40849fi
40850rm -f conftest*
40851
40852fi
40853
40854if test $ac_cv_header_stdc = yes; then
40855  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
40856  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40857/* end confdefs.h.  */
40858#include <stdlib.h>
40859
40860_ACEOF
40861if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
40862  $EGREP "free" >/dev/null 2>&1; then :
40863
40864else
40865  ac_cv_header_stdc=no
40866fi
40867rm -f conftest*
40868
40869fi
40870
40871if test $ac_cv_header_stdc = yes; then
40872  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
40873  if test "$cross_compiling" = yes; then :
40874  :
40875else
40876  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40877/* end confdefs.h.  */
40878#include <ctype.h>
40879#include <stdlib.h>
40880#if ((' ' & 0x0FF) == 0x020)
40881# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
40882# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
40883#else
40884# define ISLOWER(c) \
40885		   (('a' <= (c) && (c) <= 'i') \
40886		     || ('j' <= (c) && (c) <= 'r') \
40887		     || ('s' <= (c) && (c) <= 'z'))
40888# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
40889#endif
40890
40891#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
40892int
40893main ()
40894{
40895  int i;
40896  for (i = 0; i < 256; i++)
40897    if (XOR (islower (i), ISLOWER (i))
40898	|| toupper (i) != TOUPPER (i))
40899      return 2;
40900  return 0;
40901}
40902_ACEOF
40903if ac_fn_cxx_try_run "$LINENO"; then :
40904
40905else
40906  ac_cv_header_stdc=no
40907fi
40908rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
40909  conftest.$ac_objext conftest.beam conftest.$ac_ext
40910fi
40911
40912fi
40913fi
40914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
40915$as_echo "$ac_cv_header_stdc" >&6; }
40916if test $ac_cv_header_stdc = yes; then
40917
40918$as_echo "#define STDC_HEADERS 1" >>confdefs.h
40919
40920fi
40921
40922# On IRIX 5.3, sys/types and inttypes.h are conflicting.
40923for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
40924		  inttypes.h stdint.h unistd.h
40925do :
40926  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
40927ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
40928"
40929if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
40930  cat >>confdefs.h <<_ACEOF
40931#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
40932_ACEOF
40933
40934fi
40935
40936done
40937
40938
40939
40940  ###############################################################################
40941  #
40942  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
40943  # (The JVM can use 32 or 64 bit Java pointers but that decision
40944  # is made at runtime.)
40945  #
40946
40947  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
40948    # Always specify -m flag on Solaris
40949    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
40950
40951  # When we add flags to the "official" CFLAGS etc, we need to
40952  # keep track of these additions in ADDED_CFLAGS etc. These
40953  # will later be checked to make sure only controlled additions
40954  # have been made to CFLAGS etc.
40955  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40956  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40957  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40958
40959  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
40960  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
40961  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
40962
40963  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
40964  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
40965  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
40966
40967  elif test "x$COMPILE_TYPE" = xreduced; then
40968    if test "x$OPENJDK_TARGET_OS" != xwindows; then
40969      # Specify -m if running reduced on other Posix platforms
40970
40971  # When we add flags to the "official" CFLAGS etc, we need to
40972  # keep track of these additions in ADDED_CFLAGS etc. These
40973  # will later be checked to make sure only controlled additions
40974  # have been made to CFLAGS etc.
40975  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40976  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40977  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40978
40979  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
40980  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
40981  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
40982
40983  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
40984  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
40985  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
40986
40987    fi
40988  fi
40989
40990  # Make compilation sanity check
40991  for ac_header in stdio.h
40992do :
40993  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
40994if test "x$ac_cv_header_stdio_h" = xyes; then :
40995  cat >>confdefs.h <<_ACEOF
40996#define HAVE_STDIO_H 1
40997_ACEOF
40998
40999else
41000
41001    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
41002$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
41003    if test "x$COMPILE_TYPE" = xreduced; then
41004      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
41005$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
41006    elif test "x$COMPILE_TYPE" = xcross; then
41007      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
41008$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
41009    fi
41010    as_fn_error $? "Cannot continue." "$LINENO" 5
41011
41012fi
41013
41014done
41015
41016
41017  # The cast to long int works around a bug in the HP C Compiler
41018# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41019# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41020# This bug is HP SR number 8606223364.
41021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41022$as_echo_n "checking size of int *... " >&6; }
41023if ${ac_cv_sizeof_int_p+:} false; then :
41024  $as_echo_n "(cached) " >&6
41025else
41026  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41027
41028else
41029  if test "$ac_cv_type_int_p" = yes; then
41030     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41031$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41032as_fn_error 77 "cannot compute sizeof (int *)
41033See \`config.log' for more details" "$LINENO" 5; }
41034   else
41035     ac_cv_sizeof_int_p=0
41036   fi
41037fi
41038
41039fi
41040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41041$as_echo "$ac_cv_sizeof_int_p" >&6; }
41042
41043
41044
41045cat >>confdefs.h <<_ACEOF
41046#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41047_ACEOF
41048
41049
41050
41051  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
41052  if test "x$ac_cv_sizeof_int_p" = x; then
41053    # The test failed, lets stick to the assumed value.
41054    { $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
41055$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
41056  else
41057    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41058
41059    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41060      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
41061      # Let's try to implicitely set the compilers target architecture and retry the test
41062      { $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
41063$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;}
41064      { $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
41065$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;}
41066
41067  # When we add flags to the "official" CFLAGS etc, we need to
41068  # keep track of these additions in ADDED_CFLAGS etc. These
41069  # will later be checked to make sure only controlled additions
41070  # have been made to CFLAGS etc.
41071  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41072  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41073  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41074
41075  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41076  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41077  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41078
41079  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41080  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41081  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41082
41083
41084      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
41085      unset ac_cv_sizeof_int_p
41086      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
41087      cat >>confdefs.h <<_ACEOF
41088#undef SIZEOF_INT_P
41089_ACEOF
41090
41091      # The cast to long int works around a bug in the HP C Compiler
41092# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41093# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41094# This bug is HP SR number 8606223364.
41095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41096$as_echo_n "checking size of int *... " >&6; }
41097if ${ac_cv_sizeof_int_p+:} false; then :
41098  $as_echo_n "(cached) " >&6
41099else
41100  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41101
41102else
41103  if test "$ac_cv_type_int_p" = yes; then
41104     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41105$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41106as_fn_error 77 "cannot compute sizeof (int *)
41107See \`config.log' for more details" "$LINENO" 5; }
41108   else
41109     ac_cv_sizeof_int_p=0
41110   fi
41111fi
41112
41113fi
41114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41115$as_echo "$ac_cv_sizeof_int_p" >&6; }
41116
41117
41118
41119cat >>confdefs.h <<_ACEOF
41120#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41121_ACEOF
41122
41123
41124
41125      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41126
41127      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41128        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
41129      fi
41130    fi
41131  fi
41132
41133  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
41134$as_echo_n "checking for target address size... " >&6; }
41135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
41136$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
41137
41138
41139  ###############################################################################
41140  #
41141  # Is the target little of big endian?
41142  #
41143   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
41144$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
41145if ${ac_cv_c_bigendian+:} false; then :
41146  $as_echo_n "(cached) " >&6
41147else
41148  ac_cv_c_bigendian=unknown
41149    # See if we're dealing with a universal compiler.
41150    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41151/* end confdefs.h.  */
41152#ifndef __APPLE_CC__
41153	       not a universal capable compiler
41154	     #endif
41155	     typedef int dummy;
41156
41157_ACEOF
41158if ac_fn_cxx_try_compile "$LINENO"; then :
41159
41160	# Check for potential -arch flags.  It is not universal unless
41161	# there are at least two -arch flags with different values.
41162	ac_arch=
41163	ac_prev=
41164	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
41165	 if test -n "$ac_prev"; then
41166	   case $ac_word in
41167	     i?86 | x86_64 | ppc | ppc64)
41168	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
41169		 ac_arch=$ac_word
41170	       else
41171		 ac_cv_c_bigendian=universal
41172		 break
41173	       fi
41174	       ;;
41175	   esac
41176	   ac_prev=
41177	 elif test "x$ac_word" = "x-arch"; then
41178	   ac_prev=arch
41179	 fi
41180       done
41181fi
41182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41183    if test $ac_cv_c_bigendian = unknown; then
41184      # See if sys/param.h defines the BYTE_ORDER macro.
41185      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41186/* end confdefs.h.  */
41187#include <sys/types.h>
41188	     #include <sys/param.h>
41189
41190int
41191main ()
41192{
41193#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
41194		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
41195		     && LITTLE_ENDIAN)
41196	      bogus endian macros
41197	     #endif
41198
41199  ;
41200  return 0;
41201}
41202_ACEOF
41203if ac_fn_cxx_try_compile "$LINENO"; then :
41204  # It does; now see whether it defined to BIG_ENDIAN or not.
41205	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41206/* end confdefs.h.  */
41207#include <sys/types.h>
41208		#include <sys/param.h>
41209
41210int
41211main ()
41212{
41213#if BYTE_ORDER != BIG_ENDIAN
41214		 not big endian
41215		#endif
41216
41217  ;
41218  return 0;
41219}
41220_ACEOF
41221if ac_fn_cxx_try_compile "$LINENO"; then :
41222  ac_cv_c_bigendian=yes
41223else
41224  ac_cv_c_bigendian=no
41225fi
41226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41227fi
41228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41229    fi
41230    if test $ac_cv_c_bigendian = unknown; then
41231      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
41232      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41233/* end confdefs.h.  */
41234#include <limits.h>
41235
41236int
41237main ()
41238{
41239#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
41240	      bogus endian macros
41241	     #endif
41242
41243  ;
41244  return 0;
41245}
41246_ACEOF
41247if ac_fn_cxx_try_compile "$LINENO"; then :
41248  # It does; now see whether it defined to _BIG_ENDIAN or not.
41249	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41250/* end confdefs.h.  */
41251#include <limits.h>
41252
41253int
41254main ()
41255{
41256#ifndef _BIG_ENDIAN
41257		 not big endian
41258		#endif
41259
41260  ;
41261  return 0;
41262}
41263_ACEOF
41264if ac_fn_cxx_try_compile "$LINENO"; then :
41265  ac_cv_c_bigendian=yes
41266else
41267  ac_cv_c_bigendian=no
41268fi
41269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41270fi
41271rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41272    fi
41273    if test $ac_cv_c_bigendian = unknown; then
41274      # Compile a test program.
41275      if test "$cross_compiling" = yes; then :
41276  # Try to guess by grepping values from an object file.
41277	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41278/* end confdefs.h.  */
41279short int ascii_mm[] =
41280		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
41281		short int ascii_ii[] =
41282		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
41283		int use_ascii (int i) {
41284		  return ascii_mm[i] + ascii_ii[i];
41285		}
41286		short int ebcdic_ii[] =
41287		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
41288		short int ebcdic_mm[] =
41289		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
41290		int use_ebcdic (int i) {
41291		  return ebcdic_mm[i] + ebcdic_ii[i];
41292		}
41293		extern int foo;
41294
41295int
41296main ()
41297{
41298return use_ascii (foo) == use_ebcdic (foo);
41299  ;
41300  return 0;
41301}
41302_ACEOF
41303if ac_fn_cxx_try_compile "$LINENO"; then :
41304  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
41305	      ac_cv_c_bigendian=yes
41306	    fi
41307	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
41308	      if test "$ac_cv_c_bigendian" = unknown; then
41309		ac_cv_c_bigendian=no
41310	      else
41311		# finding both strings is unlikely to happen, but who knows?
41312		ac_cv_c_bigendian=unknown
41313	      fi
41314	    fi
41315fi
41316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41317else
41318  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41319/* end confdefs.h.  */
41320$ac_includes_default
41321int
41322main ()
41323{
41324
41325	     /* Are we little or big endian?  From Harbison&Steele.  */
41326	     union
41327	     {
41328	       long int l;
41329	       char c[sizeof (long int)];
41330	     } u;
41331	     u.l = 1;
41332	     return u.c[sizeof (long int) - 1] == 1;
41333
41334  ;
41335  return 0;
41336}
41337_ACEOF
41338if ac_fn_cxx_try_run "$LINENO"; then :
41339  ac_cv_c_bigendian=no
41340else
41341  ac_cv_c_bigendian=yes
41342fi
41343rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41344  conftest.$ac_objext conftest.beam conftest.$ac_ext
41345fi
41346
41347    fi
41348fi
41349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
41350$as_echo "$ac_cv_c_bigendian" >&6; }
41351 case $ac_cv_c_bigendian in #(
41352   yes)
41353     ENDIAN="big";; #(
41354   no)
41355     ENDIAN="little" ;; #(
41356   universal)
41357     ENDIAN="universal_endianness"
41358     ;; #(
41359   *)
41360     ENDIAN="unknown" ;;
41361 esac
41362
41363
41364  if test "x$ENDIAN" = xuniversal_endianness; then
41365    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
41366  fi
41367  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
41368    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
41369  fi
41370
41371
41372# Configure flags for the tools
41373
41374  ###############################################################################
41375  #
41376  # How to compile shared libraries.
41377  #
41378
41379  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41380    PICFLAG="-fPIC"
41381    C_FLAG_REORDER=''
41382    CXX_FLAG_REORDER=''
41383
41384    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41385      # Linking is different on MacOSX
41386      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
41387      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
41388      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41389      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
41390      SET_SHARED_LIBRARY_MAPFILE=''
41391    else
41392      # Default works for linux, might work on other platforms as well.
41393      SHARED_LIBRARY_FLAGS='-shared'
41394      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41395      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
41396      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
41397      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
41398    fi
41399  elif test "x$TOOLCHAIN_TYPE" = xclang; then
41400    PICFLAG=''
41401    C_FLAG_REORDER=''
41402    CXX_FLAG_REORDER=''
41403
41404    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41405      # Linking is different on MacOSX
41406      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
41407      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
41408      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41409      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
41410      SET_SHARED_LIBRARY_MAPFILE=''
41411    else
41412      # Default works for linux, might work on other platforms as well.
41413      SHARED_LIBRARY_FLAGS='-shared'
41414      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41415      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
41416      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
41417      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
41418    fi
41419  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41420    PICFLAG="-KPIC"
41421    C_FLAG_REORDER='-xF'
41422    CXX_FLAG_REORDER='-xF'
41423    SHARED_LIBRARY_FLAGS="-G"
41424    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
41425    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41426    SET_SHARED_LIBRARY_NAME=''
41427    SET_SHARED_LIBRARY_MAPFILE='-M$1'
41428  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41429    PICFLAG="-qpic=large"
41430    C_FLAG_REORDER=''
41431    CXX_FLAG_REORDER=''
41432    SHARED_LIBRARY_FLAGS="-qmkshrobj"
41433    SET_EXECUTABLE_ORIGIN=""
41434    SET_SHARED_LIBRARY_ORIGIN=''
41435    SET_SHARED_LIBRARY_NAME=''
41436    SET_SHARED_LIBRARY_MAPFILE=''
41437  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41438    PICFLAG=""
41439    C_FLAG_REORDER=''
41440    CXX_FLAG_REORDER=''
41441    SHARED_LIBRARY_FLAGS="-LD"
41442    SET_EXECUTABLE_ORIGIN=''
41443    SET_SHARED_LIBRARY_ORIGIN=''
41444    SET_SHARED_LIBRARY_NAME=''
41445    SET_SHARED_LIBRARY_MAPFILE=''
41446  fi
41447
41448
41449
41450
41451
41452
41453
41454
41455
41456  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41457    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
41458    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
41459    CFLAGS_JDKLIB_EXTRA='-xstrconst'
41460  fi
41461  # The (cross) compiler is now configured, we can now test capabilities
41462  # of the target platform.
41463
41464
41465
41466  ###############################################################################
41467  #
41468  # Setup the opt flags for different compilers
41469  # and different operating systems.
41470  #
41471
41472  # FIXME: this was indirectly the old default, but just inherited.
41473  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41474  #   C_FLAG_DEPS="-MMD -MF"
41475  # fi
41476
41477  # Generate make dependency files
41478  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41479    C_FLAG_DEPS="-MMD -MF"
41480  elif test "x$TOOLCHAIN_TYPE" = xclang; then
41481    C_FLAG_DEPS="-MMD -MF"
41482  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41483    C_FLAG_DEPS="-xMMD -xMF"
41484  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41485    C_FLAG_DEPS="-qmakedep=gcc -MF"
41486  fi
41487  CXX_FLAG_DEPS="$C_FLAG_DEPS"
41488
41489
41490
41491  # Debug symbols
41492  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41493    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
41494      CFLAGS_DEBUG_SYMBOLS="-g1"
41495      CXXFLAGS_DEBUG_SYMBOLS="-g1"
41496    else
41497      CFLAGS_DEBUG_SYMBOLS="-g"
41498      CXXFLAGS_DEBUG_SYMBOLS="-g"
41499    fi
41500  elif test "x$TOOLCHAIN_TYPE" = xclang; then
41501    CFLAGS_DEBUG_SYMBOLS="-g"
41502    CXXFLAGS_DEBUG_SYMBOLS="-g"
41503  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41504    CFLAGS_DEBUG_SYMBOLS="-g -xs"
41505    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
41506  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41507    CFLAGS_DEBUG_SYMBOLS="-g"
41508    CXXFLAGS_DEBUG_SYMBOLS="-g"
41509  fi
41510
41511
41512
41513  # Optimization levels
41514  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41515    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
41516
41517    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
41518      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
41519      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
41520      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
41521      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
41522      C_O_FLAG_NONE="-xregs=no%frameptr"
41523      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
41524      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
41525      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
41526      CXX_O_FLAG_NONE="-xregs=no%frameptr"
41527      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
41528        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
41529        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
41530      fi
41531    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
41532      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
41533      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
41534      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
41535      C_O_FLAG_NONE=""
41536      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
41537      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
41538      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
41539      CXX_O_FLAG_NONE=""
41540    fi
41541  else
41542    # The remaining toolchains share opt flags between CC and CXX;
41543    # setup for C and duplicate afterwards.
41544    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41545      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41546        # On MacOSX we optimize for size, something
41547        # we should do for all platforms?
41548        C_O_FLAG_HIGHEST="-Os"
41549        C_O_FLAG_HI="-Os"
41550        C_O_FLAG_NORM="-Os"
41551        C_O_FLAG_NONE=""
41552      else
41553        C_O_FLAG_HIGHEST="-O3"
41554        C_O_FLAG_HI="-O3"
41555        C_O_FLAG_NORM="-O2"
41556        C_O_FLAG_NONE="-O0"
41557      fi
41558    elif test "x$TOOLCHAIN_TYPE" = xclang; then
41559      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41560        # On MacOSX we optimize for size, something
41561        # we should do for all platforms?
41562        C_O_FLAG_HIGHEST="-Os"
41563        C_O_FLAG_HI="-Os"
41564        C_O_FLAG_NORM="-Os"
41565        C_O_FLAG_NONE=""
41566      else
41567        C_O_FLAG_HIGHEST="-O3"
41568        C_O_FLAG_HI="-O3"
41569        C_O_FLAG_NORM="-O2"
41570        C_O_FLAG_NONE="-O0"
41571      fi
41572    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41573      C_O_FLAG_HIGHEST="-O3"
41574      C_O_FLAG_HI="-O3 -qstrict"
41575      C_O_FLAG_NORM="-O2"
41576      C_O_FLAG_NONE=""
41577    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41578      C_O_FLAG_HIGHEST="-O2"
41579      C_O_FLAG_HI="-O1"
41580      C_O_FLAG_NORM="-O1"
41581      C_O_FLAG_NONE="-Od"
41582    fi
41583    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
41584    CXX_O_FLAG_HI="$C_O_FLAG_HI"
41585    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
41586    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
41587  fi
41588
41589
41590
41591
41592
41593
41594
41595
41596
41597
41598
41599  # Special extras...
41600  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41601    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
41602      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
41603      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
41604    fi
41605  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41606    LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
41607    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
41608    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
41609  fi
41610
41611  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
41612    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
41613$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
41614  fi
41615
41616  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
41617    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
41618$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
41619  fi
41620
41621  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
41622    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
41623$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
41624  fi
41625
41626
41627# Check whether --with-extra-cflags was given.
41628if test "${with_extra_cflags+set}" = set; then :
41629  withval=$with_extra_cflags;
41630fi
41631
41632
41633
41634# Check whether --with-extra-cxxflags was given.
41635if test "${with_extra_cxxflags+set}" = set; then :
41636  withval=$with_extra_cxxflags;
41637fi
41638
41639
41640
41641# Check whether --with-extra-ldflags was given.
41642if test "${with_extra_ldflags+set}" = set; then :
41643  withval=$with_extra_ldflags;
41644fi
41645
41646
41647  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
41648  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
41649  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
41650
41651  # Hotspot needs these set in their legacy form
41652  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
41653  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
41654  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
41655
41656
41657
41658
41659
41660  ###############################################################################
41661  #
41662  # Now setup the CFLAGS and LDFLAGS for the JDK build.
41663  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
41664  #
41665
41666  # Setup compiler/platform specific flags to CFLAGS_JDK,
41667  # CXXFLAGS_JDK and CCXXFLAGS_JDK (common to C and CXX?)
41668  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41669    # these options are used for both C and C++ compiles
41670    CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Wall -Wno-parentheses -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
41671        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
41672    case $OPENJDK_TARGET_CPU_ARCH in
41673      arm )
41674        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
41675        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
41676        ;;
41677      ppc )
41678        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
41679        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
41680        ;;
41681      * )
41682        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
41683        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
41684        ;;
41685    esac
41686  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41687    CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
41688    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
41689      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
41690      CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
41691    fi
41692
41693    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
41694    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
41695  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41696    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
41697    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
41698  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41699    CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
41700    -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
41701    -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
41702    -DWIN32 -DIAL"
41703    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
41704      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
41705    else
41706      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
41707    fi
41708  fi
41709
41710  ###############################################################################
41711
41712  # Adjust flags according to debug level.
41713  case $DEBUG_LEVEL in
41714    fastdebug )
41715      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
41716      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
41717      C_O_FLAG_HI="$C_O_FLAG_NORM"
41718      C_O_FLAG_NORM="$C_O_FLAG_NORM"
41719      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
41720      CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
41721      JAVAC_FLAGS="$JAVAC_FLAGS -g"
41722      ;;
41723    slowdebug )
41724      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
41725      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
41726      C_O_FLAG_HI="$C_O_FLAG_NONE"
41727      C_O_FLAG_NORM="$C_O_FLAG_NONE"
41728      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
41729      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
41730      JAVAC_FLAGS="$JAVAC_FLAGS -g"
41731      ;;
41732  esac
41733
41734  # Setup LP64
41735  CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
41736
41737  # Set some common defines. These works for all compilers, but assume
41738  # -D is universally accepted.
41739
41740  # Setup endianness
41741  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
41742    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
41743    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
41744    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
41745    #   Note: -Dmacro         is the same as    #define macro 1
41746    #         -Dmacro=        is the same as    #define macro
41747    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41748      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
41749    else
41750      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
41751    fi
41752  else
41753    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
41754    # are defined in the system?
41755    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41756      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN="
41757    else
41758      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
41759    fi
41760  fi
41761
41762  # Setup target OS define. Use OS target name but in upper case.
41763  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
41764  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
41765
41766  # Setup target CPU
41767  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
41768
41769  # Setup debug/release defines
41770  if test "x$DEBUG_LEVEL" = xrelease; then
41771    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
41772    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41773      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
41774    fi
41775  else
41776    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
41777  fi
41778
41779  # Setup release name
41780  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
41781
41782
41783  # Set some additional per-OS defines.
41784  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41785    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
41786  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41787    # FIXME: PPC64 should not be here.
41788    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DPPC64"
41789  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
41790    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
41791  fi
41792
41793  # Additional macosx handling
41794  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41795    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41796      # FIXME: This needs to be exported in spec.gmk due to closed legacy code.
41797      # FIXME: clean this up, and/or move it elsewhere.
41798
41799      # Setting these parameters makes it an error to link to macosx APIs that are
41800      # newer than the given OS version and makes the linked binaries compatible
41801      # even if built on a newer version of the OS.
41802      # The expected format is X.Y.Z
41803      MACOSX_VERSION_MIN=10.7.0
41804
41805
41806      # The macro takes the version with no dots, ex: 1070
41807      # Let the flags variables get resolved in make for easier override on make
41808      # command line.
41809      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
41810      LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
41811    fi
41812  fi
41813
41814  # Setup some hard coded includes
41815  CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
41816      -I${JDK_OUTPUTDIR}/include \
41817      -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
41818      -I${JDK_TOPDIR}/src/share/javavm/export \
41819      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_EXPORT_DIR/javavm/export \
41820      -I${JDK_TOPDIR}/src/share/native/common \
41821      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
41822
41823  # The shared libraries are compiled using the picflag.
41824  CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
41825  CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
41826
41827  # Executable flags
41828  CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
41829  CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
41830
41831
41832
41833
41834
41835
41836  # Setup LDFLAGS et al.
41837  #
41838  # Now this is odd. The JDK native libraries have to link against libjvm.so
41839  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
41840  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
41841  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
41842  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
41843  # libraries will link to whatever is in memory. Yuck.
41844  #
41845  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
41846  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41847    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
41848    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
41849      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
41850    fi
41851    # TODO: make -debug optional "--disable-full-debug-symbols"
41852    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
41853    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
41854    LDFLAGS_JDKLIB_SUFFIX=""
41855    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
41856      LDFLAGS_STACK_SIZE=1048576
41857    else
41858      LDFLAGS_STACK_SIZE=327680
41859    fi
41860    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
41861  else
41862    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41863      # If this is a --hash-style=gnu system, use --hash-style=both, why?
41864      # We have previously set HAS_GNU_HASH if this is the case
41865      if test -n "$HAS_GNU_HASH"; then
41866        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
41867      fi
41868      if test "x$OPENJDK_TARGET_OS" = xlinux; then
41869        # And since we now know that the linker is gnu, then add -z defs, to forbid
41870        # undefined symbols in object files.
41871        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
41872        if test "x$DEBUG_LEVEL" = "xrelease"; then
41873          # When building release libraries, tell the linker optimize them.
41874          # Should this be supplied to the OSS linker as well?
41875          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
41876        fi
41877      fi
41878    fi
41879
41880    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41881      LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
41882      LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
41883    fi
41884
41885    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
41886        -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
41887
41888    # On some platforms (mac) the linker warns about non existing -L dirs.
41889    # Add server first if available. Linking aginst client does not always produce the same results.
41890    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
41891    # Default to server for other variants.
41892    if test "x$JVM_VARIANT_SERVER" = xtrue; then
41893      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
41894    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
41895      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
41896    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
41897      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
41898    else
41899      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
41900    fi
41901
41902    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
41903    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41904      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
41905    fi
41906
41907    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
41908    if test "x$OPENJDK_TARGET_OS" = xlinux; then
41909      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
41910    fi
41911  fi
41912
41913
41914
41915
41916
41917
41918
41919
41920  # Some Zero and Shark settings.
41921  # ZERO_ARCHFLAG tells the compiler which mode to build for
41922  case "${OPENJDK_TARGET_CPU}" in
41923    s390)
41924      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
41925      ;;
41926    *)
41927      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41928  esac
41929
41930  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
41931$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
41932  supports=yes
41933
41934  saved_cflags="$CFLAGS"
41935  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
41936  ac_ext=c
41937ac_cpp='$CPP $CPPFLAGS'
41938ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41939ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41940ac_compiler_gnu=$ac_cv_c_compiler_gnu
41941
41942  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41943/* end confdefs.h.  */
41944int i;
41945_ACEOF
41946if ac_fn_c_try_compile "$LINENO"; then :
41947
41948else
41949  supports=no
41950fi
41951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41952  ac_ext=cpp
41953ac_cpp='$CXXCPP $CPPFLAGS'
41954ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41955ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41956ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41957
41958  CFLAGS="$saved_cflags"
41959
41960  saved_cxxflags="$CXXFLAGS"
41961  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
41962  ac_ext=cpp
41963ac_cpp='$CXXCPP $CPPFLAGS'
41964ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41965ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41966ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41967
41968  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41969/* end confdefs.h.  */
41970int i;
41971_ACEOF
41972if ac_fn_cxx_try_compile "$LINENO"; then :
41973
41974else
41975  supports=no
41976fi
41977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41978  ac_ext=cpp
41979ac_cpp='$CXXCPP $CPPFLAGS'
41980ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41981ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41982ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41983
41984  CXXFLAGS="$saved_cxxflags"
41985
41986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41987$as_echo "$supports" >&6; }
41988  if test "x$supports" = "xyes" ; then
41989    :
41990  else
41991    ZERO_ARCHFLAG=""
41992  fi
41993
41994
41995
41996  # Check that the compiler supports -mX (or -qX on AIX) flags
41997  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
41998
41999  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
42000$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
42001  supports=yes
42002
42003  saved_cflags="$CFLAGS"
42004  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42005  ac_ext=c
42006ac_cpp='$CPP $CPPFLAGS'
42007ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42008ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42009ac_compiler_gnu=$ac_cv_c_compiler_gnu
42010
42011  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42012/* end confdefs.h.  */
42013int i;
42014_ACEOF
42015if ac_fn_c_try_compile "$LINENO"; then :
42016
42017else
42018  supports=no
42019fi
42020rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42021  ac_ext=cpp
42022ac_cpp='$CXXCPP $CPPFLAGS'
42023ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42024ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42025ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42026
42027  CFLAGS="$saved_cflags"
42028
42029  saved_cxxflags="$CXXFLAGS"
42030  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42031  ac_ext=cpp
42032ac_cpp='$CXXCPP $CPPFLAGS'
42033ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42034ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42035ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42036
42037  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42038/* end confdefs.h.  */
42039int i;
42040_ACEOF
42041if ac_fn_cxx_try_compile "$LINENO"; then :
42042
42043else
42044  supports=no
42045fi
42046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42047  ac_ext=cpp
42048ac_cpp='$CXXCPP $CPPFLAGS'
42049ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42050ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42051ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42052
42053  CXXFLAGS="$saved_cxxflags"
42054
42055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42056$as_echo "$supports" >&6; }
42057  if test "x$supports" = "xyes" ; then
42058    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
42059  else
42060    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
42061  fi
42062
42063
42064
42065  case "${TOOLCHAIN_TYPE}" in
42066    microsoft)
42067      CFLAGS_WARNINGS_ARE_ERRORS="/WX"
42068      ;;
42069    solstudio)
42070      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
42071      ;;
42072    gcc)
42073      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42074      ;;
42075    clang)
42076      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42077      ;;
42078  esac
42079
42080
42081
42082# Setup debug symbols (need objcopy from the toolchain for that)
42083
42084  #
42085  # ENABLE_DEBUG_SYMBOLS
42086  # This must be done after the toolchain is setup, since we're looking at objcopy.
42087  #
42088  # Check whether --enable-debug-symbols was given.
42089if test "${enable_debug_symbols+set}" = set; then :
42090  enableval=$enable_debug_symbols;
42091fi
42092
42093
42094  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
42095$as_echo_n "checking if we should generate debug symbols... " >&6; }
42096
42097  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
42098    # explicit enabling of enable-debug-symbols and can't find objcopy
42099    #   this is an error
42100    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
42101  fi
42102
42103  if test "x$enable_debug_symbols" = "xyes"; then
42104    ENABLE_DEBUG_SYMBOLS=true
42105  elif test "x$enable_debug_symbols" = "xno"; then
42106    ENABLE_DEBUG_SYMBOLS=false
42107  else
42108    # Default is on if objcopy is found
42109    if test "x$OBJCOPY" != x; then
42110      ENABLE_DEBUG_SYMBOLS=true
42111    # MacOS X and Windows don't use objcopy but default is on for those OSes
42112    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
42113      ENABLE_DEBUG_SYMBOLS=true
42114    else
42115      ENABLE_DEBUG_SYMBOLS=false
42116    fi
42117  fi
42118
42119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
42120$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
42121
42122  #
42123  # ZIP_DEBUGINFO_FILES
42124  #
42125  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
42126$as_echo_n "checking if we should zip debug-info files... " >&6; }
42127  # Check whether --enable-zip-debug-info was given.
42128if test "${enable_zip_debug_info+set}" = set; then :
42129  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
42130else
42131  enable_zip_debug_info="yes"
42132fi
42133
42134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
42135$as_echo "${enable_zip_debug_info}" >&6; }
42136
42137  if test "x${enable_zip_debug_info}" = "xno"; then
42138    ZIP_DEBUGINFO_FILES=false
42139  else
42140    ZIP_DEBUGINFO_FILES=true
42141  fi
42142
42143
42144
42145
42146
42147###############################################################################
42148#
42149# Check dependencies for external and internal libraries.
42150#
42151###############################################################################
42152
42153# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
42154
42155  # When using cygwin or msys, we need a wrapper binary that renames
42156  # /cygdrive/c/ arguments into c:/ arguments and peeks into
42157  # @files and rewrites these too! This wrapper binary is
42158  # called fixpath.
42159  FIXPATH=
42160  if test "x$OPENJDK_BUILD_OS" = xwindows; then
42161    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
42162$as_echo_n "checking if fixpath can be created... " >&6; }
42163    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
42164    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
42165    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
42166      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
42167      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
42168      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
42169      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
42170    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
42171      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
42172      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
42173
42174      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
42175      # @ was chosen as separator to minimize risk of other tools messing around with it
42176      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
42177      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
42178
42179      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
42180    fi
42181    rm -f $OUTPUT_ROOT/fixpath*
42182    cd $OUTPUT_ROOT
42183    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
42184    cd $CURDIR
42185
42186    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
42187      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42188$as_echo "no" >&6; }
42189      cat $OUTPUT_ROOT/fixpath1.log
42190      as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
42191    fi
42192    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42193$as_echo "yes" >&6; }
42194    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
42195$as_echo_n "checking if fixpath.exe works... " >&6; }
42196    cd $OUTPUT_ROOT
42197    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
42198    cd $CURDIR
42199    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
42200      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42201$as_echo "no" >&6; }
42202      cat $OUTPUT_ROOT/fixpath2.log
42203      as_fn_error $? "fixpath did not work!" "$LINENO" 5
42204    fi
42205    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42206$as_echo "yes" >&6; }
42207    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
42208  fi
42209
42210
42211
42212
42213
42214
42215  ###############################################################################
42216  #
42217  # OS specific settings that we never will need to probe.
42218  #
42219  if test "x$OPENJDK_TARGET_OS" = xlinux; then
42220    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
42221$as_echo_n "checking what is not needed on Linux?... " >&6; }
42222    PULSE_NOT_NEEDED=yes
42223    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
42224$as_echo "pulse" >&6; }
42225  fi
42226
42227  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42228    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
42229$as_echo_n "checking what is not needed on Solaris?... " >&6; }
42230    ALSA_NOT_NEEDED=yes
42231    PULSE_NOT_NEEDED=yes
42232    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42233$as_echo "alsa pulse" >&6; }
42234  fi
42235
42236  if test "x$OPENJDK_TARGET_OS" = xaix; then
42237    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
42238$as_echo_n "checking what is not needed on AIX?... " >&6; }
42239    ALSA_NOT_NEEDED=yes
42240    PULSE_NOT_NEEDED=yes
42241    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42242$as_echo "alsa pulse" >&6; }
42243  fi
42244
42245
42246  if test "x$OPENJDK_TARGET_OS" = xwindows; then
42247    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
42248$as_echo_n "checking what is not needed on Windows?... " >&6; }
42249    CUPS_NOT_NEEDED=yes
42250    ALSA_NOT_NEEDED=yes
42251    PULSE_NOT_NEEDED=yes
42252    X11_NOT_NEEDED=yes
42253    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
42254$as_echo "alsa cups pulse x11" >&6; }
42255  fi
42256
42257  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42258    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
42259$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
42260    ALSA_NOT_NEEDED=yes
42261    PULSE_NOT_NEEDED=yes
42262    X11_NOT_NEEDED=yes
42263    # If the java runtime framework is disabled, then we need X11.
42264    # This will be adjusted below.
42265    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
42266$as_echo "alsa pulse x11" >&6; }
42267  fi
42268
42269  if test "x$OPENJDK_TARGET_OS" = xbsd; then
42270    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
42271$as_echo_n "checking what is not needed on bsd?... " >&6; }
42272    ALSA_NOT_NEEDED=yes
42273    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
42274$as_echo "alsa" >&6; }
42275  fi
42276
42277  if test "x$OPENJDK" = "xfalse"; then
42278    FREETYPE_NOT_NEEDED=yes
42279  fi
42280
42281  if test "x$SUPPORT_HEADFUL" = xno; then
42282    X11_NOT_NEEDED=yes
42283  fi
42284
42285  ###############################################################################
42286  #
42287  # Check for MacOSX support for OpenJDK.
42288  #
42289
42290
42291  # Check whether --enable-macosx-runtime-support was given.
42292if test "${enable_macosx_runtime_support+set}" = set; then :
42293  enableval=$enable_macosx_runtime_support;
42294fi
42295
42296  if test "x$enable_macosx_runtime_support" != x; then
42297    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&5
42298$as_echo "$as_me: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&2;}
42299  fi
42300
42301
42302  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mac OS X Java Framework" >&5
42303$as_echo_n "checking for Mac OS X Java Framework... " >&6; }
42304  if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
42305    { $as_echo "$as_me:${as_lineno-$LINENO}: result: /System/Library/Frameworks/JavaVM.framework" >&5
42306$as_echo "/System/Library/Frameworks/JavaVM.framework" >&6; }
42307  else
42308    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42309$as_echo "no" >&6; }
42310  fi
42311
42312
42313
42314  ###############################################################################
42315  #
42316  # Check for X Windows
42317  #
42318
42319  # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
42320  # Make a simple check for the libraries at the sysroot, and setup --x-includes and
42321  # --x-libraries for the sysroot, if that seems to be correct.
42322  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
42323    if test "x$SYSROOT" != "x"; then
42324      if test "x$x_includes" = xNONE; then
42325        if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
42326          x_includes="$SYSROOT/usr/X11R6/include"
42327        elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
42328          x_includes="$SYSROOT/usr/include"
42329        fi
42330      fi
42331      if test "x$x_libraries" = xNONE; then
42332        if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
42333          x_libraries="$SYSROOT/usr/X11R6/lib"
42334        elif test "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
42335          x_libraries="$SYSROOT/usr/lib64"
42336        elif test -f "$SYSROOT/usr/lib/libX11.so"; then
42337          x_libraries="$SYSROOT/usr/lib"
42338        fi
42339      fi
42340    fi
42341  fi
42342
42343  # Now let autoconf do it's magic
42344  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
42345$as_echo_n "checking for X... " >&6; }
42346
42347
42348# Check whether --with-x was given.
42349if test "${with_x+set}" = set; then :
42350  withval=$with_x;
42351fi
42352
42353# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
42354if test "x$with_x" = xno; then
42355  # The user explicitly disabled X.
42356  have_x=disabled
42357else
42358  case $x_includes,$x_libraries in #(
42359    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
42360    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
42361  $as_echo_n "(cached) " >&6
42362else
42363  # One or both of the vars are not set, and there is no cached value.
42364ac_x_includes=no ac_x_libraries=no
42365rm -f -r conftest.dir
42366if mkdir conftest.dir; then
42367  cd conftest.dir
42368  cat >Imakefile <<'_ACEOF'
42369incroot:
42370	@echo incroot='${INCROOT}'
42371usrlibdir:
42372	@echo usrlibdir='${USRLIBDIR}'
42373libdir:
42374	@echo libdir='${LIBDIR}'
42375_ACEOF
42376  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
42377    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
42378    for ac_var in incroot usrlibdir libdir; do
42379      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
42380    done
42381    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
42382    for ac_extension in a so sl dylib la dll; do
42383      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
42384	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
42385	ac_im_usrlibdir=$ac_im_libdir; break
42386      fi
42387    done
42388    # Screen out bogus values from the imake configuration.  They are
42389    # bogus both because they are the default anyway, and because
42390    # using them would break gcc on systems where it needs fixed includes.
42391    case $ac_im_incroot in
42392	/usr/include) ac_x_includes= ;;
42393	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
42394    esac
42395    case $ac_im_usrlibdir in
42396	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
42397	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
42398    esac
42399  fi
42400  cd ..
42401  rm -f -r conftest.dir
42402fi
42403
42404# Standard set of common directories for X headers.
42405# Check X11 before X11Rn because it is often a symlink to the current release.
42406ac_x_header_dirs='
42407/usr/X11/include
42408/usr/X11R7/include
42409/usr/X11R6/include
42410/usr/X11R5/include
42411/usr/X11R4/include
42412
42413/usr/include/X11
42414/usr/include/X11R7
42415/usr/include/X11R6
42416/usr/include/X11R5
42417/usr/include/X11R4
42418
42419/usr/local/X11/include
42420/usr/local/X11R7/include
42421/usr/local/X11R6/include
42422/usr/local/X11R5/include
42423/usr/local/X11R4/include
42424
42425/usr/local/include/X11
42426/usr/local/include/X11R7
42427/usr/local/include/X11R6
42428/usr/local/include/X11R5
42429/usr/local/include/X11R4
42430
42431/usr/X386/include
42432/usr/x386/include
42433/usr/XFree86/include/X11
42434
42435/usr/include
42436/usr/local/include
42437/usr/unsupported/include
42438/usr/athena/include
42439/usr/local/x11r5/include
42440/usr/lpp/Xamples/include
42441
42442/usr/openwin/include
42443/usr/openwin/share/include'
42444
42445if test "$ac_x_includes" = no; then
42446  # Guess where to find include files, by looking for Xlib.h.
42447  # First, try using that file with no special directory specified.
42448  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42449/* end confdefs.h.  */
42450#include <X11/Xlib.h>
42451_ACEOF
42452if ac_fn_cxx_try_cpp "$LINENO"; then :
42453  # We can compile using X headers with no special include directory.
42454ac_x_includes=
42455else
42456  for ac_dir in $ac_x_header_dirs; do
42457  if test -r "$ac_dir/X11/Xlib.h"; then
42458    ac_x_includes=$ac_dir
42459    break
42460  fi
42461done
42462fi
42463rm -f conftest.err conftest.i conftest.$ac_ext
42464fi # $ac_x_includes = no
42465
42466if test "$ac_x_libraries" = no; then
42467  # Check for the libraries.
42468  # See if we find them without any special options.
42469  # Don't add to $LIBS permanently.
42470  ac_save_LIBS=$LIBS
42471  LIBS="-lX11 $LIBS"
42472  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42473/* end confdefs.h.  */
42474#include <X11/Xlib.h>
42475int
42476main ()
42477{
42478XrmInitialize ()
42479  ;
42480  return 0;
42481}
42482_ACEOF
42483if ac_fn_cxx_try_link "$LINENO"; then :
42484  LIBS=$ac_save_LIBS
42485# We can link X programs with no special library path.
42486ac_x_libraries=
42487else
42488  LIBS=$ac_save_LIBS
42489for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
42490do
42491  # Don't even attempt the hair of trying to link an X program!
42492  for ac_extension in a so sl dylib la dll; do
42493    if test -r "$ac_dir/libX11.$ac_extension"; then
42494      ac_x_libraries=$ac_dir
42495      break 2
42496    fi
42497  done
42498done
42499fi
42500rm -f core conftest.err conftest.$ac_objext \
42501    conftest$ac_exeext conftest.$ac_ext
42502fi # $ac_x_libraries = no
42503
42504case $ac_x_includes,$ac_x_libraries in #(
42505  no,* | *,no | *\'*)
42506    # Didn't find X, or a directory has "'" in its name.
42507    ac_cv_have_x="have_x=no";; #(
42508  *)
42509    # Record where we found X for the cache.
42510    ac_cv_have_x="have_x=yes\
42511	ac_x_includes='$ac_x_includes'\
42512	ac_x_libraries='$ac_x_libraries'"
42513esac
42514fi
42515;; #(
42516    *) have_x=yes;;
42517  esac
42518  eval "$ac_cv_have_x"
42519fi # $with_x != no
42520
42521if test "$have_x" != yes; then
42522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
42523$as_echo "$have_x" >&6; }
42524  no_x=yes
42525else
42526  # If each of the values was on the command line, it overrides each guess.
42527  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
42528  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
42529  # Update the cache value to reflect the command line values.
42530  ac_cv_have_x="have_x=yes\
42531	ac_x_includes='$x_includes'\
42532	ac_x_libraries='$x_libraries'"
42533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
42534$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
42535fi
42536
42537  if test "$no_x" = yes; then
42538  # Not all programs may use this symbol, but it does not hurt to define it.
42539
42540$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
42541
42542  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
42543else
42544  if test -n "$x_includes"; then
42545    X_CFLAGS="$X_CFLAGS -I$x_includes"
42546  fi
42547
42548  # It would also be nice to do this for all -L options, not just this one.
42549  if test -n "$x_libraries"; then
42550    X_LIBS="$X_LIBS -L$x_libraries"
42551    # For Solaris; some versions of Sun CC require a space after -R and
42552    # others require no space.  Words are not sufficient . . . .
42553    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
42554$as_echo_n "checking whether -R must be followed by a space... " >&6; }
42555    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
42556    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
42557    ac_cxx_werror_flag=yes
42558    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42559/* end confdefs.h.  */
42560
42561int
42562main ()
42563{
42564
42565  ;
42566  return 0;
42567}
42568_ACEOF
42569if ac_fn_cxx_try_link "$LINENO"; then :
42570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42571$as_echo "no" >&6; }
42572       X_LIBS="$X_LIBS -R$x_libraries"
42573else
42574  LIBS="$ac_xsave_LIBS -R $x_libraries"
42575       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42576/* end confdefs.h.  */
42577
42578int
42579main ()
42580{
42581
42582  ;
42583  return 0;
42584}
42585_ACEOF
42586if ac_fn_cxx_try_link "$LINENO"; then :
42587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42588$as_echo "yes" >&6; }
42589	  X_LIBS="$X_LIBS -R $x_libraries"
42590else
42591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
42592$as_echo "neither works" >&6; }
42593fi
42594rm -f core conftest.err conftest.$ac_objext \
42595    conftest$ac_exeext conftest.$ac_ext
42596fi
42597rm -f core conftest.err conftest.$ac_objext \
42598    conftest$ac_exeext conftest.$ac_ext
42599    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
42600    LIBS=$ac_xsave_LIBS
42601  fi
42602
42603  # Check for system-dependent libraries X programs must link with.
42604  # Do this before checking for the system-independent R6 libraries
42605  # (-lICE), since we may need -lsocket or whatever for X linking.
42606
42607  if test "$ISC" = yes; then
42608    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
42609  else
42610    # Martyn Johnson says this is needed for Ultrix, if the X
42611    # libraries were built with DECnet support.  And Karl Berry says
42612    # the Alpha needs dnet_stub (dnet does not exist).
42613    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
42614    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42615/* end confdefs.h.  */
42616
42617/* Override any GCC internal prototype to avoid an error.
42618   Use char because int might match the return type of a GCC
42619   builtin and then its argument prototype would still apply.  */
42620#ifdef __cplusplus
42621extern "C"
42622#endif
42623char XOpenDisplay ();
42624int
42625main ()
42626{
42627return XOpenDisplay ();
42628  ;
42629  return 0;
42630}
42631_ACEOF
42632if ac_fn_cxx_try_link "$LINENO"; then :
42633
42634else
42635  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
42636$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
42637if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
42638  $as_echo_n "(cached) " >&6
42639else
42640  ac_check_lib_save_LIBS=$LIBS
42641LIBS="-ldnet  $LIBS"
42642cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42643/* end confdefs.h.  */
42644
42645/* Override any GCC internal prototype to avoid an error.
42646   Use char because int might match the return type of a GCC
42647   builtin and then its argument prototype would still apply.  */
42648#ifdef __cplusplus
42649extern "C"
42650#endif
42651char dnet_ntoa ();
42652int
42653main ()
42654{
42655return dnet_ntoa ();
42656  ;
42657  return 0;
42658}
42659_ACEOF
42660if ac_fn_cxx_try_link "$LINENO"; then :
42661  ac_cv_lib_dnet_dnet_ntoa=yes
42662else
42663  ac_cv_lib_dnet_dnet_ntoa=no
42664fi
42665rm -f core conftest.err conftest.$ac_objext \
42666    conftest$ac_exeext conftest.$ac_ext
42667LIBS=$ac_check_lib_save_LIBS
42668fi
42669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
42670$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
42671if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
42672  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
42673fi
42674
42675    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
42676      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
42677$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
42678if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
42679  $as_echo_n "(cached) " >&6
42680else
42681  ac_check_lib_save_LIBS=$LIBS
42682LIBS="-ldnet_stub  $LIBS"
42683cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42684/* end confdefs.h.  */
42685
42686/* Override any GCC internal prototype to avoid an error.
42687   Use char because int might match the return type of a GCC
42688   builtin and then its argument prototype would still apply.  */
42689#ifdef __cplusplus
42690extern "C"
42691#endif
42692char dnet_ntoa ();
42693int
42694main ()
42695{
42696return dnet_ntoa ();
42697  ;
42698  return 0;
42699}
42700_ACEOF
42701if ac_fn_cxx_try_link "$LINENO"; then :
42702  ac_cv_lib_dnet_stub_dnet_ntoa=yes
42703else
42704  ac_cv_lib_dnet_stub_dnet_ntoa=no
42705fi
42706rm -f core conftest.err conftest.$ac_objext \
42707    conftest$ac_exeext conftest.$ac_ext
42708LIBS=$ac_check_lib_save_LIBS
42709fi
42710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
42711$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
42712if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
42713  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
42714fi
42715
42716    fi
42717fi
42718rm -f core conftest.err conftest.$ac_objext \
42719    conftest$ac_exeext conftest.$ac_ext
42720    LIBS="$ac_xsave_LIBS"
42721
42722    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
42723    # to get the SysV transport functions.
42724    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
42725    # needs -lnsl.
42726    # The nsl library prevents programs from opening the X display
42727    # on Irix 5.2, according to T.E. Dickey.
42728    # The functions gethostbyname, getservbyname, and inet_addr are
42729    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
42730    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
42731if test "x$ac_cv_func_gethostbyname" = xyes; then :
42732
42733fi
42734
42735    if test $ac_cv_func_gethostbyname = no; then
42736      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
42737$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
42738if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
42739  $as_echo_n "(cached) " >&6
42740else
42741  ac_check_lib_save_LIBS=$LIBS
42742LIBS="-lnsl  $LIBS"
42743cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42744/* end confdefs.h.  */
42745
42746/* Override any GCC internal prototype to avoid an error.
42747   Use char because int might match the return type of a GCC
42748   builtin and then its argument prototype would still apply.  */
42749#ifdef __cplusplus
42750extern "C"
42751#endif
42752char gethostbyname ();
42753int
42754main ()
42755{
42756return gethostbyname ();
42757  ;
42758  return 0;
42759}
42760_ACEOF
42761if ac_fn_cxx_try_link "$LINENO"; then :
42762  ac_cv_lib_nsl_gethostbyname=yes
42763else
42764  ac_cv_lib_nsl_gethostbyname=no
42765fi
42766rm -f core conftest.err conftest.$ac_objext \
42767    conftest$ac_exeext conftest.$ac_ext
42768LIBS=$ac_check_lib_save_LIBS
42769fi
42770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
42771$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
42772if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
42773  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
42774fi
42775
42776      if test $ac_cv_lib_nsl_gethostbyname = no; then
42777	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
42778$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
42779if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
42780  $as_echo_n "(cached) " >&6
42781else
42782  ac_check_lib_save_LIBS=$LIBS
42783LIBS="-lbsd  $LIBS"
42784cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42785/* end confdefs.h.  */
42786
42787/* Override any GCC internal prototype to avoid an error.
42788   Use char because int might match the return type of a GCC
42789   builtin and then its argument prototype would still apply.  */
42790#ifdef __cplusplus
42791extern "C"
42792#endif
42793char gethostbyname ();
42794int
42795main ()
42796{
42797return gethostbyname ();
42798  ;
42799  return 0;
42800}
42801_ACEOF
42802if ac_fn_cxx_try_link "$LINENO"; then :
42803  ac_cv_lib_bsd_gethostbyname=yes
42804else
42805  ac_cv_lib_bsd_gethostbyname=no
42806fi
42807rm -f core conftest.err conftest.$ac_objext \
42808    conftest$ac_exeext conftest.$ac_ext
42809LIBS=$ac_check_lib_save_LIBS
42810fi
42811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
42812$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
42813if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
42814  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
42815fi
42816
42817      fi
42818    fi
42819
42820    # lieder@skyler.mavd.honeywell.com says without -lsocket,
42821    # socket/setsockopt and other routines are undefined under SCO ODT
42822    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
42823    # on later versions), says Simon Leinen: it contains gethostby*
42824    # variants that don't use the name server (or something).  -lsocket
42825    # must be given before -lnsl if both are needed.  We assume that
42826    # if connect needs -lnsl, so does gethostbyname.
42827    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
42828if test "x$ac_cv_func_connect" = xyes; then :
42829
42830fi
42831
42832    if test $ac_cv_func_connect = no; then
42833      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
42834$as_echo_n "checking for connect in -lsocket... " >&6; }
42835if ${ac_cv_lib_socket_connect+:} false; then :
42836  $as_echo_n "(cached) " >&6
42837else
42838  ac_check_lib_save_LIBS=$LIBS
42839LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
42840cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42841/* end confdefs.h.  */
42842
42843/* Override any GCC internal prototype to avoid an error.
42844   Use char because int might match the return type of a GCC
42845   builtin and then its argument prototype would still apply.  */
42846#ifdef __cplusplus
42847extern "C"
42848#endif
42849char connect ();
42850int
42851main ()
42852{
42853return connect ();
42854  ;
42855  return 0;
42856}
42857_ACEOF
42858if ac_fn_cxx_try_link "$LINENO"; then :
42859  ac_cv_lib_socket_connect=yes
42860else
42861  ac_cv_lib_socket_connect=no
42862fi
42863rm -f core conftest.err conftest.$ac_objext \
42864    conftest$ac_exeext conftest.$ac_ext
42865LIBS=$ac_check_lib_save_LIBS
42866fi
42867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
42868$as_echo "$ac_cv_lib_socket_connect" >&6; }
42869if test "x$ac_cv_lib_socket_connect" = xyes; then :
42870  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
42871fi
42872
42873    fi
42874
42875    # Guillermo Gomez says -lposix is necessary on A/UX.
42876    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
42877if test "x$ac_cv_func_remove" = xyes; then :
42878
42879fi
42880
42881    if test $ac_cv_func_remove = no; then
42882      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
42883$as_echo_n "checking for remove in -lposix... " >&6; }
42884if ${ac_cv_lib_posix_remove+:} false; then :
42885  $as_echo_n "(cached) " >&6
42886else
42887  ac_check_lib_save_LIBS=$LIBS
42888LIBS="-lposix  $LIBS"
42889cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42890/* end confdefs.h.  */
42891
42892/* Override any GCC internal prototype to avoid an error.
42893   Use char because int might match the return type of a GCC
42894   builtin and then its argument prototype would still apply.  */
42895#ifdef __cplusplus
42896extern "C"
42897#endif
42898char remove ();
42899int
42900main ()
42901{
42902return remove ();
42903  ;
42904  return 0;
42905}
42906_ACEOF
42907if ac_fn_cxx_try_link "$LINENO"; then :
42908  ac_cv_lib_posix_remove=yes
42909else
42910  ac_cv_lib_posix_remove=no
42911fi
42912rm -f core conftest.err conftest.$ac_objext \
42913    conftest$ac_exeext conftest.$ac_ext
42914LIBS=$ac_check_lib_save_LIBS
42915fi
42916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
42917$as_echo "$ac_cv_lib_posix_remove" >&6; }
42918if test "x$ac_cv_lib_posix_remove" = xyes; then :
42919  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
42920fi
42921
42922    fi
42923
42924    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
42925    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
42926if test "x$ac_cv_func_shmat" = xyes; then :
42927
42928fi
42929
42930    if test $ac_cv_func_shmat = no; then
42931      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
42932$as_echo_n "checking for shmat in -lipc... " >&6; }
42933if ${ac_cv_lib_ipc_shmat+:} false; then :
42934  $as_echo_n "(cached) " >&6
42935else
42936  ac_check_lib_save_LIBS=$LIBS
42937LIBS="-lipc  $LIBS"
42938cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42939/* end confdefs.h.  */
42940
42941/* Override any GCC internal prototype to avoid an error.
42942   Use char because int might match the return type of a GCC
42943   builtin and then its argument prototype would still apply.  */
42944#ifdef __cplusplus
42945extern "C"
42946#endif
42947char shmat ();
42948int
42949main ()
42950{
42951return shmat ();
42952  ;
42953  return 0;
42954}
42955_ACEOF
42956if ac_fn_cxx_try_link "$LINENO"; then :
42957  ac_cv_lib_ipc_shmat=yes
42958else
42959  ac_cv_lib_ipc_shmat=no
42960fi
42961rm -f core conftest.err conftest.$ac_objext \
42962    conftest$ac_exeext conftest.$ac_ext
42963LIBS=$ac_check_lib_save_LIBS
42964fi
42965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
42966$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
42967if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
42968  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
42969fi
42970
42971    fi
42972  fi
42973
42974  # Check for libraries that X11R6 Xt/Xaw programs need.
42975  ac_save_LDFLAGS=$LDFLAGS
42976  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
42977  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
42978  # check for ICE first), but we must link in the order -lSM -lICE or
42979  # we get undefined symbols.  So assume we have SM if we have ICE.
42980  # These have to be linked with before -lX11, unlike the other
42981  # libraries we check for below, so use a different variable.
42982  # John Interrante, Karl Berry
42983  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
42984$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
42985if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
42986  $as_echo_n "(cached) " >&6
42987else
42988  ac_check_lib_save_LIBS=$LIBS
42989LIBS="-lICE $X_EXTRA_LIBS $LIBS"
42990cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42991/* end confdefs.h.  */
42992
42993/* Override any GCC internal prototype to avoid an error.
42994   Use char because int might match the return type of a GCC
42995   builtin and then its argument prototype would still apply.  */
42996#ifdef __cplusplus
42997extern "C"
42998#endif
42999char IceConnectionNumber ();
43000int
43001main ()
43002{
43003return IceConnectionNumber ();
43004  ;
43005  return 0;
43006}
43007_ACEOF
43008if ac_fn_cxx_try_link "$LINENO"; then :
43009  ac_cv_lib_ICE_IceConnectionNumber=yes
43010else
43011  ac_cv_lib_ICE_IceConnectionNumber=no
43012fi
43013rm -f core conftest.err conftest.$ac_objext \
43014    conftest$ac_exeext conftest.$ac_ext
43015LIBS=$ac_check_lib_save_LIBS
43016fi
43017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
43018$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
43019if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
43020  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
43021fi
43022
43023  LDFLAGS=$ac_save_LDFLAGS
43024
43025fi
43026
43027
43028  # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
43029  # this doesn't make sense so we remove it.
43030  if test "x$COMPILE_TYPE" = xcross; then
43031    X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
43032  fi
43033
43034  if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
43035
43036  # Print a helpful message on how to acquire the necessary build dependency.
43037  # x11 is the help tag: freetype, cups, pulse, alsa etc
43038  MISSING_DEPENDENCY=x11
43039
43040  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43041    cygwin_help $MISSING_DEPENDENCY
43042  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43043    msys_help $MISSING_DEPENDENCY
43044  else
43045    PKGHANDLER_COMMAND=
43046
43047    case $PKGHANDLER in
43048      apt-get)
43049        apt_help     $MISSING_DEPENDENCY ;;
43050      yum)
43051        yum_help     $MISSING_DEPENDENCY ;;
43052      port)
43053        port_help    $MISSING_DEPENDENCY ;;
43054      pkgutil)
43055        pkgutil_help $MISSING_DEPENDENCY ;;
43056      pkgadd)
43057        pkgadd_help  $MISSING_DEPENDENCY ;;
43058    esac
43059
43060    if test "x$PKGHANDLER_COMMAND" != x; then
43061      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43062    fi
43063  fi
43064
43065    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
43066  fi
43067
43068  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43069    OPENWIN_HOME="/usr/openwin"
43070    X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
43071    X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43072        -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
43073        -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43074        -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
43075  fi
43076
43077  #
43078  # Weird Sol10 something check...TODO change to try compile
43079  #
43080  if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
43081    if test "`uname -r`" = "5.10"; then
43082      if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
43083        X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
43084      fi
43085    fi
43086  fi
43087
43088  ac_ext=c
43089ac_cpp='$CPP $CPPFLAGS'
43090ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43091ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43092ac_compiler_gnu=$ac_cv_c_compiler_gnu
43093
43094  OLD_CFLAGS="$CFLAGS"
43095  CFLAGS="$CFLAGS $X_CFLAGS"
43096
43097  # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
43098  for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
43099do :
43100  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43101ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
43102        # include <X11/Xlib.h>
43103        # include <X11/Xutil.h>
43104
43105
43106"
43107if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43108  cat >>confdefs.h <<_ACEOF
43109#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43110_ACEOF
43111 X11_A_OK=yes
43112else
43113  X11_A_OK=no; break
43114fi
43115
43116done
43117
43118
43119  CFLAGS="$OLD_CFLAGS"
43120  ac_ext=cpp
43121ac_cpp='$CXXCPP $CPPFLAGS'
43122ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43123ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43124ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43125
43126
43127  if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
43128
43129  # Print a helpful message on how to acquire the necessary build dependency.
43130  # x11 is the help tag: freetype, cups, pulse, alsa etc
43131  MISSING_DEPENDENCY=x11
43132
43133  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43134    cygwin_help $MISSING_DEPENDENCY
43135  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43136    msys_help $MISSING_DEPENDENCY
43137  else
43138    PKGHANDLER_COMMAND=
43139
43140    case $PKGHANDLER in
43141      apt-get)
43142        apt_help     $MISSING_DEPENDENCY ;;
43143      yum)
43144        yum_help     $MISSING_DEPENDENCY ;;
43145      port)
43146        port_help    $MISSING_DEPENDENCY ;;
43147      pkgutil)
43148        pkgutil_help $MISSING_DEPENDENCY ;;
43149      pkgadd)
43150        pkgadd_help  $MISSING_DEPENDENCY ;;
43151    esac
43152
43153    if test "x$PKGHANDLER_COMMAND" != x; then
43154      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43155    fi
43156  fi
43157
43158    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
43159  fi
43160
43161
43162
43163
43164
43165
43166  ###############################################################################
43167  #
43168  # The common unix printing system cups is used to print from java.
43169  #
43170
43171# Check whether --with-cups was given.
43172if test "${with_cups+set}" = set; then :
43173  withval=$with_cups;
43174fi
43175
43176
43177# Check whether --with-cups-include was given.
43178if test "${with_cups_include+set}" = set; then :
43179  withval=$with_cups_include;
43180fi
43181
43182
43183  if test "x$CUPS_NOT_NEEDED" = xyes; then
43184    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
43185      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
43186$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
43187    fi
43188    CUPS_CFLAGS=
43189  else
43190    CUPS_FOUND=no
43191
43192    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
43193      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
43194    fi
43195
43196    if test "x${with_cups}" != x; then
43197      CUPS_CFLAGS="-I${with_cups}/include"
43198      CUPS_FOUND=yes
43199    fi
43200    if test "x${with_cups_include}" != x; then
43201      CUPS_CFLAGS="-I${with_cups_include}"
43202      CUPS_FOUND=yes
43203    fi
43204    if test "x$CUPS_FOUND" = xno; then
43205
43206
43207  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
43208    # Source the builddeps file again, to make sure it uses the latest variables!
43209    . $builddepsfile
43210    # Look for a target and build machine specific resource!
43211    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
43212    if test "x$resource" = x; then
43213      # Ok, lets instead look for a target specific resource
43214      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
43215    fi
43216    if test "x$resource" = x; then
43217      # Ok, lets instead look for a build specific resource
43218      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
43219    fi
43220    if test "x$resource" = x; then
43221      # Ok, lets instead look for a generic resource
43222      # (The cups comes from M4 and not the shell, thus no need for eval here.)
43223      resource=${builddep_cups}
43224    fi
43225    if test "x$resource" != x; then
43226      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
43227$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
43228      # If the resource in the builddeps.conf file is an existing directory,
43229      # for example /java/linux/cups
43230      if test -d ${resource}; then
43231        depdir=${resource}
43232      else
43233
43234  # cups is for example mymodule
43235  # $resource is for example libs/general/libmymod_1_2_3.zip
43236  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
43237  # $with_builddeps_dir is for example /localhome/builddeps
43238  # depdir is the name of the variable into which we store the depdir, eg MYMOD
43239  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
43240  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
43241  filename=`basename $resource`
43242  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
43243  filebase=${filename%%.*}
43244  extension=${filename#*.}
43245  installdir=$with_builddeps_dir/$filebase
43246  if test ! -f $installdir/$filename.unpacked; then
43247    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
43248$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
43249    if test ! -d $installdir; then
43250      mkdir -p $installdir
43251    fi
43252    if test ! -d $installdir; then
43253      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
43254    fi
43255    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
43256    touch $tmpfile
43257    if test ! -f $tmpfile; then
43258      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
43259    fi
43260
43261  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
43262  # $tmpfile is the local file name for the downloaded file.
43263  VALID_TOOL=no
43264  if test "x$BDEPS_FTP" = xwget; then
43265    VALID_TOOL=yes
43266    wget -O $tmpfile $with_builddeps_server/$resource
43267  fi
43268  if test "x$BDEPS_FTP" = xlftp; then
43269    VALID_TOOL=yes
43270    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
43271  fi
43272  if test "x$BDEPS_FTP" = xftp; then
43273    VALID_TOOL=yes
43274    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
43275    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
43276    FTPUSERPWD=${FTPSERVER%%@*}
43277    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
43278      FTPUSER=${userpwd%%:*}
43279      FTPPWD=${userpwd#*@}
43280      FTPSERVER=${FTPSERVER#*@}
43281    else
43282      FTPUSER=ftp
43283      FTPPWD=ftp
43284    fi
43285    # the "pass" command does not work on some
43286    # ftp clients (read ftp.exe) but if it works,
43287    # passive mode is better!
43288    ( \
43289        echo "user $FTPUSER $FTPPWD"        ; \
43290        echo "pass"                         ; \
43291        echo "bin"                          ; \
43292        echo "get $FTPPATH $tmpfile"              ; \
43293    ) | ftp -in $FTPSERVER
43294  fi
43295  if test "x$VALID_TOOL" != xyes; then
43296    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
43297  fi
43298
43299    mv $tmpfile $installdir/$filename
43300    if test ! -s $installdir/$filename; then
43301      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
43302    fi
43303    case "$extension" in
43304      zip)  echo "Unzipping $installdir/$filename..."
43305        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
43306        ;;
43307      tar.gz) echo "Untaring $installdir/$filename..."
43308        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43309        ;;
43310      tgz) echo "Untaring $installdir/$filename..."
43311        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43312        ;;
43313      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
43314        ;;
43315    esac
43316  fi
43317  if test -f $installdir/$filename.unpacked; then
43318    depdir=$installdir
43319  fi
43320
43321      fi
43322      # Source the builddeps file again, because in the previous command, the depdir
43323      # was updated to point at the current build dependency install directory.
43324      . $builddepsfile
43325      # Now extract variables from the builddeps.conf files.
43326      theroot=${builddep_cups_ROOT}
43327      thecflags=${builddep_cups_CFLAGS}
43328      thelibs=${builddep_cups_LIBS}
43329      if test "x$depdir" = x; then
43330        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
43331      fi
43332      CUPS=$depdir
43333      if test "x$theroot" != x; then
43334        CUPS="$theroot"
43335      fi
43336      if test "x$thecflags" != x; then
43337        CUPS_CFLAGS="$thecflags"
43338      fi
43339      if test "x$thelibs" != x; then
43340        CUPS_LIBS="$thelibs"
43341      fi
43342      CUPS_FOUND=yes
43343
43344    fi
43345
43346  fi
43347
43348    fi
43349    if test "x$CUPS_FOUND" = xno; then
43350      # Are the cups headers installed in the default /usr/include location?
43351      for ac_header in cups/cups.h cups/ppd.h
43352do :
43353  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43354ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
43355if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43356  cat >>confdefs.h <<_ACEOF
43357#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43358_ACEOF
43359
43360            CUPS_FOUND=yes
43361            CUPS_CFLAGS=
43362            DEFAULT_CUPS=yes
43363
43364
43365fi
43366
43367done
43368
43369    fi
43370    if test "x$CUPS_FOUND" = xno; then
43371      # Getting nervous now? Lets poke around for standard Solaris third-party
43372      # package installation locations.
43373      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
43374$as_echo_n "checking for cups headers... " >&6; }
43375      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
43376        # An SFW package seems to be installed!
43377        CUPS_FOUND=yes
43378        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
43379      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
43380        # A CSW package seems to be installed!
43381        CUPS_FOUND=yes
43382        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
43383      fi
43384      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
43385$as_echo "$CUPS_FOUND" >&6; }
43386    fi
43387    if test "x$CUPS_FOUND" = xno; then
43388
43389  # Print a helpful message on how to acquire the necessary build dependency.
43390  # cups is the help tag: freetype, cups, pulse, alsa etc
43391  MISSING_DEPENDENCY=cups
43392
43393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43394    cygwin_help $MISSING_DEPENDENCY
43395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43396    msys_help $MISSING_DEPENDENCY
43397  else
43398    PKGHANDLER_COMMAND=
43399
43400    case $PKGHANDLER in
43401      apt-get)
43402        apt_help     $MISSING_DEPENDENCY ;;
43403      yum)
43404        yum_help     $MISSING_DEPENDENCY ;;
43405      port)
43406        port_help    $MISSING_DEPENDENCY ;;
43407      pkgutil)
43408        pkgutil_help $MISSING_DEPENDENCY ;;
43409      pkgadd)
43410        pkgadd_help  $MISSING_DEPENDENCY ;;
43411    esac
43412
43413    if test "x$PKGHANDLER_COMMAND" != x; then
43414      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43415    fi
43416  fi
43417
43418      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
43419    fi
43420  fi
43421
43422
43423
43424
43425
43426
43427  ###############################################################################
43428  #
43429  # The ubiquitous freetype library is used to render fonts.
43430  #
43431
43432# Check whether --with-freetype was given.
43433if test "${with_freetype+set}" = set; then :
43434  withval=$with_freetype;
43435fi
43436
43437
43438# Check whether --with-freetype-include was given.
43439if test "${with_freetype_include+set}" = set; then :
43440  withval=$with_freetype_include;
43441fi
43442
43443
43444# Check whether --with-freetype-lib was given.
43445if test "${with_freetype_lib+set}" = set; then :
43446  withval=$with_freetype_lib;
43447fi
43448
43449  # Check whether --enable-freetype-bundling was given.
43450if test "${enable_freetype_bundling+set}" = set; then :
43451  enableval=$enable_freetype_bundling;
43452fi
43453
43454
43455  FREETYPE_CFLAGS=
43456  FREETYPE_LIBS=
43457  FREETYPE_BUNDLE_LIB_PATH=
43458
43459  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
43460    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
43461      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
43462$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
43463    fi
43464    if test "x$enable_freetype_bundling" != x; then
43465      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
43466$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
43467    fi
43468  else
43469    # freetype is needed to build; go get it!
43470
43471    BUNDLE_FREETYPE="$enable_freetype_bundling"
43472
43473    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
43474      # User has specified settings
43475
43476      if test "x$BUNDLE_FREETYPE" = x; then
43477        # If not specified, default is to bundle freetype
43478        BUNDLE_FREETYPE=yes
43479      fi
43480
43481      if test "x$with_freetype" != x; then
43482        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
43483        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
43484      fi
43485
43486      # Allow --with-freetype-lib and --with-freetype-include to override
43487      if test "x$with_freetype_include" != x; then
43488        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
43489      fi
43490      if test "x$with_freetype_lib" != x; then
43491        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
43492      fi
43493
43494      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
43495        # Okay, we got it. Check that it works.
43496
43497  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43498  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
43499  METHOD="--with-freetype"
43500
43501  # First check if the files exists.
43502  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
43503    # We found an arbitrary include file. That's a good sign.
43504    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
43505$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
43506    FOUND_FREETYPE=yes
43507
43508    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
43509    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
43510      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
43511$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
43512      FOUND_FREETYPE=no
43513    else
43514      if test "x$OPENJDK_TARGET_OS" = xwindows; then
43515        # On Windows, we will need both .lib and .dll file.
43516        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
43517          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
43518$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
43519          FOUND_FREETYPE=no
43520        fi
43521      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
43522          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
43523        # Found lib in isa dir, use that instead.
43524        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
43525      fi
43526    fi
43527  fi
43528
43529  if test "x$FOUND_FREETYPE" = xyes; then
43530
43531  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43532
43533  # Input might be given as Windows format, start by converting to
43534  # unix format.
43535  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43536  new_path=`$CYGPATH -u "$path"`
43537
43538  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43539  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43540  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43541  # "foo.exe" is OK but "foo" is an error.
43542  #
43543  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43544  # It is also a way to make sure we got the proper file name for the real test later on.
43545  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43546  if test "x$test_shortpath" = x; then
43547    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43548$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43549    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
43550  fi
43551
43552  # Call helper function which possibly converts this using DOS-style short mode.
43553  # If so, the updated path is stored in $new_path.
43554
43555  input_path="$new_path"
43556  # Check if we need to convert this using DOS-style short mode. If the path
43557  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43558  # take no chances and rewrite it.
43559  # Note: m4 eats our [], so we need to use [ and ] instead.
43560  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43561  if test "x$has_forbidden_chars" != x; then
43562    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43563    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43564    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43565    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43566      # Going to short mode and back again did indeed matter. Since short mode is
43567      # case insensitive, let's make it lowercase to improve readability.
43568      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43569      # Now convert it back to Unix-stile (cygpath)
43570      input_path=`$CYGPATH -u "$shortmode_path"`
43571      new_path="$input_path"
43572    fi
43573  fi
43574
43575  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43576  if test "x$test_cygdrive_prefix" = x; then
43577    # As a simple fix, exclude /usr/bin since it's not a real path.
43578    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43579      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43580      # a path prefixed by /cygdrive for fixpath to work.
43581      new_path="$CYGWIN_ROOT_PATH$input_path"
43582    fi
43583  fi
43584
43585
43586  if test "x$path" != "x$new_path"; then
43587    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43588    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43589$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43590  fi
43591
43592  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43593
43594  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43595  has_colon=`$ECHO $path | $GREP ^.:`
43596  new_path="$path"
43597  if test "x$has_colon" = x; then
43598    # Not in mixed or Windows style, start by that.
43599    new_path=`cmd //c echo $path`
43600  fi
43601
43602
43603  input_path="$new_path"
43604  # Check if we need to convert this using DOS-style short mode. If the path
43605  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43606  # take no chances and rewrite it.
43607  # Note: m4 eats our [], so we need to use [ and ] instead.
43608  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43609  if test "x$has_forbidden_chars" != x; then
43610    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43611    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43612  fi
43613
43614
43615  windows_path="$new_path"
43616  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43617    unix_path=`$CYGPATH -u "$windows_path"`
43618    new_path="$unix_path"
43619  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43620    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43621    new_path="$unix_path"
43622  fi
43623
43624  if test "x$path" != "x$new_path"; then
43625    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43626    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43627$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43628  fi
43629
43630  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43631  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43632
43633  else
43634    # We're on a posix platform. Hooray! :)
43635    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43636    has_space=`$ECHO "$path" | $GREP " "`
43637    if test "x$has_space" != x; then
43638      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43639$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43640      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43641    fi
43642
43643    # Use eval to expand a potential ~
43644    eval path="$path"
43645    if test ! -f "$path" && test ! -d "$path"; then
43646      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
43647    fi
43648
43649    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
43650  fi
43651
43652
43653  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43654
43655  # Input might be given as Windows format, start by converting to
43656  # unix format.
43657  path="$POTENTIAL_FREETYPE_LIB_PATH"
43658  new_path=`$CYGPATH -u "$path"`
43659
43660  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43661  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43662  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43663  # "foo.exe" is OK but "foo" is an error.
43664  #
43665  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43666  # It is also a way to make sure we got the proper file name for the real test later on.
43667  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43668  if test "x$test_shortpath" = x; then
43669    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
43670$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
43671    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
43672  fi
43673
43674  # Call helper function which possibly converts this using DOS-style short mode.
43675  # If so, the updated path is stored in $new_path.
43676
43677  input_path="$new_path"
43678  # Check if we need to convert this using DOS-style short mode. If the path
43679  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43680  # take no chances and rewrite it.
43681  # Note: m4 eats our [], so we need to use [ and ] instead.
43682  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43683  if test "x$has_forbidden_chars" != x; then
43684    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43685    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43686    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43687    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43688      # Going to short mode and back again did indeed matter. Since short mode is
43689      # case insensitive, let's make it lowercase to improve readability.
43690      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43691      # Now convert it back to Unix-stile (cygpath)
43692      input_path=`$CYGPATH -u "$shortmode_path"`
43693      new_path="$input_path"
43694    fi
43695  fi
43696
43697  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43698  if test "x$test_cygdrive_prefix" = x; then
43699    # As a simple fix, exclude /usr/bin since it's not a real path.
43700    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43701      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43702      # a path prefixed by /cygdrive for fixpath to work.
43703      new_path="$CYGWIN_ROOT_PATH$input_path"
43704    fi
43705  fi
43706
43707
43708  if test "x$path" != "x$new_path"; then
43709    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
43710    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
43711$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
43712  fi
43713
43714  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43715
43716  path="$POTENTIAL_FREETYPE_LIB_PATH"
43717  has_colon=`$ECHO $path | $GREP ^.:`
43718  new_path="$path"
43719  if test "x$has_colon" = x; then
43720    # Not in mixed or Windows style, start by that.
43721    new_path=`cmd //c echo $path`
43722  fi
43723
43724
43725  input_path="$new_path"
43726  # Check if we need to convert this using DOS-style short mode. If the path
43727  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43728  # take no chances and rewrite it.
43729  # Note: m4 eats our [], so we need to use [ and ] instead.
43730  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43731  if test "x$has_forbidden_chars" != x; then
43732    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43733    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43734  fi
43735
43736
43737  windows_path="$new_path"
43738  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43739    unix_path=`$CYGPATH -u "$windows_path"`
43740    new_path="$unix_path"
43741  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43742    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43743    new_path="$unix_path"
43744  fi
43745
43746  if test "x$path" != "x$new_path"; then
43747    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
43748    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
43749$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
43750  fi
43751
43752  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43753  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43754
43755  else
43756    # We're on a posix platform. Hooray! :)
43757    path="$POTENTIAL_FREETYPE_LIB_PATH"
43758    has_space=`$ECHO "$path" | $GREP " "`
43759    if test "x$has_space" != x; then
43760      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
43761$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
43762      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43763    fi
43764
43765    # Use eval to expand a potential ~
43766    eval path="$path"
43767    if test ! -f "$path" && test ! -d "$path"; then
43768      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
43769    fi
43770
43771    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
43772  fi
43773
43774
43775    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43776    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
43777$as_echo_n "checking for freetype includes... " >&6; }
43778    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
43779$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
43780    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
43781    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
43782$as_echo_n "checking for freetype libraries... " >&6; }
43783    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
43784$as_echo "$FREETYPE_LIB_PATH" >&6; }
43785  fi
43786
43787        if test "x$FOUND_FREETYPE" != xyes; then
43788          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
43789        fi
43790      else
43791        # User specified only one of lib or include. This is an error.
43792        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
43793          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
43794$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
43795          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
43796        else
43797          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
43798$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
43799          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
43800        fi
43801      fi
43802    else
43803      # User did not specify settings, but we need freetype. Try to locate it.
43804
43805      if test "x$BUNDLE_FREETYPE" = x; then
43806        # If not specified, default is to bundle freetype only on windows
43807        if test "x$OPENJDK_TARGET_OS" = xwindows; then
43808          BUNDLE_FREETYPE=yes
43809        else
43810          BUNDLE_FREETYPE=no
43811        fi
43812      fi
43813
43814      if test "x$FOUND_FREETYPE" != xyes; then
43815        # Check builddeps
43816
43817
43818  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
43819    # Source the builddeps file again, to make sure it uses the latest variables!
43820    . $builddepsfile
43821    # Look for a target and build machine specific resource!
43822    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
43823    if test "x$resource" = x; then
43824      # Ok, lets instead look for a target specific resource
43825      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
43826    fi
43827    if test "x$resource" = x; then
43828      # Ok, lets instead look for a build specific resource
43829      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
43830    fi
43831    if test "x$resource" = x; then
43832      # Ok, lets instead look for a generic resource
43833      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
43834      resource=${builddep_freetype2}
43835    fi
43836    if test "x$resource" != x; then
43837      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
43838$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
43839      # If the resource in the builddeps.conf file is an existing directory,
43840      # for example /java/linux/cups
43841      if test -d ${resource}; then
43842        depdir=${resource}
43843      else
43844
43845  # freetype2 is for example mymodule
43846  # $resource is for example libs/general/libmymod_1_2_3.zip
43847  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
43848  # $with_builddeps_dir is for example /localhome/builddeps
43849  # depdir is the name of the variable into which we store the depdir, eg MYMOD
43850  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
43851  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
43852  filename=`basename $resource`
43853  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
43854  filebase=${filename%%.*}
43855  extension=${filename#*.}
43856  installdir=$with_builddeps_dir/$filebase
43857  if test ! -f $installdir/$filename.unpacked; then
43858    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
43859$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
43860    if test ! -d $installdir; then
43861      mkdir -p $installdir
43862    fi
43863    if test ! -d $installdir; then
43864      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
43865    fi
43866    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
43867    touch $tmpfile
43868    if test ! -f $tmpfile; then
43869      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
43870    fi
43871
43872  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
43873  # $tmpfile is the local file name for the downloaded file.
43874  VALID_TOOL=no
43875  if test "x$BDEPS_FTP" = xwget; then
43876    VALID_TOOL=yes
43877    wget -O $tmpfile $with_builddeps_server/$resource
43878  fi
43879  if test "x$BDEPS_FTP" = xlftp; then
43880    VALID_TOOL=yes
43881    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
43882  fi
43883  if test "x$BDEPS_FTP" = xftp; then
43884    VALID_TOOL=yes
43885    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
43886    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
43887    FTPUSERPWD=${FTPSERVER%%@*}
43888    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
43889      FTPUSER=${userpwd%%:*}
43890      FTPPWD=${userpwd#*@}
43891      FTPSERVER=${FTPSERVER#*@}
43892    else
43893      FTPUSER=ftp
43894      FTPPWD=ftp
43895    fi
43896    # the "pass" command does not work on some
43897    # ftp clients (read ftp.exe) but if it works,
43898    # passive mode is better!
43899    ( \
43900        echo "user $FTPUSER $FTPPWD"        ; \
43901        echo "pass"                         ; \
43902        echo "bin"                          ; \
43903        echo "get $FTPPATH $tmpfile"              ; \
43904    ) | ftp -in $FTPSERVER
43905  fi
43906  if test "x$VALID_TOOL" != xyes; then
43907    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
43908  fi
43909
43910    mv $tmpfile $installdir/$filename
43911    if test ! -s $installdir/$filename; then
43912      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
43913    fi
43914    case "$extension" in
43915      zip)  echo "Unzipping $installdir/$filename..."
43916        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
43917        ;;
43918      tar.gz) echo "Untaring $installdir/$filename..."
43919        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43920        ;;
43921      tgz) echo "Untaring $installdir/$filename..."
43922        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43923        ;;
43924      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
43925        ;;
43926    esac
43927  fi
43928  if test -f $installdir/$filename.unpacked; then
43929    depdir=$installdir
43930  fi
43931
43932      fi
43933      # Source the builddeps file again, because in the previous command, the depdir
43934      # was updated to point at the current build dependency install directory.
43935      . $builddepsfile
43936      # Now extract variables from the builddeps.conf files.
43937      theroot=${builddep_freetype2_ROOT}
43938      thecflags=${builddep_freetype2_CFLAGS}
43939      thelibs=${builddep_freetype2_LIBS}
43940      if test "x$depdir" = x; then
43941        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
43942      fi
43943      FREETYPE=$depdir
43944      if test "x$theroot" != x; then
43945        FREETYPE="$theroot"
43946      fi
43947      if test "x$thecflags" != x; then
43948        FREETYPE_CFLAGS="$thecflags"
43949      fi
43950      if test "x$thelibs" != x; then
43951        FREETYPE_LIBS="$thelibs"
43952      fi
43953      FOUND_FREETYPE=yes
43954      else FOUND_FREETYPE=no
43955
43956    fi
43957    else FOUND_FREETYPE=no
43958
43959  fi
43960
43961        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
43962        if test "x$FOUND_FREETYPE" = xyes; then
43963          if test "x$BUNDLE_FREETYPE" = xyes; then
43964            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
43965$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
43966            FOUND_FREETYPE=no
43967          else
43968            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
43969$as_echo_n "checking for freetype... " >&6; }
43970            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
43971$as_echo "yes (using builddeps)" >&6; }
43972          fi
43973        fi
43974      fi
43975
43976      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
43977      if test "x$SYSROOT" = x; then
43978        if test "x$FOUND_FREETYPE" != xyes; then
43979          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
43980          if test "x$PKG_CONFIG" != x; then
43981
43982pkg_failed=no
43983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
43984$as_echo_n "checking for FREETYPE... " >&6; }
43985
43986if test -n "$FREETYPE_CFLAGS"; then
43987    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
43988 elif test -n "$PKG_CONFIG"; then
43989    if test -n "$PKG_CONFIG" && \
43990    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
43991  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
43992  ac_status=$?
43993  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43994  test $ac_status = 0; }; then
43995  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
43996else
43997  pkg_failed=yes
43998fi
43999 else
44000    pkg_failed=untried
44001fi
44002if test -n "$FREETYPE_LIBS"; then
44003    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
44004 elif test -n "$PKG_CONFIG"; then
44005    if test -n "$PKG_CONFIG" && \
44006    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
44007  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
44008  ac_status=$?
44009  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44010  test $ac_status = 0; }; then
44011  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
44012else
44013  pkg_failed=yes
44014fi
44015 else
44016    pkg_failed=untried
44017fi
44018
44019
44020
44021if test $pkg_failed = yes; then
44022
44023if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
44024        _pkg_short_errors_supported=yes
44025else
44026        _pkg_short_errors_supported=no
44027fi
44028        if test $_pkg_short_errors_supported = yes; then
44029	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
44030        else
44031	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
44032        fi
44033	# Put the nasty error message in config.log where it belongs
44034	echo "$FREETYPE_PKG_ERRORS" >&5
44035
44036	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44037$as_echo "no" >&6; }
44038                FOUND_FREETYPE=no
44039elif test $pkg_failed = untried; then
44040	FOUND_FREETYPE=no
44041else
44042	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
44043	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
44044        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44045$as_echo "yes" >&6; }
44046	FOUND_FREETYPE=yes
44047fi
44048            if test "x$FOUND_FREETYPE" = xyes; then
44049              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
44050              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
44051              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
44052              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
44053                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
44054              fi
44055              # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
44056              if test "x$BUNDLE_FREETYPE" = xyes; then
44057                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
44058$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
44059                FOUND_FREETYPE=no
44060              else
44061                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
44062$as_echo_n "checking for freetype... " >&6; }
44063                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
44064$as_echo "yes (using pkg-config)" >&6; }
44065              fi
44066            fi
44067          fi
44068        fi
44069      fi
44070
44071      if test "x$FOUND_FREETYPE" != xyes; then
44072        # Check in well-known locations
44073        if test "x$OPENJDK_TARGET_OS" = xwindows; then
44074          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
44075
44076  windows_path="$FREETYPE_BASE_DIR"
44077  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44078    unix_path=`$CYGPATH -u "$windows_path"`
44079    FREETYPE_BASE_DIR="$unix_path"
44080  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44081    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44082    FREETYPE_BASE_DIR="$unix_path"
44083  fi
44084
44085
44086  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44087  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44088  METHOD="well-known location"
44089
44090  # First check if the files exists.
44091  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44092    # We found an arbitrary include file. That's a good sign.
44093    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44094$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44095    FOUND_FREETYPE=yes
44096
44097    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44098    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44099      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44100$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44101      FOUND_FREETYPE=no
44102    else
44103      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44104        # On Windows, we will need both .lib and .dll file.
44105        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44106          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44107$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44108          FOUND_FREETYPE=no
44109        fi
44110      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44111          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44112        # Found lib in isa dir, use that instead.
44113        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44114      fi
44115    fi
44116  fi
44117
44118  if test "x$FOUND_FREETYPE" = xyes; then
44119
44120  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44121
44122  # Input might be given as Windows format, start by converting to
44123  # unix format.
44124  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44125  new_path=`$CYGPATH -u "$path"`
44126
44127  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44128  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44129  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44130  # "foo.exe" is OK but "foo" is an error.
44131  #
44132  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44133  # It is also a way to make sure we got the proper file name for the real test later on.
44134  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44135  if test "x$test_shortpath" = x; then
44136    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44137$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44138    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44139  fi
44140
44141  # Call helper function which possibly converts this using DOS-style short mode.
44142  # If so, the updated path is stored in $new_path.
44143
44144  input_path="$new_path"
44145  # Check if we need to convert this using DOS-style short mode. If the path
44146  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44147  # take no chances and rewrite it.
44148  # Note: m4 eats our [], so we need to use [ and ] instead.
44149  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44150  if test "x$has_forbidden_chars" != x; then
44151    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44152    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44153    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44154    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44155      # Going to short mode and back again did indeed matter. Since short mode is
44156      # case insensitive, let's make it lowercase to improve readability.
44157      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44158      # Now convert it back to Unix-stile (cygpath)
44159      input_path=`$CYGPATH -u "$shortmode_path"`
44160      new_path="$input_path"
44161    fi
44162  fi
44163
44164  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44165  if test "x$test_cygdrive_prefix" = x; then
44166    # As a simple fix, exclude /usr/bin since it's not a real path.
44167    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44168      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44169      # a path prefixed by /cygdrive for fixpath to work.
44170      new_path="$CYGWIN_ROOT_PATH$input_path"
44171    fi
44172  fi
44173
44174
44175  if test "x$path" != "x$new_path"; then
44176    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44177    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44178$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44179  fi
44180
44181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44182
44183  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44184  has_colon=`$ECHO $path | $GREP ^.:`
44185  new_path="$path"
44186  if test "x$has_colon" = x; then
44187    # Not in mixed or Windows style, start by that.
44188    new_path=`cmd //c echo $path`
44189  fi
44190
44191
44192  input_path="$new_path"
44193  # Check if we need to convert this using DOS-style short mode. If the path
44194  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44195  # take no chances and rewrite it.
44196  # Note: m4 eats our [], so we need to use [ and ] instead.
44197  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44198  if test "x$has_forbidden_chars" != x; then
44199    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44200    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44201  fi
44202
44203
44204  windows_path="$new_path"
44205  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44206    unix_path=`$CYGPATH -u "$windows_path"`
44207    new_path="$unix_path"
44208  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44209    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44210    new_path="$unix_path"
44211  fi
44212
44213  if test "x$path" != "x$new_path"; then
44214    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44215    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44216$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44217  fi
44218
44219  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44220  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44221
44222  else
44223    # We're on a posix platform. Hooray! :)
44224    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44225    has_space=`$ECHO "$path" | $GREP " "`
44226    if test "x$has_space" != x; then
44227      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44228$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44229      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44230    fi
44231
44232    # Use eval to expand a potential ~
44233    eval path="$path"
44234    if test ! -f "$path" && test ! -d "$path"; then
44235      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44236    fi
44237
44238    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44239  fi
44240
44241
44242  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44243
44244  # Input might be given as Windows format, start by converting to
44245  # unix format.
44246  path="$POTENTIAL_FREETYPE_LIB_PATH"
44247  new_path=`$CYGPATH -u "$path"`
44248
44249  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44250  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44251  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44252  # "foo.exe" is OK but "foo" is an error.
44253  #
44254  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44255  # It is also a way to make sure we got the proper file name for the real test later on.
44256  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44257  if test "x$test_shortpath" = x; then
44258    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44259$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44260    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44261  fi
44262
44263  # Call helper function which possibly converts this using DOS-style short mode.
44264  # If so, the updated path is stored in $new_path.
44265
44266  input_path="$new_path"
44267  # Check if we need to convert this using DOS-style short mode. If the path
44268  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44269  # take no chances and rewrite it.
44270  # Note: m4 eats our [], so we need to use [ and ] instead.
44271  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44272  if test "x$has_forbidden_chars" != x; then
44273    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44274    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44275    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44276    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44277      # Going to short mode and back again did indeed matter. Since short mode is
44278      # case insensitive, let's make it lowercase to improve readability.
44279      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44280      # Now convert it back to Unix-stile (cygpath)
44281      input_path=`$CYGPATH -u "$shortmode_path"`
44282      new_path="$input_path"
44283    fi
44284  fi
44285
44286  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44287  if test "x$test_cygdrive_prefix" = x; then
44288    # As a simple fix, exclude /usr/bin since it's not a real path.
44289    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44290      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44291      # a path prefixed by /cygdrive for fixpath to work.
44292      new_path="$CYGWIN_ROOT_PATH$input_path"
44293    fi
44294  fi
44295
44296
44297  if test "x$path" != "x$new_path"; then
44298    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44299    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44300$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44301  fi
44302
44303  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44304
44305  path="$POTENTIAL_FREETYPE_LIB_PATH"
44306  has_colon=`$ECHO $path | $GREP ^.:`
44307  new_path="$path"
44308  if test "x$has_colon" = x; then
44309    # Not in mixed or Windows style, start by that.
44310    new_path=`cmd //c echo $path`
44311  fi
44312
44313
44314  input_path="$new_path"
44315  # Check if we need to convert this using DOS-style short mode. If the path
44316  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44317  # take no chances and rewrite it.
44318  # Note: m4 eats our [], so we need to use [ and ] instead.
44319  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44320  if test "x$has_forbidden_chars" != x; then
44321    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44322    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44323  fi
44324
44325
44326  windows_path="$new_path"
44327  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44328    unix_path=`$CYGPATH -u "$windows_path"`
44329    new_path="$unix_path"
44330  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44331    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44332    new_path="$unix_path"
44333  fi
44334
44335  if test "x$path" != "x$new_path"; then
44336    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44337    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44338$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44339  fi
44340
44341  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44342  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44343
44344  else
44345    # We're on a posix platform. Hooray! :)
44346    path="$POTENTIAL_FREETYPE_LIB_PATH"
44347    has_space=`$ECHO "$path" | $GREP " "`
44348    if test "x$has_space" != x; then
44349      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44350$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44351      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44352    fi
44353
44354    # Use eval to expand a potential ~
44355    eval path="$path"
44356    if test ! -f "$path" && test ! -d "$path"; then
44357      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44358    fi
44359
44360    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44361  fi
44362
44363
44364    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44365    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44366$as_echo_n "checking for freetype includes... " >&6; }
44367    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44368$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44369    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44370    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44371$as_echo_n "checking for freetype libraries... " >&6; }
44372    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44373$as_echo "$FREETYPE_LIB_PATH" >&6; }
44374  fi
44375
44376          if test "x$FOUND_FREETYPE" != xyes; then
44377            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
44378
44379  windows_path="$FREETYPE_BASE_DIR"
44380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44381    unix_path=`$CYGPATH -u "$windows_path"`
44382    FREETYPE_BASE_DIR="$unix_path"
44383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44384    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44385    FREETYPE_BASE_DIR="$unix_path"
44386  fi
44387
44388
44389  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44390  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44391  METHOD="well-known location"
44392
44393  # First check if the files exists.
44394  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44395    # We found an arbitrary include file. That's a good sign.
44396    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44397$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44398    FOUND_FREETYPE=yes
44399
44400    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44401    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44402      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44403$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44404      FOUND_FREETYPE=no
44405    else
44406      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44407        # On Windows, we will need both .lib and .dll file.
44408        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44409          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44410$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44411          FOUND_FREETYPE=no
44412        fi
44413      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44414          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44415        # Found lib in isa dir, use that instead.
44416        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44417      fi
44418    fi
44419  fi
44420
44421  if test "x$FOUND_FREETYPE" = xyes; then
44422
44423  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44424
44425  # Input might be given as Windows format, start by converting to
44426  # unix format.
44427  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44428  new_path=`$CYGPATH -u "$path"`
44429
44430  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44431  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44432  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44433  # "foo.exe" is OK but "foo" is an error.
44434  #
44435  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44436  # It is also a way to make sure we got the proper file name for the real test later on.
44437  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44438  if test "x$test_shortpath" = x; then
44439    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44440$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44441    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44442  fi
44443
44444  # Call helper function which possibly converts this using DOS-style short mode.
44445  # If so, the updated path is stored in $new_path.
44446
44447  input_path="$new_path"
44448  # Check if we need to convert this using DOS-style short mode. If the path
44449  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44450  # take no chances and rewrite it.
44451  # Note: m4 eats our [], so we need to use [ and ] instead.
44452  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44453  if test "x$has_forbidden_chars" != x; then
44454    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44455    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44456    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44457    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44458      # Going to short mode and back again did indeed matter. Since short mode is
44459      # case insensitive, let's make it lowercase to improve readability.
44460      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44461      # Now convert it back to Unix-stile (cygpath)
44462      input_path=`$CYGPATH -u "$shortmode_path"`
44463      new_path="$input_path"
44464    fi
44465  fi
44466
44467  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44468  if test "x$test_cygdrive_prefix" = x; then
44469    # As a simple fix, exclude /usr/bin since it's not a real path.
44470    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44471      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44472      # a path prefixed by /cygdrive for fixpath to work.
44473      new_path="$CYGWIN_ROOT_PATH$input_path"
44474    fi
44475  fi
44476
44477
44478  if test "x$path" != "x$new_path"; then
44479    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44480    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44481$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44482  fi
44483
44484  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44485
44486  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44487  has_colon=`$ECHO $path | $GREP ^.:`
44488  new_path="$path"
44489  if test "x$has_colon" = x; then
44490    # Not in mixed or Windows style, start by that.
44491    new_path=`cmd //c echo $path`
44492  fi
44493
44494
44495  input_path="$new_path"
44496  # Check if we need to convert this using DOS-style short mode. If the path
44497  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44498  # take no chances and rewrite it.
44499  # Note: m4 eats our [], so we need to use [ and ] instead.
44500  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44501  if test "x$has_forbidden_chars" != x; then
44502    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44503    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44504  fi
44505
44506
44507  windows_path="$new_path"
44508  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44509    unix_path=`$CYGPATH -u "$windows_path"`
44510    new_path="$unix_path"
44511  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44512    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44513    new_path="$unix_path"
44514  fi
44515
44516  if test "x$path" != "x$new_path"; then
44517    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44518    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44519$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44520  fi
44521
44522  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44523  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44524
44525  else
44526    # We're on a posix platform. Hooray! :)
44527    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44528    has_space=`$ECHO "$path" | $GREP " "`
44529    if test "x$has_space" != x; then
44530      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44531$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44532      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44533    fi
44534
44535    # Use eval to expand a potential ~
44536    eval path="$path"
44537    if test ! -f "$path" && test ! -d "$path"; then
44538      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44539    fi
44540
44541    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44542  fi
44543
44544
44545  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44546
44547  # Input might be given as Windows format, start by converting to
44548  # unix format.
44549  path="$POTENTIAL_FREETYPE_LIB_PATH"
44550  new_path=`$CYGPATH -u "$path"`
44551
44552  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44553  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44554  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44555  # "foo.exe" is OK but "foo" is an error.
44556  #
44557  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44558  # It is also a way to make sure we got the proper file name for the real test later on.
44559  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44560  if test "x$test_shortpath" = x; then
44561    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44562$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44563    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44564  fi
44565
44566  # Call helper function which possibly converts this using DOS-style short mode.
44567  # If so, the updated path is stored in $new_path.
44568
44569  input_path="$new_path"
44570  # Check if we need to convert this using DOS-style short mode. If the path
44571  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44572  # take no chances and rewrite it.
44573  # Note: m4 eats our [], so we need to use [ and ] instead.
44574  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44575  if test "x$has_forbidden_chars" != x; then
44576    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44577    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44578    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44579    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44580      # Going to short mode and back again did indeed matter. Since short mode is
44581      # case insensitive, let's make it lowercase to improve readability.
44582      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44583      # Now convert it back to Unix-stile (cygpath)
44584      input_path=`$CYGPATH -u "$shortmode_path"`
44585      new_path="$input_path"
44586    fi
44587  fi
44588
44589  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44590  if test "x$test_cygdrive_prefix" = x; then
44591    # As a simple fix, exclude /usr/bin since it's not a real path.
44592    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44593      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44594      # a path prefixed by /cygdrive for fixpath to work.
44595      new_path="$CYGWIN_ROOT_PATH$input_path"
44596    fi
44597  fi
44598
44599
44600  if test "x$path" != "x$new_path"; then
44601    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44602    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44603$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44604  fi
44605
44606  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44607
44608  path="$POTENTIAL_FREETYPE_LIB_PATH"
44609  has_colon=`$ECHO $path | $GREP ^.:`
44610  new_path="$path"
44611  if test "x$has_colon" = x; then
44612    # Not in mixed or Windows style, start by that.
44613    new_path=`cmd //c echo $path`
44614  fi
44615
44616
44617  input_path="$new_path"
44618  # Check if we need to convert this using DOS-style short mode. If the path
44619  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44620  # take no chances and rewrite it.
44621  # Note: m4 eats our [], so we need to use [ and ] instead.
44622  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44623  if test "x$has_forbidden_chars" != x; then
44624    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44625    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44626  fi
44627
44628
44629  windows_path="$new_path"
44630  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44631    unix_path=`$CYGPATH -u "$windows_path"`
44632    new_path="$unix_path"
44633  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44634    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44635    new_path="$unix_path"
44636  fi
44637
44638  if test "x$path" != "x$new_path"; then
44639    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44640    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44641$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44642  fi
44643
44644  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44645  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44646
44647  else
44648    # We're on a posix platform. Hooray! :)
44649    path="$POTENTIAL_FREETYPE_LIB_PATH"
44650    has_space=`$ECHO "$path" | $GREP " "`
44651    if test "x$has_space" != x; then
44652      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44653$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44654      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44655    fi
44656
44657    # Use eval to expand a potential ~
44658    eval path="$path"
44659    if test ! -f "$path" && test ! -d "$path"; then
44660      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44661    fi
44662
44663    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44664  fi
44665
44666
44667    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44668    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44669$as_echo_n "checking for freetype includes... " >&6; }
44670    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44671$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44672    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44673    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44674$as_echo_n "checking for freetype libraries... " >&6; }
44675    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44676$as_echo "$FREETYPE_LIB_PATH" >&6; }
44677  fi
44678
44679          fi
44680        else
44681          FREETYPE_BASE_DIR="$SYSROOT/usr"
44682
44683  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44684  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44685  METHOD="well-known location"
44686
44687  # First check if the files exists.
44688  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44689    # We found an arbitrary include file. That's a good sign.
44690    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44691$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44692    FOUND_FREETYPE=yes
44693
44694    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44695    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44696      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44697$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44698      FOUND_FREETYPE=no
44699    else
44700      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44701        # On Windows, we will need both .lib and .dll file.
44702        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44703          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44704$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44705          FOUND_FREETYPE=no
44706        fi
44707      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44708          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44709        # Found lib in isa dir, use that instead.
44710        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44711      fi
44712    fi
44713  fi
44714
44715  if test "x$FOUND_FREETYPE" = xyes; then
44716
44717  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44718
44719  # Input might be given as Windows format, start by converting to
44720  # unix format.
44721  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44722  new_path=`$CYGPATH -u "$path"`
44723
44724  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44725  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44726  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44727  # "foo.exe" is OK but "foo" is an error.
44728  #
44729  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44730  # It is also a way to make sure we got the proper file name for the real test later on.
44731  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44732  if test "x$test_shortpath" = x; then
44733    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44734$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44735    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44736  fi
44737
44738  # Call helper function which possibly converts this using DOS-style short mode.
44739  # If so, the updated path is stored in $new_path.
44740
44741  input_path="$new_path"
44742  # Check if we need to convert this using DOS-style short mode. If the path
44743  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44744  # take no chances and rewrite it.
44745  # Note: m4 eats our [], so we need to use [ and ] instead.
44746  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44747  if test "x$has_forbidden_chars" != x; then
44748    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44749    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44750    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44751    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44752      # Going to short mode and back again did indeed matter. Since short mode is
44753      # case insensitive, let's make it lowercase to improve readability.
44754      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44755      # Now convert it back to Unix-stile (cygpath)
44756      input_path=`$CYGPATH -u "$shortmode_path"`
44757      new_path="$input_path"
44758    fi
44759  fi
44760
44761  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44762  if test "x$test_cygdrive_prefix" = x; then
44763    # As a simple fix, exclude /usr/bin since it's not a real path.
44764    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44765      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44766      # a path prefixed by /cygdrive for fixpath to work.
44767      new_path="$CYGWIN_ROOT_PATH$input_path"
44768    fi
44769  fi
44770
44771
44772  if test "x$path" != "x$new_path"; then
44773    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44774    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44775$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44776  fi
44777
44778  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44779
44780  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44781  has_colon=`$ECHO $path | $GREP ^.:`
44782  new_path="$path"
44783  if test "x$has_colon" = x; then
44784    # Not in mixed or Windows style, start by that.
44785    new_path=`cmd //c echo $path`
44786  fi
44787
44788
44789  input_path="$new_path"
44790  # Check if we need to convert this using DOS-style short mode. If the path
44791  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44792  # take no chances and rewrite it.
44793  # Note: m4 eats our [], so we need to use [ and ] instead.
44794  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44795  if test "x$has_forbidden_chars" != x; then
44796    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44797    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44798  fi
44799
44800
44801  windows_path="$new_path"
44802  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44803    unix_path=`$CYGPATH -u "$windows_path"`
44804    new_path="$unix_path"
44805  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44806    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44807    new_path="$unix_path"
44808  fi
44809
44810  if test "x$path" != "x$new_path"; then
44811    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44812    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44813$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44814  fi
44815
44816  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44817  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44818
44819  else
44820    # We're on a posix platform. Hooray! :)
44821    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44822    has_space=`$ECHO "$path" | $GREP " "`
44823    if test "x$has_space" != x; then
44824      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44825$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44826      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44827    fi
44828
44829    # Use eval to expand a potential ~
44830    eval path="$path"
44831    if test ! -f "$path" && test ! -d "$path"; then
44832      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44833    fi
44834
44835    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44836  fi
44837
44838
44839  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44840
44841  # Input might be given as Windows format, start by converting to
44842  # unix format.
44843  path="$POTENTIAL_FREETYPE_LIB_PATH"
44844  new_path=`$CYGPATH -u "$path"`
44845
44846  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44847  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44848  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44849  # "foo.exe" is OK but "foo" is an error.
44850  #
44851  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44852  # It is also a way to make sure we got the proper file name for the real test later on.
44853  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44854  if test "x$test_shortpath" = x; then
44855    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44856$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44857    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44858  fi
44859
44860  # Call helper function which possibly converts this using DOS-style short mode.
44861  # If so, the updated path is stored in $new_path.
44862
44863  input_path="$new_path"
44864  # Check if we need to convert this using DOS-style short mode. If the path
44865  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44866  # take no chances and rewrite it.
44867  # Note: m4 eats our [], so we need to use [ and ] instead.
44868  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44869  if test "x$has_forbidden_chars" != x; then
44870    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44871    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44872    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44873    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44874      # Going to short mode and back again did indeed matter. Since short mode is
44875      # case insensitive, let's make it lowercase to improve readability.
44876      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44877      # Now convert it back to Unix-stile (cygpath)
44878      input_path=`$CYGPATH -u "$shortmode_path"`
44879      new_path="$input_path"
44880    fi
44881  fi
44882
44883  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44884  if test "x$test_cygdrive_prefix" = x; then
44885    # As a simple fix, exclude /usr/bin since it's not a real path.
44886    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44887      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44888      # a path prefixed by /cygdrive for fixpath to work.
44889      new_path="$CYGWIN_ROOT_PATH$input_path"
44890    fi
44891  fi
44892
44893
44894  if test "x$path" != "x$new_path"; then
44895    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44896    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44897$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44898  fi
44899
44900  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44901
44902  path="$POTENTIAL_FREETYPE_LIB_PATH"
44903  has_colon=`$ECHO $path | $GREP ^.:`
44904  new_path="$path"
44905  if test "x$has_colon" = x; then
44906    # Not in mixed or Windows style, start by that.
44907    new_path=`cmd //c echo $path`
44908  fi
44909
44910
44911  input_path="$new_path"
44912  # Check if we need to convert this using DOS-style short mode. If the path
44913  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44914  # take no chances and rewrite it.
44915  # Note: m4 eats our [], so we need to use [ and ] instead.
44916  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44917  if test "x$has_forbidden_chars" != x; then
44918    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44919    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44920  fi
44921
44922
44923  windows_path="$new_path"
44924  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44925    unix_path=`$CYGPATH -u "$windows_path"`
44926    new_path="$unix_path"
44927  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44928    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44929    new_path="$unix_path"
44930  fi
44931
44932  if test "x$path" != "x$new_path"; then
44933    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44934    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44935$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44936  fi
44937
44938  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44939  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44940
44941  else
44942    # We're on a posix platform. Hooray! :)
44943    path="$POTENTIAL_FREETYPE_LIB_PATH"
44944    has_space=`$ECHO "$path" | $GREP " "`
44945    if test "x$has_space" != x; then
44946      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44947$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44948      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44949    fi
44950
44951    # Use eval to expand a potential ~
44952    eval path="$path"
44953    if test ! -f "$path" && test ! -d "$path"; then
44954      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44955    fi
44956
44957    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44958  fi
44959
44960
44961    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44962    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44963$as_echo_n "checking for freetype includes... " >&6; }
44964    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44965$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44966    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44967    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44968$as_echo_n "checking for freetype libraries... " >&6; }
44969    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44970$as_echo "$FREETYPE_LIB_PATH" >&6; }
44971  fi
44972
44973
44974          if test "x$FOUND_FREETYPE" != xyes; then
44975            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
44976
44977  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44978  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44979  METHOD="well-known location"
44980
44981  # First check if the files exists.
44982  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44983    # We found an arbitrary include file. That's a good sign.
44984    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44985$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44986    FOUND_FREETYPE=yes
44987
44988    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44989    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44990      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44991$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44992      FOUND_FREETYPE=no
44993    else
44994      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44995        # On Windows, we will need both .lib and .dll file.
44996        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44997          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44998$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44999          FOUND_FREETYPE=no
45000        fi
45001      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45002          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45003        # Found lib in isa dir, use that instead.
45004        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45005      fi
45006    fi
45007  fi
45008
45009  if test "x$FOUND_FREETYPE" = xyes; then
45010
45011  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45012
45013  # Input might be given as Windows format, start by converting to
45014  # unix format.
45015  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45016  new_path=`$CYGPATH -u "$path"`
45017
45018  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45019  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45020  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45021  # "foo.exe" is OK but "foo" is an error.
45022  #
45023  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45024  # It is also a way to make sure we got the proper file name for the real test later on.
45025  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45026  if test "x$test_shortpath" = x; then
45027    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45028$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45029    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45030  fi
45031
45032  # Call helper function which possibly converts this using DOS-style short mode.
45033  # If so, the updated path is stored in $new_path.
45034
45035  input_path="$new_path"
45036  # Check if we need to convert this using DOS-style short mode. If the path
45037  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45038  # take no chances and rewrite it.
45039  # Note: m4 eats our [], so we need to use [ and ] instead.
45040  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45041  if test "x$has_forbidden_chars" != x; then
45042    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45043    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45044    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45045    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45046      # Going to short mode and back again did indeed matter. Since short mode is
45047      # case insensitive, let's make it lowercase to improve readability.
45048      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45049      # Now convert it back to Unix-stile (cygpath)
45050      input_path=`$CYGPATH -u "$shortmode_path"`
45051      new_path="$input_path"
45052    fi
45053  fi
45054
45055  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45056  if test "x$test_cygdrive_prefix" = x; then
45057    # As a simple fix, exclude /usr/bin since it's not a real path.
45058    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45059      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45060      # a path prefixed by /cygdrive for fixpath to work.
45061      new_path="$CYGWIN_ROOT_PATH$input_path"
45062    fi
45063  fi
45064
45065
45066  if test "x$path" != "x$new_path"; then
45067    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45068    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45069$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45070  fi
45071
45072  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45073
45074  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45075  has_colon=`$ECHO $path | $GREP ^.:`
45076  new_path="$path"
45077  if test "x$has_colon" = x; then
45078    # Not in mixed or Windows style, start by that.
45079    new_path=`cmd //c echo $path`
45080  fi
45081
45082
45083  input_path="$new_path"
45084  # Check if we need to convert this using DOS-style short mode. If the path
45085  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45086  # take no chances and rewrite it.
45087  # Note: m4 eats our [], so we need to use [ and ] instead.
45088  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45089  if test "x$has_forbidden_chars" != x; then
45090    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45091    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45092  fi
45093
45094
45095  windows_path="$new_path"
45096  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45097    unix_path=`$CYGPATH -u "$windows_path"`
45098    new_path="$unix_path"
45099  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45100    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45101    new_path="$unix_path"
45102  fi
45103
45104  if test "x$path" != "x$new_path"; then
45105    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45106    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45107$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45108  fi
45109
45110  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45111  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45112
45113  else
45114    # We're on a posix platform. Hooray! :)
45115    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45116    has_space=`$ECHO "$path" | $GREP " "`
45117    if test "x$has_space" != x; then
45118      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45119$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45120      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45121    fi
45122
45123    # Use eval to expand a potential ~
45124    eval path="$path"
45125    if test ! -f "$path" && test ! -d "$path"; then
45126      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45127    fi
45128
45129    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45130  fi
45131
45132
45133  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45134
45135  # Input might be given as Windows format, start by converting to
45136  # unix format.
45137  path="$POTENTIAL_FREETYPE_LIB_PATH"
45138  new_path=`$CYGPATH -u "$path"`
45139
45140  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45141  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45142  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45143  # "foo.exe" is OK but "foo" is an error.
45144  #
45145  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45146  # It is also a way to make sure we got the proper file name for the real test later on.
45147  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45148  if test "x$test_shortpath" = x; then
45149    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45150$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45151    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45152  fi
45153
45154  # Call helper function which possibly converts this using DOS-style short mode.
45155  # If so, the updated path is stored in $new_path.
45156
45157  input_path="$new_path"
45158  # Check if we need to convert this using DOS-style short mode. If the path
45159  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45160  # take no chances and rewrite it.
45161  # Note: m4 eats our [], so we need to use [ and ] instead.
45162  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45163  if test "x$has_forbidden_chars" != x; then
45164    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45165    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45166    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45167    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45168      # Going to short mode and back again did indeed matter. Since short mode is
45169      # case insensitive, let's make it lowercase to improve readability.
45170      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45171      # Now convert it back to Unix-stile (cygpath)
45172      input_path=`$CYGPATH -u "$shortmode_path"`
45173      new_path="$input_path"
45174    fi
45175  fi
45176
45177  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45178  if test "x$test_cygdrive_prefix" = x; then
45179    # As a simple fix, exclude /usr/bin since it's not a real path.
45180    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45181      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45182      # a path prefixed by /cygdrive for fixpath to work.
45183      new_path="$CYGWIN_ROOT_PATH$input_path"
45184    fi
45185  fi
45186
45187
45188  if test "x$path" != "x$new_path"; then
45189    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45190    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45191$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45192  fi
45193
45194  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45195
45196  path="$POTENTIAL_FREETYPE_LIB_PATH"
45197  has_colon=`$ECHO $path | $GREP ^.:`
45198  new_path="$path"
45199  if test "x$has_colon" = x; then
45200    # Not in mixed or Windows style, start by that.
45201    new_path=`cmd //c echo $path`
45202  fi
45203
45204
45205  input_path="$new_path"
45206  # Check if we need to convert this using DOS-style short mode. If the path
45207  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45208  # take no chances and rewrite it.
45209  # Note: m4 eats our [], so we need to use [ and ] instead.
45210  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45211  if test "x$has_forbidden_chars" != x; then
45212    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45213    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45214  fi
45215
45216
45217  windows_path="$new_path"
45218  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45219    unix_path=`$CYGPATH -u "$windows_path"`
45220    new_path="$unix_path"
45221  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45222    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45223    new_path="$unix_path"
45224  fi
45225
45226  if test "x$path" != "x$new_path"; then
45227    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45228    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45229$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45230  fi
45231
45232  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45233  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45234
45235  else
45236    # We're on a posix platform. Hooray! :)
45237    path="$POTENTIAL_FREETYPE_LIB_PATH"
45238    has_space=`$ECHO "$path" | $GREP " "`
45239    if test "x$has_space" != x; then
45240      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45241$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45242      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45243    fi
45244
45245    # Use eval to expand a potential ~
45246    eval path="$path"
45247    if test ! -f "$path" && test ! -d "$path"; then
45248      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45249    fi
45250
45251    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45252  fi
45253
45254
45255    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45256    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45257$as_echo_n "checking for freetype includes... " >&6; }
45258    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45259$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45260    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45261    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45262$as_echo_n "checking for freetype libraries... " >&6; }
45263    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45264$as_echo "$FREETYPE_LIB_PATH" >&6; }
45265  fi
45266
45267          fi
45268
45269          if test "x$FOUND_FREETYPE" != xyes; then
45270            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
45271
45272  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45273  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45274  METHOD="well-known location"
45275
45276  # First check if the files exists.
45277  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45278    # We found an arbitrary include file. That's a good sign.
45279    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45280$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45281    FOUND_FREETYPE=yes
45282
45283    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45284    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45285      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45286$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45287      FOUND_FREETYPE=no
45288    else
45289      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45290        # On Windows, we will need both .lib and .dll file.
45291        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45292          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45293$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45294          FOUND_FREETYPE=no
45295        fi
45296      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45297          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45298        # Found lib in isa dir, use that instead.
45299        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45300      fi
45301    fi
45302  fi
45303
45304  if test "x$FOUND_FREETYPE" = xyes; then
45305
45306  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45307
45308  # Input might be given as Windows format, start by converting to
45309  # unix format.
45310  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45311  new_path=`$CYGPATH -u "$path"`
45312
45313  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45314  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45315  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45316  # "foo.exe" is OK but "foo" is an error.
45317  #
45318  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45319  # It is also a way to make sure we got the proper file name for the real test later on.
45320  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45321  if test "x$test_shortpath" = x; then
45322    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45323$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45324    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45325  fi
45326
45327  # Call helper function which possibly converts this using DOS-style short mode.
45328  # If so, the updated path is stored in $new_path.
45329
45330  input_path="$new_path"
45331  # Check if we need to convert this using DOS-style short mode. If the path
45332  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45333  # take no chances and rewrite it.
45334  # Note: m4 eats our [], so we need to use [ and ] instead.
45335  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45336  if test "x$has_forbidden_chars" != x; then
45337    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45338    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45339    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45340    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45341      # Going to short mode and back again did indeed matter. Since short mode is
45342      # case insensitive, let's make it lowercase to improve readability.
45343      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45344      # Now convert it back to Unix-stile (cygpath)
45345      input_path=`$CYGPATH -u "$shortmode_path"`
45346      new_path="$input_path"
45347    fi
45348  fi
45349
45350  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45351  if test "x$test_cygdrive_prefix" = x; then
45352    # As a simple fix, exclude /usr/bin since it's not a real path.
45353    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45354      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45355      # a path prefixed by /cygdrive for fixpath to work.
45356      new_path="$CYGWIN_ROOT_PATH$input_path"
45357    fi
45358  fi
45359
45360
45361  if test "x$path" != "x$new_path"; then
45362    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45363    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45364$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45365  fi
45366
45367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45368
45369  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45370  has_colon=`$ECHO $path | $GREP ^.:`
45371  new_path="$path"
45372  if test "x$has_colon" = x; then
45373    # Not in mixed or Windows style, start by that.
45374    new_path=`cmd //c echo $path`
45375  fi
45376
45377
45378  input_path="$new_path"
45379  # Check if we need to convert this using DOS-style short mode. If the path
45380  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45381  # take no chances and rewrite it.
45382  # Note: m4 eats our [], so we need to use [ and ] instead.
45383  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45384  if test "x$has_forbidden_chars" != x; then
45385    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45386    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45387  fi
45388
45389
45390  windows_path="$new_path"
45391  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45392    unix_path=`$CYGPATH -u "$windows_path"`
45393    new_path="$unix_path"
45394  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45395    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45396    new_path="$unix_path"
45397  fi
45398
45399  if test "x$path" != "x$new_path"; then
45400    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45401    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45402$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45403  fi
45404
45405  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45406  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45407
45408  else
45409    # We're on a posix platform. Hooray! :)
45410    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45411    has_space=`$ECHO "$path" | $GREP " "`
45412    if test "x$has_space" != x; then
45413      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45414$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45415      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45416    fi
45417
45418    # Use eval to expand a potential ~
45419    eval path="$path"
45420    if test ! -f "$path" && test ! -d "$path"; then
45421      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45422    fi
45423
45424    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45425  fi
45426
45427
45428  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45429
45430  # Input might be given as Windows format, start by converting to
45431  # unix format.
45432  path="$POTENTIAL_FREETYPE_LIB_PATH"
45433  new_path=`$CYGPATH -u "$path"`
45434
45435  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45436  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45437  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45438  # "foo.exe" is OK but "foo" is an error.
45439  #
45440  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45441  # It is also a way to make sure we got the proper file name for the real test later on.
45442  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45443  if test "x$test_shortpath" = x; then
45444    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45445$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45446    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45447  fi
45448
45449  # Call helper function which possibly converts this using DOS-style short mode.
45450  # If so, the updated path is stored in $new_path.
45451
45452  input_path="$new_path"
45453  # Check if we need to convert this using DOS-style short mode. If the path
45454  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45455  # take no chances and rewrite it.
45456  # Note: m4 eats our [], so we need to use [ and ] instead.
45457  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45458  if test "x$has_forbidden_chars" != x; then
45459    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45460    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45461    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45462    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45463      # Going to short mode and back again did indeed matter. Since short mode is
45464      # case insensitive, let's make it lowercase to improve readability.
45465      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45466      # Now convert it back to Unix-stile (cygpath)
45467      input_path=`$CYGPATH -u "$shortmode_path"`
45468      new_path="$input_path"
45469    fi
45470  fi
45471
45472  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45473  if test "x$test_cygdrive_prefix" = x; then
45474    # As a simple fix, exclude /usr/bin since it's not a real path.
45475    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45476      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45477      # a path prefixed by /cygdrive for fixpath to work.
45478      new_path="$CYGWIN_ROOT_PATH$input_path"
45479    fi
45480  fi
45481
45482
45483  if test "x$path" != "x$new_path"; then
45484    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45485    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45486$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45487  fi
45488
45489  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45490
45491  path="$POTENTIAL_FREETYPE_LIB_PATH"
45492  has_colon=`$ECHO $path | $GREP ^.:`
45493  new_path="$path"
45494  if test "x$has_colon" = x; then
45495    # Not in mixed or Windows style, start by that.
45496    new_path=`cmd //c echo $path`
45497  fi
45498
45499
45500  input_path="$new_path"
45501  # Check if we need to convert this using DOS-style short mode. If the path
45502  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45503  # take no chances and rewrite it.
45504  # Note: m4 eats our [], so we need to use [ and ] instead.
45505  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45506  if test "x$has_forbidden_chars" != x; then
45507    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45508    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45509  fi
45510
45511
45512  windows_path="$new_path"
45513  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45514    unix_path=`$CYGPATH -u "$windows_path"`
45515    new_path="$unix_path"
45516  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45517    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45518    new_path="$unix_path"
45519  fi
45520
45521  if test "x$path" != "x$new_path"; then
45522    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45523    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45524$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45525  fi
45526
45527  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45528  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45529
45530  else
45531    # We're on a posix platform. Hooray! :)
45532    path="$POTENTIAL_FREETYPE_LIB_PATH"
45533    has_space=`$ECHO "$path" | $GREP " "`
45534    if test "x$has_space" != x; then
45535      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45536$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45537      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45538    fi
45539
45540    # Use eval to expand a potential ~
45541    eval path="$path"
45542    if test ! -f "$path" && test ! -d "$path"; then
45543      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45544    fi
45545
45546    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45547  fi
45548
45549
45550    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45551    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45552$as_echo_n "checking for freetype includes... " >&6; }
45553    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45554$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45555    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45556    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45557$as_echo_n "checking for freetype libraries... " >&6; }
45558    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45559$as_echo "$FREETYPE_LIB_PATH" >&6; }
45560  fi
45561
45562          fi
45563
45564          if test "x$FOUND_FREETYPE" != xyes; then
45565            FREETYPE_BASE_DIR="$SYSROOT/usr"
45566            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
45567
45568  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45569  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
45570  METHOD="well-known location"
45571
45572  # First check if the files exists.
45573  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45574    # We found an arbitrary include file. That's a good sign.
45575    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45576$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45577    FOUND_FREETYPE=yes
45578
45579    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45580    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45581      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45582$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45583      FOUND_FREETYPE=no
45584    else
45585      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45586        # On Windows, we will need both .lib and .dll file.
45587        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45588          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45589$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45590          FOUND_FREETYPE=no
45591        fi
45592      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45593          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45594        # Found lib in isa dir, use that instead.
45595        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45596      fi
45597    fi
45598  fi
45599
45600  if test "x$FOUND_FREETYPE" = xyes; then
45601
45602  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45603
45604  # Input might be given as Windows format, start by converting to
45605  # unix format.
45606  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45607  new_path=`$CYGPATH -u "$path"`
45608
45609  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45610  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45611  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45612  # "foo.exe" is OK but "foo" is an error.
45613  #
45614  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45615  # It is also a way to make sure we got the proper file name for the real test later on.
45616  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45617  if test "x$test_shortpath" = x; then
45618    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45619$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45620    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45621  fi
45622
45623  # Call helper function which possibly converts this using DOS-style short mode.
45624  # If so, the updated path is stored in $new_path.
45625
45626  input_path="$new_path"
45627  # Check if we need to convert this using DOS-style short mode. If the path
45628  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45629  # take no chances and rewrite it.
45630  # Note: m4 eats our [], so we need to use [ and ] instead.
45631  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45632  if test "x$has_forbidden_chars" != x; then
45633    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45634    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45635    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45636    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45637      # Going to short mode and back again did indeed matter. Since short mode is
45638      # case insensitive, let's make it lowercase to improve readability.
45639      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45640      # Now convert it back to Unix-stile (cygpath)
45641      input_path=`$CYGPATH -u "$shortmode_path"`
45642      new_path="$input_path"
45643    fi
45644  fi
45645
45646  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45647  if test "x$test_cygdrive_prefix" = x; then
45648    # As a simple fix, exclude /usr/bin since it's not a real path.
45649    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45650      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45651      # a path prefixed by /cygdrive for fixpath to work.
45652      new_path="$CYGWIN_ROOT_PATH$input_path"
45653    fi
45654  fi
45655
45656
45657  if test "x$path" != "x$new_path"; then
45658    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45659    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45660$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45661  fi
45662
45663  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45664
45665  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45666  has_colon=`$ECHO $path | $GREP ^.:`
45667  new_path="$path"
45668  if test "x$has_colon" = x; then
45669    # Not in mixed or Windows style, start by that.
45670    new_path=`cmd //c echo $path`
45671  fi
45672
45673
45674  input_path="$new_path"
45675  # Check if we need to convert this using DOS-style short mode. If the path
45676  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45677  # take no chances and rewrite it.
45678  # Note: m4 eats our [], so we need to use [ and ] instead.
45679  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45680  if test "x$has_forbidden_chars" != x; then
45681    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45682    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45683  fi
45684
45685
45686  windows_path="$new_path"
45687  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45688    unix_path=`$CYGPATH -u "$windows_path"`
45689    new_path="$unix_path"
45690  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45691    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45692    new_path="$unix_path"
45693  fi
45694
45695  if test "x$path" != "x$new_path"; then
45696    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45697    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45698$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45699  fi
45700
45701  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45702  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45703
45704  else
45705    # We're on a posix platform. Hooray! :)
45706    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45707    has_space=`$ECHO "$path" | $GREP " "`
45708    if test "x$has_space" != x; then
45709      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45710$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45711      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45712    fi
45713
45714    # Use eval to expand a potential ~
45715    eval path="$path"
45716    if test ! -f "$path" && test ! -d "$path"; then
45717      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45718    fi
45719
45720    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45721  fi
45722
45723
45724  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45725
45726  # Input might be given as Windows format, start by converting to
45727  # unix format.
45728  path="$POTENTIAL_FREETYPE_LIB_PATH"
45729  new_path=`$CYGPATH -u "$path"`
45730
45731  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45732  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45733  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45734  # "foo.exe" is OK but "foo" is an error.
45735  #
45736  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45737  # It is also a way to make sure we got the proper file name for the real test later on.
45738  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45739  if test "x$test_shortpath" = x; then
45740    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45741$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45742    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45743  fi
45744
45745  # Call helper function which possibly converts this using DOS-style short mode.
45746  # If so, the updated path is stored in $new_path.
45747
45748  input_path="$new_path"
45749  # Check if we need to convert this using DOS-style short mode. If the path
45750  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45751  # take no chances and rewrite it.
45752  # Note: m4 eats our [], so we need to use [ and ] instead.
45753  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45754  if test "x$has_forbidden_chars" != x; then
45755    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45756    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45757    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45758    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45759      # Going to short mode and back again did indeed matter. Since short mode is
45760      # case insensitive, let's make it lowercase to improve readability.
45761      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45762      # Now convert it back to Unix-stile (cygpath)
45763      input_path=`$CYGPATH -u "$shortmode_path"`
45764      new_path="$input_path"
45765    fi
45766  fi
45767
45768  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45769  if test "x$test_cygdrive_prefix" = x; then
45770    # As a simple fix, exclude /usr/bin since it's not a real path.
45771    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45772      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45773      # a path prefixed by /cygdrive for fixpath to work.
45774      new_path="$CYGWIN_ROOT_PATH$input_path"
45775    fi
45776  fi
45777
45778
45779  if test "x$path" != "x$new_path"; then
45780    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45781    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45782$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45783  fi
45784
45785  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45786
45787  path="$POTENTIAL_FREETYPE_LIB_PATH"
45788  has_colon=`$ECHO $path | $GREP ^.:`
45789  new_path="$path"
45790  if test "x$has_colon" = x; then
45791    # Not in mixed or Windows style, start by that.
45792    new_path=`cmd //c echo $path`
45793  fi
45794
45795
45796  input_path="$new_path"
45797  # Check if we need to convert this using DOS-style short mode. If the path
45798  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45799  # take no chances and rewrite it.
45800  # Note: m4 eats our [], so we need to use [ and ] instead.
45801  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45802  if test "x$has_forbidden_chars" != x; then
45803    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45804    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45805  fi
45806
45807
45808  windows_path="$new_path"
45809  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45810    unix_path=`$CYGPATH -u "$windows_path"`
45811    new_path="$unix_path"
45812  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45813    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45814    new_path="$unix_path"
45815  fi
45816
45817  if test "x$path" != "x$new_path"; then
45818    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45819    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45820$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45821  fi
45822
45823  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45824  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45825
45826  else
45827    # We're on a posix platform. Hooray! :)
45828    path="$POTENTIAL_FREETYPE_LIB_PATH"
45829    has_space=`$ECHO "$path" | $GREP " "`
45830    if test "x$has_space" != x; then
45831      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45832$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45833      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45834    fi
45835
45836    # Use eval to expand a potential ~
45837    eval path="$path"
45838    if test ! -f "$path" && test ! -d "$path"; then
45839      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45840    fi
45841
45842    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45843  fi
45844
45845
45846    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45847    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45848$as_echo_n "checking for freetype includes... " >&6; }
45849    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45850$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45851    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45852    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45853$as_echo_n "checking for freetype libraries... " >&6; }
45854    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45855$as_echo "$FREETYPE_LIB_PATH" >&6; }
45856  fi
45857
45858            else
45859
45860  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45861  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
45862  METHOD="well-known location"
45863
45864  # First check if the files exists.
45865  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45866    # We found an arbitrary include file. That's a good sign.
45867    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45868$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45869    FOUND_FREETYPE=yes
45870
45871    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45872    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45873      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45874$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45875      FOUND_FREETYPE=no
45876    else
45877      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45878        # On Windows, we will need both .lib and .dll file.
45879        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45880          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45881$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45882          FOUND_FREETYPE=no
45883        fi
45884      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45885          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45886        # Found lib in isa dir, use that instead.
45887        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45888      fi
45889    fi
45890  fi
45891
45892  if test "x$FOUND_FREETYPE" = xyes; then
45893
45894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45895
45896  # Input might be given as Windows format, start by converting to
45897  # unix format.
45898  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45899  new_path=`$CYGPATH -u "$path"`
45900
45901  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45902  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45903  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45904  # "foo.exe" is OK but "foo" is an error.
45905  #
45906  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45907  # It is also a way to make sure we got the proper file name for the real test later on.
45908  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45909  if test "x$test_shortpath" = x; then
45910    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45911$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45912    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45913  fi
45914
45915  # Call helper function which possibly converts this using DOS-style short mode.
45916  # If so, the updated path is stored in $new_path.
45917
45918  input_path="$new_path"
45919  # Check if we need to convert this using DOS-style short mode. If the path
45920  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45921  # take no chances and rewrite it.
45922  # Note: m4 eats our [], so we need to use [ and ] instead.
45923  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45924  if test "x$has_forbidden_chars" != x; then
45925    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45926    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45927    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45928    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45929      # Going to short mode and back again did indeed matter. Since short mode is
45930      # case insensitive, let's make it lowercase to improve readability.
45931      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45932      # Now convert it back to Unix-stile (cygpath)
45933      input_path=`$CYGPATH -u "$shortmode_path"`
45934      new_path="$input_path"
45935    fi
45936  fi
45937
45938  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45939  if test "x$test_cygdrive_prefix" = x; then
45940    # As a simple fix, exclude /usr/bin since it's not a real path.
45941    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45942      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45943      # a path prefixed by /cygdrive for fixpath to work.
45944      new_path="$CYGWIN_ROOT_PATH$input_path"
45945    fi
45946  fi
45947
45948
45949  if test "x$path" != "x$new_path"; then
45950    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45951    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45952$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45953  fi
45954
45955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45956
45957  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45958  has_colon=`$ECHO $path | $GREP ^.:`
45959  new_path="$path"
45960  if test "x$has_colon" = x; then
45961    # Not in mixed or Windows style, start by that.
45962    new_path=`cmd //c echo $path`
45963  fi
45964
45965
45966  input_path="$new_path"
45967  # Check if we need to convert this using DOS-style short mode. If the path
45968  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45969  # take no chances and rewrite it.
45970  # Note: m4 eats our [], so we need to use [ and ] instead.
45971  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45972  if test "x$has_forbidden_chars" != x; then
45973    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45974    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45975  fi
45976
45977
45978  windows_path="$new_path"
45979  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45980    unix_path=`$CYGPATH -u "$windows_path"`
45981    new_path="$unix_path"
45982  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45983    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45984    new_path="$unix_path"
45985  fi
45986
45987  if test "x$path" != "x$new_path"; then
45988    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45989    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45990$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45991  fi
45992
45993  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45994  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45995
45996  else
45997    # We're on a posix platform. Hooray! :)
45998    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45999    has_space=`$ECHO "$path" | $GREP " "`
46000    if test "x$has_space" != x; then
46001      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46002$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46003      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46004    fi
46005
46006    # Use eval to expand a potential ~
46007    eval path="$path"
46008    if test ! -f "$path" && test ! -d "$path"; then
46009      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46010    fi
46011
46012    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46013  fi
46014
46015
46016  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46017
46018  # Input might be given as Windows format, start by converting to
46019  # unix format.
46020  path="$POTENTIAL_FREETYPE_LIB_PATH"
46021  new_path=`$CYGPATH -u "$path"`
46022
46023  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46024  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46025  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46026  # "foo.exe" is OK but "foo" is an error.
46027  #
46028  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46029  # It is also a way to make sure we got the proper file name for the real test later on.
46030  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46031  if test "x$test_shortpath" = x; then
46032    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46033$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46034    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46035  fi
46036
46037  # Call helper function which possibly converts this using DOS-style short mode.
46038  # If so, the updated path is stored in $new_path.
46039
46040  input_path="$new_path"
46041  # Check if we need to convert this using DOS-style short mode. If the path
46042  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46043  # take no chances and rewrite it.
46044  # Note: m4 eats our [], so we need to use [ and ] instead.
46045  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46046  if test "x$has_forbidden_chars" != x; then
46047    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46048    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46049    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46050    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46051      # Going to short mode and back again did indeed matter. Since short mode is
46052      # case insensitive, let's make it lowercase to improve readability.
46053      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46054      # Now convert it back to Unix-stile (cygpath)
46055      input_path=`$CYGPATH -u "$shortmode_path"`
46056      new_path="$input_path"
46057    fi
46058  fi
46059
46060  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46061  if test "x$test_cygdrive_prefix" = x; then
46062    # As a simple fix, exclude /usr/bin since it's not a real path.
46063    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46064      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46065      # a path prefixed by /cygdrive for fixpath to work.
46066      new_path="$CYGWIN_ROOT_PATH$input_path"
46067    fi
46068  fi
46069
46070
46071  if test "x$path" != "x$new_path"; then
46072    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46073    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46074$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46075  fi
46076
46077  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46078
46079  path="$POTENTIAL_FREETYPE_LIB_PATH"
46080  has_colon=`$ECHO $path | $GREP ^.:`
46081  new_path="$path"
46082  if test "x$has_colon" = x; then
46083    # Not in mixed or Windows style, start by that.
46084    new_path=`cmd //c echo $path`
46085  fi
46086
46087
46088  input_path="$new_path"
46089  # Check if we need to convert this using DOS-style short mode. If the path
46090  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46091  # take no chances and rewrite it.
46092  # Note: m4 eats our [], so we need to use [ and ] instead.
46093  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46094  if test "x$has_forbidden_chars" != x; then
46095    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46096    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46097  fi
46098
46099
46100  windows_path="$new_path"
46101  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46102    unix_path=`$CYGPATH -u "$windows_path"`
46103    new_path="$unix_path"
46104  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46105    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46106    new_path="$unix_path"
46107  fi
46108
46109  if test "x$path" != "x$new_path"; then
46110    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46111    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46112$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46113  fi
46114
46115  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46116  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46117
46118  else
46119    # We're on a posix platform. Hooray! :)
46120    path="$POTENTIAL_FREETYPE_LIB_PATH"
46121    has_space=`$ECHO "$path" | $GREP " "`
46122    if test "x$has_space" != x; then
46123      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46124$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46125      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46126    fi
46127
46128    # Use eval to expand a potential ~
46129    eval path="$path"
46130    if test ! -f "$path" && test ! -d "$path"; then
46131      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46132    fi
46133
46134    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46135  fi
46136
46137
46138    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46139    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46140$as_echo_n "checking for freetype includes... " >&6; }
46141    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46142$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46143    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46144    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46145$as_echo_n "checking for freetype libraries... " >&6; }
46146    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46147$as_echo "$FREETYPE_LIB_PATH" >&6; }
46148  fi
46149
46150              if test "x$FOUND_FREETYPE" != xyes; then
46151
46152  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46153  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
46154  METHOD="well-known location"
46155
46156  # First check if the files exists.
46157  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46158    # We found an arbitrary include file. That's a good sign.
46159    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46160$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46161    FOUND_FREETYPE=yes
46162
46163    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
46164    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46165      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46166$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46167      FOUND_FREETYPE=no
46168    else
46169      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46170        # On Windows, we will need both .lib and .dll file.
46171        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
46172          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
46173$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
46174          FOUND_FREETYPE=no
46175        fi
46176      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46177          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46178        # Found lib in isa dir, use that instead.
46179        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46180      fi
46181    fi
46182  fi
46183
46184  if test "x$FOUND_FREETYPE" = xyes; then
46185
46186  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46187
46188  # Input might be given as Windows format, start by converting to
46189  # unix format.
46190  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46191  new_path=`$CYGPATH -u "$path"`
46192
46193  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46194  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46195  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46196  # "foo.exe" is OK but "foo" is an error.
46197  #
46198  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46199  # It is also a way to make sure we got the proper file name for the real test later on.
46200  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46201  if test "x$test_shortpath" = x; then
46202    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46203$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46204    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46205  fi
46206
46207  # Call helper function which possibly converts this using DOS-style short mode.
46208  # If so, the updated path is stored in $new_path.
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46219    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46220    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46221      # Going to short mode and back again did indeed matter. Since short mode is
46222      # case insensitive, let's make it lowercase to improve readability.
46223      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46224      # Now convert it back to Unix-stile (cygpath)
46225      input_path=`$CYGPATH -u "$shortmode_path"`
46226      new_path="$input_path"
46227    fi
46228  fi
46229
46230  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46231  if test "x$test_cygdrive_prefix" = x; then
46232    # As a simple fix, exclude /usr/bin since it's not a real path.
46233    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46234      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46235      # a path prefixed by /cygdrive for fixpath to work.
46236      new_path="$CYGWIN_ROOT_PATH$input_path"
46237    fi
46238  fi
46239
46240
46241  if test "x$path" != "x$new_path"; then
46242    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46243    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46244$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46245  fi
46246
46247  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46248
46249  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46250  has_colon=`$ECHO $path | $GREP ^.:`
46251  new_path="$path"
46252  if test "x$has_colon" = x; then
46253    # Not in mixed or Windows style, start by that.
46254    new_path=`cmd //c echo $path`
46255  fi
46256
46257
46258  input_path="$new_path"
46259  # Check if we need to convert this using DOS-style short mode. If the path
46260  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46261  # take no chances and rewrite it.
46262  # Note: m4 eats our [], so we need to use [ and ] instead.
46263  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46264  if test "x$has_forbidden_chars" != x; then
46265    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46266    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46267  fi
46268
46269
46270  windows_path="$new_path"
46271  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46272    unix_path=`$CYGPATH -u "$windows_path"`
46273    new_path="$unix_path"
46274  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46275    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46276    new_path="$unix_path"
46277  fi
46278
46279  if test "x$path" != "x$new_path"; then
46280    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46281    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46282$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46283  fi
46284
46285  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46286  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46287
46288  else
46289    # We're on a posix platform. Hooray! :)
46290    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46291    has_space=`$ECHO "$path" | $GREP " "`
46292    if test "x$has_space" != x; then
46293      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46294$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46295      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46296    fi
46297
46298    # Use eval to expand a potential ~
46299    eval path="$path"
46300    if test ! -f "$path" && test ! -d "$path"; then
46301      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46302    fi
46303
46304    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46305  fi
46306
46307
46308  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46309
46310  # Input might be given as Windows format, start by converting to
46311  # unix format.
46312  path="$POTENTIAL_FREETYPE_LIB_PATH"
46313  new_path=`$CYGPATH -u "$path"`
46314
46315  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46316  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46317  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46318  # "foo.exe" is OK but "foo" is an error.
46319  #
46320  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46321  # It is also a way to make sure we got the proper file name for the real test later on.
46322  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46323  if test "x$test_shortpath" = x; then
46324    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46325$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46326    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46327  fi
46328
46329  # Call helper function which possibly converts this using DOS-style short mode.
46330  # If so, the updated path is stored in $new_path.
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46341    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46342    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46343      # Going to short mode and back again did indeed matter. Since short mode is
46344      # case insensitive, let's make it lowercase to improve readability.
46345      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46346      # Now convert it back to Unix-stile (cygpath)
46347      input_path=`$CYGPATH -u "$shortmode_path"`
46348      new_path="$input_path"
46349    fi
46350  fi
46351
46352  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46353  if test "x$test_cygdrive_prefix" = x; then
46354    # As a simple fix, exclude /usr/bin since it's not a real path.
46355    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46356      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46357      # a path prefixed by /cygdrive for fixpath to work.
46358      new_path="$CYGWIN_ROOT_PATH$input_path"
46359    fi
46360  fi
46361
46362
46363  if test "x$path" != "x$new_path"; then
46364    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46365    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46366$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46367  fi
46368
46369  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46370
46371  path="$POTENTIAL_FREETYPE_LIB_PATH"
46372  has_colon=`$ECHO $path | $GREP ^.:`
46373  new_path="$path"
46374  if test "x$has_colon" = x; then
46375    # Not in mixed or Windows style, start by that.
46376    new_path=`cmd //c echo $path`
46377  fi
46378
46379
46380  input_path="$new_path"
46381  # Check if we need to convert this using DOS-style short mode. If the path
46382  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46383  # take no chances and rewrite it.
46384  # Note: m4 eats our [], so we need to use [ and ] instead.
46385  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46386  if test "x$has_forbidden_chars" != x; then
46387    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46388    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46389  fi
46390
46391
46392  windows_path="$new_path"
46393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46394    unix_path=`$CYGPATH -u "$windows_path"`
46395    new_path="$unix_path"
46396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46397    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46398    new_path="$unix_path"
46399  fi
46400
46401  if test "x$path" != "x$new_path"; then
46402    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46403    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46404$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46405  fi
46406
46407  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46408  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46409
46410  else
46411    # We're on a posix platform. Hooray! :)
46412    path="$POTENTIAL_FREETYPE_LIB_PATH"
46413    has_space=`$ECHO "$path" | $GREP " "`
46414    if test "x$has_space" != x; then
46415      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46416$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46417      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46418    fi
46419
46420    # Use eval to expand a potential ~
46421    eval path="$path"
46422    if test ! -f "$path" && test ! -d "$path"; then
46423      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46424    fi
46425
46426    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46427  fi
46428
46429
46430    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46431    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46432$as_echo_n "checking for freetype includes... " >&6; }
46433    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46434$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46435    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46436    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46437$as_echo_n "checking for freetype libraries... " >&6; }
46438    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46439$as_echo "$FREETYPE_LIB_PATH" >&6; }
46440  fi
46441
46442              fi
46443            fi
46444          fi
46445        fi
46446      fi # end check in well-known locations
46447
46448      if test "x$FOUND_FREETYPE" != xyes; then
46449
46450  # Print a helpful message on how to acquire the necessary build dependency.
46451  # freetype is the help tag: freetype, cups, pulse, alsa etc
46452  MISSING_DEPENDENCY=freetype
46453
46454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46455    cygwin_help $MISSING_DEPENDENCY
46456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46457    msys_help $MISSING_DEPENDENCY
46458  else
46459    PKGHANDLER_COMMAND=
46460
46461    case $PKGHANDLER in
46462      apt-get)
46463        apt_help     $MISSING_DEPENDENCY ;;
46464      yum)
46465        yum_help     $MISSING_DEPENDENCY ;;
46466      port)
46467        port_help    $MISSING_DEPENDENCY ;;
46468      pkgutil)
46469        pkgutil_help $MISSING_DEPENDENCY ;;
46470      pkgadd)
46471        pkgadd_help  $MISSING_DEPENDENCY ;;
46472    esac
46473
46474    if test "x$PKGHANDLER_COMMAND" != x; then
46475      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
46476    fi
46477  fi
46478
46479        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
46480      fi
46481    fi # end user specified settings
46482
46483    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
46484    if test "x$FREETYPE_CFLAGS" = x; then
46485
46486  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46487
46488  # Input might be given as Windows format, start by converting to
46489  # unix format.
46490  path="$FREETYPE_INCLUDE_PATH"
46491  new_path=`$CYGPATH -u "$path"`
46492
46493  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46494  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46495  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46496  # "foo.exe" is OK but "foo" is an error.
46497  #
46498  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46499  # It is also a way to make sure we got the proper file name for the real test later on.
46500  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46501  if test "x$test_shortpath" = x; then
46502    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46503$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46504    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
46505  fi
46506
46507  # Call helper function which possibly converts this using DOS-style short mode.
46508  # If so, the updated path is stored in $new_path.
46509
46510  input_path="$new_path"
46511  # Check if we need to convert this using DOS-style short mode. If the path
46512  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46513  # take no chances and rewrite it.
46514  # Note: m4 eats our [], so we need to use [ and ] instead.
46515  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46516  if test "x$has_forbidden_chars" != x; then
46517    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46518    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46519    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46520    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46521      # Going to short mode and back again did indeed matter. Since short mode is
46522      # case insensitive, let's make it lowercase to improve readability.
46523      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46524      # Now convert it back to Unix-stile (cygpath)
46525      input_path=`$CYGPATH -u "$shortmode_path"`
46526      new_path="$input_path"
46527    fi
46528  fi
46529
46530  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46531  if test "x$test_cygdrive_prefix" = x; then
46532    # As a simple fix, exclude /usr/bin since it's not a real path.
46533    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46534      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46535      # a path prefixed by /cygdrive for fixpath to work.
46536      new_path="$CYGWIN_ROOT_PATH$input_path"
46537    fi
46538  fi
46539
46540
46541  if test "x$path" != "x$new_path"; then
46542    FREETYPE_INCLUDE_PATH="$new_path"
46543    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46544$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46545  fi
46546
46547  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46548
46549  path="$FREETYPE_INCLUDE_PATH"
46550  has_colon=`$ECHO $path | $GREP ^.:`
46551  new_path="$path"
46552  if test "x$has_colon" = x; then
46553    # Not in mixed or Windows style, start by that.
46554    new_path=`cmd //c echo $path`
46555  fi
46556
46557
46558  input_path="$new_path"
46559  # Check if we need to convert this using DOS-style short mode. If the path
46560  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46561  # take no chances and rewrite it.
46562  # Note: m4 eats our [], so we need to use [ and ] instead.
46563  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46564  if test "x$has_forbidden_chars" != x; then
46565    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46566    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46567  fi
46568
46569
46570  windows_path="$new_path"
46571  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46572    unix_path=`$CYGPATH -u "$windows_path"`
46573    new_path="$unix_path"
46574  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46575    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46576    new_path="$unix_path"
46577  fi
46578
46579  if test "x$path" != "x$new_path"; then
46580    FREETYPE_INCLUDE_PATH="$new_path"
46581    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46582$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46583  fi
46584
46585  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46586  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46587
46588  else
46589    # We're on a posix platform. Hooray! :)
46590    path="$FREETYPE_INCLUDE_PATH"
46591    has_space=`$ECHO "$path" | $GREP " "`
46592    if test "x$has_space" != x; then
46593      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46594$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46595      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46596    fi
46597
46598    # Use eval to expand a potential ~
46599    eval path="$path"
46600    if test ! -f "$path" && test ! -d "$path"; then
46601      as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46602    fi
46603
46604    FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46605  fi
46606
46607      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
46608        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
46609      else
46610        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
46611      fi
46612    fi
46613
46614    if test "x$FREETYPE_LIBS" = x; then
46615
46616  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46617
46618  # Input might be given as Windows format, start by converting to
46619  # unix format.
46620  path="$FREETYPE_LIB_PATH"
46621  new_path=`$CYGPATH -u "$path"`
46622
46623  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46624  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46625  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46626  # "foo.exe" is OK but "foo" is an error.
46627  #
46628  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46629  # It is also a way to make sure we got the proper file name for the real test later on.
46630  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46631  if test "x$test_shortpath" = x; then
46632    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46633$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46634    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
46635  fi
46636
46637  # Call helper function which possibly converts this using DOS-style short mode.
46638  # If so, the updated path is stored in $new_path.
46639
46640  input_path="$new_path"
46641  # Check if we need to convert this using DOS-style short mode. If the path
46642  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46643  # take no chances and rewrite it.
46644  # Note: m4 eats our [], so we need to use [ and ] instead.
46645  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46646  if test "x$has_forbidden_chars" != x; then
46647    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46648    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46649    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46650    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46651      # Going to short mode and back again did indeed matter. Since short mode is
46652      # case insensitive, let's make it lowercase to improve readability.
46653      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46654      # Now convert it back to Unix-stile (cygpath)
46655      input_path=`$CYGPATH -u "$shortmode_path"`
46656      new_path="$input_path"
46657    fi
46658  fi
46659
46660  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46661  if test "x$test_cygdrive_prefix" = x; then
46662    # As a simple fix, exclude /usr/bin since it's not a real path.
46663    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46664      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46665      # a path prefixed by /cygdrive for fixpath to work.
46666      new_path="$CYGWIN_ROOT_PATH$input_path"
46667    fi
46668  fi
46669
46670
46671  if test "x$path" != "x$new_path"; then
46672    FREETYPE_LIB_PATH="$new_path"
46673    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
46674$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46675  fi
46676
46677  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46678
46679  path="$FREETYPE_LIB_PATH"
46680  has_colon=`$ECHO $path | $GREP ^.:`
46681  new_path="$path"
46682  if test "x$has_colon" = x; then
46683    # Not in mixed or Windows style, start by that.
46684    new_path=`cmd //c echo $path`
46685  fi
46686
46687
46688  input_path="$new_path"
46689  # Check if we need to convert this using DOS-style short mode. If the path
46690  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46691  # take no chances and rewrite it.
46692  # Note: m4 eats our [], so we need to use [ and ] instead.
46693  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46694  if test "x$has_forbidden_chars" != x; then
46695    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46696    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46697  fi
46698
46699
46700  windows_path="$new_path"
46701  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46702    unix_path=`$CYGPATH -u "$windows_path"`
46703    new_path="$unix_path"
46704  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46705    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46706    new_path="$unix_path"
46707  fi
46708
46709  if test "x$path" != "x$new_path"; then
46710    FREETYPE_LIB_PATH="$new_path"
46711    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
46712$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46713  fi
46714
46715  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46716  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46717
46718  else
46719    # We're on a posix platform. Hooray! :)
46720    path="$FREETYPE_LIB_PATH"
46721    has_space=`$ECHO "$path" | $GREP " "`
46722    if test "x$has_space" != x; then
46723      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46724$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46725      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46726    fi
46727
46728    # Use eval to expand a potential ~
46729    eval path="$path"
46730    if test ! -f "$path" && test ! -d "$path"; then
46731      as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46732    fi
46733
46734    FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46735  fi
46736
46737      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46738        FREETYPE_LIBS="$FREETYPE_LIB_PATH/freetype.lib"
46739      else
46740        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -lfreetype"
46741      fi
46742    fi
46743
46744    # Try to compile it
46745    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
46746$as_echo_n "checking if we can compile and link with freetype... " >&6; }
46747    ac_ext=cpp
46748ac_cpp='$CXXCPP $CPPFLAGS'
46749ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46750ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46751ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46752
46753    PREV_CXXCFLAGS="$CXXFLAGS"
46754    PREV_LIBS="$LIBS"
46755    PREV_CXX="$CXX"
46756    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
46757    LIBS="$LIBS $FREETYPE_LIBS"
46758    CXX="$FIXPATH $CXX"
46759    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46760/* end confdefs.h.  */
46761
46762          #include<ft2build.h>
46763          #include FT_FREETYPE_H
46764          int main () {
46765            FT_Init_FreeType(NULL);
46766            return 0;
46767          }
46768
46769_ACEOF
46770if ac_fn_cxx_try_link "$LINENO"; then :
46771
46772          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
46773$as_echo "yes" >&6; }
46774
46775else
46776
46777          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46778$as_echo "no" >&6; }
46779          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
46780$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
46781          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
46782$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
46783
46784
46785  # Print a helpful message on how to acquire the necessary build dependency.
46786  # freetype is the help tag: freetype, cups, pulse, alsa etc
46787  MISSING_DEPENDENCY=freetype
46788
46789  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46790    cygwin_help $MISSING_DEPENDENCY
46791  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46792    msys_help $MISSING_DEPENDENCY
46793  else
46794    PKGHANDLER_COMMAND=
46795
46796    case $PKGHANDLER in
46797      apt-get)
46798        apt_help     $MISSING_DEPENDENCY ;;
46799      yum)
46800        yum_help     $MISSING_DEPENDENCY ;;
46801      port)
46802        port_help    $MISSING_DEPENDENCY ;;
46803      pkgutil)
46804        pkgutil_help $MISSING_DEPENDENCY ;;
46805      pkgadd)
46806        pkgadd_help  $MISSING_DEPENDENCY ;;
46807    esac
46808
46809    if test "x$PKGHANDLER_COMMAND" != x; then
46810      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
46811    fi
46812  fi
46813
46814
46815          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
46816
46817
46818fi
46819rm -f core conftest.err conftest.$ac_objext \
46820    conftest$ac_exeext conftest.$ac_ext
46821    CXXCFLAGS="$PREV_CXXFLAGS"
46822    LIBS="$PREV_LIBS"
46823    CXX="$PREV_CXX"
46824    ac_ext=cpp
46825ac_cpp='$CXXCPP $CPPFLAGS'
46826ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46827ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46828ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46829
46830
46831    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
46832$as_echo_n "checking if we should bundle freetype... " >&6; }
46833    if test "x$BUNDLE_FREETYPE" = xyes; then
46834      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
46835    fi
46836    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
46837$as_echo "$BUNDLE_FREETYPE" >&6; }
46838
46839  fi # end freetype needed
46840
46841
46842
46843
46844
46845
46846
46847  ###############################################################################
46848  #
46849  # Check for alsa headers and libraries. Used on Linux/GNU systems.
46850  #
46851
46852# Check whether --with-alsa was given.
46853if test "${with_alsa+set}" = set; then :
46854  withval=$with_alsa;
46855fi
46856
46857
46858# Check whether --with-alsa-include was given.
46859if test "${with_alsa_include+set}" = set; then :
46860  withval=$with_alsa_include;
46861fi
46862
46863
46864# Check whether --with-alsa-lib was given.
46865if test "${with_alsa_lib+set}" = set; then :
46866  withval=$with_alsa_lib;
46867fi
46868
46869
46870  if test "x$ALSA_NOT_NEEDED" = xyes; then
46871    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
46872      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
46873$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
46874    fi
46875    ALSA_CFLAGS=
46876    ALSA_LIBS=
46877  else
46878    ALSA_FOUND=no
46879
46880    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
46881      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
46882    fi
46883
46884    if test "x${with_alsa}" != x; then
46885      ALSA_LIBS="-L${with_alsa}/lib -lasound"
46886      ALSA_CFLAGS="-I${with_alsa}/include"
46887      ALSA_FOUND=yes
46888    fi
46889    if test "x${with_alsa_include}" != x; then
46890      ALSA_CFLAGS="-I${with_alsa_include}"
46891      ALSA_FOUND=yes
46892    fi
46893    if test "x${with_alsa_lib}" != x; then
46894      ALSA_LIBS="-L${with_alsa_lib} -lasound"
46895      ALSA_FOUND=yes
46896    fi
46897    if test "x$ALSA_FOUND" = xno; then
46898
46899
46900  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
46901    # Source the builddeps file again, to make sure it uses the latest variables!
46902    . $builddepsfile
46903    # Look for a target and build machine specific resource!
46904    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
46905    if test "x$resource" = x; then
46906      # Ok, lets instead look for a target specific resource
46907      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
46908    fi
46909    if test "x$resource" = x; then
46910      # Ok, lets instead look for a build specific resource
46911      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
46912    fi
46913    if test "x$resource" = x; then
46914      # Ok, lets instead look for a generic resource
46915      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
46916      resource=${builddep_alsa}
46917    fi
46918    if test "x$resource" != x; then
46919      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
46920$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
46921      # If the resource in the builddeps.conf file is an existing directory,
46922      # for example /java/linux/cups
46923      if test -d ${resource}; then
46924        depdir=${resource}
46925      else
46926
46927  # alsa is for example mymodule
46928  # $resource is for example libs/general/libmymod_1_2_3.zip
46929  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
46930  # $with_builddeps_dir is for example /localhome/builddeps
46931  # depdir is the name of the variable into which we store the depdir, eg MYMOD
46932  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
46933  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
46934  filename=`basename $resource`
46935  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
46936  filebase=${filename%%.*}
46937  extension=${filename#*.}
46938  installdir=$with_builddeps_dir/$filebase
46939  if test ! -f $installdir/$filename.unpacked; then
46940    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
46941$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
46942    if test ! -d $installdir; then
46943      mkdir -p $installdir
46944    fi
46945    if test ! -d $installdir; then
46946      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
46947    fi
46948    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
46949    touch $tmpfile
46950    if test ! -f $tmpfile; then
46951      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
46952    fi
46953
46954  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
46955  # $tmpfile is the local file name for the downloaded file.
46956  VALID_TOOL=no
46957  if test "x$BDEPS_FTP" = xwget; then
46958    VALID_TOOL=yes
46959    wget -O $tmpfile $with_builddeps_server/$resource
46960  fi
46961  if test "x$BDEPS_FTP" = xlftp; then
46962    VALID_TOOL=yes
46963    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
46964  fi
46965  if test "x$BDEPS_FTP" = xftp; then
46966    VALID_TOOL=yes
46967    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
46968    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
46969    FTPUSERPWD=${FTPSERVER%%@*}
46970    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
46971      FTPUSER=${userpwd%%:*}
46972      FTPPWD=${userpwd#*@}
46973      FTPSERVER=${FTPSERVER#*@}
46974    else
46975      FTPUSER=ftp
46976      FTPPWD=ftp
46977    fi
46978    # the "pass" command does not work on some
46979    # ftp clients (read ftp.exe) but if it works,
46980    # passive mode is better!
46981    ( \
46982        echo "user $FTPUSER $FTPPWD"        ; \
46983        echo "pass"                         ; \
46984        echo "bin"                          ; \
46985        echo "get $FTPPATH $tmpfile"              ; \
46986    ) | ftp -in $FTPSERVER
46987  fi
46988  if test "x$VALID_TOOL" != xyes; then
46989    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
46990  fi
46991
46992    mv $tmpfile $installdir/$filename
46993    if test ! -s $installdir/$filename; then
46994      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
46995    fi
46996    case "$extension" in
46997      zip)  echo "Unzipping $installdir/$filename..."
46998        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
46999        ;;
47000      tar.gz) echo "Untaring $installdir/$filename..."
47001        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
47002        ;;
47003      tgz) echo "Untaring $installdir/$filename..."
47004        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
47005        ;;
47006      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
47007        ;;
47008    esac
47009  fi
47010  if test -f $installdir/$filename.unpacked; then
47011    depdir=$installdir
47012  fi
47013
47014      fi
47015      # Source the builddeps file again, because in the previous command, the depdir
47016      # was updated to point at the current build dependency install directory.
47017      . $builddepsfile
47018      # Now extract variables from the builddeps.conf files.
47019      theroot=${builddep_alsa_ROOT}
47020      thecflags=${builddep_alsa_CFLAGS}
47021      thelibs=${builddep_alsa_LIBS}
47022      if test "x$depdir" = x; then
47023        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
47024      fi
47025      ALSA=$depdir
47026      if test "x$theroot" != x; then
47027        ALSA="$theroot"
47028      fi
47029      if test "x$thecflags" != x; then
47030        ALSA_CFLAGS="$thecflags"
47031      fi
47032      if test "x$thelibs" != x; then
47033        ALSA_LIBS="$thelibs"
47034      fi
47035      ALSA_FOUND=yes
47036      else ALSA_FOUND=no
47037
47038    fi
47039    else ALSA_FOUND=no
47040
47041  fi
47042
47043    fi
47044    # Do not try pkg-config if we have a sysroot set.
47045    if test "x$SYSROOT" = x; then
47046      if test "x$ALSA_FOUND" = xno; then
47047
47048pkg_failed=no
47049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
47050$as_echo_n "checking for ALSA... " >&6; }
47051
47052if test -n "$ALSA_CFLAGS"; then
47053    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
47054 elif test -n "$PKG_CONFIG"; then
47055    if test -n "$PKG_CONFIG" && \
47056    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
47057  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
47058  ac_status=$?
47059  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47060  test $ac_status = 0; }; then
47061  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
47062else
47063  pkg_failed=yes
47064fi
47065 else
47066    pkg_failed=untried
47067fi
47068if test -n "$ALSA_LIBS"; then
47069    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
47070 elif test -n "$PKG_CONFIG"; then
47071    if test -n "$PKG_CONFIG" && \
47072    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
47073  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
47074  ac_status=$?
47075  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47076  test $ac_status = 0; }; then
47077  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
47078else
47079  pkg_failed=yes
47080fi
47081 else
47082    pkg_failed=untried
47083fi
47084
47085
47086
47087if test $pkg_failed = yes; then
47088
47089if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
47090        _pkg_short_errors_supported=yes
47091else
47092        _pkg_short_errors_supported=no
47093fi
47094        if test $_pkg_short_errors_supported = yes; then
47095	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
47096        else
47097	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
47098        fi
47099	# Put the nasty error message in config.log where it belongs
47100	echo "$ALSA_PKG_ERRORS" >&5
47101
47102	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47103$as_echo "no" >&6; }
47104                ALSA_FOUND=no
47105elif test $pkg_failed = untried; then
47106	ALSA_FOUND=no
47107else
47108	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
47109	ALSA_LIBS=$pkg_cv_ALSA_LIBS
47110        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47111$as_echo "yes" >&6; }
47112	ALSA_FOUND=yes
47113fi
47114      fi
47115    fi
47116    if test "x$ALSA_FOUND" = xno; then
47117      for ac_header in alsa/asoundlib.h
47118do :
47119  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
47120if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
47121  cat >>confdefs.h <<_ACEOF
47122#define HAVE_ALSA_ASOUNDLIB_H 1
47123_ACEOF
47124
47125            ALSA_FOUND=yes
47126            ALSA_CFLAGS=-Iignoreme
47127            ALSA_LIBS=-lasound
47128            DEFAULT_ALSA=yes
47129
47130else
47131  ALSA_FOUND=no
47132fi
47133
47134done
47135
47136    fi
47137    if test "x$ALSA_FOUND" = xno; then
47138
47139  # Print a helpful message on how to acquire the necessary build dependency.
47140  # alsa is the help tag: freetype, cups, pulse, alsa etc
47141  MISSING_DEPENDENCY=alsa
47142
47143  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47144    cygwin_help $MISSING_DEPENDENCY
47145  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47146    msys_help $MISSING_DEPENDENCY
47147  else
47148    PKGHANDLER_COMMAND=
47149
47150    case $PKGHANDLER in
47151      apt-get)
47152        apt_help     $MISSING_DEPENDENCY ;;
47153      yum)
47154        yum_help     $MISSING_DEPENDENCY ;;
47155      port)
47156        port_help    $MISSING_DEPENDENCY ;;
47157      pkgutil)
47158        pkgutil_help $MISSING_DEPENDENCY ;;
47159      pkgadd)
47160        pkgadd_help  $MISSING_DEPENDENCY ;;
47161    esac
47162
47163    if test "x$PKGHANDLER_COMMAND" != x; then
47164      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47165    fi
47166  fi
47167
47168      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
47169    fi
47170  fi
47171
47172
47173
47174
47175
47176
47177  ###############################################################################
47178  #
47179  # Check for the jpeg library
47180  #
47181
47182
47183# Check whether --with-libjpeg was given.
47184if test "${with_libjpeg+set}" = set; then :
47185  withval=$with_libjpeg;
47186fi
47187
47188
47189  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
47190$as_echo_n "checking for which libjpeg to use... " >&6; }
47191
47192  # default is bundled
47193  DEFAULT_LIBJPEG=bundled
47194
47195  #
47196  # if user didn't specify, use DEFAULT_LIBJPEG
47197  #
47198  if test "x${with_libjpeg}" = "x"; then
47199    with_libjpeg=${DEFAULT_LIBJPEG}
47200  fi
47201
47202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
47203$as_echo "${with_libjpeg}" >&6; }
47204
47205  if test "x${with_libjpeg}" = "xbundled"; then
47206    USE_EXTERNAL_LIBJPEG=false
47207  elif test "x${with_libjpeg}" = "xsystem"; then
47208    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
47209if test "x$ac_cv_header_jpeglib_h" = xyes; then :
47210
47211else
47212   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
47213fi
47214
47215
47216    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
47217$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
47218if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
47219  $as_echo_n "(cached) " >&6
47220else
47221  ac_check_lib_save_LIBS=$LIBS
47222LIBS="-ljpeg  $LIBS"
47223cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47224/* end confdefs.h.  */
47225
47226/* Override any GCC internal prototype to avoid an error.
47227   Use char because int might match the return type of a GCC
47228   builtin and then its argument prototype would still apply.  */
47229#ifdef __cplusplus
47230extern "C"
47231#endif
47232char jpeg_CreateDecompress ();
47233int
47234main ()
47235{
47236return jpeg_CreateDecompress ();
47237  ;
47238  return 0;
47239}
47240_ACEOF
47241if ac_fn_cxx_try_link "$LINENO"; then :
47242  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
47243else
47244  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
47245fi
47246rm -f core conftest.err conftest.$ac_objext \
47247    conftest$ac_exeext conftest.$ac_ext
47248LIBS=$ac_check_lib_save_LIBS
47249fi
47250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
47251$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
47252if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
47253  cat >>confdefs.h <<_ACEOF
47254#define HAVE_LIBJPEG 1
47255_ACEOF
47256
47257  LIBS="-ljpeg $LIBS"
47258
47259else
47260   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
47261fi
47262
47263
47264    USE_EXTERNAL_LIBJPEG=true
47265  else
47266    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
47267  fi
47268
47269
47270
47271  ###############################################################################
47272  #
47273  # Check for the gif library
47274  #
47275
47276
47277# Check whether --with-giflib was given.
47278if test "${with_giflib+set}" = set; then :
47279  withval=$with_giflib;
47280fi
47281
47282
47283
47284  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
47285$as_echo_n "checking for which giflib to use... " >&6; }
47286
47287  # default is bundled
47288  DEFAULT_GIFLIB=bundled
47289
47290  #
47291  # if user didn't specify, use DEFAULT_GIFLIB
47292  #
47293  if test "x${with_giflib}" = "x"; then
47294    with_giflib=${DEFAULT_GIFLIB}
47295  fi
47296
47297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
47298$as_echo "${with_giflib}" >&6; }
47299
47300  if test "x${with_giflib}" = "xbundled"; then
47301    USE_EXTERNAL_LIBGIF=false
47302  elif test "x${with_giflib}" = "xsystem"; then
47303    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
47304if test "x$ac_cv_header_gif_lib_h" = xyes; then :
47305
47306else
47307   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
47308fi
47309
47310
47311    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
47312$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
47313if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
47314  $as_echo_n "(cached) " >&6
47315else
47316  ac_check_lib_save_LIBS=$LIBS
47317LIBS="-lgif  $LIBS"
47318cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47319/* end confdefs.h.  */
47320
47321/* Override any GCC internal prototype to avoid an error.
47322   Use char because int might match the return type of a GCC
47323   builtin and then its argument prototype would still apply.  */
47324#ifdef __cplusplus
47325extern "C"
47326#endif
47327char DGifGetCode ();
47328int
47329main ()
47330{
47331return DGifGetCode ();
47332  ;
47333  return 0;
47334}
47335_ACEOF
47336if ac_fn_cxx_try_link "$LINENO"; then :
47337  ac_cv_lib_gif_DGifGetCode=yes
47338else
47339  ac_cv_lib_gif_DGifGetCode=no
47340fi
47341rm -f core conftest.err conftest.$ac_objext \
47342    conftest$ac_exeext conftest.$ac_ext
47343LIBS=$ac_check_lib_save_LIBS
47344fi
47345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
47346$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
47347if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
47348  cat >>confdefs.h <<_ACEOF
47349#define HAVE_LIBGIF 1
47350_ACEOF
47351
47352  LIBS="-lgif $LIBS"
47353
47354else
47355   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
47356fi
47357
47358
47359    USE_EXTERNAL_LIBGIF=true
47360  else
47361    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
47362  fi
47363
47364
47365  ###############################################################################
47366  #
47367  # Check for the lcms2 library
47368  #
47369
47370
47371# Check whether --with-lcms was given.
47372if test "${with_lcms+set}" = set; then :
47373  withval=$with_lcms;
47374fi
47375
47376
47377  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
47378$as_echo_n "checking for which lcms to use... " >&6; }
47379
47380  DEFAULT_LCMS=bundled
47381
47382  #
47383  # If user didn't specify, use DEFAULT_LCMS
47384  #
47385  if test "x${with_lcms}" = "x"; then
47386      with_lcms=${DEFAULT_LCMS}
47387  fi
47388
47389  if test "x${with_lcms}" = "xbundled"; then
47390    USE_EXTERNAL_LCMS=false
47391    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
47392$as_echo "bundled" >&6; }
47393  elif test "x${with_lcms}" = "xsystem"; then
47394    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
47395$as_echo "system" >&6; }
47396
47397pkg_failed=no
47398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
47399$as_echo_n "checking for LCMS... " >&6; }
47400
47401if test -n "$LCMS_CFLAGS"; then
47402    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
47403 elif test -n "$PKG_CONFIG"; then
47404    if test -n "$PKG_CONFIG" && \
47405    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
47406  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
47407  ac_status=$?
47408  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47409  test $ac_status = 0; }; then
47410  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
47411else
47412  pkg_failed=yes
47413fi
47414 else
47415    pkg_failed=untried
47416fi
47417if test -n "$LCMS_LIBS"; then
47418    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
47419 elif test -n "$PKG_CONFIG"; then
47420    if test -n "$PKG_CONFIG" && \
47421    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
47422  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
47423  ac_status=$?
47424  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47425  test $ac_status = 0; }; then
47426  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
47427else
47428  pkg_failed=yes
47429fi
47430 else
47431    pkg_failed=untried
47432fi
47433
47434
47435
47436if test $pkg_failed = yes; then
47437
47438if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
47439        _pkg_short_errors_supported=yes
47440else
47441        _pkg_short_errors_supported=no
47442fi
47443        if test $_pkg_short_errors_supported = yes; then
47444	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
47445        else
47446	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
47447        fi
47448	# Put the nasty error message in config.log where it belongs
47449	echo "$LCMS_PKG_ERRORS" >&5
47450
47451	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47452$as_echo "no" >&6; }
47453                LCMS_FOUND=no
47454elif test $pkg_failed = untried; then
47455	LCMS_FOUND=no
47456else
47457	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
47458	LCMS_LIBS=$pkg_cv_LCMS_LIBS
47459        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47460$as_echo "yes" >&6; }
47461	LCMS_FOUND=yes
47462fi
47463    if test "x${LCMS_FOUND}" = "xyes"; then
47464      USE_EXTERNAL_LCMS=true
47465    else
47466      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
47467    fi
47468  else
47469    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
47470  fi
47471
47472
47473
47474  ###############################################################################
47475  #
47476  # Check for the png library
47477  #
47478
47479
47480# Check whether --with-libpng was given.
47481if test "${with_libpng+set}" = set; then :
47482  withval=$with_libpng;
47483fi
47484
47485
47486
47487  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
47488$as_echo_n "checking for which libpng to use... " >&6; }
47489
47490  # default is bundled
47491  DEFAULT_LIBPNG=bundled
47492
47493  #
47494  # if user didn't specify, use DEFAULT_LIBPNG
47495  #
47496  if test "x${with_libpng}" = "x"; then
47497      with_libpng=${DEFAULT_LIBPNG}
47498  fi
47499
47500  if test "x${with_libpng}" = "xbundled"; then
47501      USE_EXTERNAL_LIBPNG=false
47502      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
47503$as_echo "bundled" >&6; }
47504  elif test "x${with_libpng}" = "xsystem"; then
47505
47506pkg_failed=no
47507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
47508$as_echo_n "checking for PNG... " >&6; }
47509
47510if test -n "$PNG_CFLAGS"; then
47511    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
47512 elif test -n "$PKG_CONFIG"; then
47513    if test -n "$PKG_CONFIG" && \
47514    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
47515  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
47516  ac_status=$?
47517  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47518  test $ac_status = 0; }; then
47519  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
47520else
47521  pkg_failed=yes
47522fi
47523 else
47524    pkg_failed=untried
47525fi
47526if test -n "$PNG_LIBS"; then
47527    pkg_cv_PNG_LIBS="$PNG_LIBS"
47528 elif test -n "$PKG_CONFIG"; then
47529    if test -n "$PKG_CONFIG" && \
47530    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
47531  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
47532  ac_status=$?
47533  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47534  test $ac_status = 0; }; then
47535  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
47536else
47537  pkg_failed=yes
47538fi
47539 else
47540    pkg_failed=untried
47541fi
47542
47543
47544
47545if test $pkg_failed = yes; then
47546
47547if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
47548        _pkg_short_errors_supported=yes
47549else
47550        _pkg_short_errors_supported=no
47551fi
47552        if test $_pkg_short_errors_supported = yes; then
47553	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
47554        else
47555	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
47556        fi
47557	# Put the nasty error message in config.log where it belongs
47558	echo "$PNG_PKG_ERRORS" >&5
47559
47560	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47561$as_echo "no" >&6; }
47562                 LIBPNG_FOUND=no
47563elif test $pkg_failed = untried; then
47564	 LIBPNG_FOUND=no
47565else
47566	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
47567	PNG_LIBS=$pkg_cv_PNG_LIBS
47568        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47569$as_echo "yes" >&6; }
47570	 LIBPNG_FOUND=yes
47571fi
47572      if test "x${LIBPNG_FOUND}" = "xyes"; then
47573          USE_EXTERNAL_LIBPNG=true
47574          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
47575$as_echo "system" >&6; }
47576      else
47577          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
47578$as_echo "system not found" >&6; }
47579          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
47580      fi
47581  else
47582      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
47583  fi
47584
47585
47586  ###############################################################################
47587  #
47588  # Check for the zlib library
47589  #
47590
47591
47592# Check whether --with-zlib was given.
47593if test "${with_zlib+set}" = set; then :
47594  withval=$with_zlib;
47595fi
47596
47597
47598  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
47599$as_echo_n "checking for compress in -lz... " >&6; }
47600if ${ac_cv_lib_z_compress+:} false; then :
47601  $as_echo_n "(cached) " >&6
47602else
47603  ac_check_lib_save_LIBS=$LIBS
47604LIBS="-lz  $LIBS"
47605cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47606/* end confdefs.h.  */
47607
47608/* Override any GCC internal prototype to avoid an error.
47609   Use char because int might match the return type of a GCC
47610   builtin and then its argument prototype would still apply.  */
47611#ifdef __cplusplus
47612extern "C"
47613#endif
47614char compress ();
47615int
47616main ()
47617{
47618return compress ();
47619  ;
47620  return 0;
47621}
47622_ACEOF
47623if ac_fn_cxx_try_link "$LINENO"; then :
47624  ac_cv_lib_z_compress=yes
47625else
47626  ac_cv_lib_z_compress=no
47627fi
47628rm -f core conftest.err conftest.$ac_objext \
47629    conftest$ac_exeext conftest.$ac_ext
47630LIBS=$ac_check_lib_save_LIBS
47631fi
47632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
47633$as_echo "$ac_cv_lib_z_compress" >&6; }
47634if test "x$ac_cv_lib_z_compress" = xyes; then :
47635   ZLIB_FOUND=yes
47636else
47637   ZLIB_FOUND=no
47638fi
47639
47640
47641  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
47642$as_echo_n "checking for which zlib to use... " >&6; }
47643
47644  DEFAULT_ZLIB=bundled
47645  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47646    #
47647    # On macosx default is system...on others default is
47648    #
47649    DEFAULT_ZLIB=system
47650  fi
47651
47652  if test "x${ZLIB_FOUND}" != "xyes"; then
47653    #
47654    # If we don't find any system...set default to bundled
47655    #
47656    DEFAULT_ZLIB=bundled
47657  fi
47658
47659  #
47660  # If user didn't specify, use DEFAULT_ZLIB
47661  #
47662  if test "x${with_zlib}" = "x"; then
47663    with_zlib=${DEFAULT_ZLIB}
47664  fi
47665
47666  if test "x${with_zlib}" = "xbundled"; then
47667    USE_EXTERNAL_LIBZ=false
47668    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
47669$as_echo "bundled" >&6; }
47670  elif test "x${with_zlib}" = "xsystem"; then
47671    if test "x${ZLIB_FOUND}" = "xyes"; then
47672      USE_EXTERNAL_LIBZ=true
47673      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
47674$as_echo "system" >&6; }
47675    else
47676      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
47677$as_echo "system not found" >&6; }
47678      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
47679    fi
47680  else
47681    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
47682  fi
47683
47684
47685
47686  ###############################################################################
47687  LIBZIP_CAN_USE_MMAP=true
47688
47689
47690
47691  ###############################################################################
47692  #
47693  # Check if altzone exists in time.h
47694  #
47695
47696  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47697/* end confdefs.h.  */
47698#include <time.h>
47699int
47700main ()
47701{
47702return (int)altzone;
47703  ;
47704  return 0;
47705}
47706_ACEOF
47707if ac_fn_cxx_try_link "$LINENO"; then :
47708  has_altzone=yes
47709else
47710  has_altzone=no
47711fi
47712rm -f core conftest.err conftest.$ac_objext \
47713    conftest$ac_exeext conftest.$ac_ext
47714  if test "x$has_altzone" = xyes; then
47715
47716$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
47717
47718  fi
47719
47720  ###############################################################################
47721  #
47722  # Check the maths library
47723  #
47724
47725  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
47726$as_echo_n "checking for cos in -lm... " >&6; }
47727if ${ac_cv_lib_m_cos+:} false; then :
47728  $as_echo_n "(cached) " >&6
47729else
47730  ac_check_lib_save_LIBS=$LIBS
47731LIBS="-lm  $LIBS"
47732cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47733/* end confdefs.h.  */
47734
47735/* Override any GCC internal prototype to avoid an error.
47736   Use char because int might match the return type of a GCC
47737   builtin and then its argument prototype would still apply.  */
47738#ifdef __cplusplus
47739extern "C"
47740#endif
47741char cos ();
47742int
47743main ()
47744{
47745return cos ();
47746  ;
47747  return 0;
47748}
47749_ACEOF
47750if ac_fn_cxx_try_link "$LINENO"; then :
47751  ac_cv_lib_m_cos=yes
47752else
47753  ac_cv_lib_m_cos=no
47754fi
47755rm -f core conftest.err conftest.$ac_objext \
47756    conftest$ac_exeext conftest.$ac_ext
47757LIBS=$ac_check_lib_save_LIBS
47758fi
47759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
47760$as_echo "$ac_cv_lib_m_cos" >&6; }
47761if test "x$ac_cv_lib_m_cos" = xyes; then :
47762  cat >>confdefs.h <<_ACEOF
47763#define HAVE_LIBM 1
47764_ACEOF
47765
47766  LIBS="-lm $LIBS"
47767
47768else
47769
47770        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
47771$as_echo "$as_me: Maths library was not found" >&6;}
47772
47773
47774fi
47775
47776
47777
47778  ###############################################################################
47779  #
47780  # Check for libdl.so
47781
47782  save_LIBS="$LIBS"
47783  LIBS=""
47784  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
47785$as_echo_n "checking for dlopen in -ldl... " >&6; }
47786if ${ac_cv_lib_dl_dlopen+:} false; then :
47787  $as_echo_n "(cached) " >&6
47788else
47789  ac_check_lib_save_LIBS=$LIBS
47790LIBS="-ldl  $LIBS"
47791cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47792/* end confdefs.h.  */
47793
47794/* Override any GCC internal prototype to avoid an error.
47795   Use char because int might match the return type of a GCC
47796   builtin and then its argument prototype would still apply.  */
47797#ifdef __cplusplus
47798extern "C"
47799#endif
47800char dlopen ();
47801int
47802main ()
47803{
47804return dlopen ();
47805  ;
47806  return 0;
47807}
47808_ACEOF
47809if ac_fn_cxx_try_link "$LINENO"; then :
47810  ac_cv_lib_dl_dlopen=yes
47811else
47812  ac_cv_lib_dl_dlopen=no
47813fi
47814rm -f core conftest.err conftest.$ac_objext \
47815    conftest$ac_exeext conftest.$ac_ext
47816LIBS=$ac_check_lib_save_LIBS
47817fi
47818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
47819$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
47820if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
47821  cat >>confdefs.h <<_ACEOF
47822#define HAVE_LIBDL 1
47823_ACEOF
47824
47825  LIBS="-ldl $LIBS"
47826
47827fi
47828
47829  LIBDL="$LIBS"
47830
47831  LIBS="$save_LIBS"
47832
47833
47834  ###############################################################################
47835  #
47836  # statically link libstdc++ before C++ ABI is stablized on Linux unless
47837  # dynamic build is configured on command line.
47838  #
47839
47840# Check whether --with-stdc++lib was given.
47841if test "${with_stdc__lib+set}" = set; then :
47842  withval=$with_stdc__lib;
47843        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
47844                && test "x$with_stdc__lib" != xdefault; then
47845          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
47846        fi
47847
47848else
47849  with_stdc__lib=default
47850
47851fi
47852
47853
47854  if test "x$OPENJDK_TARGET_OS" = xlinux; then
47855    # Test if -lstdc++ works.
47856    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
47857$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
47858    ac_ext=cpp
47859ac_cpp='$CXXCPP $CPPFLAGS'
47860ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47861ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47862ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47863
47864    OLD_CXXFLAGS="$CXXFLAGS"
47865    CXXFLAGS="$CXXFLAGS -lstdc++"
47866    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47867/* end confdefs.h.  */
47868
47869int
47870main ()
47871{
47872return 0;
47873  ;
47874  return 0;
47875}
47876_ACEOF
47877if ac_fn_cxx_try_link "$LINENO"; then :
47878  has_dynamic_libstdcxx=yes
47879else
47880  has_dynamic_libstdcxx=no
47881fi
47882rm -f core conftest.err conftest.$ac_objext \
47883    conftest$ac_exeext conftest.$ac_ext
47884    CXXFLAGS="$OLD_CXXFLAGS"
47885    ac_ext=cpp
47886ac_cpp='$CXXCPP $CPPFLAGS'
47887ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47888ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47889ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47890
47891    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
47892$as_echo "$has_dynamic_libstdcxx" >&6; }
47893
47894    # Test if stdc++ can be linked statically.
47895    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
47896$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
47897    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
47898    ac_ext=cpp
47899ac_cpp='$CXXCPP $CPPFLAGS'
47900ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47901ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47902ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47903
47904    OLD_LIBS="$LIBS"
47905    OLD_CXX="$CXX"
47906    LIBS="$STATIC_STDCXX_FLAGS"
47907    CXX="$CC"
47908    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47909/* end confdefs.h.  */
47910
47911int
47912main ()
47913{
47914return 0;
47915  ;
47916  return 0;
47917}
47918_ACEOF
47919if ac_fn_cxx_try_link "$LINENO"; then :
47920  has_static_libstdcxx=yes
47921else
47922  has_static_libstdcxx=no
47923fi
47924rm -f core conftest.err conftest.$ac_objext \
47925    conftest$ac_exeext conftest.$ac_ext
47926    LIBS="$OLD_LIBS"
47927    CXX="$OLD_CXX"
47928    ac_ext=cpp
47929ac_cpp='$CXXCPP $CPPFLAGS'
47930ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47931ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47932ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47933
47934    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
47935$as_echo "$has_static_libstdcxx" >&6; }
47936
47937    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
47938      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
47939    fi
47940
47941    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
47942      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
47943    fi
47944
47945    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
47946      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
47947    fi
47948
47949    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
47950$as_echo_n "checking how to link with libstdc++... " >&6; }
47951    # If dynamic was requested, it's available since it would fail above otherwise.
47952    # If dynamic wasn't requested, go with static unless it isn't available.
47953    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47954      LIBCXX="$LIBCXX -lstdc++"
47955      LDCXX="$CXX"
47956      STATIC_CXX_SETTING="STATIC_CXX=false"
47957      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
47958$as_echo "dynamic" >&6; }
47959    else
47960      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
47961      LDCXX="$CC"
47962      STATIC_CXX_SETTING="STATIC_CXX=true"
47963      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
47964$as_echo "static" >&6; }
47965    fi
47966  fi
47967
47968
47969  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47970    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
47971
47972pkg_failed=no
47973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
47974$as_echo_n "checking for LIBFFI... " >&6; }
47975
47976if test -n "$LIBFFI_CFLAGS"; then
47977    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
47978 elif test -n "$PKG_CONFIG"; then
47979    if test -n "$PKG_CONFIG" && \
47980    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
47981  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
47982  ac_status=$?
47983  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47984  test $ac_status = 0; }; then
47985  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
47986else
47987  pkg_failed=yes
47988fi
47989 else
47990    pkg_failed=untried
47991fi
47992if test -n "$LIBFFI_LIBS"; then
47993    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
47994 elif test -n "$PKG_CONFIG"; then
47995    if test -n "$PKG_CONFIG" && \
47996    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
47997  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
47998  ac_status=$?
47999  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48000  test $ac_status = 0; }; then
48001  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
48002else
48003  pkg_failed=yes
48004fi
48005 else
48006    pkg_failed=untried
48007fi
48008
48009
48010
48011if test $pkg_failed = yes; then
48012
48013if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48014        _pkg_short_errors_supported=yes
48015else
48016        _pkg_short_errors_supported=no
48017fi
48018        if test $_pkg_short_errors_supported = yes; then
48019	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
48020        else
48021	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
48022        fi
48023	# Put the nasty error message in config.log where it belongs
48024	echo "$LIBFFI_PKG_ERRORS" >&5
48025
48026	as_fn_error $? "Package requirements (libffi) were not met:
48027
48028$LIBFFI_PKG_ERRORS
48029
48030Consider adjusting the PKG_CONFIG_PATH environment variable if you
48031installed software in a non-standard prefix.
48032
48033Alternatively, you may set the environment variables LIBFFI_CFLAGS
48034and LIBFFI_LIBS to avoid the need to call pkg-config.
48035See the pkg-config man page for more details.
48036" "$LINENO" 5
48037elif test $pkg_failed = untried; then
48038	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48039$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48040as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
48041is in your PATH or set the PKG_CONFIG environment variable to the full
48042path to pkg-config.
48043
48044Alternatively, you may set the environment variables LIBFFI_CFLAGS
48045and LIBFFI_LIBS to avoid the need to call pkg-config.
48046See the pkg-config man page for more details.
48047
48048To get pkg-config, see <http://pkg-config.freedesktop.org/>.
48049See \`config.log' for more details" "$LINENO" 5; }
48050else
48051	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
48052	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
48053        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48054$as_echo "yes" >&6; }
48055	:
48056fi
48057
48058  fi
48059
48060  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
48061    # Extract the first word of "llvm-config", so it can be a program name with args.
48062set dummy llvm-config; ac_word=$2
48063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48064$as_echo_n "checking for $ac_word... " >&6; }
48065if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
48066  $as_echo_n "(cached) " >&6
48067else
48068  if test -n "$LLVM_CONFIG"; then
48069  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
48070else
48071as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48072for as_dir in $PATH
48073do
48074  IFS=$as_save_IFS
48075  test -z "$as_dir" && as_dir=.
48076    for ac_exec_ext in '' $ac_executable_extensions; do
48077  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48078    ac_cv_prog_LLVM_CONFIG="llvm-config"
48079    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48080    break 2
48081  fi
48082done
48083  done
48084IFS=$as_save_IFS
48085
48086fi
48087fi
48088LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
48089if test -n "$LLVM_CONFIG"; then
48090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
48091$as_echo "$LLVM_CONFIG" >&6; }
48092else
48093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48094$as_echo "no" >&6; }
48095fi
48096
48097
48098
48099    if test "x$LLVM_CONFIG" != xllvm-config; then
48100      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
48101    fi
48102
48103    llvm_components="jit mcjit engine nativecodegen native"
48104    unset LLVM_CFLAGS
48105    for flag in $("$LLVM_CONFIG" --cxxflags); do
48106      if echo "${flag}" | grep -q '^-[ID]'; then
48107        if test "${flag}" != "-D_DEBUG" ; then
48108          if test "${LLVM_CFLAGS}" != "" ; then
48109            LLVM_CFLAGS="${LLVM_CFLAGS} "
48110          fi
48111          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
48112        fi
48113      fi
48114    done
48115    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
48116    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
48117
48118    unset LLVM_LDFLAGS
48119    for flag in $("${LLVM_CONFIG}" --ldflags); do
48120      if echo "${flag}" | grep -q '^-L'; then
48121        if test "${LLVM_LDFLAGS}" != ""; then
48122          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
48123        fi
48124        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
48125      fi
48126    done
48127
48128    unset LLVM_LIBS
48129    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
48130      if echo "${flag}" | grep -q '^-l'; then
48131        if test "${LLVM_LIBS}" != ""; then
48132          LLVM_LIBS="${LLVM_LIBS} "
48133        fi
48134        LLVM_LIBS="${LLVM_LIBS}${flag}"
48135      fi
48136    done
48137
48138
48139
48140
48141  fi
48142
48143  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
48144  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
48145    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
48146  fi
48147
48148  # TODO better (platform agnostic) test
48149  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
48150    LIBCXX="-lstdc++"
48151  fi
48152
48153
48154
48155
48156  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
48157
48158
48159# Check whether --with-msvcr-dll was given.
48160if test "${with_msvcr_dll+set}" = set; then :
48161  withval=$with_msvcr_dll;
48162fi
48163
48164
48165  if test "x$with_msvcr_dll" != x; then
48166    # If given explicitely by user, do not probe. If not present, fail directly.
48167
48168  POSSIBLE_MSVCR_DLL="$with_msvcr_dll"
48169  METHOD="--with-msvcr-dll"
48170  if test -e "$POSSIBLE_MSVCR_DLL"; then
48171    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
48172$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
48173
48174    # Need to check if the found msvcr is correct architecture
48175    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
48176$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
48177    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
48178    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48179      CORRECT_MSVCR_ARCH=386
48180    else
48181      CORRECT_MSVCR_ARCH=x86-64
48182    fi
48183    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
48184      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48185$as_echo "ok" >&6; }
48186      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48187      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
48188$as_echo_n "checking for msvcr100.dll... " >&6; }
48189      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
48190$as_echo "$MSVCR_DLL" >&6; }
48191    else
48192      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48193$as_echo "incorrect, ignoring" >&6; }
48194      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
48195$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
48196    fi
48197  fi
48198
48199    if test "x$MSVCR_DLL" = x; then
48200      as_fn_error $? "Could not find a proper msvcr100.dll as specified by --with-msvcr-dll" "$LINENO" 5
48201    fi
48202  fi
48203
48204  if test "x$MSVCR_DLL" = x; then
48205    # Probe: Using well-known location from Visual Studio 10.0
48206    if test "x$VCINSTALLDIR" != x; then
48207      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
48208
48209  windows_path="$CYGWIN_VC_INSTALL_DIR"
48210  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48211    unix_path=`$CYGPATH -u "$windows_path"`
48212    CYGWIN_VC_INSTALL_DIR="$unix_path"
48213  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48214    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48215    CYGWIN_VC_INSTALL_DIR="$unix_path"
48216  fi
48217
48218      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48219        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll"
48220      else
48221        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll"
48222      fi
48223
48224  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48225  METHOD="well-known location in VCINSTALLDIR"
48226  if test -e "$POSSIBLE_MSVCR_DLL"; then
48227    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
48228$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
48229
48230    # Need to check if the found msvcr is correct architecture
48231    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
48232$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
48233    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
48234    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48235      CORRECT_MSVCR_ARCH=386
48236    else
48237      CORRECT_MSVCR_ARCH=x86-64
48238    fi
48239    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
48240      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48241$as_echo "ok" >&6; }
48242      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48243      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
48244$as_echo_n "checking for msvcr100.dll... " >&6; }
48245      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
48246$as_echo "$MSVCR_DLL" >&6; }
48247    else
48248      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48249$as_echo "incorrect, ignoring" >&6; }
48250      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
48251$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
48252    fi
48253  fi
48254
48255    fi
48256  fi
48257
48258  if test "x$MSVCR_DLL" = x; then
48259    # Probe: Check in the Boot JDK directory.
48260    POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
48261
48262  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48263  METHOD="well-known location in Boot JDK"
48264  if test -e "$POSSIBLE_MSVCR_DLL"; then
48265    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
48266$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
48267
48268    # Need to check if the found msvcr is correct architecture
48269    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
48270$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
48271    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
48272    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48273      CORRECT_MSVCR_ARCH=386
48274    else
48275      CORRECT_MSVCR_ARCH=x86-64
48276    fi
48277    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
48278      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48279$as_echo "ok" >&6; }
48280      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48281      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
48282$as_echo_n "checking for msvcr100.dll... " >&6; }
48283      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
48284$as_echo "$MSVCR_DLL" >&6; }
48285    else
48286      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48287$as_echo "incorrect, ignoring" >&6; }
48288      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
48289$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
48290    fi
48291  fi
48292
48293  fi
48294
48295  if test "x$MSVCR_DLL" = x; then
48296    # Probe: Look in the Windows system32 directory
48297    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
48298
48299  windows_path="$CYGWIN_SYSTEMROOT"
48300  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48301    unix_path=`$CYGPATH -u "$windows_path"`
48302    CYGWIN_SYSTEMROOT="$unix_path"
48303  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48304    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48305    CYGWIN_SYSTEMROOT="$unix_path"
48306  fi
48307
48308    POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
48309
48310  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48311  METHOD="well-known location in SYSTEMROOT"
48312  if test -e "$POSSIBLE_MSVCR_DLL"; then
48313    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
48314$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
48315
48316    # Need to check if the found msvcr is correct architecture
48317    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
48318$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
48319    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
48320    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48321      CORRECT_MSVCR_ARCH=386
48322    else
48323      CORRECT_MSVCR_ARCH=x86-64
48324    fi
48325    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
48326      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48327$as_echo "ok" >&6; }
48328      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48329      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
48330$as_echo_n "checking for msvcr100.dll... " >&6; }
48331      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
48332$as_echo "$MSVCR_DLL" >&6; }
48333    else
48334      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48335$as_echo "incorrect, ignoring" >&6; }
48336      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
48337$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
48338    fi
48339  fi
48340
48341  fi
48342
48343  if test "x$MSVCR_DLL" = x; then
48344    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
48345    if test "x$VS100COMNTOOLS" != x; then
48346      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
48347
48348  windows_path="$CYGWIN_VS_TOOLS_DIR"
48349  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48350    unix_path=`$CYGPATH -u "$windows_path"`
48351    CYGWIN_VS_TOOLS_DIR="$unix_path"
48352  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48353    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48354    CYGWIN_VS_TOOLS_DIR="$unix_path"
48355  fi
48356
48357      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48358        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1`
48359      else
48360        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1`
48361      fi
48362
48363  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48364  METHOD="search of VS100COMNTOOLS"
48365  if test -e "$POSSIBLE_MSVCR_DLL"; then
48366    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
48367$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
48368
48369    # Need to check if the found msvcr is correct architecture
48370    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
48371$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
48372    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
48373    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48374      CORRECT_MSVCR_ARCH=386
48375    else
48376      CORRECT_MSVCR_ARCH=x86-64
48377    fi
48378    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
48379      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48380$as_echo "ok" >&6; }
48381      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48382      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
48383$as_echo_n "checking for msvcr100.dll... " >&6; }
48384      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
48385$as_echo "$MSVCR_DLL" >&6; }
48386    else
48387      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48388$as_echo "incorrect, ignoring" >&6; }
48389      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
48390$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
48391    fi
48392  fi
48393
48394    fi
48395  fi
48396
48397  if test "x$MSVCR_DLL" = x; then
48398    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
48399    # (This was the original behaviour; kept since it might turn up something)
48400    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
48401      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48402        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1`
48403      else
48404        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
48405        if test "x$POSSIBLE_MSVCR_DLL" = x; then
48406          # We're grasping at straws now...
48407          POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
48408        fi
48409      fi
48410
48411
48412  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48413  METHOD="search of VCINSTALLDIR"
48414  if test -e "$POSSIBLE_MSVCR_DLL"; then
48415    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
48416$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
48417
48418    # Need to check if the found msvcr is correct architecture
48419    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
48420$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
48421    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
48422    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48423      CORRECT_MSVCR_ARCH=386
48424    else
48425      CORRECT_MSVCR_ARCH=x86-64
48426    fi
48427    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
48428      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48429$as_echo "ok" >&6; }
48430      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48431      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
48432$as_echo_n "checking for msvcr100.dll... " >&6; }
48433      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
48434$as_echo "$MSVCR_DLL" >&6; }
48435    else
48436      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48437$as_echo "incorrect, ignoring" >&6; }
48438      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
48439$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
48440    fi
48441  fi
48442
48443    fi
48444  fi
48445
48446  if test "x$MSVCR_DLL" = x; then
48447    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
48448$as_echo_n "checking for msvcr100.dll... " >&6; }
48449    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48450$as_echo "no" >&6; }
48451    as_fn_error $? "Could not find msvcr100.dll. Please specify using --with-msvcr-dll." "$LINENO" 5
48452  fi
48453
48454
48455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48456
48457  # Input might be given as Windows format, start by converting to
48458  # unix format.
48459  path="$MSVCR_DLL"
48460  new_path=`$CYGPATH -u "$path"`
48461
48462  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48463  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48464  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48465  # "foo.exe" is OK but "foo" is an error.
48466  #
48467  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48468  # It is also a way to make sure we got the proper file name for the real test later on.
48469  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48470  if test "x$test_shortpath" = x; then
48471    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
48472$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
48473    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
48474  fi
48475
48476  # Call helper function which possibly converts this using DOS-style short mode.
48477  # If so, the updated path is stored in $new_path.
48478
48479  input_path="$new_path"
48480  # Check if we need to convert this using DOS-style short mode. If the path
48481  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48482  # take no chances and rewrite it.
48483  # Note: m4 eats our [], so we need to use [ and ] instead.
48484  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48485  if test "x$has_forbidden_chars" != x; then
48486    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48487    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48488    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48489    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48490      # Going to short mode and back again did indeed matter. Since short mode is
48491      # case insensitive, let's make it lowercase to improve readability.
48492      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48493      # Now convert it back to Unix-stile (cygpath)
48494      input_path=`$CYGPATH -u "$shortmode_path"`
48495      new_path="$input_path"
48496    fi
48497  fi
48498
48499  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48500  if test "x$test_cygdrive_prefix" = x; then
48501    # As a simple fix, exclude /usr/bin since it's not a real path.
48502    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48503      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48504      # a path prefixed by /cygdrive for fixpath to work.
48505      new_path="$CYGWIN_ROOT_PATH$input_path"
48506    fi
48507  fi
48508
48509
48510  if test "x$path" != "x$new_path"; then
48511    MSVCR_DLL="$new_path"
48512    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
48513$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
48514  fi
48515
48516  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48517
48518  path="$MSVCR_DLL"
48519  has_colon=`$ECHO $path | $GREP ^.:`
48520  new_path="$path"
48521  if test "x$has_colon" = x; then
48522    # Not in mixed or Windows style, start by that.
48523    new_path=`cmd //c echo $path`
48524  fi
48525
48526
48527  input_path="$new_path"
48528  # Check if we need to convert this using DOS-style short mode. If the path
48529  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48530  # take no chances and rewrite it.
48531  # Note: m4 eats our [], so we need to use [ and ] instead.
48532  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48533  if test "x$has_forbidden_chars" != x; then
48534    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48535    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48536  fi
48537
48538
48539  windows_path="$new_path"
48540  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48541    unix_path=`$CYGPATH -u "$windows_path"`
48542    new_path="$unix_path"
48543  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48544    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48545    new_path="$unix_path"
48546  fi
48547
48548  if test "x$path" != "x$new_path"; then
48549    MSVCR_DLL="$new_path"
48550    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
48551$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
48552  fi
48553
48554  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48555  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48556
48557  else
48558    # We're on a posix platform. Hooray! :)
48559    path="$MSVCR_DLL"
48560    has_space=`$ECHO "$path" | $GREP " "`
48561    if test "x$has_space" != x; then
48562      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
48563$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
48564      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48565    fi
48566
48567    # Use eval to expand a potential ~
48568    eval path="$path"
48569    if test ! -f "$path" && test ! -d "$path"; then
48570      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48571    fi
48572
48573    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
48574  fi
48575
48576
48577
48578
48579# Check whether --with-dxsdk was given.
48580if test "${with_dxsdk+set}" = set; then :
48581  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
48582$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
48583fi
48584
48585
48586
48587
48588# Check whether --with-dxsdk-lib was given.
48589if test "${with_dxsdk_lib+set}" = set; then :
48590  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
48591$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
48592fi
48593
48594
48595
48596
48597# Check whether --with-dxsdk-include was given.
48598if test "${with_dxsdk_include+set}" = set; then :
48599  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
48600$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
48601fi
48602
48603
48604  fi
48605
48606
48607
48608###############################################################################
48609#
48610# We need to do some final tweaking, when everything else is done.
48611#
48612###############################################################################
48613
48614
48615  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
48616
48617
48618  # The name of the Service Agent jar.
48619  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
48620  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
48621    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
48622  fi
48623
48624
48625
48626    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
48627$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
48628
48629    if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
48630      ENABLE_INTREE_EC=yes
48631      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48632$as_echo "yes" >&6; }
48633    else
48634      ENABLE_INTREE_EC=no
48635      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48636$as_echo "no" >&6; }
48637    fi
48638
48639
48640
48641
48642###############################################################################
48643#
48644# Configure parts of the build that only affect the build performance,
48645# not the result.
48646#
48647###############################################################################
48648
48649
48650  # How many cores do we have on this build system?
48651
48652# Check whether --with-num-cores was given.
48653if test "${with_num_cores+set}" = set; then :
48654  withval=$with_num_cores;
48655fi
48656
48657  if test "x$with_num_cores" = x; then
48658    # The number of cores were not specified, try to probe them.
48659
48660  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
48661$as_echo_n "checking for number of cores... " >&6; }
48662  NUM_CORES=1
48663  FOUND_CORES=no
48664
48665  if test -f /proc/cpuinfo; then
48666    # Looks like a Linux (or cygwin) system
48667    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
48668    FOUND_CORES=yes
48669  elif test -x /usr/sbin/psrinfo; then
48670    # Looks like a Solaris system
48671    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
48672    FOUND_CORES=yes
48673  elif test -x /usr/sbin/system_profiler; then
48674    # Looks like a MacOSX system
48675    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
48676    FOUND_CORES=yes
48677  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
48678    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
48679    FOUND_CORES=yes
48680  elif test -n "$NUMBER_OF_PROCESSORS"; then
48681    # On windows, look in the env
48682    NUM_CORES=$NUMBER_OF_PROCESSORS
48683    FOUND_CORES=yes
48684  fi
48685
48686  if test "x$FOUND_CORES" = xyes; then
48687    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
48688$as_echo "$NUM_CORES" >&6; }
48689  else
48690    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
48691$as_echo "could not detect number of cores, defaulting to 1" >&6; }
48692    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
48693$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
48694  fi
48695
48696  else
48697    NUM_CORES=$with_num_cores
48698  fi
48699
48700
48701
48702  # How much memory do we have on this build system?
48703
48704# Check whether --with-memory-size was given.
48705if test "${with_memory_size+set}" = set; then :
48706  withval=$with_memory_size;
48707fi
48708
48709  if test "x$with_memory_size" = x; then
48710    # The memory size was not specified, try to probe it.
48711
48712  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
48713$as_echo_n "checking for memory size... " >&6; }
48714  # Default to 1024 MB
48715  MEMORY_SIZE=1024
48716  FOUND_MEM=no
48717
48718  if test -f /proc/meminfo; then
48719    # Looks like a Linux (or cygwin) system
48720    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
48721    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
48722    FOUND_MEM=yes
48723  elif test -x /usr/sbin/prtconf; then
48724    # Looks like a Solaris or AIX system
48725    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
48726    FOUND_MEM=yes
48727  elif test -x /usr/sbin/system_profiler; then
48728    # Looks like a MacOSX system
48729    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
48730    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
48731    FOUND_MEM=yes
48732  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
48733    # Windows, but without cygwin
48734    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
48735    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
48736    FOUND_MEM=yes
48737  fi
48738
48739  if test "x$FOUND_MEM" = xyes; then
48740    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
48741$as_echo "$MEMORY_SIZE MB" >&6; }
48742  else
48743    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
48744$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
48745    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
48746$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
48747  fi
48748
48749  else
48750    MEMORY_SIZE=$with_memory_size
48751  fi
48752
48753
48754
48755  # Provide a decent default number of parallel jobs for make depending on
48756  # number of cores, amount of memory and machine architecture.
48757
48758# Check whether --with-jobs was given.
48759if test "${with_jobs+set}" = set; then :
48760  withval=$with_jobs;
48761fi
48762
48763  if test "x$with_jobs" = x; then
48764    # Number of jobs was not specified, calculate.
48765    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
48766$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
48767    # Approximate memory in GB, rounding up a bit.
48768    memory_gb=`expr $MEMORY_SIZE / 1100`
48769    # Pick the lowest of memory in gb and number of cores.
48770    if test "$memory_gb" -lt "$NUM_CORES"; then
48771      JOBS="$memory_gb"
48772    else
48773      JOBS="$NUM_CORES"
48774      # On bigger machines, leave some room for other processes to run
48775      if test "$JOBS" -gt "4"; then
48776        JOBS=`expr $JOBS '*' 90 / 100`
48777      fi
48778    fi
48779    # Cap number of jobs to 16
48780    if test "$JOBS" -gt "16"; then
48781      JOBS=16
48782    fi
48783    if test "$JOBS" -eq "0"; then
48784      JOBS=1
48785    fi
48786    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
48787$as_echo "$JOBS" >&6; }
48788  else
48789    JOBS=$with_jobs
48790  fi
48791
48792
48793
48794# Setup smart javac (after cores and memory have been setup)
48795
48796
48797# Check whether --with-sjavac-server-java was given.
48798if test "${with_sjavac_server_java+set}" = set; then :
48799  withval=$with_sjavac_server_java;
48800fi
48801
48802
48803  if test "x$with_sjavac_server_java" != x; then
48804    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
48805    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
48806    if test "x$FOUND_VERSION" = x; then
48807      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
48808    fi
48809  else
48810    SJAVAC_SERVER_JAVA=""
48811    # Hotspot specific options.
48812
48813  $ECHO "Check if jvm arg is ok: -verbosegc" >&5
48814  $ECHO "Command: $JAVA -verbosegc -version" >&5
48815  OUTPUT=`$JAVA -verbosegc -version 2>&1`
48816  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48817  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48818  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48819    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
48820    JVM_ARG_OK=true
48821  else
48822    $ECHO "Arg failed:" >&5
48823    $ECHO "$OUTPUT" >&5
48824    JVM_ARG_OK=false
48825  fi
48826
48827    # JRockit specific options.
48828
48829  $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
48830  $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
48831  OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
48832  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48833  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48834  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48835    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
48836    JVM_ARG_OK=true
48837  else
48838    $ECHO "Arg failed:" >&5
48839    $ECHO "$OUTPUT" >&5
48840    JVM_ARG_OK=false
48841  fi
48842
48843    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
48844  fi
48845
48846
48847  if test "$MEMORY_SIZE" -gt "2500"; then
48848
48849  $ECHO "Check if jvm arg is ok: -d64" >&5
48850  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
48851  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
48852  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48853  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48854  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48855    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
48856    JVM_ARG_OK=true
48857  else
48858    $ECHO "Arg failed:" >&5
48859    $ECHO "$OUTPUT" >&5
48860    JVM_ARG_OK=false
48861  fi
48862
48863    if test "$JVM_ARG_OK" = true; then
48864      JVM_64BIT=true
48865      JVM_ARG_OK=false
48866    fi
48867  fi
48868
48869  if test "$JVM_64BIT" = true; then
48870    if test "$MEMORY_SIZE" -gt "17000"; then
48871
48872  $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
48873  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
48874  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
48875  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48876  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48877  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48878    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
48879    JVM_ARG_OK=true
48880  else
48881    $ECHO "Arg failed:" >&5
48882    $ECHO "$OUTPUT" >&5
48883    JVM_ARG_OK=false
48884  fi
48885
48886    fi
48887    if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
48888
48889  $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
48890  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
48891  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
48892  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48893  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48894  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48895    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
48896    JVM_ARG_OK=true
48897  else
48898    $ECHO "Arg failed:" >&5
48899    $ECHO "$OUTPUT" >&5
48900    JVM_ARG_OK=false
48901  fi
48902
48903    fi
48904    if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
48905
48906  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
48907  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
48908  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
48909  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48910  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48911  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48912    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
48913    JVM_ARG_OK=true
48914  else
48915    $ECHO "Arg failed:" >&5
48916    $ECHO "$OUTPUT" >&5
48917    JVM_ARG_OK=false
48918  fi
48919
48920    fi
48921    if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
48922
48923  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
48924  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
48925  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
48926  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48927  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48928  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48929    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
48930    JVM_ARG_OK=true
48931  else
48932    $ECHO "Arg failed:" >&5
48933    $ECHO "$OUTPUT" >&5
48934    JVM_ARG_OK=false
48935  fi
48936
48937    fi
48938  fi
48939  if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
48940
48941  $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
48942  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
48943  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
48944  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48945  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48946  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48947    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
48948    JVM_ARG_OK=true
48949  else
48950    $ECHO "Arg failed:" >&5
48951    $ECHO "$OUTPUT" >&5
48952    JVM_ARG_OK=false
48953  fi
48954
48955  fi
48956  if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
48957
48958  $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
48959  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
48960  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
48961  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48962  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48963  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48964    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
48965    JVM_ARG_OK=true
48966  else
48967    $ECHO "Arg failed:" >&5
48968    $ECHO "$OUTPUT" >&5
48969    JVM_ARG_OK=false
48970  fi
48971
48972  fi
48973  if test "$JVM_ARG_OK" = false; then
48974
48975  $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
48976  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
48977  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
48978  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48979  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48980  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48981    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
48982    JVM_ARG_OK=true
48983  else
48984    $ECHO "Arg failed:" >&5
48985    $ECHO "$OUTPUT" >&5
48986    JVM_ARG_OK=false
48987  fi
48988
48989  fi
48990
48991  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
48992$as_echo_n "checking whether to use sjavac... " >&6; }
48993  # Check whether --enable-sjavac was given.
48994if test "${enable_sjavac+set}" = set; then :
48995  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
48996else
48997  ENABLE_SJAVAC='no'
48998fi
48999
49000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
49001$as_echo "$ENABLE_SJAVAC" >&6; }
49002
49003
49004  if test "x$ENABLE_SJAVAC" = xyes; then
49005    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
49006  else
49007    SJAVAC_SERVER_DIR=
49008  fi
49009
49010
49011
49012# Can the C/C++ compiler use precompiled headers?
49013
49014
49015  ###############################################################################
49016  #
49017  # Can the C/C++ compiler use precompiled headers?
49018  #
49019  # Check whether --enable-precompiled-headers was given.
49020if test "${enable_precompiled_headers+set}" = set; then :
49021  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
49022else
49023  ENABLE_PRECOMPH=yes
49024fi
49025
49026
49027  USE_PRECOMPILED_HEADER=1
49028  if test "x$ENABLE_PRECOMPH" = xno; then
49029    USE_PRECOMPILED_HEADER=0
49030  fi
49031
49032  if test "x$ENABLE_PRECOMPH" = xyes; then
49033    # Check that the compiler actually supports precomp headers.
49034    if test "x$TOOLCHAIN_TYPE" = xgcc; then
49035      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
49036$as_echo_n "checking that precompiled headers work... " >&6; }
49037      echo "int alfa();" > conftest.h
49038      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
49039      if test ! -f conftest.hpp.gch; then
49040        USE_PRECOMPILED_HEADER=0
49041        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49042$as_echo "no" >&6; }
49043      else
49044        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49045$as_echo "yes" >&6; }
49046      fi
49047      rm -f conftest.h conftest.hpp.gch
49048    fi
49049  fi
49050
49051
49052
49053
49054# Setup use of ccache, if available
49055
49056  # Check whether --enable-ccache was given.
49057if test "${enable_ccache+set}" = set; then :
49058  enableval=$enable_ccache;
49059fi
49060
49061
49062  CCACHE=
49063  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
49064$as_echo_n "checking is ccache enabled... " >&6; }
49065  ENABLE_CCACHE=$enable_ccache
49066  if test "x$enable_ccache" = xyes; then
49067    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49068$as_echo "yes" >&6; }
49069    OLD_PATH="$PATH"
49070    if test "x$TOOLCHAIN_PATH" != x; then
49071      PATH=$TOOLCHAIN_PATH:$PATH
49072    fi
49073
49074
49075
49076  # Publish this variable in the help.
49077
49078
49079  if test "x$CCACHE" = x; then
49080    # The variable is not set by user, try to locate tool using the code snippet
49081    for ac_prog in ccache
49082do
49083  # Extract the first word of "$ac_prog", so it can be a program name with args.
49084set dummy $ac_prog; ac_word=$2
49085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49086$as_echo_n "checking for $ac_word... " >&6; }
49087if ${ac_cv_path_CCACHE+:} false; then :
49088  $as_echo_n "(cached) " >&6
49089else
49090  case $CCACHE in
49091  [\\/]* | ?:[\\/]*)
49092  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
49093  ;;
49094  *)
49095  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49096for as_dir in $PATH
49097do
49098  IFS=$as_save_IFS
49099  test -z "$as_dir" && as_dir=.
49100    for ac_exec_ext in '' $ac_executable_extensions; do
49101  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49102    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
49103    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49104    break 2
49105  fi
49106done
49107  done
49108IFS=$as_save_IFS
49109
49110  ;;
49111esac
49112fi
49113CCACHE=$ac_cv_path_CCACHE
49114if test -n "$CCACHE"; then
49115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
49116$as_echo "$CCACHE" >&6; }
49117else
49118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49119$as_echo "no" >&6; }
49120fi
49121
49122
49123  test -n "$CCACHE" && break
49124done
49125
49126  else
49127    # The variable is set, but is it from the command line or the environment?
49128
49129    # Try to remove the string !CCACHE! from our list.
49130    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
49131    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
49132      # If it failed, the variable was not from the command line. Ignore it,
49133      # but warn the user (except for BASH, which is always set by the calling BASH).
49134      if test "xCCACHE" != xBASH; then
49135        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
49136$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
49137      fi
49138      # Try to locate tool using the code snippet
49139      for ac_prog in ccache
49140do
49141  # Extract the first word of "$ac_prog", so it can be a program name with args.
49142set dummy $ac_prog; ac_word=$2
49143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49144$as_echo_n "checking for $ac_word... " >&6; }
49145if ${ac_cv_path_CCACHE+:} false; then :
49146  $as_echo_n "(cached) " >&6
49147else
49148  case $CCACHE in
49149  [\\/]* | ?:[\\/]*)
49150  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
49151  ;;
49152  *)
49153  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49154for as_dir in $PATH
49155do
49156  IFS=$as_save_IFS
49157  test -z "$as_dir" && as_dir=.
49158    for ac_exec_ext in '' $ac_executable_extensions; do
49159  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49160    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
49161    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49162    break 2
49163  fi
49164done
49165  done
49166IFS=$as_save_IFS
49167
49168  ;;
49169esac
49170fi
49171CCACHE=$ac_cv_path_CCACHE
49172if test -n "$CCACHE"; then
49173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
49174$as_echo "$CCACHE" >&6; }
49175else
49176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49177$as_echo "no" >&6; }
49178fi
49179
49180
49181  test -n "$CCACHE" && break
49182done
49183
49184    else
49185      # If it succeeded, then it was overridden by the user. We will use it
49186      # for the tool.
49187
49188      # First remove it from the list of overridden variables, so we can test
49189      # for unknown variables in the end.
49190      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
49191
49192      # Check if the provided tool contains a complete path.
49193      tool_specified="$CCACHE"
49194      tool_basename="${tool_specified##*/}"
49195      if test "x$tool_basename" = "x$tool_specified"; then
49196        # A command without a complete path is provided, search $PATH.
49197        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
49198$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
49199        # Extract the first word of "$tool_basename", so it can be a program name with args.
49200set dummy $tool_basename; ac_word=$2
49201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49202$as_echo_n "checking for $ac_word... " >&6; }
49203if ${ac_cv_path_CCACHE+:} false; then :
49204  $as_echo_n "(cached) " >&6
49205else
49206  case $CCACHE in
49207  [\\/]* | ?:[\\/]*)
49208  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
49209  ;;
49210  *)
49211  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49212for as_dir in $PATH
49213do
49214  IFS=$as_save_IFS
49215  test -z "$as_dir" && as_dir=.
49216    for ac_exec_ext in '' $ac_executable_extensions; do
49217  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49218    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
49219    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49220    break 2
49221  fi
49222done
49223  done
49224IFS=$as_save_IFS
49225
49226  ;;
49227esac
49228fi
49229CCACHE=$ac_cv_path_CCACHE
49230if test -n "$CCACHE"; then
49231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
49232$as_echo "$CCACHE" >&6; }
49233else
49234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49235$as_echo "no" >&6; }
49236fi
49237
49238
49239        if test "x$CCACHE" = x; then
49240          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
49241        fi
49242      else
49243        # Otherwise we believe it is a complete path. Use it as it is.
49244        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
49245$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
49246        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
49247$as_echo_n "checking for CCACHE... " >&6; }
49248        if test ! -x "$tool_specified"; then
49249          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
49250$as_echo "not found" >&6; }
49251          as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
49252        fi
49253        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
49254$as_echo "$tool_specified" >&6; }
49255      fi
49256    fi
49257  fi
49258
49259
49260
49261  if test "x$CCACHE" = x; then
49262    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
49263  fi
49264
49265
49266    CCACHE_STATUS="enabled"
49267    PATH="$OLD_PATH"
49268  elif test "x$enable_ccache" = xno; then
49269    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
49270$as_echo "no, explicitly disabled" >&6; }
49271  elif test "x$enable_ccache" = x; then
49272    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49273$as_echo "no" >&6; }
49274  else
49275    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
49276$as_echo "unknown" >&6; }
49277    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
49278  fi
49279
49280
49281
49282# Check whether --with-ccache-dir was given.
49283if test "${with_ccache_dir+set}" = set; then :
49284  withval=$with_ccache_dir;
49285fi
49286
49287
49288  if test "x$with_ccache_dir" != x; then
49289    # When using a non home ccache directory, assume the use is to share ccache files
49290    # with other users. Thus change the umask.
49291    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
49292    if test "x$CCACHE" = x; then
49293      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
49294$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
49295    fi
49296  fi
49297
49298  if test "x$CCACHE" != x; then
49299
49300  if test "x$CCACHE" != x; then
49301    # Only use ccache if it is 3.1.4 or later, which supports
49302    # precompiled headers.
49303    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
49304$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
49305    HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
49306    if test "x$HAS_GOOD_CCACHE" = x; then
49307      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
49308$as_echo "no, disabling ccache" >&6; }
49309      CCACHE=
49310      CCACHE_STATUS="disabled"
49311    else
49312      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49313$as_echo "yes" >&6; }
49314      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
49315$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
49316      PUSHED_FLAGS="$CXXFLAGS"
49317      CXXFLAGS="-fpch-preprocess $CXXFLAGS"
49318      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49319/* end confdefs.h.  */
49320
49321int
49322main ()
49323{
49324
49325  ;
49326  return 0;
49327}
49328_ACEOF
49329if ac_fn_cxx_try_compile "$LINENO"; then :
49330  CC_KNOWS_CCACHE_TRICK=yes
49331else
49332  CC_KNOWS_CCACHE_TRICK=no
49333fi
49334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49335      CXXFLAGS="$PUSHED_FLAGS"
49336      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
49337        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49338$as_echo "yes" >&6; }
49339      else
49340        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
49341$as_echo "no, disabling ccaching of precompiled headers" >&6; }
49342        CCACHE=
49343        CCACHE_STATUS="disabled"
49344      fi
49345    fi
49346  fi
49347
49348  if test "x$CCACHE" != x; then
49349    CCACHE_SLOPPINESS=time_macros
49350    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
49351    CCACHE_FLAGS=-fpch-preprocess
49352
49353    if test "x$SET_CCACHE_DIR" != x; then
49354      mkdir -p $CCACHE_DIR > /dev/null 2>&1
49355      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
49356    fi
49357  fi
49358
49359  fi
49360
49361
49362###############################################################################
49363#
49364# And now the finish...
49365#
49366###############################################################################
49367
49368# Check for some common pitfalls
49369
49370  if test x"$OPENJDK_BUILD_OS" = xwindows; then
49371    file_to_test="$SRC_ROOT/LICENSE"
49372    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
49373      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
49374    fi
49375  fi
49376
49377
49378  # Did user specify any unknown variables?
49379
49380  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
49381    # Replace the separating ! with spaces before presenting for end user.
49382    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
49383    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
49384$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
49385  fi
49386
49387
49388  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
49389$as_echo_n "checking if build directory is on local disk... " >&6; }
49390
49391  # df -l lists only local disks; if the given directory is not found then
49392  # a non-zero exit code is given
49393  if test "x$DF" = x; then
49394    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49395      # msys does not have df; use Windows "net use" instead.
49396      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
49397      if test "x$IS_NETWORK_DISK" = x; then
49398        OUTPUT_DIR_IS_LOCAL="yes"
49399      else
49400        OUTPUT_DIR_IS_LOCAL="no"
49401      fi
49402    else
49403      # No df here, say it's local
49404      OUTPUT_DIR_IS_LOCAL="yes"
49405    fi
49406  else
49407    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
49408      OUTPUT_DIR_IS_LOCAL="yes"
49409    else
49410      OUTPUT_DIR_IS_LOCAL="no"
49411    fi
49412  fi
49413
49414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
49415$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
49416
49417
49418
49419  # Check if the user has any old-style ALT_ variables set.
49420  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
49421
49422  # Before generating output files, test if they exist. If they do, this is a reconfigure.
49423  # Since we can't properly handle the dependencies for this, warn the user about the situation
49424  if test -e $OUTPUT_ROOT/spec.gmk; then
49425    IS_RECONFIGURE=yes
49426  else
49427    IS_RECONFIGURE=no
49428  fi
49429
49430
49431# At the end, call the custom hook. (Dummy macro if no custom sources available)
49432
49433
49434# We're messing a bit with internal autoconf variables to put the config.status
49435# in the output directory instead of the current directory.
49436CONFIG_STATUS="$OUTPUT_ROOT/config.status"
49437
49438# Create the actual output files. Now the main work of configure is done.
49439cat >confcache <<\_ACEOF
49440# This file is a shell script that caches the results of configure
49441# tests run on this system so they can be shared between configure
49442# scripts and configure runs, see configure's option --config-cache.
49443# It is not useful on other systems.  If it contains results you don't
49444# want to keep, you may remove or edit it.
49445#
49446# config.status only pays attention to the cache file if you give it
49447# the --recheck option to rerun configure.
49448#
49449# `ac_cv_env_foo' variables (set or unset) will be overridden when
49450# loading this file, other *unset* `ac_cv_foo' will be assigned the
49451# following values.
49452
49453_ACEOF
49454
49455# The following way of writing the cache mishandles newlines in values,
49456# but we know of no workaround that is simple, portable, and efficient.
49457# So, we kill variables containing newlines.
49458# Ultrix sh set writes to stderr and can't be redirected directly,
49459# and sets the high bit in the cache file unless we assign to the vars.
49460(
49461  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
49462    eval ac_val=\$$ac_var
49463    case $ac_val in #(
49464    *${as_nl}*)
49465      case $ac_var in #(
49466      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
49467$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
49468      esac
49469      case $ac_var in #(
49470      _ | IFS | as_nl) ;; #(
49471      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
49472      *) { eval $ac_var=; unset $ac_var;} ;;
49473      esac ;;
49474    esac
49475  done
49476
49477  (set) 2>&1 |
49478    case $as_nl`(ac_space=' '; set) 2>&1` in #(
49479    *${as_nl}ac_space=\ *)
49480      # `set' does not quote correctly, so add quotes: double-quote
49481      # substitution turns \\\\ into \\, and sed turns \\ into \.
49482      sed -n \
49483	"s/'/'\\\\''/g;
49484	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
49485      ;; #(
49486    *)
49487      # `set' quotes correctly as required by POSIX, so do not add quotes.
49488      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
49489      ;;
49490    esac |
49491    sort
49492) |
49493  sed '
49494     /^ac_cv_env_/b end
49495     t clear
49496     :clear
49497     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
49498     t end
49499     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
49500     :end' >>confcache
49501if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
49502  if test -w "$cache_file"; then
49503    if test "x$cache_file" != "x/dev/null"; then
49504      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
49505$as_echo "$as_me: updating cache $cache_file" >&6;}
49506      if test ! -f "$cache_file" || test -h "$cache_file"; then
49507	cat confcache >"$cache_file"
49508      else
49509        case $cache_file in #(
49510        */* | ?:*)
49511	  mv -f confcache "$cache_file"$$ &&
49512	  mv -f "$cache_file"$$ "$cache_file" ;; #(
49513        *)
49514	  mv -f confcache "$cache_file" ;;
49515	esac
49516      fi
49517    fi
49518  else
49519    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
49520$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
49521  fi
49522fi
49523rm -f confcache
49524
49525test "x$prefix" = xNONE && prefix=$ac_default_prefix
49526# Let make expand exec_prefix.
49527test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
49528
49529DEFS=-DHAVE_CONFIG_H
49530
49531ac_libobjs=
49532ac_ltlibobjs=
49533U=
49534for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
49535  # 1. Remove the extension, and $U if already installed.
49536  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
49537  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
49538  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
49539  #    will be set to the directory where LIBOBJS objects are built.
49540  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
49541  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
49542done
49543LIBOBJS=$ac_libobjs
49544
49545LTLIBOBJS=$ac_ltlibobjs
49546
49547
49548
49549: "${CONFIG_STATUS=./config.status}"
49550ac_write_fail=0
49551ac_clean_files_save=$ac_clean_files
49552ac_clean_files="$ac_clean_files $CONFIG_STATUS"
49553{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
49554$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
49555as_write_fail=0
49556cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
49557#! $SHELL
49558# Generated by $as_me.
49559# Run this file to recreate the current configuration.
49560# Compiler output produced by configure, useful for debugging
49561# configure, is in config.log if it exists.
49562
49563debug=false
49564ac_cs_recheck=false
49565ac_cs_silent=false
49566
49567SHELL=\${CONFIG_SHELL-$SHELL}
49568export SHELL
49569_ASEOF
49570cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
49571## -------------------- ##
49572## M4sh Initialization. ##
49573## -------------------- ##
49574
49575# Be more Bourne compatible
49576DUALCASE=1; export DUALCASE # for MKS sh
49577if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
49578  emulate sh
49579  NULLCMD=:
49580  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
49581  # is contrary to our usage.  Disable this feature.
49582  alias -g '${1+"$@"}'='"$@"'
49583  setopt NO_GLOB_SUBST
49584else
49585  case `(set -o) 2>/dev/null` in #(
49586  *posix*) :
49587    set -o posix ;; #(
49588  *) :
49589     ;;
49590esac
49591fi
49592
49593
49594as_nl='
49595'
49596export as_nl
49597# Printing a long string crashes Solaris 7 /usr/bin/printf.
49598as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
49599as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
49600as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
49601# Prefer a ksh shell builtin over an external printf program on Solaris,
49602# but without wasting forks for bash or zsh.
49603if test -z "$BASH_VERSION$ZSH_VERSION" \
49604    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49605  as_echo='print -r --'
49606  as_echo_n='print -rn --'
49607elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
49608  as_echo='printf %s\n'
49609  as_echo_n='printf %s'
49610else
49611  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
49612    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
49613    as_echo_n='/usr/ucb/echo -n'
49614  else
49615    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
49616    as_echo_n_body='eval
49617      arg=$1;
49618      case $arg in #(
49619      *"$as_nl"*)
49620	expr "X$arg" : "X\\(.*\\)$as_nl";
49621	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
49622      esac;
49623      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
49624    '
49625    export as_echo_n_body
49626    as_echo_n='sh -c $as_echo_n_body as_echo'
49627  fi
49628  export as_echo_body
49629  as_echo='sh -c $as_echo_body as_echo'
49630fi
49631
49632# The user is always right.
49633if test "${PATH_SEPARATOR+set}" != set; then
49634  PATH_SEPARATOR=:
49635  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
49636    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
49637      PATH_SEPARATOR=';'
49638  }
49639fi
49640
49641
49642# IFS
49643# We need space, tab and new line, in precisely that order.  Quoting is
49644# there to prevent editors from complaining about space-tab.
49645# (If _AS_PATH_WALK were called with IFS unset, it would disable word
49646# splitting by setting IFS to empty value.)
49647IFS=" ""	$as_nl"
49648
49649# Find who we are.  Look in the path if we contain no directory separator.
49650as_myself=
49651case $0 in #((
49652  *[\\/]* ) as_myself=$0 ;;
49653  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49654for as_dir in $PATH
49655do
49656  IFS=$as_save_IFS
49657  test -z "$as_dir" && as_dir=.
49658    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
49659  done
49660IFS=$as_save_IFS
49661
49662     ;;
49663esac
49664# We did not find ourselves, most probably we were run as `sh COMMAND'
49665# in which case we are not to be found in the path.
49666if test "x$as_myself" = x; then
49667  as_myself=$0
49668fi
49669if test ! -f "$as_myself"; then
49670  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
49671  exit 1
49672fi
49673
49674# Unset variables that we do not need and which cause bugs (e.g. in
49675# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
49676# suppresses any "Segmentation fault" message there.  '((' could
49677# trigger a bug in pdksh 5.2.14.
49678for as_var in BASH_ENV ENV MAIL MAILPATH
49679do eval test x\${$as_var+set} = xset \
49680  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
49681done
49682PS1='$ '
49683PS2='> '
49684PS4='+ '
49685
49686# NLS nuisances.
49687LC_ALL=C
49688export LC_ALL
49689LANGUAGE=C
49690export LANGUAGE
49691
49692# CDPATH.
49693(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
49694
49695
49696# as_fn_error STATUS ERROR [LINENO LOG_FD]
49697# ----------------------------------------
49698# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
49699# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
49700# script with STATUS, using 1 if that was 0.
49701as_fn_error ()
49702{
49703  as_status=$1; test $as_status -eq 0 && as_status=1
49704  if test "$4"; then
49705    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
49706    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
49707  fi
49708  $as_echo "$as_me: error: $2" >&2
49709  as_fn_exit $as_status
49710} # as_fn_error
49711
49712
49713# as_fn_set_status STATUS
49714# -----------------------
49715# Set $? to STATUS, without forking.
49716as_fn_set_status ()
49717{
49718  return $1
49719} # as_fn_set_status
49720
49721# as_fn_exit STATUS
49722# -----------------
49723# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
49724as_fn_exit ()
49725{
49726  set +e
49727  as_fn_set_status $1
49728  exit $1
49729} # as_fn_exit
49730
49731# as_fn_unset VAR
49732# ---------------
49733# Portably unset VAR.
49734as_fn_unset ()
49735{
49736  { eval $1=; unset $1;}
49737}
49738as_unset=as_fn_unset
49739# as_fn_append VAR VALUE
49740# ----------------------
49741# Append the text in VALUE to the end of the definition contained in VAR. Take
49742# advantage of any shell optimizations that allow amortized linear growth over
49743# repeated appends, instead of the typical quadratic growth present in naive
49744# implementations.
49745if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
49746  eval 'as_fn_append ()
49747  {
49748    eval $1+=\$2
49749  }'
49750else
49751  as_fn_append ()
49752  {
49753    eval $1=\$$1\$2
49754  }
49755fi # as_fn_append
49756
49757# as_fn_arith ARG...
49758# ------------------
49759# Perform arithmetic evaluation on the ARGs, and store the result in the
49760# global $as_val. Take advantage of shells that can avoid forks. The arguments
49761# must be portable across $(()) and expr.
49762if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
49763  eval 'as_fn_arith ()
49764  {
49765    as_val=$(( $* ))
49766  }'
49767else
49768  as_fn_arith ()
49769  {
49770    as_val=`expr "$@" || test $? -eq 1`
49771  }
49772fi # as_fn_arith
49773
49774
49775if expr a : '\(a\)' >/dev/null 2>&1 &&
49776   test "X`expr 00001 : '.*\(...\)'`" = X001; then
49777  as_expr=expr
49778else
49779  as_expr=false
49780fi
49781
49782if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
49783  as_basename=basename
49784else
49785  as_basename=false
49786fi
49787
49788if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
49789  as_dirname=dirname
49790else
49791  as_dirname=false
49792fi
49793
49794as_me=`$as_basename -- "$0" ||
49795$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
49796	 X"$0" : 'X\(//\)$' \| \
49797	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
49798$as_echo X/"$0" |
49799    sed '/^.*\/\([^/][^/]*\)\/*$/{
49800	    s//\1/
49801	    q
49802	  }
49803	  /^X\/\(\/\/\)$/{
49804	    s//\1/
49805	    q
49806	  }
49807	  /^X\/\(\/\).*/{
49808	    s//\1/
49809	    q
49810	  }
49811	  s/.*/./; q'`
49812
49813# Avoid depending upon Character Ranges.
49814as_cr_letters='abcdefghijklmnopqrstuvwxyz'
49815as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
49816as_cr_Letters=$as_cr_letters$as_cr_LETTERS
49817as_cr_digits='0123456789'
49818as_cr_alnum=$as_cr_Letters$as_cr_digits
49819
49820ECHO_C= ECHO_N= ECHO_T=
49821case `echo -n x` in #(((((
49822-n*)
49823  case `echo 'xy\c'` in
49824  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
49825  xy)  ECHO_C='\c';;
49826  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
49827       ECHO_T='	';;
49828  esac;;
49829*)
49830  ECHO_N='-n';;
49831esac
49832
49833rm -f conf$$ conf$$.exe conf$$.file
49834if test -d conf$$.dir; then
49835  rm -f conf$$.dir/conf$$.file
49836else
49837  rm -f conf$$.dir
49838  mkdir conf$$.dir 2>/dev/null
49839fi
49840if (echo >conf$$.file) 2>/dev/null; then
49841  if ln -s conf$$.file conf$$ 2>/dev/null; then
49842    as_ln_s='ln -s'
49843    # ... but there are two gotchas:
49844    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
49845    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
49846    # In both cases, we have to default to `cp -pR'.
49847    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
49848      as_ln_s='cp -pR'
49849  elif ln conf$$.file conf$$ 2>/dev/null; then
49850    as_ln_s=ln
49851  else
49852    as_ln_s='cp -pR'
49853  fi
49854else
49855  as_ln_s='cp -pR'
49856fi
49857rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
49858rmdir conf$$.dir 2>/dev/null
49859
49860
49861# as_fn_mkdir_p
49862# -------------
49863# Create "$as_dir" as a directory, including parents if necessary.
49864as_fn_mkdir_p ()
49865{
49866
49867  case $as_dir in #(
49868  -*) as_dir=./$as_dir;;
49869  esac
49870  test -d "$as_dir" || eval $as_mkdir_p || {
49871    as_dirs=
49872    while :; do
49873      case $as_dir in #(
49874      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
49875      *) as_qdir=$as_dir;;
49876      esac
49877      as_dirs="'$as_qdir' $as_dirs"
49878      as_dir=`$as_dirname -- "$as_dir" ||
49879$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
49880	 X"$as_dir" : 'X\(//\)[^/]' \| \
49881	 X"$as_dir" : 'X\(//\)$' \| \
49882	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
49883$as_echo X"$as_dir" |
49884    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
49885	    s//\1/
49886	    q
49887	  }
49888	  /^X\(\/\/\)[^/].*/{
49889	    s//\1/
49890	    q
49891	  }
49892	  /^X\(\/\/\)$/{
49893	    s//\1/
49894	    q
49895	  }
49896	  /^X\(\/\).*/{
49897	    s//\1/
49898	    q
49899	  }
49900	  s/.*/./; q'`
49901      test -d "$as_dir" && break
49902    done
49903    test -z "$as_dirs" || eval "mkdir $as_dirs"
49904  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
49905
49906
49907} # as_fn_mkdir_p
49908if mkdir -p . 2>/dev/null; then
49909  as_mkdir_p='mkdir -p "$as_dir"'
49910else
49911  test -d ./-p && rmdir ./-p
49912  as_mkdir_p=false
49913fi
49914
49915
49916# as_fn_executable_p FILE
49917# -----------------------
49918# Test if FILE is an executable regular file.
49919as_fn_executable_p ()
49920{
49921  test -f "$1" && test -x "$1"
49922} # as_fn_executable_p
49923as_test_x='test -x'
49924as_executable_p=as_fn_executable_p
49925
49926# Sed expression to map a string onto a valid CPP name.
49927as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
49928
49929# Sed expression to map a string onto a valid variable name.
49930as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
49931
49932
49933exec 6>&1
49934## ----------------------------------- ##
49935## Main body of $CONFIG_STATUS script. ##
49936## ----------------------------------- ##
49937_ASEOF
49938test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
49939
49940cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49941# Save the log message, to keep $0 and so on meaningful, and to
49942# report actual input values of CONFIG_FILES etc. instead of their
49943# values after options handling.
49944ac_log="
49945This file was extended by OpenJDK $as_me jdk9, which was
49946generated by GNU Autoconf 2.69.  Invocation command line was
49947
49948  CONFIG_FILES    = $CONFIG_FILES
49949  CONFIG_HEADERS  = $CONFIG_HEADERS
49950  CONFIG_LINKS    = $CONFIG_LINKS
49951  CONFIG_COMMANDS = $CONFIG_COMMANDS
49952  $ $0 $@
49953
49954on `(hostname || uname -n) 2>/dev/null | sed 1q`
49955"
49956
49957_ACEOF
49958
49959case $ac_config_files in *"
49960"*) set x $ac_config_files; shift; ac_config_files=$*;;
49961esac
49962
49963case $ac_config_headers in *"
49964"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
49965esac
49966
49967
49968cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49969# Files that config.status was made for.
49970config_files="$ac_config_files"
49971config_headers="$ac_config_headers"
49972
49973_ACEOF
49974
49975cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49976ac_cs_usage="\
49977\`$as_me' instantiates files and other configuration actions
49978from templates according to the current configuration.  Unless the files
49979and actions are specified as TAGs, all are instantiated by default.
49980
49981Usage: $0 [OPTION]... [TAG]...
49982
49983  -h, --help       print this help, then exit
49984  -V, --version    print version number and configuration settings, then exit
49985      --config     print configuration, then exit
49986  -q, --quiet, --silent
49987                   do not print progress messages
49988  -d, --debug      don't remove temporary files
49989      --recheck    update $as_me by reconfiguring in the same conditions
49990      --file=FILE[:TEMPLATE]
49991                   instantiate the configuration file FILE
49992      --header=FILE[:TEMPLATE]
49993                   instantiate the configuration header FILE
49994
49995Configuration files:
49996$config_files
49997
49998Configuration headers:
49999$config_headers
50000
50001Report bugs to <build-dev@openjdk.java.net>.
50002OpenJDK home page: <http://openjdk.java.net>."
50003
50004_ACEOF
50005cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50006ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
50007ac_cs_version="\\
50008OpenJDK config.status jdk9
50009configured by $0, generated by GNU Autoconf 2.69,
50010  with options \\"\$ac_cs_config\\"
50011
50012Copyright (C) 2012 Free Software Foundation, Inc.
50013This config.status script is free software; the Free Software Foundation
50014gives unlimited permission to copy, distribute and modify it."
50015
50016ac_pwd='$ac_pwd'
50017srcdir='$srcdir'
50018AWK='$AWK'
50019test -n "\$AWK" || AWK=awk
50020_ACEOF
50021
50022cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50023# The default lists apply if the user does not specify any file.
50024ac_need_defaults=:
50025while test $# != 0
50026do
50027  case $1 in
50028  --*=?*)
50029    ac_option=`expr "X$1" : 'X\([^=]*\)='`
50030    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
50031    ac_shift=:
50032    ;;
50033  --*=)
50034    ac_option=`expr "X$1" : 'X\([^=]*\)='`
50035    ac_optarg=
50036    ac_shift=:
50037    ;;
50038  *)
50039    ac_option=$1
50040    ac_optarg=$2
50041    ac_shift=shift
50042    ;;
50043  esac
50044
50045  case $ac_option in
50046  # Handling of the options.
50047  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
50048    ac_cs_recheck=: ;;
50049  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
50050    $as_echo "$ac_cs_version"; exit ;;
50051  --config | --confi | --conf | --con | --co | --c )
50052    $as_echo "$ac_cs_config"; exit ;;
50053  --debug | --debu | --deb | --de | --d | -d )
50054    debug=: ;;
50055  --file | --fil | --fi | --f )
50056    $ac_shift
50057    case $ac_optarg in
50058    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
50059    '') as_fn_error $? "missing file argument" ;;
50060    esac
50061    as_fn_append CONFIG_FILES " '$ac_optarg'"
50062    ac_need_defaults=false;;
50063  --header | --heade | --head | --hea )
50064    $ac_shift
50065    case $ac_optarg in
50066    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
50067    esac
50068    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
50069    ac_need_defaults=false;;
50070  --he | --h)
50071    # Conflict between --help and --header
50072    as_fn_error $? "ambiguous option: \`$1'
50073Try \`$0 --help' for more information.";;
50074  --help | --hel | -h )
50075    $as_echo "$ac_cs_usage"; exit ;;
50076  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
50077  | -silent | --silent | --silen | --sile | --sil | --si | --s)
50078    ac_cs_silent=: ;;
50079
50080  # This is an error.
50081  -*) as_fn_error $? "unrecognized option: \`$1'
50082Try \`$0 --help' for more information." ;;
50083
50084  *) as_fn_append ac_config_targets " $1"
50085     ac_need_defaults=false ;;
50086
50087  esac
50088  shift
50089done
50090
50091ac_configure_extra_args=
50092
50093if $ac_cs_silent; then
50094  exec 6>/dev/null
50095  ac_configure_extra_args="$ac_configure_extra_args --silent"
50096fi
50097
50098_ACEOF
50099cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50100if \$ac_cs_recheck; then
50101  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
50102  shift
50103  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
50104  CONFIG_SHELL='$SHELL'
50105  export CONFIG_SHELL
50106  exec "\$@"
50107fi
50108
50109_ACEOF
50110cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50111exec 5>>config.log
50112{
50113  echo
50114  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
50115## Running $as_me. ##
50116_ASBOX
50117  $as_echo "$ac_log"
50118} >&5
50119
50120_ACEOF
50121cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50122_ACEOF
50123
50124cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50125
50126# Handling of arguments.
50127for ac_config_target in $ac_config_targets
50128do
50129  case $ac_config_target in
50130    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
50131    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
50132    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
50133    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
50134    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
50135    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
50136    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
50137
50138  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
50139  esac
50140done
50141
50142
50143# If the user did not use the arguments to specify the items to instantiate,
50144# then the envvar interface is used.  Set only those that are not.
50145# We use the long form for the default assignment because of an extremely
50146# bizarre bug on SunOS 4.1.3.
50147if $ac_need_defaults; then
50148  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
50149  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
50150fi
50151
50152# Have a temporary directory for convenience.  Make it in the build tree
50153# simply because there is no reason against having it here, and in addition,
50154# creating and moving files from /tmp can sometimes cause problems.
50155# Hook for its removal unless debugging.
50156# Note that there is a small window in which the directory will not be cleaned:
50157# after its creation but before its name has been assigned to `$tmp'.
50158$debug ||
50159{
50160  tmp= ac_tmp=
50161  trap 'exit_status=$?
50162  : "${ac_tmp:=$tmp}"
50163  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
50164' 0
50165  trap 'as_fn_exit 1' 1 2 13 15
50166}
50167# Create a (secure) tmp directory for tmp files.
50168
50169{
50170  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
50171  test -d "$tmp"
50172}  ||
50173{
50174  tmp=./conf$$-$RANDOM
50175  (umask 077 && mkdir "$tmp")
50176} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
50177ac_tmp=$tmp
50178
50179# Set up the scripts for CONFIG_FILES section.
50180# No need to generate them if there are no CONFIG_FILES.
50181# This happens for instance with `./config.status config.h'.
50182if test -n "$CONFIG_FILES"; then
50183
50184
50185ac_cr=`echo X | tr X '\015'`
50186# On cygwin, bash can eat \r inside `` if the user requested igncr.
50187# But we know of no other shell where ac_cr would be empty at this
50188# point, so we can use a bashism as a fallback.
50189if test "x$ac_cr" = x; then
50190  eval ac_cr=\$\'\\r\'
50191fi
50192ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
50193if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
50194  ac_cs_awk_cr='\\r'
50195else
50196  ac_cs_awk_cr=$ac_cr
50197fi
50198
50199echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
50200_ACEOF
50201
50202
50203{
50204  echo "cat >conf$$subs.awk <<_ACEOF" &&
50205  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
50206  echo "_ACEOF"
50207} >conf$$subs.sh ||
50208  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
50209ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
50210ac_delim='%!_!# '
50211for ac_last_try in false false false false false :; do
50212  . ./conf$$subs.sh ||
50213    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
50214
50215  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
50216  if test $ac_delim_n = $ac_delim_num; then
50217    break
50218  elif $ac_last_try; then
50219    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
50220  else
50221    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
50222  fi
50223done
50224rm -f conf$$subs.sh
50225
50226cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50227cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
50228_ACEOF
50229sed -n '
50230h
50231s/^/S["/; s/!.*/"]=/
50232p
50233g
50234s/^[^!]*!//
50235:repl
50236t repl
50237s/'"$ac_delim"'$//
50238t delim
50239:nl
50240h
50241s/\(.\{148\}\)..*/\1/
50242t more1
50243s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
50244p
50245n
50246b repl
50247:more1
50248s/["\\]/\\&/g; s/^/"/; s/$/"\\/
50249p
50250g
50251s/.\{148\}//
50252t nl
50253:delim
50254h
50255s/\(.\{148\}\)..*/\1/
50256t more2
50257s/["\\]/\\&/g; s/^/"/; s/$/"/
50258p
50259b
50260:more2
50261s/["\\]/\\&/g; s/^/"/; s/$/"\\/
50262p
50263g
50264s/.\{148\}//
50265t delim
50266' <conf$$subs.awk | sed '
50267/^[^""]/{
50268  N
50269  s/\n//
50270}
50271' >>$CONFIG_STATUS || ac_write_fail=1
50272rm -f conf$$subs.awk
50273cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50274_ACAWK
50275cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
50276  for (key in S) S_is_set[key] = 1
50277  FS = ""
50278
50279}
50280{
50281  line = $ 0
50282  nfields = split(line, field, "@")
50283  substed = 0
50284  len = length(field[1])
50285  for (i = 2; i < nfields; i++) {
50286    key = field[i]
50287    keylen = length(key)
50288    if (S_is_set[key]) {
50289      value = S[key]
50290      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
50291      len += length(value) + length(field[++i])
50292      substed = 1
50293    } else
50294      len += 1 + keylen
50295  }
50296
50297  print line
50298}
50299
50300_ACAWK
50301_ACEOF
50302cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50303if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
50304  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
50305else
50306  cat
50307fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
50308  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
50309_ACEOF
50310
50311# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
50312# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
50313# trailing colons and then remove the whole line if VPATH becomes empty
50314# (actually we leave an empty line to preserve line numbers).
50315if test "x$srcdir" = x.; then
50316  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
50317h
50318s///
50319s/^/:/
50320s/[	 ]*$/:/
50321s/:\$(srcdir):/:/g
50322s/:\${srcdir}:/:/g
50323s/:@srcdir@:/:/g
50324s/^:*//
50325s/:*$//
50326x
50327s/\(=[	 ]*\).*/\1/
50328G
50329s/\n//
50330s/^[^=]*=[	 ]*$//
50331}'
50332fi
50333
50334cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50335fi # test -n "$CONFIG_FILES"
50336
50337# Set up the scripts for CONFIG_HEADERS section.
50338# No need to generate them if there are no CONFIG_HEADERS.
50339# This happens for instance with `./config.status Makefile'.
50340if test -n "$CONFIG_HEADERS"; then
50341cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
50342BEGIN {
50343_ACEOF
50344
50345# Transform confdefs.h into an awk script `defines.awk', embedded as
50346# here-document in config.status, that substitutes the proper values into
50347# config.h.in to produce config.h.
50348
50349# Create a delimiter string that does not exist in confdefs.h, to ease
50350# handling of long lines.
50351ac_delim='%!_!# '
50352for ac_last_try in false false :; do
50353  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
50354  if test -z "$ac_tt"; then
50355    break
50356  elif $ac_last_try; then
50357    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
50358  else
50359    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
50360  fi
50361done
50362
50363# For the awk script, D is an array of macro values keyed by name,
50364# likewise P contains macro parameters if any.  Preserve backslash
50365# newline sequences.
50366
50367ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
50368sed -n '
50369s/.\{148\}/&'"$ac_delim"'/g
50370t rset
50371:rset
50372s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
50373t def
50374d
50375:def
50376s/\\$//
50377t bsnl
50378s/["\\]/\\&/g
50379s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
50380D["\1"]=" \3"/p
50381s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
50382d
50383:bsnl
50384s/["\\]/\\&/g
50385s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
50386D["\1"]=" \3\\\\\\n"\\/p
50387t cont
50388s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
50389t cont
50390d
50391:cont
50392n
50393s/.\{148\}/&'"$ac_delim"'/g
50394t clear
50395:clear
50396s/\\$//
50397t bsnlc
50398s/["\\]/\\&/g; s/^/"/; s/$/"/p
50399d
50400:bsnlc
50401s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
50402b cont
50403' <confdefs.h | sed '
50404s/'"$ac_delim"'/"\\\
50405"/g' >>$CONFIG_STATUS || ac_write_fail=1
50406
50407cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50408  for (key in D) D_is_set[key] = 1
50409  FS = ""
50410}
50411/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
50412  line = \$ 0
50413  split(line, arg, " ")
50414  if (arg[1] == "#") {
50415    defundef = arg[2]
50416    mac1 = arg[3]
50417  } else {
50418    defundef = substr(arg[1], 2)
50419    mac1 = arg[2]
50420  }
50421  split(mac1, mac2, "(") #)
50422  macro = mac2[1]
50423  prefix = substr(line, 1, index(line, defundef) - 1)
50424  if (D_is_set[macro]) {
50425    # Preserve the white space surrounding the "#".
50426    print prefix "define", macro P[macro] D[macro]
50427    next
50428  } else {
50429    # Replace #undef with comments.  This is necessary, for example,
50430    # in the case of _POSIX_SOURCE, which is predefined and required
50431    # on some systems where configure will not decide to define it.
50432    if (defundef == "undef") {
50433      print "/*", prefix defundef, macro, "*/"
50434      next
50435    }
50436  }
50437}
50438{ print }
50439_ACAWK
50440_ACEOF
50441cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50442  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
50443fi # test -n "$CONFIG_HEADERS"
50444
50445
50446eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
50447shift
50448for ac_tag
50449do
50450  case $ac_tag in
50451  :[FHLC]) ac_mode=$ac_tag; continue;;
50452  esac
50453  case $ac_mode$ac_tag in
50454  :[FHL]*:*);;
50455  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
50456  :[FH]-) ac_tag=-:-;;
50457  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
50458  esac
50459  ac_save_IFS=$IFS
50460  IFS=:
50461  set x $ac_tag
50462  IFS=$ac_save_IFS
50463  shift
50464  ac_file=$1
50465  shift
50466
50467  case $ac_mode in
50468  :L) ac_source=$1;;
50469  :[FH])
50470    ac_file_inputs=
50471    for ac_f
50472    do
50473      case $ac_f in
50474      -) ac_f="$ac_tmp/stdin";;
50475      *) # Look for the file first in the build tree, then in the source tree
50476	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
50477	 # because $ac_f cannot contain `:'.
50478	 test -f "$ac_f" ||
50479	   case $ac_f in
50480	   [\\/$]*) false;;
50481	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
50482	   esac ||
50483	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
50484      esac
50485      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
50486      as_fn_append ac_file_inputs " '$ac_f'"
50487    done
50488
50489    # Let's still pretend it is `configure' which instantiates (i.e., don't
50490    # use $as_me), people would be surprised to read:
50491    #    /* config.h.  Generated by config.status.  */
50492    configure_input='Generated from '`
50493	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
50494	`' by configure.'
50495    if test x"$ac_file" != x-; then
50496      configure_input="$ac_file.  $configure_input"
50497      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
50498$as_echo "$as_me: creating $ac_file" >&6;}
50499    fi
50500    # Neutralize special characters interpreted by sed in replacement strings.
50501    case $configure_input in #(
50502    *\&* | *\|* | *\\* )
50503       ac_sed_conf_input=`$as_echo "$configure_input" |
50504       sed 's/[\\\\&|]/\\\\&/g'`;; #(
50505    *) ac_sed_conf_input=$configure_input;;
50506    esac
50507
50508    case $ac_tag in
50509    *:-:* | *:-) cat >"$ac_tmp/stdin" \
50510      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
50511    esac
50512    ;;
50513  esac
50514
50515  ac_dir=`$as_dirname -- "$ac_file" ||
50516$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
50517	 X"$ac_file" : 'X\(//\)[^/]' \| \
50518	 X"$ac_file" : 'X\(//\)$' \| \
50519	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
50520$as_echo X"$ac_file" |
50521    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
50522	    s//\1/
50523	    q
50524	  }
50525	  /^X\(\/\/\)[^/].*/{
50526	    s//\1/
50527	    q
50528	  }
50529	  /^X\(\/\/\)$/{
50530	    s//\1/
50531	    q
50532	  }
50533	  /^X\(\/\).*/{
50534	    s//\1/
50535	    q
50536	  }
50537	  s/.*/./; q'`
50538  as_dir="$ac_dir"; as_fn_mkdir_p
50539  ac_builddir=.
50540
50541case "$ac_dir" in
50542.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
50543*)
50544  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
50545  # A ".." for each directory in $ac_dir_suffix.
50546  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
50547  case $ac_top_builddir_sub in
50548  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
50549  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
50550  esac ;;
50551esac
50552ac_abs_top_builddir=$ac_pwd
50553ac_abs_builddir=$ac_pwd$ac_dir_suffix
50554# for backward compatibility:
50555ac_top_builddir=$ac_top_build_prefix
50556
50557case $srcdir in
50558  .)  # We are building in place.
50559    ac_srcdir=.
50560    ac_top_srcdir=$ac_top_builddir_sub
50561    ac_abs_top_srcdir=$ac_pwd ;;
50562  [\\/]* | ?:[\\/]* )  # Absolute name.
50563    ac_srcdir=$srcdir$ac_dir_suffix;
50564    ac_top_srcdir=$srcdir
50565    ac_abs_top_srcdir=$srcdir ;;
50566  *) # Relative name.
50567    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
50568    ac_top_srcdir=$ac_top_build_prefix$srcdir
50569    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
50570esac
50571ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
50572
50573
50574  case $ac_mode in
50575  :F)
50576  #
50577  # CONFIG_FILE
50578  #
50579
50580_ACEOF
50581
50582cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50583# If the template does not know about datarootdir, expand it.
50584# FIXME: This hack should be removed a few years after 2.60.
50585ac_datarootdir_hack=; ac_datarootdir_seen=
50586ac_sed_dataroot='
50587/datarootdir/ {
50588  p
50589  q
50590}
50591/@datadir@/p
50592/@docdir@/p
50593/@infodir@/p
50594/@localedir@/p
50595/@mandir@/p'
50596case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
50597*datarootdir*) ac_datarootdir_seen=yes;;
50598*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
50599  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
50600$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
50601_ACEOF
50602cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50603  ac_datarootdir_hack='
50604  s&@datadir@&$datadir&g
50605  s&@docdir@&$docdir&g
50606  s&@infodir@&$infodir&g
50607  s&@localedir@&$localedir&g
50608  s&@mandir@&$mandir&g
50609  s&\\\${datarootdir}&$datarootdir&g' ;;
50610esac
50611_ACEOF
50612
50613# Neutralize VPATH when `$srcdir' = `.'.
50614# Shell code in configure.ac might set extrasub.
50615# FIXME: do we really want to maintain this feature?
50616cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50617ac_sed_extra="$ac_vpsub
50618$extrasub
50619_ACEOF
50620cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50621:t
50622/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
50623s|@configure_input@|$ac_sed_conf_input|;t t
50624s&@top_builddir@&$ac_top_builddir_sub&;t t
50625s&@top_build_prefix@&$ac_top_build_prefix&;t t
50626s&@srcdir@&$ac_srcdir&;t t
50627s&@abs_srcdir@&$ac_abs_srcdir&;t t
50628s&@top_srcdir@&$ac_top_srcdir&;t t
50629s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
50630s&@builddir@&$ac_builddir&;t t
50631s&@abs_builddir@&$ac_abs_builddir&;t t
50632s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
50633$ac_datarootdir_hack
50634"
50635eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
50636  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
50637
50638test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
50639  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
50640  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
50641      "$ac_tmp/out"`; test -z "$ac_out"; } &&
50642  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
50643which seems to be undefined.  Please make sure it is defined" >&5
50644$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
50645which seems to be undefined.  Please make sure it is defined" >&2;}
50646
50647  rm -f "$ac_tmp/stdin"
50648  case $ac_file in
50649  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
50650  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
50651  esac \
50652  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
50653 ;;
50654  :H)
50655  #
50656  # CONFIG_HEADER
50657  #
50658  if test x"$ac_file" != x-; then
50659    {
50660      $as_echo "/* $configure_input  */" \
50661      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
50662    } >"$ac_tmp/config.h" \
50663      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
50664    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
50665      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
50666$as_echo "$as_me: $ac_file is unchanged" >&6;}
50667    else
50668      rm -f "$ac_file"
50669      mv "$ac_tmp/config.h" "$ac_file" \
50670	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
50671    fi
50672  else
50673    $as_echo "/* $configure_input  */" \
50674      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
50675      || as_fn_error $? "could not create -" "$LINENO" 5
50676  fi
50677 ;;
50678
50679
50680  esac
50681
50682done # for ac_tag
50683
50684
50685as_fn_exit 0
50686_ACEOF
50687ac_clean_files=$ac_clean_files_save
50688
50689test $ac_write_fail = 0 ||
50690  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
50691
50692
50693# configure is writing to config.log, and then calls config.status.
50694# config.status does its own redirection, appending to config.log.
50695# Unfortunately, on DOS this fails, as config.log is still kept open
50696# by configure, so config.status won't be able to write to it; its
50697# output is simply discarded.  So we exec the FD to /dev/null,
50698# effectively closing config.log, so it can be properly (re)opened and
50699# appended to by config.status.  When coming back to configure, we
50700# need to make the FD available again.
50701if test "$no_create" != yes; then
50702  ac_cs_success=:
50703  ac_config_status_args=
50704  test "$silent" = yes &&
50705    ac_config_status_args="$ac_config_status_args --quiet"
50706  exec 5>/dev/null
50707  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
50708  exec 5>>config.log
50709  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
50710  # would make configure fail if this is the last instruction.
50711  $ac_cs_success || as_fn_exit 1
50712fi
50713if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
50714  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
50715$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
50716fi
50717
50718
50719# Try to move the config.log file to the output directory.
50720if test -e ./config.log; then
50721  $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
50722fi
50723
50724# Make the compare script executable
50725$CHMOD +x $OUTPUT_ROOT/compare.sh
50726
50727# Finally output some useful information to the user
50728
50729  # Finally output some useful information to the user
50730
50731  printf "\n"
50732  printf "====================================================\n"
50733  if test "x$no_create" != "xyes"; then
50734    if test "x$IS_RECONFIGURE" != "xyes"; then
50735      printf "A new configuration has been successfully created in\n %s\n" "$OUTPUT_ROOT"
50736    else
50737      printf "The existing configuration has been successfully updated in\n %s\n" "$OUTPUT_ROOT"
50738    fi
50739  else
50740    if test "x$IS_RECONFIGURE" != "xyes"; then
50741      printf "A configuration has been successfully checked but not created\n"
50742    else
50743      printf "The existing configuration has been successfully checked in\n %s\n" "$OUTPUT_ROOT"
50744    fi
50745  fi
50746  if test "x$CONFIGURE_COMMAND_LINE" != x; then
50747    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
50748  else
50749    printf "using default settings.\n"
50750  fi
50751
50752  printf "\n"
50753  printf "Configuration summary:\n"
50754  printf "* Debug level:    $DEBUG_LEVEL\n"
50755  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
50756  printf "* JDK variant:    $JDK_VARIANT\n"
50757  printf "* JVM variants:   $with_jvm_variants\n"
50758  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
50759
50760  printf "\n"
50761  printf "Tools summary:\n"
50762  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
50763    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
50764  fi
50765  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
50766  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)\n"
50767  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
50768  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
50769
50770  printf "\n"
50771  printf "Build performance summary:\n"
50772  printf "* Cores to use:   $JOBS\n"
50773  printf "* Memory limit:   $MEMORY_SIZE MB\n"
50774  if test "x$CCACHE_STATUS" != "x"; then
50775    printf "* ccache status:  $CCACHE_STATUS\n"
50776  fi
50777  printf "\n"
50778
50779  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
50780    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
50781    printf "will result in longer build times.\n"
50782    printf "\n"
50783  fi
50784
50785  if test "x$FOUND_ALT_VARIABLES" != "x"; then
50786    printf "WARNING: You have old-style ALT_ environment variables set.\n"
50787    printf "These are not respected, and will be ignored. It is recommended\n"
50788    printf "that you clean your environment. The following variables are set:\n"
50789    printf "$FOUND_ALT_VARIABLES\n"
50790    printf "\n"
50791  fi
50792
50793  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
50794    printf "WARNING: Your build output directory is not on a local disk.\n"
50795    printf "This will severely degrade build performance!\n"
50796    printf "It is recommended that you create an output directory on a local disk,\n"
50797    printf "and run the configure script again from that directory.\n"
50798    printf "\n"
50799  fi
50800
50801  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
50802    printf "WARNING: The result of this configuration has overridden an older\n"
50803    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
50804    printf "proper build. Failure to do so might result in strange build problems.\n"
50805    printf "\n"
50806  fi
50807
50808  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
50809    printf "WARNING: The result of this configuration was not saved.\n"
50810    printf "You should run without '--no-create | -n' to create the configuration.\n"
50811    printf "\n"
50812  fi
50813
50814