generated-configure.sh revision 1146:e0a080fd4047
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
637JAVA_TOOL_FLAGS_SMALL
638JAVA_FLAGS_SMALL
639JAVA_FLAGS_BIG
640JAVA_FLAGS
641JOBS
642MEMORY_SIZE
643NUM_CORES
644ENABLE_INTREE_EC
645SALIB_NAME
646HOTSPOT_MAKE_ARGS
647MSVCR_DLL
648LIBCXX
649LLVM_LIBS
650LLVM_LDFLAGS
651LLVM_CFLAGS
652LLVM_CONFIG
653LIBFFI_LIBS
654LIBFFI_CFLAGS
655STATIC_CXX_SETTING
656LIBDL
657LIBM
658LIBZIP_CAN_USE_MMAP
659USE_EXTERNAL_LIBZ
660USE_EXTERNAL_LIBPNG
661PNG_LIBS
662PNG_CFLAGS
663USE_EXTERNAL_LCMS
664LCMS_LIBS
665LCMS_CFLAGS
666USE_EXTERNAL_LIBGIF
667USE_EXTERNAL_LIBJPEG
668ALSA_LIBS
669ALSA_CFLAGS
670FREETYPE_BUNDLE_LIB_PATH
671FREETYPE_LIBS
672FREETYPE_CFLAGS
673CUPS_CFLAGS
674X_EXTRA_LIBS
675X_LIBS
676X_PRE_LIBS
677X_CFLAGS
678XMKMF
679FIXPATH
680ZIP_DEBUGINFO_FILES
681ENABLE_DEBUG_SYMBOLS
682CFLAGS_WARNINGS_ARE_ERRORS
683COMPILER_SUPPORTS_TARGET_BITS_FLAG
684ZERO_ARCHFLAG
685LDFLAGS_CXX_JDK
686LDFLAGS_JDKEXE_SUFFIX
687LDFLAGS_JDKLIB_SUFFIX
688LDFLAGS_JDKEXE
689LDFLAGS_JDKLIB
690CXXFLAGS_JDKEXE
691CXXFLAGS_JDKLIB
692CFLAGS_JDKEXE
693CFLAGS_JDKLIB
694MACOSX_VERSION_MIN
695LEGACY_EXTRA_LDFLAGS
696LEGACY_EXTRA_CXXFLAGS
697LEGACY_EXTRA_CFLAGS
698CXX_O_FLAG_NONE
699CXX_O_FLAG_DEBUG
700CXX_O_FLAG_NORM
701CXX_O_FLAG_HI
702CXX_O_FLAG_HIGHEST
703C_O_FLAG_NONE
704C_O_FLAG_DEBUG
705C_O_FLAG_NORM
706C_O_FLAG_HI
707C_O_FLAG_HIGHEST
708CXXFLAGS_DEBUG_OPTIONS
709CFLAGS_DEBUG_OPTIONS
710CXXFLAGS_DEBUG_SYMBOLS
711CFLAGS_DEBUG_SYMBOLS
712CXX_FLAG_DEPS
713C_FLAG_DEPS
714SET_SHARED_LIBRARY_MAPFILE
715SET_SHARED_LIBRARY_NAME
716SET_SHARED_LIBRARY_ORIGIN
717SET_EXECUTABLE_ORIGIN
718SHARED_LIBRARY_FLAGS
719CXX_FLAG_REORDER
720C_FLAG_REORDER
721SYSROOT_LDFLAGS
722SYSROOT_CFLAGS
723RC_FLAGS
724AR_OUT_OPTION
725LD_OUT_OPTION
726EXE_OUT_OPTION
727CC_OUT_OPTION
728POST_MCS_CMD
729POST_STRIP_CMD
730ARFLAGS
731COMPILER_TARGET_BITS_FLAG
732JT_HOME
733JTREGEXE
734USING_BROKEN_SUSE_LD
735PACKAGE_PATH
736LDEXECXX
737LDEXE
738USE_CLANG
739HOTSPOT_LD
740HOTSPOT_CXX
741HOTSPOT_RC
742HOTSPOT_MT
743BUILD_LD
744BUILD_CXX
745BUILD_CC
746ac_ct_OBJDUMP
747OBJDUMP
748ac_ct_OBJCOPY
749OBJCOPY
750ac_ct_NM
751ac_ct_STRIP
752MCS
753GNM
754NM
755STRIP
756DUMPBIN
757RC
758MT
759LIPO
760ac_ct_OBJC
761OBJCFLAGS
762OBJC
763ac_ct_AR
764AR
765AS
766LDCXX
767LD
768CXXCPP
769CPP
770ac_ct_CXX
771CXXFLAGS
772CXX
773ac_ct_PROPER_COMPILER_CXX
774PROPER_COMPILER_CXX
775TOOLCHAIN_PATH_CXX
776POTENTIAL_CXX
777OBJEXT
778EXEEXT
779ac_ct_CC
780CPPFLAGS
781LDFLAGS
782CFLAGS
783CC
784ac_ct_PROPER_COMPILER_CC
785PROPER_COMPILER_CC
786TOOLCHAIN_PATH_CC
787POTENTIAL_CC
788VS_LIB
789VS_INCLUDE
790VS_PATH
791CYGWIN_LINK
792EXE_SUFFIX
793OBJ_SUFFIX
794STATIC_LIBRARY
795SHARED_LIBRARY
796STATIC_LIBRARY_SUFFIX
797SHARED_LIBRARY_SUFFIX
798LIBRARY_PREFIX
799TOOLCHAIN_TYPE
800BUILD_HOTSPOT
801HOTSPOT_DIST
802BUILD_OUTPUT
803OVERRIDE_SRC_ROOT
804ADD_SRC_ROOT
805JDK_TOPDIR
806NASHORN_TOPDIR
807HOTSPOT_TOPDIR
808JAXWS_TOPDIR
809JAXP_TOPDIR
810CORBA_TOPDIR
811LANGTOOLS_TOPDIR
812JAVAC_FLAGS
813BOOT_JDK_SOURCETARGET
814JARSIGNER
815NATIVE2ASCII
816JAR
817JAVAH
818JAVAC
819JAVA
820BOOT_JDK
821BOOT_TOOLSJAR
822BOOT_RTJAR
823JAVA_CHECK
824JAVAC_CHECK
825COOKED_BUILD_NUMBER
826JDK_VERSION
827COPYRIGHT_YEAR
828MACOSX_BUNDLE_ID_BASE
829MACOSX_BUNDLE_NAME_BASE
830COMPANY_NAME
831JDK_RC_PLATFORM_NAME
832PRODUCT_SUFFIX
833PRODUCT_NAME
834LAUNCHER_NAME
835MILESTONE
836JDK_BUILD_NUMBER
837JDK_UPDATE_VERSION
838JDK_MICRO_VERSION
839JDK_MINOR_VERSION
840JDK_MAJOR_VERSION
841USER_RELEASE_SUFFIX
842COMPRESS_JARS
843RMICONNECTOR_IIOP
844UNLIMITED_CRYPTO
845CACERTS_FILE
846TEST_IN_BUILD
847BUILD_HEADLESS
848SUPPORT_HEADFUL
849SUPPORT_HEADLESS
850BDEPS_FTP
851BDEPS_UNZIP
852OS_VERSION_MICRO
853OS_VERSION_MINOR
854OS_VERSION_MAJOR
855PKG_CONFIG
856CODESIGN
857XATTR
858DSYMUTIL
859IS_GNU_TIME
860TIME
861STAT
862HG
863READELF
864OTOOL
865LDD
866ZIP
867UNZIP
868FIND_DELETE
869OUTPUT_SYNC
870OUTPUT_SYNC_SUPPORTED
871MAKE
872CHECK_TOOLSDIR_MAKE
873CHECK_TOOLSDIR_GMAKE
874CHECK_MAKE
875CHECK_GMAKE
876PKGHANDLER
877OUTPUT_ROOT
878CONF_NAME
879SPEC
880SDKROOT
881XCODEBUILD
882BUILD_VARIANT_RELEASE
883DEBUG_CLASSFILES
884FASTDEBUG
885VARIANT
886DEBUG_LEVEL
887MACOSX_UNIVERSAL
888INCLUDE_SA
889JVM_VARIANT_CORE
890JVM_VARIANT_ZEROSHARK
891JVM_VARIANT_ZERO
892JVM_VARIANT_KERNEL
893JVM_VARIANT_MINIMAL1
894JVM_VARIANT_CLIENT
895JVM_VARIANT_SERVER
896JVM_VARIANTS
897JVM_INTERPRETER
898JDK_VARIANT
899SET_OPENJDK
900BUILD_LOG_WRAPPER
901BUILD_LOG_PREVIOUS
902BUILD_LOG
903TOPDIR
904PATH_SEP
905ZERO_ARCHDEF
906DEFINE_CROSS_COMPILE_ARCH
907LP64
908OPENJDK_TARGET_OS_EXPORT_DIR
909OPENJDK_TARGET_OS_API_DIR
910OPENJDK_TARGET_CPU_JLI_CFLAGS
911OPENJDK_TARGET_CPU_OSARCH
912OPENJDK_TARGET_CPU_ISADIR
913OPENJDK_TARGET_CPU_LIBDIR
914OPENJDK_TARGET_CPU_LEGACY_LIB
915OPENJDK_TARGET_CPU_LEGACY
916REQUIRED_OS_VERSION
917REQUIRED_OS_NAME
918COMPILE_TYPE
919OPENJDK_TARGET_CPU_ENDIAN
920OPENJDK_TARGET_CPU_BITS
921OPENJDK_TARGET_CPU_ARCH
922OPENJDK_TARGET_CPU
923OPENJDK_TARGET_OS_ENV
924OPENJDK_TARGET_OS_API
925OPENJDK_TARGET_OS
926OPENJDK_BUILD_CPU_ENDIAN
927OPENJDK_BUILD_CPU_BITS
928OPENJDK_BUILD_CPU_ARCH
929OPENJDK_BUILD_CPU
930OPENJDK_BUILD_OS_ENV
931OPENJDK_BUILD_OS_API
932OPENJDK_BUILD_OS
933OPENJDK_BUILD_AUTOCONF_NAME
934OPENJDK_TARGET_AUTOCONF_NAME
935target_os
936target_vendor
937target_cpu
938target
939host_os
940host_vendor
941host_cpu
942host
943build_os
944build_vendor
945build_cpu
946build
947CPIO
948SETFILE
949DF
950READLINK
951CYGPATH
952SED
953FGREP
954EGREP
955GREP
956AWK
957XARGS
958WHICH
959WC
960UNIQ
961UNAME
962TR
963TOUCH
964TEE
965TAR
966TAIL
967SORT
968SH
969RM
970PRINTF
971NAWK
972MV
973MKTEMP
974MKDIR
975LS
976LN
977HEAD
978FIND
979FILE
980EXPR
981ECHO
982DIRNAME
983DIFF
984DATE
985CUT
986CP
987COMM
988CMP
989CHMOD
990CAT
991BASH
992BASENAME
993DATE_WHEN_CONFIGURED
994CONFIGURE_COMMAND_LINE
995target_alias
996host_alias
997build_alias
998LIBS
999ECHO_T
1000ECHO_N
1001ECHO_C
1002DEFS
1003mandir
1004localedir
1005libdir
1006psdir
1007pdfdir
1008dvidir
1009htmldir
1010infodir
1011docdir
1012oldincludedir
1013includedir
1014localstatedir
1015sharedstatedir
1016sysconfdir
1017datadir
1018datarootdir
1019libexecdir
1020sbindir
1021bindir
1022program_transform_name
1023prefix
1024exec_prefix
1025PACKAGE_URL
1026PACKAGE_BUGREPORT
1027PACKAGE_STRING
1028PACKAGE_VERSION
1029PACKAGE_TARNAME
1030PACKAGE_NAME
1031PATH_SEPARATOR
1032SHELL'
1033ac_subst_files=''
1034ac_user_opts='
1035enable_option_checking
1036with_target_bits
1037enable_openjdk_only
1038with_custom_make_dir
1039with_jdk_variant
1040with_jvm_interpreter
1041with_jvm_variants
1042enable_debug
1043with_debug_level
1044with_devkit
1045with_sys_root
1046with_sysroot
1047with_tools_dir
1048with_toolchain_path
1049with_extra_path
1050with_sdk_name
1051with_conf_name
1052with_output_sync
1053with_builddeps_conf
1054with_builddeps_server
1055with_builddeps_dir
1056with_builddeps_group
1057enable_headful
1058enable_hotspot_test_in_build
1059with_cacerts_file
1060enable_unlimited_crypto
1061enable_rmiconnector_iiop
1062with_milestone
1063with_update_version
1064with_user_release_suffix
1065with_build_number
1066with_boot_jdk
1067with_add_source_root
1068with_override_source_root
1069with_adds_and_overrides
1070with_override_langtools
1071with_override_corba
1072with_override_jaxp
1073with_override_jaxws
1074with_override_hotspot
1075with_override_nashorn
1076with_override_jdk
1077with_import_hotspot
1078with_toolchain_type
1079with_jtreg
1080with_extra_cflags
1081with_extra_cxxflags
1082with_extra_ldflags
1083enable_debug_symbols
1084enable_zip_debug_info
1085with_x
1086with_cups
1087with_cups_include
1088with_freetype
1089with_freetype_include
1090with_freetype_lib
1091enable_freetype_bundling
1092with_alsa
1093with_alsa_include
1094with_alsa_lib
1095with_libjpeg
1096with_giflib
1097with_lcms
1098with_libpng
1099with_zlib
1100with_stdc__lib
1101with_msvcr_dll
1102with_dxsdk
1103with_dxsdk_lib
1104with_dxsdk_include
1105with_num_cores
1106with_memory_size
1107with_jobs
1108with_boot_jdk_jvmargs
1109with_sjavac_server_java
1110enable_sjavac
1111enable_precompiled_headers
1112enable_ccache
1113with_ccache_dir
1114'
1115      ac_precious_vars='build_alias
1116host_alias
1117target_alias
1118BASENAME
1119BASH
1120CAT
1121CHMOD
1122CMP
1123COMM
1124CP
1125CUT
1126DATE
1127DIFF
1128DIRNAME
1129ECHO
1130EXPR
1131FILE
1132FIND
1133HEAD
1134LN
1135LS
1136MKDIR
1137MKTEMP
1138MV
1139NAWK
1140PRINTF
1141RM
1142SH
1143SORT
1144TAIL
1145TAR
1146TEE
1147TOUCH
1148TR
1149UNAME
1150UNIQ
1151WC
1152WHICH
1153XARGS
1154AWK
1155GREP
1156EGREP
1157FGREP
1158SED
1159CYGPATH
1160READLINK
1161DF
1162SETFILE
1163CPIO
1164UNZIP
1165ZIP
1166LDD
1167OTOOL
1168READELF
1169HG
1170STAT
1171TIME
1172DSYMUTIL
1173XATTR
1174CODESIGN
1175PKG_CONFIG
1176JAVA
1177JAVAC
1178JAVAH
1179JAR
1180NATIVE2ASCII
1181JARSIGNER
1182CC
1183CFLAGS
1184LDFLAGS
1185LIBS
1186CPPFLAGS
1187CXX
1188CXXFLAGS
1189CCC
1190CPP
1191CXXCPP
1192AS
1193AR
1194OBJC
1195OBJCFLAGS
1196LIPO
1197STRIP
1198NM
1199GNM
1200MCS
1201OBJCOPY
1202OBJDUMP
1203BUILD_CC
1204BUILD_CXX
1205BUILD_LD
1206JTREGEXE
1207XMKMF
1208FREETYPE_CFLAGS
1209FREETYPE_LIBS
1210ALSA_CFLAGS
1211ALSA_LIBS
1212LCMS_CFLAGS
1213LCMS_LIBS
1214PNG_CFLAGS
1215PNG_LIBS
1216LIBFFI_CFLAGS
1217LIBFFI_LIBS
1218CCACHE'
1219
1220
1221# Initialize some variables set by options.
1222ac_init_help=
1223ac_init_version=false
1224ac_unrecognized_opts=
1225ac_unrecognized_sep=
1226# The variables have the same names as the options, with
1227# dashes changed to underlines.
1228cache_file=/dev/null
1229exec_prefix=NONE
1230no_create=
1231no_recursion=
1232prefix=NONE
1233program_prefix=NONE
1234program_suffix=NONE
1235program_transform_name=s,x,x,
1236silent=
1237site=
1238srcdir=
1239verbose=
1240x_includes=NONE
1241x_libraries=NONE
1242
1243# Installation directory options.
1244# These are left unexpanded so users can "make install exec_prefix=/foo"
1245# and all the variables that are supposed to be based on exec_prefix
1246# by default will actually change.
1247# Use braces instead of parens because sh, perl, etc. also accept them.
1248# (The list follows the same order as the GNU Coding Standards.)
1249bindir='${exec_prefix}/bin'
1250sbindir='${exec_prefix}/sbin'
1251libexecdir='${exec_prefix}/libexec'
1252datarootdir='${prefix}/share'
1253datadir='${datarootdir}'
1254sysconfdir='${prefix}/etc'
1255sharedstatedir='${prefix}/com'
1256localstatedir='${prefix}/var'
1257includedir='${prefix}/include'
1258oldincludedir='/usr/include'
1259docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1260infodir='${datarootdir}/info'
1261htmldir='${docdir}'
1262dvidir='${docdir}'
1263pdfdir='${docdir}'
1264psdir='${docdir}'
1265libdir='${exec_prefix}/lib'
1266localedir='${datarootdir}/locale'
1267mandir='${datarootdir}/man'
1268
1269ac_prev=
1270ac_dashdash=
1271for ac_option
1272do
1273  # If the previous option needs an argument, assign it.
1274  if test -n "$ac_prev"; then
1275    eval $ac_prev=\$ac_option
1276    ac_prev=
1277    continue
1278  fi
1279
1280  case $ac_option in
1281  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1282  *=)   ac_optarg= ;;
1283  *)    ac_optarg=yes ;;
1284  esac
1285
1286  # Accept the important Cygnus configure options, so we can diagnose typos.
1287
1288  case $ac_dashdash$ac_option in
1289  --)
1290    ac_dashdash=yes ;;
1291
1292  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1293    ac_prev=bindir ;;
1294  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1295    bindir=$ac_optarg ;;
1296
1297  -build | --build | --buil | --bui | --bu)
1298    ac_prev=build_alias ;;
1299  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1300    build_alias=$ac_optarg ;;
1301
1302  -cache-file | --cache-file | --cache-fil | --cache-fi \
1303  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1304    ac_prev=cache_file ;;
1305  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1306  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1307    cache_file=$ac_optarg ;;
1308
1309  --config-cache | -C)
1310    cache_file=config.cache ;;
1311
1312  -datadir | --datadir | --datadi | --datad)
1313    ac_prev=datadir ;;
1314  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1315    datadir=$ac_optarg ;;
1316
1317  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1318  | --dataroo | --dataro | --datar)
1319    ac_prev=datarootdir ;;
1320  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1321  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1322    datarootdir=$ac_optarg ;;
1323
1324  -disable-* | --disable-*)
1325    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1326    # Reject names that are not valid shell variable names.
1327    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1328      as_fn_error $? "invalid feature name: $ac_useropt"
1329    ac_useropt_orig=$ac_useropt
1330    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1331    case $ac_user_opts in
1332      *"
1333"enable_$ac_useropt"
1334"*) ;;
1335      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1336	 ac_unrecognized_sep=', ';;
1337    esac
1338    eval enable_$ac_useropt=no ;;
1339
1340  -docdir | --docdir | --docdi | --doc | --do)
1341    ac_prev=docdir ;;
1342  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1343    docdir=$ac_optarg ;;
1344
1345  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1346    ac_prev=dvidir ;;
1347  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1348    dvidir=$ac_optarg ;;
1349
1350  -enable-* | --enable-*)
1351    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1352    # Reject names that are not valid shell variable names.
1353    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1354      as_fn_error $? "invalid feature name: $ac_useropt"
1355    ac_useropt_orig=$ac_useropt
1356    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1357    case $ac_user_opts in
1358      *"
1359"enable_$ac_useropt"
1360"*) ;;
1361      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1362	 ac_unrecognized_sep=', ';;
1363    esac
1364    eval enable_$ac_useropt=\$ac_optarg ;;
1365
1366  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1367  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1368  | --exec | --exe | --ex)
1369    ac_prev=exec_prefix ;;
1370  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1371  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1372  | --exec=* | --exe=* | --ex=*)
1373    exec_prefix=$ac_optarg ;;
1374
1375  -gas | --gas | --ga | --g)
1376    # Obsolete; use --with-gas.
1377    with_gas=yes ;;
1378
1379  -help | --help | --hel | --he | -h)
1380    ac_init_help=long ;;
1381  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1382    ac_init_help=recursive ;;
1383  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1384    ac_init_help=short ;;
1385
1386  -host | --host | --hos | --ho)
1387    ac_prev=host_alias ;;
1388  -host=* | --host=* | --hos=* | --ho=*)
1389    host_alias=$ac_optarg ;;
1390
1391  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1392    ac_prev=htmldir ;;
1393  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1394  | --ht=*)
1395    htmldir=$ac_optarg ;;
1396
1397  -includedir | --includedir | --includedi | --included | --include \
1398  | --includ | --inclu | --incl | --inc)
1399    ac_prev=includedir ;;
1400  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1401  | --includ=* | --inclu=* | --incl=* | --inc=*)
1402    includedir=$ac_optarg ;;
1403
1404  -infodir | --infodir | --infodi | --infod | --info | --inf)
1405    ac_prev=infodir ;;
1406  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1407    infodir=$ac_optarg ;;
1408
1409  -libdir | --libdir | --libdi | --libd)
1410    ac_prev=libdir ;;
1411  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1412    libdir=$ac_optarg ;;
1413
1414  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1415  | --libexe | --libex | --libe)
1416    ac_prev=libexecdir ;;
1417  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1418  | --libexe=* | --libex=* | --libe=*)
1419    libexecdir=$ac_optarg ;;
1420
1421  -localedir | --localedir | --localedi | --localed | --locale)
1422    ac_prev=localedir ;;
1423  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1424    localedir=$ac_optarg ;;
1425
1426  -localstatedir | --localstatedir | --localstatedi | --localstated \
1427  | --localstate | --localstat | --localsta | --localst | --locals)
1428    ac_prev=localstatedir ;;
1429  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1430  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1431    localstatedir=$ac_optarg ;;
1432
1433  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1434    ac_prev=mandir ;;
1435  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1436    mandir=$ac_optarg ;;
1437
1438  -nfp | --nfp | --nf)
1439    # Obsolete; use --without-fp.
1440    with_fp=no ;;
1441
1442  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1443  | --no-cr | --no-c | -n)
1444    no_create=yes ;;
1445
1446  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1447  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1448    no_recursion=yes ;;
1449
1450  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1451  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1452  | --oldin | --oldi | --old | --ol | --o)
1453    ac_prev=oldincludedir ;;
1454  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1455  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1456  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1457    oldincludedir=$ac_optarg ;;
1458
1459  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1460    ac_prev=prefix ;;
1461  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1462    prefix=$ac_optarg ;;
1463
1464  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1465  | --program-pre | --program-pr | --program-p)
1466    ac_prev=program_prefix ;;
1467  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1468  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1469    program_prefix=$ac_optarg ;;
1470
1471  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1472  | --program-suf | --program-su | --program-s)
1473    ac_prev=program_suffix ;;
1474  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1475  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1476    program_suffix=$ac_optarg ;;
1477
1478  -program-transform-name | --program-transform-name \
1479  | --program-transform-nam | --program-transform-na \
1480  | --program-transform-n | --program-transform- \
1481  | --program-transform | --program-transfor \
1482  | --program-transfo | --program-transf \
1483  | --program-trans | --program-tran \
1484  | --progr-tra | --program-tr | --program-t)
1485    ac_prev=program_transform_name ;;
1486  -program-transform-name=* | --program-transform-name=* \
1487  | --program-transform-nam=* | --program-transform-na=* \
1488  | --program-transform-n=* | --program-transform-=* \
1489  | --program-transform=* | --program-transfor=* \
1490  | --program-transfo=* | --program-transf=* \
1491  | --program-trans=* | --program-tran=* \
1492  | --progr-tra=* | --program-tr=* | --program-t=*)
1493    program_transform_name=$ac_optarg ;;
1494
1495  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1496    ac_prev=pdfdir ;;
1497  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1498    pdfdir=$ac_optarg ;;
1499
1500  -psdir | --psdir | --psdi | --psd | --ps)
1501    ac_prev=psdir ;;
1502  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1503    psdir=$ac_optarg ;;
1504
1505  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1506  | -silent | --silent | --silen | --sile | --sil)
1507    silent=yes ;;
1508
1509  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1510    ac_prev=sbindir ;;
1511  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1512  | --sbi=* | --sb=*)
1513    sbindir=$ac_optarg ;;
1514
1515  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1516  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1517  | --sharedst | --shareds | --shared | --share | --shar \
1518  | --sha | --sh)
1519    ac_prev=sharedstatedir ;;
1520  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1521  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1522  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1523  | --sha=* | --sh=*)
1524    sharedstatedir=$ac_optarg ;;
1525
1526  -site | --site | --sit)
1527    ac_prev=site ;;
1528  -site=* | --site=* | --sit=*)
1529    site=$ac_optarg ;;
1530
1531  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1532    ac_prev=srcdir ;;
1533  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1534    srcdir=$ac_optarg ;;
1535
1536  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1537  | --syscon | --sysco | --sysc | --sys | --sy)
1538    ac_prev=sysconfdir ;;
1539  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1540  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1541    sysconfdir=$ac_optarg ;;
1542
1543  -target | --target | --targe | --targ | --tar | --ta | --t)
1544    ac_prev=target_alias ;;
1545  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1546    target_alias=$ac_optarg ;;
1547
1548  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1549    verbose=yes ;;
1550
1551  -version | --version | --versio | --versi | --vers | -V)
1552    ac_init_version=: ;;
1553
1554  -with-* | --with-*)
1555    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1556    # Reject names that are not valid shell variable names.
1557    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1558      as_fn_error $? "invalid package name: $ac_useropt"
1559    ac_useropt_orig=$ac_useropt
1560    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1561    case $ac_user_opts in
1562      *"
1563"with_$ac_useropt"
1564"*) ;;
1565      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1566	 ac_unrecognized_sep=', ';;
1567    esac
1568    eval with_$ac_useropt=\$ac_optarg ;;
1569
1570  -without-* | --without-*)
1571    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1572    # Reject names that are not valid shell variable names.
1573    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1574      as_fn_error $? "invalid package name: $ac_useropt"
1575    ac_useropt_orig=$ac_useropt
1576    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1577    case $ac_user_opts in
1578      *"
1579"with_$ac_useropt"
1580"*) ;;
1581      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1582	 ac_unrecognized_sep=', ';;
1583    esac
1584    eval with_$ac_useropt=no ;;
1585
1586  --x)
1587    # Obsolete; use --with-x.
1588    with_x=yes ;;
1589
1590  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1591  | --x-incl | --x-inc | --x-in | --x-i)
1592    ac_prev=x_includes ;;
1593  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1594  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1595    x_includes=$ac_optarg ;;
1596
1597  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1598  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1599    ac_prev=x_libraries ;;
1600  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1601  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1602    x_libraries=$ac_optarg ;;
1603
1604  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1605Try \`$0 --help' for more information"
1606    ;;
1607
1608  *=*)
1609    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1610    # Reject names that are not valid shell variable names.
1611    case $ac_envvar in #(
1612      '' | [0-9]* | *[!_$as_cr_alnum]* )
1613      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1614    esac
1615    eval $ac_envvar=\$ac_optarg
1616    export $ac_envvar ;;
1617
1618  *)
1619    # FIXME: should be removed in autoconf 3.0.
1620    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1621    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1622      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1623    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1624    ;;
1625
1626  esac
1627done
1628
1629if test -n "$ac_prev"; then
1630  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1631  as_fn_error $? "missing argument to $ac_option"
1632fi
1633
1634if test -n "$ac_unrecognized_opts"; then
1635  case $enable_option_checking in
1636    no) ;;
1637    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1638    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1639  esac
1640fi
1641
1642# Check all directory arguments for consistency.
1643for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1644		datadir sysconfdir sharedstatedir localstatedir includedir \
1645		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1646		libdir localedir mandir
1647do
1648  eval ac_val=\$$ac_var
1649  # Remove trailing slashes.
1650  case $ac_val in
1651    */ )
1652      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1653      eval $ac_var=\$ac_val;;
1654  esac
1655  # Be sure to have absolute directory names.
1656  case $ac_val in
1657    [\\/$]* | ?:[\\/]* )  continue;;
1658    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1659  esac
1660  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1661done
1662
1663# There might be people who depend on the old broken behavior: `$host'
1664# used to hold the argument of --host etc.
1665# FIXME: To remove some day.
1666build=$build_alias
1667host=$host_alias
1668target=$target_alias
1669
1670# FIXME: To remove some day.
1671if test "x$host_alias" != x; then
1672  if test "x$build_alias" = x; then
1673    cross_compiling=maybe
1674  elif test "x$build_alias" != "x$host_alias"; then
1675    cross_compiling=yes
1676  fi
1677fi
1678
1679ac_tool_prefix=
1680test -n "$host_alias" && ac_tool_prefix=$host_alias-
1681
1682test "$silent" = yes && exec 6>/dev/null
1683
1684
1685ac_pwd=`pwd` && test -n "$ac_pwd" &&
1686ac_ls_di=`ls -di .` &&
1687ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1688  as_fn_error $? "working directory cannot be determined"
1689test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1690  as_fn_error $? "pwd does not report name of working directory"
1691
1692
1693# Find the source files, if location was not specified.
1694if test -z "$srcdir"; then
1695  ac_srcdir_defaulted=yes
1696  # Try the directory containing this script, then the parent directory.
1697  ac_confdir=`$as_dirname -- "$as_myself" ||
1698$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1699	 X"$as_myself" : 'X\(//\)[^/]' \| \
1700	 X"$as_myself" : 'X\(//\)$' \| \
1701	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1702$as_echo X"$as_myself" |
1703    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1704	    s//\1/
1705	    q
1706	  }
1707	  /^X\(\/\/\)[^/].*/{
1708	    s//\1/
1709	    q
1710	  }
1711	  /^X\(\/\/\)$/{
1712	    s//\1/
1713	    q
1714	  }
1715	  /^X\(\/\).*/{
1716	    s//\1/
1717	    q
1718	  }
1719	  s/.*/./; q'`
1720  srcdir=$ac_confdir
1721  if test ! -r "$srcdir/$ac_unique_file"; then
1722    srcdir=..
1723  fi
1724else
1725  ac_srcdir_defaulted=no
1726fi
1727if test ! -r "$srcdir/$ac_unique_file"; then
1728  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1729  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1730fi
1731ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1732ac_abs_confdir=`(
1733	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1734	pwd)`
1735# When building in place, set srcdir=.
1736if test "$ac_abs_confdir" = "$ac_pwd"; then
1737  srcdir=.
1738fi
1739# Remove unnecessary trailing slashes from srcdir.
1740# Double slashes in file names in object file debugging info
1741# mess up M-x gdb in Emacs.
1742case $srcdir in
1743*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1744esac
1745for ac_var in $ac_precious_vars; do
1746  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1747  eval ac_env_${ac_var}_value=\$${ac_var}
1748  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1749  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1750done
1751
1752#
1753# Report the --help message.
1754#
1755if test "$ac_init_help" = "long"; then
1756  # Omit some internal or obsolete options to make the list less imposing.
1757  # This message is too long to be a string in the A/UX 3.1 sh.
1758  cat <<_ACEOF
1759\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1760
1761Usage: $0 [OPTION]... [VAR=VALUE]...
1762
1763To assign environment variables (e.g., CC, CFLAGS...), specify them as
1764VAR=VALUE.  See below for descriptions of some of the useful variables.
1765
1766Defaults for the options are specified in brackets.
1767
1768Configuration:
1769  -h, --help              display this help and exit
1770      --help=short        display options specific to this package
1771      --help=recursive    display the short help of all the included packages
1772  -V, --version           display version information and exit
1773  -q, --quiet, --silent   do not print \`checking ...' messages
1774      --cache-file=FILE   cache test results in FILE [disabled]
1775  -C, --config-cache      alias for \`--cache-file=config.cache'
1776  -n, --no-create         do not create output files
1777      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1778
1779Installation directories:
1780  --prefix=PREFIX         install architecture-independent files in PREFIX
1781                          [$ac_default_prefix]
1782  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1783                          [PREFIX]
1784
1785By default, \`make install' will install all the files in
1786\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1787an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1788for instance \`--prefix=\$HOME'.
1789
1790For better control, use the options below.
1791
1792Fine tuning of the installation directories:
1793  --bindir=DIR            user executables [EPREFIX/bin]
1794  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1795  --libexecdir=DIR        program executables [EPREFIX/libexec]
1796  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1797  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1798  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1799  --libdir=DIR            object code libraries [EPREFIX/lib]
1800  --includedir=DIR        C header files [PREFIX/include]
1801  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1802  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1803  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1804  --infodir=DIR           info documentation [DATAROOTDIR/info]
1805  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1806  --mandir=DIR            man documentation [DATAROOTDIR/man]
1807  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1808  --htmldir=DIR           html documentation [DOCDIR]
1809  --dvidir=DIR            dvi documentation [DOCDIR]
1810  --pdfdir=DIR            pdf documentation [DOCDIR]
1811  --psdir=DIR             ps documentation [DOCDIR]
1812_ACEOF
1813
1814  cat <<\_ACEOF
1815
1816X features:
1817  --x-includes=DIR    X include files are in DIR
1818  --x-libraries=DIR   X library files are in DIR
1819
1820System types:
1821  --build=BUILD     configure for building on BUILD [guessed]
1822  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1823  --target=TARGET   configure for building compilers for TARGET [HOST]
1824_ACEOF
1825fi
1826
1827if test -n "$ac_init_help"; then
1828  case $ac_init_help in
1829     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1830   esac
1831  cat <<\_ACEOF
1832
1833Optional Features:
1834  --disable-option-checking  ignore unrecognized --enable/--with options
1835  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1836  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1837  --enable-openjdk-only   suppress building custom source even if present
1838                          [disabled]
1839  --enable-debug          set the debug level to fastdebug (shorthand for
1840                          --with-debug-level=fastdebug) [disabled]
1841  --disable-headful       disable building headful support (graphical UI
1842                          support) [enabled]
1843  --enable-hotspot-test-in-build
1844                          run the Queens test after Hotspot build [disabled]
1845  --enable-unlimited-crypto
1846                          Enable unlimited crypto policy [disabled]
1847  --enable-rmiconnector-iiop
1848                          enable the JMX RMIConnector iiop transport
1849                          [disabled]
1850  --disable-debug-symbols disable generation of debug symbols [enabled]
1851  --disable-zip-debug-info
1852                          disable zipping of debug-info files [enabled]
1853  --disable-freetype-bundling
1854                          disable bundling of the freetype library with the
1855                          build result [enabled on Windows or when using
1856                          --with-freetype, disabled otherwise]
1857  --enable-sjavac         use sjavac to do fast incremental compiles
1858                          [disabled]
1859  --disable-precompiled-headers
1860                          disable using precompiled headers when compiling C++
1861                          [enabled]
1862  --enable-ccache         enable using ccache to speed up recompilations
1863                          [disabled]
1864
1865Optional Packages:
1866  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1867  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1868  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1869                          support it), e.g. --with-target-bits=32 [guessed]
1870  --with-custom-make-dir  Deprecated. Option is kept for backwards
1871                          compatibility and is ignored
1872  --with-jdk-variant      JDK variant to build (normal) [normal]
1873  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1874  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1875                          client, minimal1, kernel, zero, zeroshark, core)
1876                          [server]
1877  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1878                          optimized (HotSpot build only)) [release]
1879  --with-devkit           use this devkit for compilers, tools and resources
1880  --with-sys-root         alias for --with-sysroot for backwards compatability
1881  --with-sysroot          use this directory as sysroot
1882  --with-tools-dir        alias for --with-toolchain-path for backwards
1883                          compatibility
1884  --with-toolchain-path   prepend these directories when searching for
1885                          toolchain binaries (compilers etc)
1886  --with-extra-path       prepend these directories to the default path
1887  --with-sdk-name         use the platform SDK of the given name. [macosx]
1888  --with-conf-name        use this as the name of the configuration [generated
1889                          from important configuration options]
1890  --with-output-sync      set make output sync type if supported by make.
1891                          [recurse]
1892  --with-builddeps-conf   use this configuration file for the builddeps
1893  --with-builddeps-server download and use build dependencies from this server
1894                          url
1895  --with-builddeps-dir    store downloaded build dependencies here
1896                          [/localhome/builddeps]
1897  --with-builddeps-group  chgrp the downloaded build dependencies to this
1898                          group
1899  --with-cacerts-file     specify alternative cacerts file
1900  --with-milestone        Set milestone value for build [internal]
1901  --with-update-version   Set update version value for build [b00]
1902  --with-user-release-suffix
1903                          Add a custom string to the version string if build
1904                          number is not set.[username_builddateb00]
1905  --with-build-number     Set build number value for build [b00]
1906  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1907  --with-add-source-root  for each and every source directory, look in this
1908                          additional source root for the same directory; if it
1909                          exists and have files in it, include it in the build
1910  --with-override-source-root
1911                          for each and every source directory, look in this
1912                          override source root for the same directory; if it
1913                          exists, use that directory instead and ignore the
1914                          directory in the original source root
1915  --with-adds-and-overrides
1916                          use the subdirs 'adds' and 'overrides' in the
1917                          specified directory as add-source-root and
1918                          override-source-root
1919  --with-override-langtools
1920                          use this langtools dir for the build
1921  --with-override-corba   use this corba dir for the build
1922  --with-override-jaxp    use this jaxp dir for the build
1923  --with-override-jaxws   use this jaxws dir for the build
1924  --with-override-hotspot use this hotspot dir for the build
1925  --with-override-nashorn use this nashorn dir for the build
1926  --with-override-jdk     use this jdk dir for the build
1927  --with-import-hotspot   import hotspot binaries from this jdk image or
1928                          hotspot build dist dir instead of building from
1929                          source
1930  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1931                          to show possible values [platform dependent]
1932  --with-jtreg            Regression Test Harness [probed]
1933  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1934  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1935  --with-extra-ldflags    extra flags to be used when linking jdk
1936  --with-x                use the X Window System
1937  --with-cups             specify prefix directory for the cups package
1938                          (expecting the headers under PATH/include)
1939  --with-cups-include     specify directory for the cups include files
1940  --with-freetype         specify prefix directory for the freetype package
1941                          (expecting the libraries under PATH/lib and the
1942                          headers under PATH/include)
1943  --with-freetype-include specify directory for the freetype include files
1944  --with-freetype-lib     specify directory for the freetype library
1945  --with-alsa             specify prefix directory for the alsa package
1946                          (expecting the libraries under PATH/lib and the
1947                          headers under PATH/include)
1948  --with-alsa-include     specify directory for the alsa include files
1949  --with-alsa-lib         specify directory for the alsa library
1950  --with-libjpeg          use libjpeg from build system or OpenJDK source
1951                          (system, bundled) [bundled]
1952  --with-giflib           use giflib from build system or OpenJDK source
1953                          (system, bundled) [bundled]
1954  --with-lcms             use lcms2 from build system or OpenJDK source
1955                          (system, bundled) [bundled]
1956  --with-libpng           use libpng from build system or OpenJDK source
1957                          (system, bundled) [bundled]
1958  --with-zlib             use zlib from build system or OpenJDK source
1959                          (system, bundled) [bundled]
1960  --with-stdc++lib=<static>,<dynamic>,<default>
1961                          force linking of the C++ runtime on Linux to either
1962                          static or dynamic, default is static with dynamic as
1963                          fallback
1964  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1965                          only) [probed]
1966  --with-dxsdk            Deprecated. Option is kept for backwards
1967                          compatibility and is ignored
1968  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1969                          compatibility and is ignored
1970  --with-dxsdk-include    Deprecated. Option is kept for backwards
1971                          compatibility and is ignored
1972  --with-num-cores        number of cores in the build system, e.g.
1973                          --with-num-cores=8 [probed]
1974  --with-memory-size      memory (in MB) available in the build system, e.g.
1975                          --with-memory-size=1024 [probed]
1976  --with-jobs             number of parallel jobs to let make run [calculated
1977                          based on cores and memory]
1978  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
1979                          invocations of boot JDK, overriding the default
1980                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1981                          -enableassertions"
1982  --with-sjavac-server-java
1983                          use this java binary for running the sjavac
1984                          background server [Boot JDK java]
1985  --with-ccache-dir       where to store ccache files [~/.ccache]
1986
1987Some influential environment variables:
1988  BASENAME    Override default value for BASENAME
1989  BASH        Override default value for BASH
1990  CAT         Override default value for CAT
1991  CHMOD       Override default value for CHMOD
1992  CMP         Override default value for CMP
1993  COMM        Override default value for COMM
1994  CP          Override default value for CP
1995  CUT         Override default value for CUT
1996  DATE        Override default value for DATE
1997  DIFF        Override default value for DIFF
1998  DIRNAME     Override default value for DIRNAME
1999  ECHO        Override default value for ECHO
2000  EXPR        Override default value for EXPR
2001  FILE        Override default value for FILE
2002  FIND        Override default value for FIND
2003  HEAD        Override default value for HEAD
2004  LN          Override default value for LN
2005  LS          Override default value for LS
2006  MKDIR       Override default value for MKDIR
2007  MKTEMP      Override default value for MKTEMP
2008  MV          Override default value for MV
2009  NAWK        Override default value for NAWK
2010  PRINTF      Override default value for PRINTF
2011  RM          Override default value for RM
2012  SH          Override default value for SH
2013  SORT        Override default value for SORT
2014  TAIL        Override default value for TAIL
2015  TAR         Override default value for TAR
2016  TEE         Override default value for TEE
2017  TOUCH       Override default value for TOUCH
2018  TR          Override default value for TR
2019  UNAME       Override default value for UNAME
2020  UNIQ        Override default value for UNIQ
2021  WC          Override default value for WC
2022  WHICH       Override default value for WHICH
2023  XARGS       Override default value for XARGS
2024  AWK         Override default value for AWK
2025  GREP        Override default value for GREP
2026  EGREP       Override default value for EGREP
2027  FGREP       Override default value for FGREP
2028  SED         Override default value for SED
2029  CYGPATH     Override default value for CYGPATH
2030  READLINK    Override default value for READLINK
2031  DF          Override default value for DF
2032  SETFILE     Override default value for SETFILE
2033  CPIO        Override default value for CPIO
2034  UNZIP       Override default value for UNZIP
2035  ZIP         Override default value for ZIP
2036  LDD         Override default value for LDD
2037  OTOOL       Override default value for OTOOL
2038  READELF     Override default value for READELF
2039  HG          Override default value for HG
2040  STAT        Override default value for STAT
2041  TIME        Override default value for TIME
2042  DSYMUTIL    Override default value for DSYMUTIL
2043  XATTR       Override default value for XATTR
2044  CODESIGN    Override default value for CODESIGN
2045  PKG_CONFIG  path to pkg-config utility
2046  JAVA        Override default value for JAVA
2047  JAVAC       Override default value for JAVAC
2048  JAVAH       Override default value for JAVAH
2049  JAR         Override default value for JAR
2050  NATIVE2ASCII
2051              Override default value for NATIVE2ASCII
2052  JARSIGNER   Override default value for JARSIGNER
2053  CC          C compiler command
2054  CFLAGS      C compiler flags
2055  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2056              nonstandard directory <lib dir>
2057  LIBS        libraries to pass to the linker, e.g. -l<library>
2058  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2059              you have headers in a nonstandard directory <include dir>
2060  CXX         C++ compiler command
2061  CXXFLAGS    C++ compiler flags
2062  CPP         C preprocessor
2063  CXXCPP      C++ preprocessor
2064  AS          Override default value for AS
2065  AR          Override default value for AR
2066  OBJC        Objective C compiler command
2067  OBJCFLAGS   Objective C compiler flags
2068  LIPO        Override default value for LIPO
2069  STRIP       Override default value for STRIP
2070  NM          Override default value for NM
2071  GNM         Override default value for GNM
2072  MCS         Override default value for MCS
2073  OBJCOPY     Override default value for OBJCOPY
2074  OBJDUMP     Override default value for OBJDUMP
2075  BUILD_CC    Override default value for BUILD_CC
2076  BUILD_CXX   Override default value for BUILD_CXX
2077  BUILD_LD    Override default value for BUILD_LD
2078  JTREGEXE    Override default value for JTREGEXE
2079  XMKMF       Path to xmkmf, Makefile generator for X Window System
2080  FREETYPE_CFLAGS
2081              C compiler flags for FREETYPE, overriding pkg-config
2082  FREETYPE_LIBS
2083              linker flags for FREETYPE, overriding pkg-config
2084  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2085  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2086  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2087  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2088  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2089  PNG_LIBS    linker flags for PNG, overriding pkg-config
2090  LIBFFI_CFLAGS
2091              C compiler flags for LIBFFI, overriding pkg-config
2092  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2093  CCACHE      Override default value for CCACHE
2094
2095Use these variables to override the choices made by `configure' or to help
2096it to find libraries and programs with nonstandard names/locations.
2097
2098Report bugs to <build-dev@openjdk.java.net>.
2099OpenJDK home page: <http://openjdk.java.net>.
2100_ACEOF
2101ac_status=$?
2102fi
2103
2104if test "$ac_init_help" = "recursive"; then
2105  # If there are subdirs, report their specific --help.
2106  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2107    test -d "$ac_dir" ||
2108      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2109      continue
2110    ac_builddir=.
2111
2112case "$ac_dir" in
2113.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2114*)
2115  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2116  # A ".." for each directory in $ac_dir_suffix.
2117  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2118  case $ac_top_builddir_sub in
2119  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2120  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2121  esac ;;
2122esac
2123ac_abs_top_builddir=$ac_pwd
2124ac_abs_builddir=$ac_pwd$ac_dir_suffix
2125# for backward compatibility:
2126ac_top_builddir=$ac_top_build_prefix
2127
2128case $srcdir in
2129  .)  # We are building in place.
2130    ac_srcdir=.
2131    ac_top_srcdir=$ac_top_builddir_sub
2132    ac_abs_top_srcdir=$ac_pwd ;;
2133  [\\/]* | ?:[\\/]* )  # Absolute name.
2134    ac_srcdir=$srcdir$ac_dir_suffix;
2135    ac_top_srcdir=$srcdir
2136    ac_abs_top_srcdir=$srcdir ;;
2137  *) # Relative name.
2138    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2139    ac_top_srcdir=$ac_top_build_prefix$srcdir
2140    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2141esac
2142ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2143
2144    cd "$ac_dir" || { ac_status=$?; continue; }
2145    # Check for guested configure.
2146    if test -f "$ac_srcdir/configure.gnu"; then
2147      echo &&
2148      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2149    elif test -f "$ac_srcdir/configure"; then
2150      echo &&
2151      $SHELL "$ac_srcdir/configure" --help=recursive
2152    else
2153      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2154    fi || ac_status=$?
2155    cd "$ac_pwd" || { ac_status=$?; break; }
2156  done
2157fi
2158
2159test -n "$ac_init_help" && exit $ac_status
2160if $ac_init_version; then
2161  cat <<\_ACEOF
2162OpenJDK configure jdk9
2163generated by GNU Autoconf 2.69
2164
2165Copyright (C) 2012 Free Software Foundation, Inc.
2166This configure script is free software; the Free Software Foundation
2167gives unlimited permission to copy, distribute and modify it.
2168_ACEOF
2169  exit
2170fi
2171
2172## ------------------------ ##
2173## Autoconf initialization. ##
2174## ------------------------ ##
2175
2176# ac_fn_c_try_compile LINENO
2177# --------------------------
2178# Try to compile conftest.$ac_ext, and return whether this succeeded.
2179ac_fn_c_try_compile ()
2180{
2181  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2182  rm -f conftest.$ac_objext
2183  if { { ac_try="$ac_compile"
2184case "(($ac_try" in
2185  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2186  *) ac_try_echo=$ac_try;;
2187esac
2188eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2189$as_echo "$ac_try_echo"; } >&5
2190  (eval "$ac_compile") 2>conftest.err
2191  ac_status=$?
2192  if test -s conftest.err; then
2193    grep -v '^ *+' conftest.err >conftest.er1
2194    cat conftest.er1 >&5
2195    mv -f conftest.er1 conftest.err
2196  fi
2197  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2198  test $ac_status = 0; } && {
2199	 test -z "$ac_c_werror_flag" ||
2200	 test ! -s conftest.err
2201       } && test -s conftest.$ac_objext; then :
2202  ac_retval=0
2203else
2204  $as_echo "$as_me: failed program was:" >&5
2205sed 's/^/| /' conftest.$ac_ext >&5
2206
2207	ac_retval=1
2208fi
2209  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2210  as_fn_set_status $ac_retval
2211
2212} # ac_fn_c_try_compile
2213
2214# ac_fn_cxx_try_compile LINENO
2215# ----------------------------
2216# Try to compile conftest.$ac_ext, and return whether this succeeded.
2217ac_fn_cxx_try_compile ()
2218{
2219  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2220  rm -f conftest.$ac_objext
2221  if { { ac_try="$ac_compile"
2222case "(($ac_try" in
2223  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2224  *) ac_try_echo=$ac_try;;
2225esac
2226eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2227$as_echo "$ac_try_echo"; } >&5
2228  (eval "$ac_compile") 2>conftest.err
2229  ac_status=$?
2230  if test -s conftest.err; then
2231    grep -v '^ *+' conftest.err >conftest.er1
2232    cat conftest.er1 >&5
2233    mv -f conftest.er1 conftest.err
2234  fi
2235  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2236  test $ac_status = 0; } && {
2237	 test -z "$ac_cxx_werror_flag" ||
2238	 test ! -s conftest.err
2239       } && test -s conftest.$ac_objext; then :
2240  ac_retval=0
2241else
2242  $as_echo "$as_me: failed program was:" >&5
2243sed 's/^/| /' conftest.$ac_ext >&5
2244
2245	ac_retval=1
2246fi
2247  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2248  as_fn_set_status $ac_retval
2249
2250} # ac_fn_cxx_try_compile
2251
2252# ac_fn_c_try_cpp LINENO
2253# ----------------------
2254# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2255ac_fn_c_try_cpp ()
2256{
2257  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2258  if { { ac_try="$ac_cpp conftest.$ac_ext"
2259case "(($ac_try" in
2260  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2261  *) ac_try_echo=$ac_try;;
2262esac
2263eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2264$as_echo "$ac_try_echo"; } >&5
2265  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2266  ac_status=$?
2267  if test -s conftest.err; then
2268    grep -v '^ *+' conftest.err >conftest.er1
2269    cat conftest.er1 >&5
2270    mv -f conftest.er1 conftest.err
2271  fi
2272  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2273  test $ac_status = 0; } > conftest.i && {
2274	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2275	 test ! -s conftest.err
2276       }; then :
2277  ac_retval=0
2278else
2279  $as_echo "$as_me: failed program was:" >&5
2280sed 's/^/| /' conftest.$ac_ext >&5
2281
2282    ac_retval=1
2283fi
2284  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2285  as_fn_set_status $ac_retval
2286
2287} # ac_fn_c_try_cpp
2288
2289# ac_fn_cxx_try_cpp LINENO
2290# ------------------------
2291# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2292ac_fn_cxx_try_cpp ()
2293{
2294  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2295  if { { ac_try="$ac_cpp conftest.$ac_ext"
2296case "(($ac_try" in
2297  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2298  *) ac_try_echo=$ac_try;;
2299esac
2300eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2301$as_echo "$ac_try_echo"; } >&5
2302  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2303  ac_status=$?
2304  if test -s conftest.err; then
2305    grep -v '^ *+' conftest.err >conftest.er1
2306    cat conftest.er1 >&5
2307    mv -f conftest.er1 conftest.err
2308  fi
2309  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2310  test $ac_status = 0; } > conftest.i && {
2311	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2312	 test ! -s conftest.err
2313       }; then :
2314  ac_retval=0
2315else
2316  $as_echo "$as_me: failed program was:" >&5
2317sed 's/^/| /' conftest.$ac_ext >&5
2318
2319    ac_retval=1
2320fi
2321  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2322  as_fn_set_status $ac_retval
2323
2324} # ac_fn_cxx_try_cpp
2325
2326# ac_fn_objc_try_compile LINENO
2327# -----------------------------
2328# Try to compile conftest.$ac_ext, and return whether this succeeded.
2329ac_fn_objc_try_compile ()
2330{
2331  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2332  rm -f conftest.$ac_objext
2333  if { { ac_try="$ac_compile"
2334case "(($ac_try" in
2335  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2336  *) ac_try_echo=$ac_try;;
2337esac
2338eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2339$as_echo "$ac_try_echo"; } >&5
2340  (eval "$ac_compile") 2>conftest.err
2341  ac_status=$?
2342  if test -s conftest.err; then
2343    grep -v '^ *+' conftest.err >conftest.er1
2344    cat conftest.er1 >&5
2345    mv -f conftest.er1 conftest.err
2346  fi
2347  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2348  test $ac_status = 0; } && {
2349	 test -z "$ac_objc_werror_flag" ||
2350	 test ! -s conftest.err
2351       } && test -s conftest.$ac_objext; then :
2352  ac_retval=0
2353else
2354  $as_echo "$as_me: failed program was:" >&5
2355sed 's/^/| /' conftest.$ac_ext >&5
2356
2357	ac_retval=1
2358fi
2359  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2360  as_fn_set_status $ac_retval
2361
2362} # ac_fn_objc_try_compile
2363
2364# ac_fn_c_try_link LINENO
2365# -----------------------
2366# Try to link conftest.$ac_ext, and return whether this succeeded.
2367ac_fn_c_try_link ()
2368{
2369  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2370  rm -f conftest.$ac_objext conftest$ac_exeext
2371  if { { ac_try="$ac_link"
2372case "(($ac_try" in
2373  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2374  *) ac_try_echo=$ac_try;;
2375esac
2376eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2377$as_echo "$ac_try_echo"; } >&5
2378  (eval "$ac_link") 2>conftest.err
2379  ac_status=$?
2380  if test -s conftest.err; then
2381    grep -v '^ *+' conftest.err >conftest.er1
2382    cat conftest.er1 >&5
2383    mv -f conftest.er1 conftest.err
2384  fi
2385  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2386  test $ac_status = 0; } && {
2387	 test -z "$ac_c_werror_flag" ||
2388	 test ! -s conftest.err
2389       } && test -s conftest$ac_exeext && {
2390	 test "$cross_compiling" = yes ||
2391	 test -x conftest$ac_exeext
2392       }; then :
2393  ac_retval=0
2394else
2395  $as_echo "$as_me: failed program was:" >&5
2396sed 's/^/| /' conftest.$ac_ext >&5
2397
2398	ac_retval=1
2399fi
2400  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2401  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2402  # interfere with the next link command; also delete a directory that is
2403  # left behind by Apple's compiler.  We do this before executing the actions.
2404  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2405  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2406  as_fn_set_status $ac_retval
2407
2408} # ac_fn_c_try_link
2409
2410# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2411# ---------------------------------------------------------
2412# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2413# the include files in INCLUDES and setting the cache variable VAR
2414# accordingly.
2415ac_fn_cxx_check_header_mongrel ()
2416{
2417  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2418  if eval \${$3+:} false; then :
2419  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2420$as_echo_n "checking for $2... " >&6; }
2421if eval \${$3+:} false; then :
2422  $as_echo_n "(cached) " >&6
2423fi
2424eval ac_res=\$$3
2425	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2426$as_echo "$ac_res" >&6; }
2427else
2428  # Is the header compilable?
2429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2430$as_echo_n "checking $2 usability... " >&6; }
2431cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2432/* end confdefs.h.  */
2433$4
2434#include <$2>
2435_ACEOF
2436if ac_fn_cxx_try_compile "$LINENO"; then :
2437  ac_header_compiler=yes
2438else
2439  ac_header_compiler=no
2440fi
2441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2443$as_echo "$ac_header_compiler" >&6; }
2444
2445# Is the header present?
2446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2447$as_echo_n "checking $2 presence... " >&6; }
2448cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2449/* end confdefs.h.  */
2450#include <$2>
2451_ACEOF
2452if ac_fn_cxx_try_cpp "$LINENO"; then :
2453  ac_header_preproc=yes
2454else
2455  ac_header_preproc=no
2456fi
2457rm -f conftest.err conftest.i conftest.$ac_ext
2458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2459$as_echo "$ac_header_preproc" >&6; }
2460
2461# So?  What about this header?
2462case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2463  yes:no: )
2464    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2465$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2466    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2467$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2468    ;;
2469  no:yes:* )
2470    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2471$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2472    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2473$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2474    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2475$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2476    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2477$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2478    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2479$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2480( $as_echo "## ----------------------------------------- ##
2481## Report this to build-dev@openjdk.java.net ##
2482## ----------------------------------------- ##"
2483     ) | sed "s/^/$as_me: WARNING:     /" >&2
2484    ;;
2485esac
2486  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2487$as_echo_n "checking for $2... " >&6; }
2488if eval \${$3+:} false; then :
2489  $as_echo_n "(cached) " >&6
2490else
2491  eval "$3=\$ac_header_compiler"
2492fi
2493eval ac_res=\$$3
2494	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2495$as_echo "$ac_res" >&6; }
2496fi
2497  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2498
2499} # ac_fn_cxx_check_header_mongrel
2500
2501# ac_fn_cxx_try_run LINENO
2502# ------------------------
2503# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2504# that executables *can* be run.
2505ac_fn_cxx_try_run ()
2506{
2507  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2508  if { { ac_try="$ac_link"
2509case "(($ac_try" in
2510  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2511  *) ac_try_echo=$ac_try;;
2512esac
2513eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2514$as_echo "$ac_try_echo"; } >&5
2515  (eval "$ac_link") 2>&5
2516  ac_status=$?
2517  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2518  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2519  { { case "(($ac_try" in
2520  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2521  *) ac_try_echo=$ac_try;;
2522esac
2523eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2524$as_echo "$ac_try_echo"; } >&5
2525  (eval "$ac_try") 2>&5
2526  ac_status=$?
2527  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2528  test $ac_status = 0; }; }; then :
2529  ac_retval=0
2530else
2531  $as_echo "$as_me: program exited with status $ac_status" >&5
2532       $as_echo "$as_me: failed program was:" >&5
2533sed 's/^/| /' conftest.$ac_ext >&5
2534
2535       ac_retval=$ac_status
2536fi
2537  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2538  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2539  as_fn_set_status $ac_retval
2540
2541} # ac_fn_cxx_try_run
2542
2543# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2544# ---------------------------------------------------------
2545# Tests whether HEADER exists and can be compiled using the include files in
2546# INCLUDES, setting the cache variable VAR accordingly.
2547ac_fn_cxx_check_header_compile ()
2548{
2549  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2550  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2551$as_echo_n "checking for $2... " >&6; }
2552if eval \${$3+:} false; then :
2553  $as_echo_n "(cached) " >&6
2554else
2555  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2556/* end confdefs.h.  */
2557$4
2558#include <$2>
2559_ACEOF
2560if ac_fn_cxx_try_compile "$LINENO"; then :
2561  eval "$3=yes"
2562else
2563  eval "$3=no"
2564fi
2565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2566fi
2567eval ac_res=\$$3
2568	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2569$as_echo "$ac_res" >&6; }
2570  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2571
2572} # ac_fn_cxx_check_header_compile
2573
2574# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2575# ----------------------------------------------
2576# Tries to find the compile-time value of EXPR in a program that includes
2577# INCLUDES, setting VAR accordingly. Returns whether the value could be
2578# computed
2579ac_fn_cxx_compute_int ()
2580{
2581  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2582  if test "$cross_compiling" = yes; then
2583    # Depending upon the size, compute the lo and hi bounds.
2584cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2585/* end confdefs.h.  */
2586$4
2587int
2588main ()
2589{
2590static int test_array [1 - 2 * !(($2) >= 0)];
2591test_array [0] = 0;
2592return test_array [0];
2593
2594  ;
2595  return 0;
2596}
2597_ACEOF
2598if ac_fn_cxx_try_compile "$LINENO"; then :
2599  ac_lo=0 ac_mid=0
2600  while :; do
2601    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2602/* end confdefs.h.  */
2603$4
2604int
2605main ()
2606{
2607static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2608test_array [0] = 0;
2609return test_array [0];
2610
2611  ;
2612  return 0;
2613}
2614_ACEOF
2615if ac_fn_cxx_try_compile "$LINENO"; then :
2616  ac_hi=$ac_mid; break
2617else
2618  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2619			if test $ac_lo -le $ac_mid; then
2620			  ac_lo= ac_hi=
2621			  break
2622			fi
2623			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2624fi
2625rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2626  done
2627else
2628  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2629/* end confdefs.h.  */
2630$4
2631int
2632main ()
2633{
2634static int test_array [1 - 2 * !(($2) < 0)];
2635test_array [0] = 0;
2636return test_array [0];
2637
2638  ;
2639  return 0;
2640}
2641_ACEOF
2642if ac_fn_cxx_try_compile "$LINENO"; then :
2643  ac_hi=-1 ac_mid=-1
2644  while :; do
2645    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2646/* end confdefs.h.  */
2647$4
2648int
2649main ()
2650{
2651static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2652test_array [0] = 0;
2653return test_array [0];
2654
2655  ;
2656  return 0;
2657}
2658_ACEOF
2659if ac_fn_cxx_try_compile "$LINENO"; then :
2660  ac_lo=$ac_mid; break
2661else
2662  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2663			if test $ac_mid -le $ac_hi; then
2664			  ac_lo= ac_hi=
2665			  break
2666			fi
2667			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2668fi
2669rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2670  done
2671else
2672  ac_lo= ac_hi=
2673fi
2674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2675fi
2676rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2677# Binary search between lo and hi bounds.
2678while test "x$ac_lo" != "x$ac_hi"; do
2679  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2680  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2681/* end confdefs.h.  */
2682$4
2683int
2684main ()
2685{
2686static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2687test_array [0] = 0;
2688return test_array [0];
2689
2690  ;
2691  return 0;
2692}
2693_ACEOF
2694if ac_fn_cxx_try_compile "$LINENO"; then :
2695  ac_hi=$ac_mid
2696else
2697  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2698fi
2699rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2700done
2701case $ac_lo in #((
2702?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2703'') ac_retval=1 ;;
2704esac
2705  else
2706    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2707/* end confdefs.h.  */
2708$4
2709static long int longval () { return $2; }
2710static unsigned long int ulongval () { return $2; }
2711#include <stdio.h>
2712#include <stdlib.h>
2713int
2714main ()
2715{
2716
2717  FILE *f = fopen ("conftest.val", "w");
2718  if (! f)
2719    return 1;
2720  if (($2) < 0)
2721    {
2722      long int i = longval ();
2723      if (i != ($2))
2724	return 1;
2725      fprintf (f, "%ld", i);
2726    }
2727  else
2728    {
2729      unsigned long int i = ulongval ();
2730      if (i != ($2))
2731	return 1;
2732      fprintf (f, "%lu", i);
2733    }
2734  /* Do not output a trailing newline, as this causes \r\n confusion
2735     on some platforms.  */
2736  return ferror (f) || fclose (f) != 0;
2737
2738  ;
2739  return 0;
2740}
2741_ACEOF
2742if ac_fn_cxx_try_run "$LINENO"; then :
2743  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2744else
2745  ac_retval=1
2746fi
2747rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2748  conftest.$ac_objext conftest.beam conftest.$ac_ext
2749rm -f conftest.val
2750
2751  fi
2752  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2753  as_fn_set_status $ac_retval
2754
2755} # ac_fn_cxx_compute_int
2756
2757# ac_fn_cxx_try_link LINENO
2758# -------------------------
2759# Try to link conftest.$ac_ext, and return whether this succeeded.
2760ac_fn_cxx_try_link ()
2761{
2762  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2763  rm -f conftest.$ac_objext conftest$ac_exeext
2764  if { { ac_try="$ac_link"
2765case "(($ac_try" in
2766  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2767  *) ac_try_echo=$ac_try;;
2768esac
2769eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2770$as_echo "$ac_try_echo"; } >&5
2771  (eval "$ac_link") 2>conftest.err
2772  ac_status=$?
2773  if test -s conftest.err; then
2774    grep -v '^ *+' conftest.err >conftest.er1
2775    cat conftest.er1 >&5
2776    mv -f conftest.er1 conftest.err
2777  fi
2778  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2779  test $ac_status = 0; } && {
2780	 test -z "$ac_cxx_werror_flag" ||
2781	 test ! -s conftest.err
2782       } && test -s conftest$ac_exeext && {
2783	 test "$cross_compiling" = yes ||
2784	 test -x conftest$ac_exeext
2785       }; then :
2786  ac_retval=0
2787else
2788  $as_echo "$as_me: failed program was:" >&5
2789sed 's/^/| /' conftest.$ac_ext >&5
2790
2791	ac_retval=1
2792fi
2793  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2794  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2795  # interfere with the next link command; also delete a directory that is
2796  # left behind by Apple's compiler.  We do this before executing the actions.
2797  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2798  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2799  as_fn_set_status $ac_retval
2800
2801} # ac_fn_cxx_try_link
2802
2803# ac_fn_cxx_check_func LINENO FUNC VAR
2804# ------------------------------------
2805# Tests whether FUNC exists, setting the cache variable VAR accordingly
2806ac_fn_cxx_check_func ()
2807{
2808  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2809  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2810$as_echo_n "checking for $2... " >&6; }
2811if eval \${$3+:} false; then :
2812  $as_echo_n "(cached) " >&6
2813else
2814  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2815/* end confdefs.h.  */
2816/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2817   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2818#define $2 innocuous_$2
2819
2820/* System header to define __stub macros and hopefully few prototypes,
2821    which can conflict with char $2 (); below.
2822    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2823    <limits.h> exists even on freestanding compilers.  */
2824
2825#ifdef __STDC__
2826# include <limits.h>
2827#else
2828# include <assert.h>
2829#endif
2830
2831#undef $2
2832
2833/* Override any GCC internal prototype to avoid an error.
2834   Use char because int might match the return type of a GCC
2835   builtin and then its argument prototype would still apply.  */
2836#ifdef __cplusplus
2837extern "C"
2838#endif
2839char $2 ();
2840/* The GNU C library defines this for functions which it implements
2841    to always fail with ENOSYS.  Some functions are actually named
2842    something starting with __ and the normal name is an alias.  */
2843#if defined __stub_$2 || defined __stub___$2
2844choke me
2845#endif
2846
2847int
2848main ()
2849{
2850return $2 ();
2851  ;
2852  return 0;
2853}
2854_ACEOF
2855if ac_fn_cxx_try_link "$LINENO"; then :
2856  eval "$3=yes"
2857else
2858  eval "$3=no"
2859fi
2860rm -f core conftest.err conftest.$ac_objext \
2861    conftest$ac_exeext conftest.$ac_ext
2862fi
2863eval ac_res=\$$3
2864	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2865$as_echo "$ac_res" >&6; }
2866  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2867
2868} # ac_fn_cxx_check_func
2869
2870# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2871# -------------------------------------------------------
2872# Tests whether HEADER exists and can be compiled using the include files in
2873# INCLUDES, setting the cache variable VAR accordingly.
2874ac_fn_c_check_header_compile ()
2875{
2876  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2877  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2878$as_echo_n "checking for $2... " >&6; }
2879if eval \${$3+:} false; then :
2880  $as_echo_n "(cached) " >&6
2881else
2882  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2883/* end confdefs.h.  */
2884$4
2885#include <$2>
2886_ACEOF
2887if ac_fn_c_try_compile "$LINENO"; then :
2888  eval "$3=yes"
2889else
2890  eval "$3=no"
2891fi
2892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2893fi
2894eval ac_res=\$$3
2895	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2896$as_echo "$ac_res" >&6; }
2897  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2898
2899} # ac_fn_c_check_header_compile
2900cat >config.log <<_ACEOF
2901This file contains any messages produced by compilers while
2902running configure, to aid debugging if configure makes a mistake.
2903
2904It was created by OpenJDK $as_me jdk9, which was
2905generated by GNU Autoconf 2.69.  Invocation command line was
2906
2907  $ $0 $@
2908
2909_ACEOF
2910exec 5>>config.log
2911{
2912cat <<_ASUNAME
2913## --------- ##
2914## Platform. ##
2915## --------- ##
2916
2917hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2918uname -m = `(uname -m) 2>/dev/null || echo unknown`
2919uname -r = `(uname -r) 2>/dev/null || echo unknown`
2920uname -s = `(uname -s) 2>/dev/null || echo unknown`
2921uname -v = `(uname -v) 2>/dev/null || echo unknown`
2922
2923/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2924/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2925
2926/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2927/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2928/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2929/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2930/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2931/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2932/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2933
2934_ASUNAME
2935
2936as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2937for as_dir in $PATH
2938do
2939  IFS=$as_save_IFS
2940  test -z "$as_dir" && as_dir=.
2941    $as_echo "PATH: $as_dir"
2942  done
2943IFS=$as_save_IFS
2944
2945} >&5
2946
2947cat >&5 <<_ACEOF
2948
2949
2950## ----------- ##
2951## Core tests. ##
2952## ----------- ##
2953
2954_ACEOF
2955
2956
2957# Keep a trace of the command line.
2958# Strip out --no-create and --no-recursion so they do not pile up.
2959# Strip out --silent because we don't want to record it for future runs.
2960# Also quote any args containing shell meta-characters.
2961# Make two passes to allow for proper duplicate-argument suppression.
2962ac_configure_args=
2963ac_configure_args0=
2964ac_configure_args1=
2965ac_must_keep_next=false
2966for ac_pass in 1 2
2967do
2968  for ac_arg
2969  do
2970    case $ac_arg in
2971    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2972    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2973    | -silent | --silent | --silen | --sile | --sil)
2974      continue ;;
2975    *\'*)
2976      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2977    esac
2978    case $ac_pass in
2979    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2980    2)
2981      as_fn_append ac_configure_args1 " '$ac_arg'"
2982      if test $ac_must_keep_next = true; then
2983	ac_must_keep_next=false # Got value, back to normal.
2984      else
2985	case $ac_arg in
2986	  *=* | --config-cache | -C | -disable-* | --disable-* \
2987	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2988	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2989	  | -with-* | --with-* | -without-* | --without-* | --x)
2990	    case "$ac_configure_args0 " in
2991	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2992	    esac
2993	    ;;
2994	  -* ) ac_must_keep_next=true ;;
2995	esac
2996      fi
2997      as_fn_append ac_configure_args " '$ac_arg'"
2998      ;;
2999    esac
3000  done
3001done
3002{ ac_configure_args0=; unset ac_configure_args0;}
3003{ ac_configure_args1=; unset ac_configure_args1;}
3004
3005# When interrupted or exit'd, cleanup temporary files, and complete
3006# config.log.  We remove comments because anyway the quotes in there
3007# would cause problems or look ugly.
3008# WARNING: Use '\'' to represent an apostrophe within the trap.
3009# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3010trap 'exit_status=$?
3011  # Save into config.log some information that might help in debugging.
3012  {
3013    echo
3014
3015    $as_echo "## ---------------- ##
3016## Cache variables. ##
3017## ---------------- ##"
3018    echo
3019    # The following way of writing the cache mishandles newlines in values,
3020(
3021  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3022    eval ac_val=\$$ac_var
3023    case $ac_val in #(
3024    *${as_nl}*)
3025      case $ac_var in #(
3026      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3027$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3028      esac
3029      case $ac_var in #(
3030      _ | IFS | as_nl) ;; #(
3031      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3032      *) { eval $ac_var=; unset $ac_var;} ;;
3033      esac ;;
3034    esac
3035  done
3036  (set) 2>&1 |
3037    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3038    *${as_nl}ac_space=\ *)
3039      sed -n \
3040	"s/'\''/'\''\\\\'\'''\''/g;
3041	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3042      ;; #(
3043    *)
3044      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3045      ;;
3046    esac |
3047    sort
3048)
3049    echo
3050
3051    $as_echo "## ----------------- ##
3052## Output variables. ##
3053## ----------------- ##"
3054    echo
3055    for ac_var in $ac_subst_vars
3056    do
3057      eval ac_val=\$$ac_var
3058      case $ac_val in
3059      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3060      esac
3061      $as_echo "$ac_var='\''$ac_val'\''"
3062    done | sort
3063    echo
3064
3065    if test -n "$ac_subst_files"; then
3066      $as_echo "## ------------------- ##
3067## File substitutions. ##
3068## ------------------- ##"
3069      echo
3070      for ac_var in $ac_subst_files
3071      do
3072	eval ac_val=\$$ac_var
3073	case $ac_val in
3074	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3075	esac
3076	$as_echo "$ac_var='\''$ac_val'\''"
3077      done | sort
3078      echo
3079    fi
3080
3081    if test -s confdefs.h; then
3082      $as_echo "## ----------- ##
3083## confdefs.h. ##
3084## ----------- ##"
3085      echo
3086      cat confdefs.h
3087      echo
3088    fi
3089    test "$ac_signal" != 0 &&
3090      $as_echo "$as_me: caught signal $ac_signal"
3091    $as_echo "$as_me: exit $exit_status"
3092  } >&5
3093  rm -f core *.core core.conftest.* &&
3094    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3095    exit $exit_status
3096' 0
3097for ac_signal in 1 2 13 15; do
3098  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3099done
3100ac_signal=0
3101
3102# confdefs.h avoids OS command line length limits that DEFS can exceed.
3103rm -f -r conftest* confdefs.h
3104
3105$as_echo "/* confdefs.h */" > confdefs.h
3106
3107# Predefined preprocessor variables.
3108
3109cat >>confdefs.h <<_ACEOF
3110#define PACKAGE_NAME "$PACKAGE_NAME"
3111_ACEOF
3112
3113cat >>confdefs.h <<_ACEOF
3114#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3115_ACEOF
3116
3117cat >>confdefs.h <<_ACEOF
3118#define PACKAGE_VERSION "$PACKAGE_VERSION"
3119_ACEOF
3120
3121cat >>confdefs.h <<_ACEOF
3122#define PACKAGE_STRING "$PACKAGE_STRING"
3123_ACEOF
3124
3125cat >>confdefs.h <<_ACEOF
3126#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3127_ACEOF
3128
3129cat >>confdefs.h <<_ACEOF
3130#define PACKAGE_URL "$PACKAGE_URL"
3131_ACEOF
3132
3133
3134# Let the site file select an alternate cache file if it wants to.
3135# Prefer an explicitly selected file to automatically selected ones.
3136ac_site_file1=NONE
3137ac_site_file2=NONE
3138if test -n "$CONFIG_SITE"; then
3139  # We do not want a PATH search for config.site.
3140  case $CONFIG_SITE in #((
3141    -*)  ac_site_file1=./$CONFIG_SITE;;
3142    */*) ac_site_file1=$CONFIG_SITE;;
3143    *)   ac_site_file1=./$CONFIG_SITE;;
3144  esac
3145elif test "x$prefix" != xNONE; then
3146  ac_site_file1=$prefix/share/config.site
3147  ac_site_file2=$prefix/etc/config.site
3148else
3149  ac_site_file1=$ac_default_prefix/share/config.site
3150  ac_site_file2=$ac_default_prefix/etc/config.site
3151fi
3152for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3153do
3154  test "x$ac_site_file" = xNONE && continue
3155  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3156    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3157$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3158    sed 's/^/| /' "$ac_site_file" >&5
3159    . "$ac_site_file" \
3160      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3161$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3162as_fn_error $? "failed to load site script $ac_site_file
3163See \`config.log' for more details" "$LINENO" 5; }
3164  fi
3165done
3166
3167if test -r "$cache_file"; then
3168  # Some versions of bash will fail to source /dev/null (special files
3169  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3170  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3171    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3172$as_echo "$as_me: loading cache $cache_file" >&6;}
3173    case $cache_file in
3174      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3175      *)                      . "./$cache_file";;
3176    esac
3177  fi
3178else
3179  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3180$as_echo "$as_me: creating cache $cache_file" >&6;}
3181  >$cache_file
3182fi
3183
3184# Check that the precious variables saved in the cache have kept the same
3185# value.
3186ac_cache_corrupted=false
3187for ac_var in $ac_precious_vars; do
3188  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3189  eval ac_new_set=\$ac_env_${ac_var}_set
3190  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3191  eval ac_new_val=\$ac_env_${ac_var}_value
3192  case $ac_old_set,$ac_new_set in
3193    set,)
3194      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3195$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3196      ac_cache_corrupted=: ;;
3197    ,set)
3198      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3199$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3200      ac_cache_corrupted=: ;;
3201    ,);;
3202    *)
3203      if test "x$ac_old_val" != "x$ac_new_val"; then
3204	# differences in whitespace do not lead to failure.
3205	ac_old_val_w=`echo x $ac_old_val`
3206	ac_new_val_w=`echo x $ac_new_val`
3207	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3208	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3209$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3210	  ac_cache_corrupted=:
3211	else
3212	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3213$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3214	  eval $ac_var=\$ac_old_val
3215	fi
3216	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3217$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3218	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3219$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3220      fi;;
3221  esac
3222  # Pass precious variables to config.status.
3223  if test "$ac_new_set" = set; then
3224    case $ac_new_val in
3225    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3226    *) ac_arg=$ac_var=$ac_new_val ;;
3227    esac
3228    case " $ac_configure_args " in
3229      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3230      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3231    esac
3232  fi
3233done
3234if $ac_cache_corrupted; then
3235  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3236$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3237  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3238$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3239  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3240fi
3241## -------------------- ##
3242## Main body of script. ##
3243## -------------------- ##
3244
3245ac_ext=c
3246ac_cpp='$CPP $CPPFLAGS'
3247ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3248ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3249ac_compiler_gnu=$ac_cv_c_compiler_gnu
3250
3251
3252
3253ac_aux_dir=
3254for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3255  if test -f "$ac_dir/install-sh"; then
3256    ac_aux_dir=$ac_dir
3257    ac_install_sh="$ac_aux_dir/install-sh -c"
3258    break
3259  elif test -f "$ac_dir/install.sh"; then
3260    ac_aux_dir=$ac_dir
3261    ac_install_sh="$ac_aux_dir/install.sh -c"
3262    break
3263  elif test -f "$ac_dir/shtool"; then
3264    ac_aux_dir=$ac_dir
3265    ac_install_sh="$ac_aux_dir/shtool install -c"
3266    break
3267  fi
3268done
3269if test -z "$ac_aux_dir"; then
3270  as_fn_error $? "cannot find install-sh, install.sh, or shtool in $TOPDIR/common/autoconf/build-aux \"$srcdir\"/$TOPDIR/common/autoconf/build-aux" "$LINENO" 5
3271fi
3272
3273# These three variables are undocumented and unsupported,
3274# and are intended to be withdrawn in a future Autoconf release.
3275# They can cause serious problems if a builder's source tree is in a directory
3276# whose full name contains unusual characters.
3277ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3278ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3279ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3280
3281
3282# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3283
3284#
3285# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3286# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3287#
3288# This code is free software; you can redistribute it and/or modify it
3289# under the terms of the GNU General Public License version 2 only, as
3290# published by the Free Software Foundation.  Oracle designates this
3291# particular file as subject to the "Classpath" exception as provided
3292# by Oracle in the LICENSE file that accompanied this code.
3293#
3294# This code is distributed in the hope that it will be useful, but WITHOUT
3295# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3296# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3297# version 2 for more details (a copy is included in the LICENSE file that
3298# accompanied this code).
3299#
3300# You should have received a copy of the GNU General Public License version
3301# 2 along with this work; if not, write to the Free Software Foundation,
3302# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3303#
3304# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3305# or visit www.oracle.com if you need additional information or have any
3306# questions.
3307#
3308
3309#
3310# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3311#
3312# This program is free software; you can redistribute it and/or modify
3313# it under the terms of the GNU General Public License as published by
3314# the Free Software Foundation; either version 2 of the License, or
3315# (at your option) any later version.
3316#
3317# This program is distributed in the hope that it will be useful, but
3318# WITHOUT ANY WARRANTY; without even the implied warranty of
3319# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3320# General Public License for more details.
3321#
3322# You should have received a copy of the GNU General Public License
3323# along with this program; if not, write to the Free Software
3324# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3325#
3326# As a special exception to the GNU General Public License, if you
3327# distribute this file as part of a program that contains a
3328# configuration script generated by Autoconf, you may include it under
3329# the same distribution terms that you use for the rest of that program.
3330
3331# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3332# ----------------------------------
3333# PKG_PROG_PKG_CONFIG
3334
3335# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3336#
3337# Check to see whether a particular set of modules exists.  Similar
3338# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3339#
3340#
3341# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3342# this or PKG_CHECK_MODULES is called, or make sure to call
3343# PKG_CHECK_EXISTS manually
3344# --------------------------------------------------------------
3345
3346
3347
3348# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3349# ---------------------------------------------
3350# _PKG_CONFIG
3351
3352# _PKG_SHORT_ERRORS_SUPPORTED
3353# -----------------------------
3354# _PKG_SHORT_ERRORS_SUPPORTED
3355
3356
3357# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3358# [ACTION-IF-NOT-FOUND])
3359#
3360#
3361# Note that if there is a possibility the first call to
3362# PKG_CHECK_MODULES might not happen, you should be sure to include an
3363# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3364#
3365#
3366# --------------------------------------------------------------
3367# PKG_CHECK_MODULES
3368
3369
3370# Include these first...
3371#
3372# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3373# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3374#
3375# This code is free software; you can redistribute it and/or modify it
3376# under the terms of the GNU General Public License version 2 only, as
3377# published by the Free Software Foundation.  Oracle designates this
3378# particular file as subject to the "Classpath" exception as provided
3379# by Oracle in the LICENSE file that accompanied this code.
3380#
3381# This code is distributed in the hope that it will be useful, but WITHOUT
3382# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3383# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3384# version 2 for more details (a copy is included in the LICENSE file that
3385# accompanied this code).
3386#
3387# You should have received a copy of the GNU General Public License version
3388# 2 along with this work; if not, write to the Free Software Foundation,
3389# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3390#
3391# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3392# or visit www.oracle.com if you need additional information or have any
3393# questions.
3394#
3395
3396# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3397# If so, then append $1 to $2 \
3398# Also set JVM_ARG_OK to true/false depending on outcome.
3399
3400
3401# Appends a string to a path variable, only adding the : when needed.
3402
3403
3404# Prepends a string to a path variable, only adding the : when needed.
3405
3406
3407# This will make sure the given variable points to a full and proper
3408# path. This means:
3409# 1) There will be no spaces in the path. On posix platforms,
3410#    spaces in the path will result in an error. On Windows,
3411#    the path will be rewritten using short-style to be space-free.
3412# 2) The path will be absolute, and it will be in unix-style (on
3413#     cygwin).
3414# $1: The name of the variable to fix
3415
3416
3417# This will make sure the given variable points to a executable
3418# with a full and proper path. This means:
3419# 1) There will be no spaces in the path. On posix platforms,
3420#    spaces in the path will result in an error. On Windows,
3421#    the path will be rewritten using short-style to be space-free.
3422# 2) The path will be absolute, and it will be in unix-style (on
3423#     cygwin).
3424# Any arguments given to the executable is preserved.
3425# If the input variable does not have a directory specification, then
3426# it need to be in the PATH.
3427# $1: The name of the variable to fix
3428
3429
3430
3431
3432# Register a --with argument but mark it as deprecated
3433# $1: The name of the with argument to deprecate, not including --with-
3434
3435
3436# Register a --enable argument but mark it as deprecated
3437# $1: The name of the with argument to deprecate, not including --enable-
3438# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3439
3440
3441
3442
3443# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3444# $1: variable to check
3445
3446
3447# Check that there are no unprocessed overridden variables left.
3448# If so, they are an incorrect argument and we will exit with an error.
3449
3450
3451# Setup a tool for the given variable. If correctly specified by the user,
3452# use that value, otherwise search for the tool using the supplied code snippet.
3453# $1: variable to set
3454# $2: code snippet to call to look for the tool
3455
3456
3457# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3458# $1: variable to set
3459# $2: executable name (or list of names) to look for
3460
3461
3462# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3463# $1: variable to set
3464# $2: executable name (or list of names) to look for
3465
3466
3467# Like BASIC_PATH_PROGS but fails if no tool was found.
3468# $1: variable to set
3469# $2: executable name (or list of names) to look for
3470
3471
3472# Like BASIC_SETUP_TOOL but fails if no tool was found.
3473# $1: variable to set
3474# $2: autoconf macro to call to look for the special tool
3475
3476
3477# Setup the most fundamental tools that relies on not much else to set up,
3478# but is used by much of the early bootstrap code.
3479
3480
3481# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491#%%% Simple tools %%%
3492
3493# Check if we have found a usable version of make
3494# $1: the path to a potential make binary (or empty)
3495# $2: the description on how we found this
3496
3497
3498
3499
3500# Goes looking for a usable version of GNU make.
3501
3502
3503
3504
3505
3506
3507# Check if build directory is on local disk. If not possible to determine,
3508# we prefer to claim it's local.
3509# Argument 1: directory to test
3510# Argument 2: what to do if it is on local disk
3511# Argument 3: what to do otherwise (remote disk or failure)
3512
3513
3514# Check that source files have basic read permissions set. This might
3515# not be the case in cygwin in certain conditions.
3516
3517
3518
3519
3520#
3521# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3522# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3523#
3524# This code is free software; you can redistribute it and/or modify it
3525# under the terms of the GNU General Public License version 2 only, as
3526# published by the Free Software Foundation.  Oracle designates this
3527# particular file as subject to the "Classpath" exception as provided
3528# by Oracle in the LICENSE file that accompanied this code.
3529#
3530# This code is distributed in the hope that it will be useful, but WITHOUT
3531# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3532# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3533# version 2 for more details (a copy is included in the LICENSE file that
3534# accompanied this code).
3535#
3536# You should have received a copy of the GNU General Public License version
3537# 2 along with this work; if not, write to the Free Software Foundation,
3538# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3539#
3540# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3541# or visit www.oracle.com if you need additional information or have any
3542# questions.
3543#
3544
3545
3546
3547
3548
3549# Helper function which possibly converts a path using DOS-style short mode.
3550# If so, the updated path is stored in $new_path.
3551# $1: The path to check
3552
3553
3554# Helper function which possibly converts a path using DOS-style short mode.
3555# If so, the updated path is stored in $new_path.
3556# $1: The path to check
3557
3558
3559# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3560# and could probably be heavily simplified. However, all changes in this
3561# area tend to need lot of testing in different scenarios, and in lack of
3562# proper unit testing, cleaning this up has not been deemed worth the effort
3563# at the moment.
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3574
3575
3576
3577
3578#
3579# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3580# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3581#
3582# This code is free software; you can redistribute it and/or modify it
3583# under the terms of the GNU General Public License version 2 only, as
3584# published by the Free Software Foundation.  Oracle designates this
3585# particular file as subject to the "Classpath" exception as provided
3586# by Oracle in the LICENSE file that accompanied this code.
3587#
3588# This code is distributed in the hope that it will be useful, but WITHOUT
3589# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3590# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3591# version 2 for more details (a copy is included in the LICENSE file that
3592# accompanied this code).
3593#
3594# You should have received a copy of the GNU General Public License version
3595# 2 along with this work; if not, write to the Free Software Foundation,
3596# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3597#
3598# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3599# or visit www.oracle.com if you need additional information or have any
3600# questions.
3601#
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613# ... then the rest
3614#
3615# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3616# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3617#
3618# This code is free software; you can redistribute it and/or modify it
3619# under the terms of the GNU General Public License version 2 only, as
3620# published by the Free Software Foundation.  Oracle designates this
3621# particular file as subject to the "Classpath" exception as provided
3622# by Oracle in the LICENSE file that accompanied this code.
3623#
3624# This code is distributed in the hope that it will be useful, but WITHOUT
3625# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3626# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3627# version 2 for more details (a copy is included in the LICENSE file that
3628# accompanied this code).
3629#
3630# You should have received a copy of the GNU General Public License version
3631# 2 along with this work; if not, write to the Free Software Foundation,
3632# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3633#
3634# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3635# or visit www.oracle.com if you need additional information or have any
3636# questions.
3637#
3638
3639########################################################################
3640# This file handles detection of the Boot JDK. The Boot JDK detection
3641# process has been developed as a response to solve a complex real-world
3642# problem. Initially, it was simple, but it has grown as platform after
3643# platform, idiosyncracy after idiosyncracy has been supported.
3644#
3645# The basic idea is this:
3646# 1) You need an acceptable *) JDK to use as a Boot JDK
3647# 2) There are several ways to locate a JDK, that are mostly platform
3648#    dependent **)
3649# 3) You can have multiple JDKs installed
3650# 4) If possible, configure should try to dig out an acceptable JDK
3651#    automatically, without having to resort to command-line options
3652#
3653# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3654#     javac) and not a JRE, etc.
3655#
3656# **) On Windows we typically use a well-known path.
3657#     On MacOSX we typically use the tool java_home.
3658#     On Linux we typically find javac in the $PATH, and then follow a
3659#     chain of symlinks that often ends up in a real JDK.
3660#
3661# This leads to the code where we check in different ways to locate a
3662# JDK, and if one is found, check if it is acceptable. If not, we print
3663# our reasons for rejecting it (useful when debugging non-working
3664# configure situations) and continue checking the next one.
3665########################################################################
3666
3667# Execute the check given as argument, and verify the result
3668# If the Boot JDK was previously found, do nothing
3669# $1 A command line (typically autoconf macro) to execute
3670
3671
3672# Test: Is bootjdk explicitely set by command line arguments?
3673
3674
3675# Test: Is bootjdk available from builddeps?
3676
3677
3678# Test: Is $JAVA_HOME set?
3679
3680
3681# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3682
3683
3684# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3685# $1: Argument to the java_home binary (optional)
3686
3687
3688# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3689
3690
3691# Look for a jdk in the given path. If there are multiple, try to select the newest.
3692# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3693# $1 = Path to directory containing jdk installations.
3694# $2 = String to append to the found JDK directory to get the proper JDK home
3695
3696
3697# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3698# environmental variable as base for where to look.
3699# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3700
3701
3702# Test: Is there a JDK installed in default, well-known locations?
3703
3704
3705# Check that a command-line tool in the Boot JDK is correct
3706# $1 = name of variable to assign
3707# $2 = name of binary
3708
3709
3710###############################################################################
3711#
3712# We need a Boot JDK to bootstrap the build.
3713#
3714
3715
3716
3717
3718
3719#
3720# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3721# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3722#
3723# This code is free software; you can redistribute it and/or modify it
3724# under the terms of the GNU General Public License version 2 only, as
3725# published by the Free Software Foundation.  Oracle designates this
3726# particular file as subject to the "Classpath" exception as provided
3727# by Oracle in the LICENSE file that accompanied this code.
3728#
3729# This code is distributed in the hope that it will be useful, but WITHOUT
3730# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3731# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3732# version 2 for more details (a copy is included in the LICENSE file that
3733# accompanied this code).
3734#
3735# You should have received a copy of the GNU General Public License version
3736# 2 along with this work; if not, write to the Free Software Foundation,
3737# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3738#
3739# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3740# or visit www.oracle.com if you need additional information or have any
3741# questions.
3742#
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763#
3764# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3765# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3766#
3767# This code is free software; you can redistribute it and/or modify it
3768# under the terms of the GNU General Public License version 2 only, as
3769# published by the Free Software Foundation.  Oracle designates this
3770# particular file as subject to the "Classpath" exception as provided
3771# by Oracle in the LICENSE file that accompanied this code.
3772#
3773# This code is distributed in the hope that it will be useful, but WITHOUT
3774# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3775# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3776# version 2 for more details (a copy is included in the LICENSE file that
3777# accompanied this code).
3778#
3779# You should have received a copy of the GNU General Public License version
3780# 2 along with this work; if not, write to the Free Software Foundation,
3781# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3782#
3783# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3784# or visit www.oracle.com if you need additional information or have any
3785# questions.
3786#
3787
3788
3789
3790
3791
3792# Documentation on common flags used for solstudio in HIGHEST.
3793#
3794# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3795#          done with care, there are some assumptions below that need to
3796#          be understood about the use of pointers, and IEEE behavior.
3797#
3798# -fns: Use non-standard floating point mode (not IEEE 754)
3799# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3800# -fsingle: Use single precision floating point with 'float'
3801# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3802#   (Source with excessing pointer casting and data access with mixed
3803#    pointer types are not recommended)
3804# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3805#   (If you expect perfect errno behavior, do not use this)
3806# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3807# -xrestrict: Pointer parameters to functions do not overlap
3808#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3809#    If you pass in multiple pointers to the same data, do not use this)
3810# -xlibmil: Inline some library routines
3811#   (If you expect perfect errno behavior, do not use this)
3812# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3813#   (If you expect perfect errno behavior, do not use this)
3814#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3815
3816    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3817    # Bug?
3818    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3819    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3820    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3821    #fi
3822
3823
3824
3825
3826
3827# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3828#                                   [RUN-IF-FALSE])
3829# ------------------------------------------------------------
3830# Check that the c and c++ compilers support an argument
3831
3832
3833# FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3834#                                    [RUN-IF-FALSE])
3835# ------------------------------------------------------------
3836# Check that the linker support an argument
3837
3838
3839
3840
3841#
3842# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3843# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3844#
3845# This code is free software; you can redistribute it and/or modify it
3846# under the terms of the GNU General Public License version 2 only, as
3847# published by the Free Software Foundation.  Oracle designates this
3848# particular file as subject to the "Classpath" exception as provided
3849# by Oracle in the LICENSE file that accompanied this code.
3850#
3851# This code is distributed in the hope that it will be useful, but WITHOUT
3852# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3853# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3854# version 2 for more details (a copy is included in the LICENSE file that
3855# accompanied this code).
3856#
3857# You should have received a copy of the GNU General Public License version
3858# 2 along with this work; if not, write to the Free Software Foundation,
3859# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3860#
3861# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3862# or visit www.oracle.com if you need additional information or have any
3863# questions.
3864#
3865
3866
3867
3868
3869
3870cygwin_help() {
3871  case $1 in
3872    unzip)
3873      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3874      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3875      ;;
3876    zip)
3877      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3878      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3879      ;;
3880    make)
3881      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3882      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3883      ;;
3884    freetype)
3885      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
3886        HELP_MSG="To install freetype, run:
3887wget \"http://gnuwin32.sourceforge.net/downlinks/freetype.php\" -O /tmp/freetype-setup.exe
3888chmod +x /tmp/freetype-setup.exe
3889/tmp/freetype-setup.exe
3890Follow GUI prompts, and install to default directory \"C:\Program Files (x86)\GnuWin32\".
3891After installation, locate lib/libfreetype.dll.a and make a copy with the name freetype.dll."
3892      else
3893        HELP_MSG="You need to build a 64-bit version of freetype.
3894This is not readily available.
3895You can find source code and build instructions on
3896http://www.freetype.org/
3897If you put the resulting build in \"C:\Program Files\GnuWin32\", it will be found automatically."
3898      fi
3899      ;;
3900  esac
3901}
3902
3903msys_help() {
3904  PKGHANDLER_COMMAND=""
3905}
3906
3907apt_help() {
3908  case $1 in
3909    devkit)
3910      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3911    openjdk)
3912      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3913    alsa)
3914      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3915    cups)
3916      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3917    freetype)
3918      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3919    pulse)
3920      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3921    x11)
3922      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3923    ccache)
3924      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3925  esac
3926}
3927
3928yum_help() {
3929  case $1 in
3930    devkit)
3931      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3932    openjdk)
3933      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3934    alsa)
3935      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3936    cups)
3937      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3938    freetype)
3939      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3940    pulse)
3941      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3942    x11)
3943      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
3944    ccache)
3945      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3946  esac
3947}
3948
3949port_help() {
3950  PKGHANDLER_COMMAND=""
3951}
3952
3953pkgutil_help() {
3954  PKGHANDLER_COMMAND=""
3955}
3956
3957pkgadd_help() {
3958  PKGHANDLER_COMMAND=""
3959}
3960
3961# This function will check if we're called from the "configure" wrapper while
3962# printing --help. If so, we will print out additional information that can
3963# only be extracted within the autoconf script, and then exit. This must be
3964# called at the very beginning in configure.ac.
3965
3966
3967
3968
3969#
3970# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3971# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3972#
3973# This code is free software; you can redistribute it and/or modify it
3974# under the terms of the GNU General Public License version 2 only, as
3975# published by the Free Software Foundation.  Oracle designates this
3976# particular file as subject to the "Classpath" exception as provided
3977# by Oracle in the LICENSE file that accompanied this code.
3978#
3979# This code is distributed in the hope that it will be useful, but WITHOUT
3980# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3981# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3982# version 2 for more details (a copy is included in the LICENSE file that
3983# accompanied this code).
3984#
3985# You should have received a copy of the GNU General Public License version
3986# 2 along with this work; if not, write to the Free Software Foundation,
3987# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3988#
3989# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3990# or visit www.oracle.com if you need additional information or have any
3991# questions.
3992#
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003###############################################################################
4004#
4005# Should we build only OpenJDK even if closed sources are present?
4006#
4007
4008
4009
4010
4011###############################################################################
4012#
4013# Setup version numbers
4014#
4015
4016
4017
4018
4019
4020
4021#
4022# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4023# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4024#
4025# This code is free software; you can redistribute it and/or modify it
4026# under the terms of the GNU General Public License version 2 only, as
4027# published by the Free Software Foundation.  Oracle designates this
4028# particular file as subject to the "Classpath" exception as provided
4029# by Oracle in the LICENSE file that accompanied this code.
4030#
4031# This code is distributed in the hope that it will be useful, but WITHOUT
4032# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4033# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4034# version 2 for more details (a copy is included in the LICENSE file that
4035# accompanied this code).
4036#
4037# You should have received a copy of the GNU General Public License version
4038# 2 along with this work; if not, write to the Free Software Foundation,
4039# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4040#
4041# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4042# or visit www.oracle.com if you need additional information or have any
4043# questions.
4044#
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064#
4065# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4066# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4067#
4068# This code is free software; you can redistribute it and/or modify it
4069# under the terms of the GNU General Public License version 2 only, as
4070# published by the Free Software Foundation.  Oracle designates this
4071# particular file as subject to the "Classpath" exception as provided
4072# by Oracle in the LICENSE file that accompanied this code.
4073#
4074# This code is distributed in the hope that it will be useful, but WITHOUT
4075# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4076# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4077# version 2 for more details (a copy is included in the LICENSE file that
4078# accompanied this code).
4079#
4080# You should have received a copy of the GNU General Public License version
4081# 2 along with this work; if not, write to the Free Software Foundation,
4082# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4083#
4084# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4085# or visit www.oracle.com if you need additional information or have any
4086# questions.
4087#
4088
4089# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4090# Converts autoconf style CPU name to OpenJDK style, into
4091# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4092
4093
4094# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4095# Converts autoconf style OS name to OpenJDK style, into
4096# VAR_OS and VAR_OS_API.
4097
4098
4099# Expects $host_os $host_cpu $build_os and $build_cpu
4100# and $with_target_bits to have been setup!
4101#
4102# Translate the standard triplet(quadruplet) definition
4103# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4104# OPENJDK_BUILD_OS, etc.
4105
4106
4107# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4108# accordingly. Must be done after setting up build and target system, but before
4109# doing anything else with these values.
4110
4111
4112# Setup the legacy variables, for controlling the old makefiles.
4113#
4114
4115
4116
4117
4118#%%% Build and target systems %%%
4119
4120
4121
4122
4123# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4124# Add -mX to various FLAGS variables.
4125
4126
4127
4128
4129
4130
4131#
4132# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4133# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4134#
4135# This code is free software; you can redistribute it and/or modify it
4136# under the terms of the GNU General Public License version 2 only, as
4137# published by the Free Software Foundation.  Oracle designates this
4138# particular file as subject to the "Classpath" exception as provided
4139# by Oracle in the LICENSE file that accompanied this code.
4140#
4141# This code is distributed in the hope that it will be useful, but WITHOUT
4142# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4143# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4144# version 2 for more details (a copy is included in the LICENSE file that
4145# accompanied this code).
4146#
4147# You should have received a copy of the GNU General Public License version
4148# 2 along with this work; if not, write to the Free Software Foundation,
4149# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4150#
4151# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4152# or visit www.oracle.com if you need additional information or have any
4153# questions.
4154#
4155
4156
4157
4158
4159
4160
4161
4162
4163#
4164# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4165# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4166#
4167# This code is free software; you can redistribute it and/or modify it
4168# under the terms of the GNU General Public License version 2 only, as
4169# published by the Free Software Foundation.  Oracle designates this
4170# particular file as subject to the "Classpath" exception as provided
4171# by Oracle in the LICENSE file that accompanied this code.
4172#
4173# This code is distributed in the hope that it will be useful, but WITHOUT
4174# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4175# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4176# version 2 for more details (a copy is included in the LICENSE file that
4177# accompanied this code).
4178#
4179# You should have received a copy of the GNU General Public License version
4180# 2 along with this work; if not, write to the Free Software Foundation,
4181# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4182#
4183# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4184# or visit www.oracle.com if you need additional information or have any
4185# questions.
4186#
4187
4188########################################################################
4189# This file is responsible for detecting, verifying and setting up the
4190# toolchain, i.e. the compiler, linker and related utilities. It will setup
4191# proper paths to the binaries, but it will not setup any flags.
4192#
4193# The binaries used is determined by the toolchain type, which is the family of
4194# compilers and related tools that are used.
4195########################################################################
4196
4197
4198# All valid toolchains, regardless of platform (used by help.m4)
4199VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4200
4201# These toolchains are valid on different platforms
4202VALID_TOOLCHAINS_linux="gcc clang"
4203VALID_TOOLCHAINS_solaris="solstudio"
4204VALID_TOOLCHAINS_macosx="gcc clang"
4205VALID_TOOLCHAINS_aix="xlc"
4206VALID_TOOLCHAINS_windows="microsoft"
4207
4208# Toolchain descriptions
4209TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4210TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4211TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4212TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4213TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4214
4215# Setup a number of variables describing how native output files are
4216# named on this platform/toolchain.
4217
4218
4219# Determine which toolchain type to use, and make sure it is valid for this
4220# platform. Setup various information about the selected toolchain.
4221
4222
4223# Before we start detecting the toolchain executables, we might need some
4224# special setup, e.g. additional paths etc.
4225
4226
4227# Restore path, etc
4228
4229
4230# Check if a compiler is of the toolchain type we expect, and save the version
4231# information from it. If the compiler does not match the expected type,
4232# this function will abort using AC_MSG_ERROR. If it matches, the version will
4233# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4234# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4235#
4236# $1 = compiler to test (CC or CXX)
4237# $2 = human readable name of compiler (C or C++)
4238
4239
4240# Try to locate the given C or C++ compiler in the path, or otherwise.
4241#
4242# $1 = compiler to test (CC or CXX)
4243# $2 = human readable name of compiler (C or C++)
4244# $3 = list of compiler names to search for
4245
4246
4247# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4248# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4249# archiver (AR). Verify that the compilers are correct according to the
4250# toolchain type.
4251
4252
4253# Setup additional tools that is considered a part of the toolchain, but not the
4254# core part. Many of these are highly platform-specific and do not exist,
4255# and/or are not needed on all platforms.
4256
4257
4258# Setup the build tools (i.e, the compiler and linker used to build programs
4259# that should be run on the build platform, not the target platform, as a build
4260# helper). Since the non-cross-compile case uses the normal, target compilers
4261# for this, we can only do this after these have been setup.
4262
4263
4264# Setup legacy variables that are still needed as alternative ways to refer to
4265# parts of the toolchain.
4266
4267
4268# Do some additional checks on the detected tools.
4269
4270
4271# Setup the JTReg Regression Test Harness.
4272
4273
4274#
4275# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4276# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4277#
4278# This code is free software; you can redistribute it and/or modify it
4279# under the terms of the GNU General Public License version 2 only, as
4280# published by the Free Software Foundation.  Oracle designates this
4281# particular file as subject to the "Classpath" exception as provided
4282# by Oracle in the LICENSE file that accompanied this code.
4283#
4284# This code is distributed in the hope that it will be useful, but WITHOUT
4285# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4286# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4287# version 2 for more details (a copy is included in the LICENSE file that
4288# accompanied this code).
4289#
4290# You should have received a copy of the GNU General Public License version
4291# 2 along with this work; if not, write to the Free Software Foundation,
4292# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4293#
4294# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4295# or visit www.oracle.com if you need additional information or have any
4296# questions.
4297#
4298
4299
4300
4301
4302
4303
4304
4305# Check if the VS env variables were setup prior to running configure.
4306# If not, then find vcvarsall.bat and run it automatically, and integrate
4307# the set env variables into the spec file.
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318# This line needs to be here, verbatim, after all includes and the dummy hook
4319# definitions. It is replaced with custom functionality when building
4320# custom sources.
4321#CUSTOM_AUTOCONF_INCLUDE
4322
4323# Do not change or remove the following line, it is needed for consistency checks:
4324DATE_WHEN_GENERATED=1409311712
4325
4326###############################################################################
4327#
4328# Initialization / Boot-strapping
4329#
4330# The bootstrapping process needs to solve the "chicken or the egg" problem,
4331# thus it jumps back and forth, each time gaining something needed later on.
4332#
4333###############################################################################
4334
4335# If we are requested to print additional help, do that and then exit.
4336# This must be the very first call.
4337
4338  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4339    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4340    $PRINTF "Which are valid to use depends on the build platform.\n"
4341    for toolchain in $VALID_TOOLCHAINS_all; do
4342      # Use indirect variable referencing
4343      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4344      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4345      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4346    done
4347
4348    # And now exit directly
4349    exit 0
4350  fi
4351
4352
4353# Basic initialization that must happen first of all in the normal process.
4354
4355  # Save the original command line. This is passed to us by the wrapper configure script.
4356
4357  DATE_WHEN_CONFIGURED=`LANG=C date`
4358
4359  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4360$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4361  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4362$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4363
4364
4365  # Start with tools that do not need have cross compilation support
4366  # and can be expected to be found in the default PATH. These tools are
4367  # used by configure. Nor are these tools expected to be found in the
4368  # devkit from the builddeps server either, since they are
4369  # needed to download the devkit.
4370
4371  # First are all the simple required tools.
4372
4373
4374
4375  # Publish this variable in the help.
4376
4377
4378  if test "x$BASENAME" = x; then
4379    # The variable is not set by user, try to locate tool using the code snippet
4380    for ac_prog in basename
4381do
4382  # Extract the first word of "$ac_prog", so it can be a program name with args.
4383set dummy $ac_prog; ac_word=$2
4384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4385$as_echo_n "checking for $ac_word... " >&6; }
4386if ${ac_cv_path_BASENAME+:} false; then :
4387  $as_echo_n "(cached) " >&6
4388else
4389  case $BASENAME in
4390  [\\/]* | ?:[\\/]*)
4391  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4392  ;;
4393  *)
4394  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4395for as_dir in $PATH
4396do
4397  IFS=$as_save_IFS
4398  test -z "$as_dir" && as_dir=.
4399    for ac_exec_ext in '' $ac_executable_extensions; do
4400  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4401    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4402    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4403    break 2
4404  fi
4405done
4406  done
4407IFS=$as_save_IFS
4408
4409  ;;
4410esac
4411fi
4412BASENAME=$ac_cv_path_BASENAME
4413if test -n "$BASENAME"; then
4414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4415$as_echo "$BASENAME" >&6; }
4416else
4417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4418$as_echo "no" >&6; }
4419fi
4420
4421
4422  test -n "$BASENAME" && break
4423done
4424
4425  else
4426    # The variable is set, but is it from the command line or the environment?
4427
4428    # Try to remove the string !BASENAME! from our list.
4429    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4430    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4431      # If it failed, the variable was not from the command line. Ignore it,
4432      # but warn the user (except for BASH, which is always set by the calling BASH).
4433      if test "xBASENAME" != xBASH; then
4434        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4435$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4436      fi
4437      # Try to locate tool using the code snippet
4438      for ac_prog in basename
4439do
4440  # Extract the first word of "$ac_prog", so it can be a program name with args.
4441set dummy $ac_prog; ac_word=$2
4442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4443$as_echo_n "checking for $ac_word... " >&6; }
4444if ${ac_cv_path_BASENAME+:} false; then :
4445  $as_echo_n "(cached) " >&6
4446else
4447  case $BASENAME in
4448  [\\/]* | ?:[\\/]*)
4449  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4450  ;;
4451  *)
4452  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4453for as_dir in $PATH
4454do
4455  IFS=$as_save_IFS
4456  test -z "$as_dir" && as_dir=.
4457    for ac_exec_ext in '' $ac_executable_extensions; do
4458  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4459    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4460    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4461    break 2
4462  fi
4463done
4464  done
4465IFS=$as_save_IFS
4466
4467  ;;
4468esac
4469fi
4470BASENAME=$ac_cv_path_BASENAME
4471if test -n "$BASENAME"; then
4472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4473$as_echo "$BASENAME" >&6; }
4474else
4475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4476$as_echo "no" >&6; }
4477fi
4478
4479
4480  test -n "$BASENAME" && break
4481done
4482
4483    else
4484      # If it succeeded, then it was overridden by the user. We will use it
4485      # for the tool.
4486
4487      # First remove it from the list of overridden variables, so we can test
4488      # for unknown variables in the end.
4489      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4490
4491      # Check if the provided tool contains a complete path.
4492      tool_specified="$BASENAME"
4493      tool_basename="${tool_specified##*/}"
4494      if test "x$tool_basename" = "x$tool_specified"; then
4495        # A command without a complete path is provided, search $PATH.
4496        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4497$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4498        # Extract the first word of "$tool_basename", so it can be a program name with args.
4499set dummy $tool_basename; ac_word=$2
4500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4501$as_echo_n "checking for $ac_word... " >&6; }
4502if ${ac_cv_path_BASENAME+:} false; then :
4503  $as_echo_n "(cached) " >&6
4504else
4505  case $BASENAME in
4506  [\\/]* | ?:[\\/]*)
4507  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4508  ;;
4509  *)
4510  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4511for as_dir in $PATH
4512do
4513  IFS=$as_save_IFS
4514  test -z "$as_dir" && as_dir=.
4515    for ac_exec_ext in '' $ac_executable_extensions; do
4516  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4517    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4518    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4519    break 2
4520  fi
4521done
4522  done
4523IFS=$as_save_IFS
4524
4525  ;;
4526esac
4527fi
4528BASENAME=$ac_cv_path_BASENAME
4529if test -n "$BASENAME"; then
4530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4531$as_echo "$BASENAME" >&6; }
4532else
4533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4534$as_echo "no" >&6; }
4535fi
4536
4537
4538        if test "x$BASENAME" = x; then
4539          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4540        fi
4541      else
4542        # Otherwise we believe it is a complete path. Use it as it is.
4543        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4544$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4545        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4546$as_echo_n "checking for BASENAME... " >&6; }
4547        if test ! -x "$tool_specified"; then
4548          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4549$as_echo "not found" >&6; }
4550          as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4551        fi
4552        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4553$as_echo "$tool_specified" >&6; }
4554      fi
4555    fi
4556  fi
4557
4558
4559
4560  if test "x$BASENAME" = x; then
4561    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4562  fi
4563
4564
4565
4566
4567
4568  # Publish this variable in the help.
4569
4570
4571  if test "x$BASH" = x; then
4572    # The variable is not set by user, try to locate tool using the code snippet
4573    for ac_prog in bash
4574do
4575  # Extract the first word of "$ac_prog", so it can be a program name with args.
4576set dummy $ac_prog; ac_word=$2
4577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4578$as_echo_n "checking for $ac_word... " >&6; }
4579if ${ac_cv_path_BASH+:} false; then :
4580  $as_echo_n "(cached) " >&6
4581else
4582  case $BASH in
4583  [\\/]* | ?:[\\/]*)
4584  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4585  ;;
4586  *)
4587  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4588for as_dir in $PATH
4589do
4590  IFS=$as_save_IFS
4591  test -z "$as_dir" && as_dir=.
4592    for ac_exec_ext in '' $ac_executable_extensions; do
4593  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4594    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4595    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4596    break 2
4597  fi
4598done
4599  done
4600IFS=$as_save_IFS
4601
4602  ;;
4603esac
4604fi
4605BASH=$ac_cv_path_BASH
4606if test -n "$BASH"; then
4607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4608$as_echo "$BASH" >&6; }
4609else
4610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4611$as_echo "no" >&6; }
4612fi
4613
4614
4615  test -n "$BASH" && break
4616done
4617
4618  else
4619    # The variable is set, but is it from the command line or the environment?
4620
4621    # Try to remove the string !BASH! from our list.
4622    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4623    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4624      # If it failed, the variable was not from the command line. Ignore it,
4625      # but warn the user (except for BASH, which is always set by the calling BASH).
4626      if test "xBASH" != xBASH; then
4627        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4628$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4629      fi
4630      # Try to locate tool using the code snippet
4631      for ac_prog in bash
4632do
4633  # Extract the first word of "$ac_prog", so it can be a program name with args.
4634set dummy $ac_prog; ac_word=$2
4635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4636$as_echo_n "checking for $ac_word... " >&6; }
4637if ${ac_cv_path_BASH+:} false; then :
4638  $as_echo_n "(cached) " >&6
4639else
4640  case $BASH in
4641  [\\/]* | ?:[\\/]*)
4642  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4643  ;;
4644  *)
4645  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4646for as_dir in $PATH
4647do
4648  IFS=$as_save_IFS
4649  test -z "$as_dir" && as_dir=.
4650    for ac_exec_ext in '' $ac_executable_extensions; do
4651  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4652    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4653    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4654    break 2
4655  fi
4656done
4657  done
4658IFS=$as_save_IFS
4659
4660  ;;
4661esac
4662fi
4663BASH=$ac_cv_path_BASH
4664if test -n "$BASH"; then
4665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4666$as_echo "$BASH" >&6; }
4667else
4668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4669$as_echo "no" >&6; }
4670fi
4671
4672
4673  test -n "$BASH" && break
4674done
4675
4676    else
4677      # If it succeeded, then it was overridden by the user. We will use it
4678      # for the tool.
4679
4680      # First remove it from the list of overridden variables, so we can test
4681      # for unknown variables in the end.
4682      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4683
4684      # Check if the provided tool contains a complete path.
4685      tool_specified="$BASH"
4686      tool_basename="${tool_specified##*/}"
4687      if test "x$tool_basename" = "x$tool_specified"; then
4688        # A command without a complete path is provided, search $PATH.
4689        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4690$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4691        # Extract the first word of "$tool_basename", so it can be a program name with args.
4692set dummy $tool_basename; ac_word=$2
4693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4694$as_echo_n "checking for $ac_word... " >&6; }
4695if ${ac_cv_path_BASH+:} false; then :
4696  $as_echo_n "(cached) " >&6
4697else
4698  case $BASH in
4699  [\\/]* | ?:[\\/]*)
4700  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4701  ;;
4702  *)
4703  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4704for as_dir in $PATH
4705do
4706  IFS=$as_save_IFS
4707  test -z "$as_dir" && as_dir=.
4708    for ac_exec_ext in '' $ac_executable_extensions; do
4709  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4710    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4711    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4712    break 2
4713  fi
4714done
4715  done
4716IFS=$as_save_IFS
4717
4718  ;;
4719esac
4720fi
4721BASH=$ac_cv_path_BASH
4722if test -n "$BASH"; then
4723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4724$as_echo "$BASH" >&6; }
4725else
4726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4727$as_echo "no" >&6; }
4728fi
4729
4730
4731        if test "x$BASH" = x; then
4732          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4733        fi
4734      else
4735        # Otherwise we believe it is a complete path. Use it as it is.
4736        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4737$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4738        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4739$as_echo_n "checking for BASH... " >&6; }
4740        if test ! -x "$tool_specified"; then
4741          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4742$as_echo "not found" >&6; }
4743          as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4744        fi
4745        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4746$as_echo "$tool_specified" >&6; }
4747      fi
4748    fi
4749  fi
4750
4751
4752
4753  if test "x$BASH" = x; then
4754    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4755  fi
4756
4757
4758
4759
4760
4761  # Publish this variable in the help.
4762
4763
4764  if test "x$CAT" = x; then
4765    # The variable is not set by user, try to locate tool using the code snippet
4766    for ac_prog in cat
4767do
4768  # Extract the first word of "$ac_prog", so it can be a program name with args.
4769set dummy $ac_prog; ac_word=$2
4770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4771$as_echo_n "checking for $ac_word... " >&6; }
4772if ${ac_cv_path_CAT+:} false; then :
4773  $as_echo_n "(cached) " >&6
4774else
4775  case $CAT in
4776  [\\/]* | ?:[\\/]*)
4777  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4778  ;;
4779  *)
4780  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4781for as_dir in $PATH
4782do
4783  IFS=$as_save_IFS
4784  test -z "$as_dir" && as_dir=.
4785    for ac_exec_ext in '' $ac_executable_extensions; do
4786  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4787    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4788    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4789    break 2
4790  fi
4791done
4792  done
4793IFS=$as_save_IFS
4794
4795  ;;
4796esac
4797fi
4798CAT=$ac_cv_path_CAT
4799if test -n "$CAT"; then
4800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4801$as_echo "$CAT" >&6; }
4802else
4803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4804$as_echo "no" >&6; }
4805fi
4806
4807
4808  test -n "$CAT" && break
4809done
4810
4811  else
4812    # The variable is set, but is it from the command line or the environment?
4813
4814    # Try to remove the string !CAT! from our list.
4815    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4816    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4817      # If it failed, the variable was not from the command line. Ignore it,
4818      # but warn the user (except for BASH, which is always set by the calling BASH).
4819      if test "xCAT" != xBASH; then
4820        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4821$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4822      fi
4823      # Try to locate tool using the code snippet
4824      for ac_prog in cat
4825do
4826  # Extract the first word of "$ac_prog", so it can be a program name with args.
4827set dummy $ac_prog; ac_word=$2
4828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4829$as_echo_n "checking for $ac_word... " >&6; }
4830if ${ac_cv_path_CAT+:} false; then :
4831  $as_echo_n "(cached) " >&6
4832else
4833  case $CAT in
4834  [\\/]* | ?:[\\/]*)
4835  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4836  ;;
4837  *)
4838  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4839for as_dir in $PATH
4840do
4841  IFS=$as_save_IFS
4842  test -z "$as_dir" && as_dir=.
4843    for ac_exec_ext in '' $ac_executable_extensions; do
4844  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4845    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4846    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4847    break 2
4848  fi
4849done
4850  done
4851IFS=$as_save_IFS
4852
4853  ;;
4854esac
4855fi
4856CAT=$ac_cv_path_CAT
4857if test -n "$CAT"; then
4858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4859$as_echo "$CAT" >&6; }
4860else
4861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4862$as_echo "no" >&6; }
4863fi
4864
4865
4866  test -n "$CAT" && break
4867done
4868
4869    else
4870      # If it succeeded, then it was overridden by the user. We will use it
4871      # for the tool.
4872
4873      # First remove it from the list of overridden variables, so we can test
4874      # for unknown variables in the end.
4875      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4876
4877      # Check if the provided tool contains a complete path.
4878      tool_specified="$CAT"
4879      tool_basename="${tool_specified##*/}"
4880      if test "x$tool_basename" = "x$tool_specified"; then
4881        # A command without a complete path is provided, search $PATH.
4882        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
4883$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
4884        # Extract the first word of "$tool_basename", so it can be a program name with args.
4885set dummy $tool_basename; ac_word=$2
4886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4887$as_echo_n "checking for $ac_word... " >&6; }
4888if ${ac_cv_path_CAT+:} false; then :
4889  $as_echo_n "(cached) " >&6
4890else
4891  case $CAT in
4892  [\\/]* | ?:[\\/]*)
4893  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4894  ;;
4895  *)
4896  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4897for as_dir in $PATH
4898do
4899  IFS=$as_save_IFS
4900  test -z "$as_dir" && as_dir=.
4901    for ac_exec_ext in '' $ac_executable_extensions; do
4902  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4903    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4904    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4905    break 2
4906  fi
4907done
4908  done
4909IFS=$as_save_IFS
4910
4911  ;;
4912esac
4913fi
4914CAT=$ac_cv_path_CAT
4915if test -n "$CAT"; then
4916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4917$as_echo "$CAT" >&6; }
4918else
4919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4920$as_echo "no" >&6; }
4921fi
4922
4923
4924        if test "x$CAT" = x; then
4925          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4926        fi
4927      else
4928        # Otherwise we believe it is a complete path. Use it as it is.
4929        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
4930$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
4931        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
4932$as_echo_n "checking for CAT... " >&6; }
4933        if test ! -x "$tool_specified"; then
4934          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4935$as_echo "not found" >&6; }
4936          as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
4937        fi
4938        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4939$as_echo "$tool_specified" >&6; }
4940      fi
4941    fi
4942  fi
4943
4944
4945
4946  if test "x$CAT" = x; then
4947    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
4948  fi
4949
4950
4951
4952
4953
4954  # Publish this variable in the help.
4955
4956
4957  if test "x$CHMOD" = x; then
4958    # The variable is not set by user, try to locate tool using the code snippet
4959    for ac_prog in chmod
4960do
4961  # Extract the first word of "$ac_prog", so it can be a program name with args.
4962set dummy $ac_prog; ac_word=$2
4963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4964$as_echo_n "checking for $ac_word... " >&6; }
4965if ${ac_cv_path_CHMOD+:} false; then :
4966  $as_echo_n "(cached) " >&6
4967else
4968  case $CHMOD in
4969  [\\/]* | ?:[\\/]*)
4970  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4971  ;;
4972  *)
4973  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4974for as_dir in $PATH
4975do
4976  IFS=$as_save_IFS
4977  test -z "$as_dir" && as_dir=.
4978    for ac_exec_ext in '' $ac_executable_extensions; do
4979  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4980    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4981    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4982    break 2
4983  fi
4984done
4985  done
4986IFS=$as_save_IFS
4987
4988  ;;
4989esac
4990fi
4991CHMOD=$ac_cv_path_CHMOD
4992if test -n "$CHMOD"; then
4993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4994$as_echo "$CHMOD" >&6; }
4995else
4996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4997$as_echo "no" >&6; }
4998fi
4999
5000
5001  test -n "$CHMOD" && break
5002done
5003
5004  else
5005    # The variable is set, but is it from the command line or the environment?
5006
5007    # Try to remove the string !CHMOD! from our list.
5008    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5009    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5010      # If it failed, the variable was not from the command line. Ignore it,
5011      # but warn the user (except for BASH, which is always set by the calling BASH).
5012      if test "xCHMOD" != xBASH; then
5013        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5014$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5015      fi
5016      # Try to locate tool using the code snippet
5017      for ac_prog in chmod
5018do
5019  # Extract the first word of "$ac_prog", so it can be a program name with args.
5020set dummy $ac_prog; ac_word=$2
5021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5022$as_echo_n "checking for $ac_word... " >&6; }
5023if ${ac_cv_path_CHMOD+:} false; then :
5024  $as_echo_n "(cached) " >&6
5025else
5026  case $CHMOD in
5027  [\\/]* | ?:[\\/]*)
5028  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5029  ;;
5030  *)
5031  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5032for as_dir in $PATH
5033do
5034  IFS=$as_save_IFS
5035  test -z "$as_dir" && as_dir=.
5036    for ac_exec_ext in '' $ac_executable_extensions; do
5037  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5038    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5039    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5040    break 2
5041  fi
5042done
5043  done
5044IFS=$as_save_IFS
5045
5046  ;;
5047esac
5048fi
5049CHMOD=$ac_cv_path_CHMOD
5050if test -n "$CHMOD"; then
5051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5052$as_echo "$CHMOD" >&6; }
5053else
5054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5055$as_echo "no" >&6; }
5056fi
5057
5058
5059  test -n "$CHMOD" && break
5060done
5061
5062    else
5063      # If it succeeded, then it was overridden by the user. We will use it
5064      # for the tool.
5065
5066      # First remove it from the list of overridden variables, so we can test
5067      # for unknown variables in the end.
5068      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5069
5070      # Check if the provided tool contains a complete path.
5071      tool_specified="$CHMOD"
5072      tool_basename="${tool_specified##*/}"
5073      if test "x$tool_basename" = "x$tool_specified"; then
5074        # A command without a complete path is provided, search $PATH.
5075        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5076$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5077        # Extract the first word of "$tool_basename", so it can be a program name with args.
5078set dummy $tool_basename; ac_word=$2
5079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5080$as_echo_n "checking for $ac_word... " >&6; }
5081if ${ac_cv_path_CHMOD+:} false; then :
5082  $as_echo_n "(cached) " >&6
5083else
5084  case $CHMOD in
5085  [\\/]* | ?:[\\/]*)
5086  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5087  ;;
5088  *)
5089  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5090for as_dir in $PATH
5091do
5092  IFS=$as_save_IFS
5093  test -z "$as_dir" && as_dir=.
5094    for ac_exec_ext in '' $ac_executable_extensions; do
5095  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5096    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5097    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5098    break 2
5099  fi
5100done
5101  done
5102IFS=$as_save_IFS
5103
5104  ;;
5105esac
5106fi
5107CHMOD=$ac_cv_path_CHMOD
5108if test -n "$CHMOD"; then
5109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5110$as_echo "$CHMOD" >&6; }
5111else
5112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5113$as_echo "no" >&6; }
5114fi
5115
5116
5117        if test "x$CHMOD" = x; then
5118          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5119        fi
5120      else
5121        # Otherwise we believe it is a complete path. Use it as it is.
5122        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5123$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5124        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5125$as_echo_n "checking for CHMOD... " >&6; }
5126        if test ! -x "$tool_specified"; then
5127          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5128$as_echo "not found" >&6; }
5129          as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5130        fi
5131        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5132$as_echo "$tool_specified" >&6; }
5133      fi
5134    fi
5135  fi
5136
5137
5138
5139  if test "x$CHMOD" = x; then
5140    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5141  fi
5142
5143
5144
5145
5146
5147  # Publish this variable in the help.
5148
5149
5150  if test "x$CMP" = x; then
5151    # The variable is not set by user, try to locate tool using the code snippet
5152    for ac_prog in cmp
5153do
5154  # Extract the first word of "$ac_prog", so it can be a program name with args.
5155set dummy $ac_prog; ac_word=$2
5156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5157$as_echo_n "checking for $ac_word... " >&6; }
5158if ${ac_cv_path_CMP+:} false; then :
5159  $as_echo_n "(cached) " >&6
5160else
5161  case $CMP in
5162  [\\/]* | ?:[\\/]*)
5163  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5164  ;;
5165  *)
5166  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5167for as_dir in $PATH
5168do
5169  IFS=$as_save_IFS
5170  test -z "$as_dir" && as_dir=.
5171    for ac_exec_ext in '' $ac_executable_extensions; do
5172  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5173    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5174    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5175    break 2
5176  fi
5177done
5178  done
5179IFS=$as_save_IFS
5180
5181  ;;
5182esac
5183fi
5184CMP=$ac_cv_path_CMP
5185if test -n "$CMP"; then
5186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5187$as_echo "$CMP" >&6; }
5188else
5189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5190$as_echo "no" >&6; }
5191fi
5192
5193
5194  test -n "$CMP" && break
5195done
5196
5197  else
5198    # The variable is set, but is it from the command line or the environment?
5199
5200    # Try to remove the string !CMP! from our list.
5201    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5202    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5203      # If it failed, the variable was not from the command line. Ignore it,
5204      # but warn the user (except for BASH, which is always set by the calling BASH).
5205      if test "xCMP" != xBASH; then
5206        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5207$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5208      fi
5209      # Try to locate tool using the code snippet
5210      for ac_prog in cmp
5211do
5212  # Extract the first word of "$ac_prog", so it can be a program name with args.
5213set dummy $ac_prog; ac_word=$2
5214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5215$as_echo_n "checking for $ac_word... " >&6; }
5216if ${ac_cv_path_CMP+:} false; then :
5217  $as_echo_n "(cached) " >&6
5218else
5219  case $CMP in
5220  [\\/]* | ?:[\\/]*)
5221  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5222  ;;
5223  *)
5224  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5225for as_dir in $PATH
5226do
5227  IFS=$as_save_IFS
5228  test -z "$as_dir" && as_dir=.
5229    for ac_exec_ext in '' $ac_executable_extensions; do
5230  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5231    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5232    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5233    break 2
5234  fi
5235done
5236  done
5237IFS=$as_save_IFS
5238
5239  ;;
5240esac
5241fi
5242CMP=$ac_cv_path_CMP
5243if test -n "$CMP"; then
5244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5245$as_echo "$CMP" >&6; }
5246else
5247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5248$as_echo "no" >&6; }
5249fi
5250
5251
5252  test -n "$CMP" && break
5253done
5254
5255    else
5256      # If it succeeded, then it was overridden by the user. We will use it
5257      # for the tool.
5258
5259      # First remove it from the list of overridden variables, so we can test
5260      # for unknown variables in the end.
5261      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5262
5263      # Check if the provided tool contains a complete path.
5264      tool_specified="$CMP"
5265      tool_basename="${tool_specified##*/}"
5266      if test "x$tool_basename" = "x$tool_specified"; then
5267        # A command without a complete path is provided, search $PATH.
5268        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5269$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5270        # Extract the first word of "$tool_basename", so it can be a program name with args.
5271set dummy $tool_basename; ac_word=$2
5272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5273$as_echo_n "checking for $ac_word... " >&6; }
5274if ${ac_cv_path_CMP+:} false; then :
5275  $as_echo_n "(cached) " >&6
5276else
5277  case $CMP in
5278  [\\/]* | ?:[\\/]*)
5279  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5280  ;;
5281  *)
5282  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5283for as_dir in $PATH
5284do
5285  IFS=$as_save_IFS
5286  test -z "$as_dir" && as_dir=.
5287    for ac_exec_ext in '' $ac_executable_extensions; do
5288  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5289    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5290    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5291    break 2
5292  fi
5293done
5294  done
5295IFS=$as_save_IFS
5296
5297  ;;
5298esac
5299fi
5300CMP=$ac_cv_path_CMP
5301if test -n "$CMP"; then
5302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5303$as_echo "$CMP" >&6; }
5304else
5305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5306$as_echo "no" >&6; }
5307fi
5308
5309
5310        if test "x$CMP" = x; then
5311          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5312        fi
5313      else
5314        # Otherwise we believe it is a complete path. Use it as it is.
5315        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5316$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5317        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5318$as_echo_n "checking for CMP... " >&6; }
5319        if test ! -x "$tool_specified"; then
5320          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5321$as_echo "not found" >&6; }
5322          as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5323        fi
5324        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5325$as_echo "$tool_specified" >&6; }
5326      fi
5327    fi
5328  fi
5329
5330
5331
5332  if test "x$CMP" = x; then
5333    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5334  fi
5335
5336
5337
5338
5339
5340  # Publish this variable in the help.
5341
5342
5343  if test "x$COMM" = x; then
5344    # The variable is not set by user, try to locate tool using the code snippet
5345    for ac_prog in comm
5346do
5347  # Extract the first word of "$ac_prog", so it can be a program name with args.
5348set dummy $ac_prog; ac_word=$2
5349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5350$as_echo_n "checking for $ac_word... " >&6; }
5351if ${ac_cv_path_COMM+:} false; then :
5352  $as_echo_n "(cached) " >&6
5353else
5354  case $COMM in
5355  [\\/]* | ?:[\\/]*)
5356  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5357  ;;
5358  *)
5359  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5360for as_dir in $PATH
5361do
5362  IFS=$as_save_IFS
5363  test -z "$as_dir" && as_dir=.
5364    for ac_exec_ext in '' $ac_executable_extensions; do
5365  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5366    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5367    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5368    break 2
5369  fi
5370done
5371  done
5372IFS=$as_save_IFS
5373
5374  ;;
5375esac
5376fi
5377COMM=$ac_cv_path_COMM
5378if test -n "$COMM"; then
5379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5380$as_echo "$COMM" >&6; }
5381else
5382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5383$as_echo "no" >&6; }
5384fi
5385
5386
5387  test -n "$COMM" && break
5388done
5389
5390  else
5391    # The variable is set, but is it from the command line or the environment?
5392
5393    # Try to remove the string !COMM! from our list.
5394    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5395    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5396      # If it failed, the variable was not from the command line. Ignore it,
5397      # but warn the user (except for BASH, which is always set by the calling BASH).
5398      if test "xCOMM" != xBASH; then
5399        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5400$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5401      fi
5402      # Try to locate tool using the code snippet
5403      for ac_prog in comm
5404do
5405  # Extract the first word of "$ac_prog", so it can be a program name with args.
5406set dummy $ac_prog; ac_word=$2
5407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5408$as_echo_n "checking for $ac_word... " >&6; }
5409if ${ac_cv_path_COMM+:} false; then :
5410  $as_echo_n "(cached) " >&6
5411else
5412  case $COMM in
5413  [\\/]* | ?:[\\/]*)
5414  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5415  ;;
5416  *)
5417  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5418for as_dir in $PATH
5419do
5420  IFS=$as_save_IFS
5421  test -z "$as_dir" && as_dir=.
5422    for ac_exec_ext in '' $ac_executable_extensions; do
5423  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5424    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5425    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5426    break 2
5427  fi
5428done
5429  done
5430IFS=$as_save_IFS
5431
5432  ;;
5433esac
5434fi
5435COMM=$ac_cv_path_COMM
5436if test -n "$COMM"; then
5437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5438$as_echo "$COMM" >&6; }
5439else
5440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5441$as_echo "no" >&6; }
5442fi
5443
5444
5445  test -n "$COMM" && break
5446done
5447
5448    else
5449      # If it succeeded, then it was overridden by the user. We will use it
5450      # for the tool.
5451
5452      # First remove it from the list of overridden variables, so we can test
5453      # for unknown variables in the end.
5454      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5455
5456      # Check if the provided tool contains a complete path.
5457      tool_specified="$COMM"
5458      tool_basename="${tool_specified##*/}"
5459      if test "x$tool_basename" = "x$tool_specified"; then
5460        # A command without a complete path is provided, search $PATH.
5461        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5462$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5463        # Extract the first word of "$tool_basename", so it can be a program name with args.
5464set dummy $tool_basename; ac_word=$2
5465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5466$as_echo_n "checking for $ac_word... " >&6; }
5467if ${ac_cv_path_COMM+:} false; then :
5468  $as_echo_n "(cached) " >&6
5469else
5470  case $COMM in
5471  [\\/]* | ?:[\\/]*)
5472  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5473  ;;
5474  *)
5475  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5476for as_dir in $PATH
5477do
5478  IFS=$as_save_IFS
5479  test -z "$as_dir" && as_dir=.
5480    for ac_exec_ext in '' $ac_executable_extensions; do
5481  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5482    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5483    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5484    break 2
5485  fi
5486done
5487  done
5488IFS=$as_save_IFS
5489
5490  ;;
5491esac
5492fi
5493COMM=$ac_cv_path_COMM
5494if test -n "$COMM"; then
5495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5496$as_echo "$COMM" >&6; }
5497else
5498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5499$as_echo "no" >&6; }
5500fi
5501
5502
5503        if test "x$COMM" = x; then
5504          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5505        fi
5506      else
5507        # Otherwise we believe it is a complete path. Use it as it is.
5508        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5509$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5510        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5511$as_echo_n "checking for COMM... " >&6; }
5512        if test ! -x "$tool_specified"; then
5513          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5514$as_echo "not found" >&6; }
5515          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5516        fi
5517        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5518$as_echo "$tool_specified" >&6; }
5519      fi
5520    fi
5521  fi
5522
5523
5524
5525  if test "x$COMM" = x; then
5526    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5527  fi
5528
5529
5530
5531
5532
5533  # Publish this variable in the help.
5534
5535
5536  if test "x$CP" = x; then
5537    # The variable is not set by user, try to locate tool using the code snippet
5538    for ac_prog in cp
5539do
5540  # Extract the first word of "$ac_prog", so it can be a program name with args.
5541set dummy $ac_prog; ac_word=$2
5542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5543$as_echo_n "checking for $ac_word... " >&6; }
5544if ${ac_cv_path_CP+:} false; then :
5545  $as_echo_n "(cached) " >&6
5546else
5547  case $CP in
5548  [\\/]* | ?:[\\/]*)
5549  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5550  ;;
5551  *)
5552  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5553for as_dir in $PATH
5554do
5555  IFS=$as_save_IFS
5556  test -z "$as_dir" && as_dir=.
5557    for ac_exec_ext in '' $ac_executable_extensions; do
5558  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5559    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5560    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5561    break 2
5562  fi
5563done
5564  done
5565IFS=$as_save_IFS
5566
5567  ;;
5568esac
5569fi
5570CP=$ac_cv_path_CP
5571if test -n "$CP"; then
5572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5573$as_echo "$CP" >&6; }
5574else
5575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5576$as_echo "no" >&6; }
5577fi
5578
5579
5580  test -n "$CP" && break
5581done
5582
5583  else
5584    # The variable is set, but is it from the command line or the environment?
5585
5586    # Try to remove the string !CP! from our list.
5587    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5588    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5589      # If it failed, the variable was not from the command line. Ignore it,
5590      # but warn the user (except for BASH, which is always set by the calling BASH).
5591      if test "xCP" != xBASH; then
5592        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5593$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5594      fi
5595      # Try to locate tool using the code snippet
5596      for ac_prog in cp
5597do
5598  # Extract the first word of "$ac_prog", so it can be a program name with args.
5599set dummy $ac_prog; ac_word=$2
5600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5601$as_echo_n "checking for $ac_word... " >&6; }
5602if ${ac_cv_path_CP+:} false; then :
5603  $as_echo_n "(cached) " >&6
5604else
5605  case $CP in
5606  [\\/]* | ?:[\\/]*)
5607  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5608  ;;
5609  *)
5610  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5611for as_dir in $PATH
5612do
5613  IFS=$as_save_IFS
5614  test -z "$as_dir" && as_dir=.
5615    for ac_exec_ext in '' $ac_executable_extensions; do
5616  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5617    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5619    break 2
5620  fi
5621done
5622  done
5623IFS=$as_save_IFS
5624
5625  ;;
5626esac
5627fi
5628CP=$ac_cv_path_CP
5629if test -n "$CP"; then
5630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5631$as_echo "$CP" >&6; }
5632else
5633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5634$as_echo "no" >&6; }
5635fi
5636
5637
5638  test -n "$CP" && break
5639done
5640
5641    else
5642      # If it succeeded, then it was overridden by the user. We will use it
5643      # for the tool.
5644
5645      # First remove it from the list of overridden variables, so we can test
5646      # for unknown variables in the end.
5647      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5648
5649      # Check if the provided tool contains a complete path.
5650      tool_specified="$CP"
5651      tool_basename="${tool_specified##*/}"
5652      if test "x$tool_basename" = "x$tool_specified"; then
5653        # A command without a complete path is provided, search $PATH.
5654        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5655$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5656        # Extract the first word of "$tool_basename", so it can be a program name with args.
5657set dummy $tool_basename; ac_word=$2
5658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5659$as_echo_n "checking for $ac_word... " >&6; }
5660if ${ac_cv_path_CP+:} false; then :
5661  $as_echo_n "(cached) " >&6
5662else
5663  case $CP in
5664  [\\/]* | ?:[\\/]*)
5665  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5666  ;;
5667  *)
5668  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5669for as_dir in $PATH
5670do
5671  IFS=$as_save_IFS
5672  test -z "$as_dir" && as_dir=.
5673    for ac_exec_ext in '' $ac_executable_extensions; do
5674  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5675    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5676    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5677    break 2
5678  fi
5679done
5680  done
5681IFS=$as_save_IFS
5682
5683  ;;
5684esac
5685fi
5686CP=$ac_cv_path_CP
5687if test -n "$CP"; then
5688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5689$as_echo "$CP" >&6; }
5690else
5691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5692$as_echo "no" >&6; }
5693fi
5694
5695
5696        if test "x$CP" = x; then
5697          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5698        fi
5699      else
5700        # Otherwise we believe it is a complete path. Use it as it is.
5701        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5702$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5703        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5704$as_echo_n "checking for CP... " >&6; }
5705        if test ! -x "$tool_specified"; then
5706          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5707$as_echo "not found" >&6; }
5708          as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5709        fi
5710        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5711$as_echo "$tool_specified" >&6; }
5712      fi
5713    fi
5714  fi
5715
5716
5717
5718  if test "x$CP" = x; then
5719    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5720  fi
5721
5722
5723
5724
5725
5726  # Publish this variable in the help.
5727
5728
5729  if test "x$CUT" = x; then
5730    # The variable is not set by user, try to locate tool using the code snippet
5731    for ac_prog in cut
5732do
5733  # Extract the first word of "$ac_prog", so it can be a program name with args.
5734set dummy $ac_prog; ac_word=$2
5735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5736$as_echo_n "checking for $ac_word... " >&6; }
5737if ${ac_cv_path_CUT+:} false; then :
5738  $as_echo_n "(cached) " >&6
5739else
5740  case $CUT in
5741  [\\/]* | ?:[\\/]*)
5742  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5743  ;;
5744  *)
5745  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5746for as_dir in $PATH
5747do
5748  IFS=$as_save_IFS
5749  test -z "$as_dir" && as_dir=.
5750    for ac_exec_ext in '' $ac_executable_extensions; do
5751  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5752    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5753    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5754    break 2
5755  fi
5756done
5757  done
5758IFS=$as_save_IFS
5759
5760  ;;
5761esac
5762fi
5763CUT=$ac_cv_path_CUT
5764if test -n "$CUT"; then
5765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5766$as_echo "$CUT" >&6; }
5767else
5768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5769$as_echo "no" >&6; }
5770fi
5771
5772
5773  test -n "$CUT" && break
5774done
5775
5776  else
5777    # The variable is set, but is it from the command line or the environment?
5778
5779    # Try to remove the string !CUT! from our list.
5780    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5781    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5782      # If it failed, the variable was not from the command line. Ignore it,
5783      # but warn the user (except for BASH, which is always set by the calling BASH).
5784      if test "xCUT" != xBASH; then
5785        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5786$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5787      fi
5788      # Try to locate tool using the code snippet
5789      for ac_prog in cut
5790do
5791  # Extract the first word of "$ac_prog", so it can be a program name with args.
5792set dummy $ac_prog; ac_word=$2
5793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5794$as_echo_n "checking for $ac_word... " >&6; }
5795if ${ac_cv_path_CUT+:} false; then :
5796  $as_echo_n "(cached) " >&6
5797else
5798  case $CUT in
5799  [\\/]* | ?:[\\/]*)
5800  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5801  ;;
5802  *)
5803  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5804for as_dir in $PATH
5805do
5806  IFS=$as_save_IFS
5807  test -z "$as_dir" && as_dir=.
5808    for ac_exec_ext in '' $ac_executable_extensions; do
5809  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5810    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5811    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5812    break 2
5813  fi
5814done
5815  done
5816IFS=$as_save_IFS
5817
5818  ;;
5819esac
5820fi
5821CUT=$ac_cv_path_CUT
5822if test -n "$CUT"; then
5823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5824$as_echo "$CUT" >&6; }
5825else
5826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5827$as_echo "no" >&6; }
5828fi
5829
5830
5831  test -n "$CUT" && break
5832done
5833
5834    else
5835      # If it succeeded, then it was overridden by the user. We will use it
5836      # for the tool.
5837
5838      # First remove it from the list of overridden variables, so we can test
5839      # for unknown variables in the end.
5840      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5841
5842      # Check if the provided tool contains a complete path.
5843      tool_specified="$CUT"
5844      tool_basename="${tool_specified##*/}"
5845      if test "x$tool_basename" = "x$tool_specified"; then
5846        # A command without a complete path is provided, search $PATH.
5847        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5848$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5849        # Extract the first word of "$tool_basename", so it can be a program name with args.
5850set dummy $tool_basename; ac_word=$2
5851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5852$as_echo_n "checking for $ac_word... " >&6; }
5853if ${ac_cv_path_CUT+:} false; then :
5854  $as_echo_n "(cached) " >&6
5855else
5856  case $CUT in
5857  [\\/]* | ?:[\\/]*)
5858  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5859  ;;
5860  *)
5861  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5862for as_dir in $PATH
5863do
5864  IFS=$as_save_IFS
5865  test -z "$as_dir" && as_dir=.
5866    for ac_exec_ext in '' $ac_executable_extensions; do
5867  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5868    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5869    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5870    break 2
5871  fi
5872done
5873  done
5874IFS=$as_save_IFS
5875
5876  ;;
5877esac
5878fi
5879CUT=$ac_cv_path_CUT
5880if test -n "$CUT"; then
5881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5882$as_echo "$CUT" >&6; }
5883else
5884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5885$as_echo "no" >&6; }
5886fi
5887
5888
5889        if test "x$CUT" = x; then
5890          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5891        fi
5892      else
5893        # Otherwise we believe it is a complete path. Use it as it is.
5894        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
5895$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
5896        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
5897$as_echo_n "checking for CUT... " >&6; }
5898        if test ! -x "$tool_specified"; then
5899          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5900$as_echo "not found" >&6; }
5901          as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
5902        fi
5903        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5904$as_echo "$tool_specified" >&6; }
5905      fi
5906    fi
5907  fi
5908
5909
5910
5911  if test "x$CUT" = x; then
5912    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
5913  fi
5914
5915
5916
5917
5918
5919  # Publish this variable in the help.
5920
5921
5922  if test "x$DATE" = x; then
5923    # The variable is not set by user, try to locate tool using the code snippet
5924    for ac_prog in date
5925do
5926  # Extract the first word of "$ac_prog", so it can be a program name with args.
5927set dummy $ac_prog; ac_word=$2
5928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5929$as_echo_n "checking for $ac_word... " >&6; }
5930if ${ac_cv_path_DATE+:} false; then :
5931  $as_echo_n "(cached) " >&6
5932else
5933  case $DATE in
5934  [\\/]* | ?:[\\/]*)
5935  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
5936  ;;
5937  *)
5938  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5939for as_dir in $PATH
5940do
5941  IFS=$as_save_IFS
5942  test -z "$as_dir" && as_dir=.
5943    for ac_exec_ext in '' $ac_executable_extensions; do
5944  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5945    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
5946    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5947    break 2
5948  fi
5949done
5950  done
5951IFS=$as_save_IFS
5952
5953  ;;
5954esac
5955fi
5956DATE=$ac_cv_path_DATE
5957if test -n "$DATE"; then
5958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
5959$as_echo "$DATE" >&6; }
5960else
5961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5962$as_echo "no" >&6; }
5963fi
5964
5965
5966  test -n "$DATE" && break
5967done
5968
5969  else
5970    # The variable is set, but is it from the command line or the environment?
5971
5972    # Try to remove the string !DATE! from our list.
5973    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
5974    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5975      # If it failed, the variable was not from the command line. Ignore it,
5976      # but warn the user (except for BASH, which is always set by the calling BASH).
5977      if test "xDATE" != xBASH; then
5978        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
5979$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
5980      fi
5981      # Try to locate tool using the code snippet
5982      for ac_prog in date
5983do
5984  # Extract the first word of "$ac_prog", so it can be a program name with args.
5985set dummy $ac_prog; ac_word=$2
5986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5987$as_echo_n "checking for $ac_word... " >&6; }
5988if ${ac_cv_path_DATE+:} false; then :
5989  $as_echo_n "(cached) " >&6
5990else
5991  case $DATE in
5992  [\\/]* | ?:[\\/]*)
5993  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
5994  ;;
5995  *)
5996  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5997for as_dir in $PATH
5998do
5999  IFS=$as_save_IFS
6000  test -z "$as_dir" && as_dir=.
6001    for ac_exec_ext in '' $ac_executable_extensions; do
6002  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6003    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6004    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6005    break 2
6006  fi
6007done
6008  done
6009IFS=$as_save_IFS
6010
6011  ;;
6012esac
6013fi
6014DATE=$ac_cv_path_DATE
6015if test -n "$DATE"; then
6016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6017$as_echo "$DATE" >&6; }
6018else
6019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6020$as_echo "no" >&6; }
6021fi
6022
6023
6024  test -n "$DATE" && break
6025done
6026
6027    else
6028      # If it succeeded, then it was overridden by the user. We will use it
6029      # for the tool.
6030
6031      # First remove it from the list of overridden variables, so we can test
6032      # for unknown variables in the end.
6033      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6034
6035      # Check if the provided tool contains a complete path.
6036      tool_specified="$DATE"
6037      tool_basename="${tool_specified##*/}"
6038      if test "x$tool_basename" = "x$tool_specified"; then
6039        # A command without a complete path is provided, search $PATH.
6040        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6041$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6042        # Extract the first word of "$tool_basename", so it can be a program name with args.
6043set dummy $tool_basename; ac_word=$2
6044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6045$as_echo_n "checking for $ac_word... " >&6; }
6046if ${ac_cv_path_DATE+:} false; then :
6047  $as_echo_n "(cached) " >&6
6048else
6049  case $DATE in
6050  [\\/]* | ?:[\\/]*)
6051  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6052  ;;
6053  *)
6054  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6055for as_dir in $PATH
6056do
6057  IFS=$as_save_IFS
6058  test -z "$as_dir" && as_dir=.
6059    for ac_exec_ext in '' $ac_executable_extensions; do
6060  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6061    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6063    break 2
6064  fi
6065done
6066  done
6067IFS=$as_save_IFS
6068
6069  ;;
6070esac
6071fi
6072DATE=$ac_cv_path_DATE
6073if test -n "$DATE"; then
6074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6075$as_echo "$DATE" >&6; }
6076else
6077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6078$as_echo "no" >&6; }
6079fi
6080
6081
6082        if test "x$DATE" = x; then
6083          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6084        fi
6085      else
6086        # Otherwise we believe it is a complete path. Use it as it is.
6087        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6088$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6089        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6090$as_echo_n "checking for DATE... " >&6; }
6091        if test ! -x "$tool_specified"; then
6092          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6093$as_echo "not found" >&6; }
6094          as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6095        fi
6096        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6097$as_echo "$tool_specified" >&6; }
6098      fi
6099    fi
6100  fi
6101
6102
6103
6104  if test "x$DATE" = x; then
6105    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6106  fi
6107
6108
6109
6110
6111
6112  # Publish this variable in the help.
6113
6114
6115  if test "x$DIFF" = x; then
6116    # The variable is not set by user, try to locate tool using the code snippet
6117    for ac_prog in gdiff diff
6118do
6119  # Extract the first word of "$ac_prog", so it can be a program name with args.
6120set dummy $ac_prog; ac_word=$2
6121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6122$as_echo_n "checking for $ac_word... " >&6; }
6123if ${ac_cv_path_DIFF+:} false; then :
6124  $as_echo_n "(cached) " >&6
6125else
6126  case $DIFF in
6127  [\\/]* | ?:[\\/]*)
6128  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6129  ;;
6130  *)
6131  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6132for as_dir in $PATH
6133do
6134  IFS=$as_save_IFS
6135  test -z "$as_dir" && as_dir=.
6136    for ac_exec_ext in '' $ac_executable_extensions; do
6137  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6138    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6140    break 2
6141  fi
6142done
6143  done
6144IFS=$as_save_IFS
6145
6146  ;;
6147esac
6148fi
6149DIFF=$ac_cv_path_DIFF
6150if test -n "$DIFF"; then
6151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6152$as_echo "$DIFF" >&6; }
6153else
6154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6155$as_echo "no" >&6; }
6156fi
6157
6158
6159  test -n "$DIFF" && break
6160done
6161
6162  else
6163    # The variable is set, but is it from the command line or the environment?
6164
6165    # Try to remove the string !DIFF! from our list.
6166    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6167    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6168      # If it failed, the variable was not from the command line. Ignore it,
6169      # but warn the user (except for BASH, which is always set by the calling BASH).
6170      if test "xDIFF" != xBASH; then
6171        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6172$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6173      fi
6174      # Try to locate tool using the code snippet
6175      for ac_prog in gdiff diff
6176do
6177  # Extract the first word of "$ac_prog", so it can be a program name with args.
6178set dummy $ac_prog; ac_word=$2
6179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6180$as_echo_n "checking for $ac_word... " >&6; }
6181if ${ac_cv_path_DIFF+:} false; then :
6182  $as_echo_n "(cached) " >&6
6183else
6184  case $DIFF in
6185  [\\/]* | ?:[\\/]*)
6186  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6187  ;;
6188  *)
6189  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6190for as_dir in $PATH
6191do
6192  IFS=$as_save_IFS
6193  test -z "$as_dir" && as_dir=.
6194    for ac_exec_ext in '' $ac_executable_extensions; do
6195  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6196    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6197    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6198    break 2
6199  fi
6200done
6201  done
6202IFS=$as_save_IFS
6203
6204  ;;
6205esac
6206fi
6207DIFF=$ac_cv_path_DIFF
6208if test -n "$DIFF"; then
6209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6210$as_echo "$DIFF" >&6; }
6211else
6212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6213$as_echo "no" >&6; }
6214fi
6215
6216
6217  test -n "$DIFF" && break
6218done
6219
6220    else
6221      # If it succeeded, then it was overridden by the user. We will use it
6222      # for the tool.
6223
6224      # First remove it from the list of overridden variables, so we can test
6225      # for unknown variables in the end.
6226      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6227
6228      # Check if the provided tool contains a complete path.
6229      tool_specified="$DIFF"
6230      tool_basename="${tool_specified##*/}"
6231      if test "x$tool_basename" = "x$tool_specified"; then
6232        # A command without a complete path is provided, search $PATH.
6233        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6234$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6235        # Extract the first word of "$tool_basename", so it can be a program name with args.
6236set dummy $tool_basename; ac_word=$2
6237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6238$as_echo_n "checking for $ac_word... " >&6; }
6239if ${ac_cv_path_DIFF+:} false; then :
6240  $as_echo_n "(cached) " >&6
6241else
6242  case $DIFF in
6243  [\\/]* | ?:[\\/]*)
6244  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6245  ;;
6246  *)
6247  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6248for as_dir in $PATH
6249do
6250  IFS=$as_save_IFS
6251  test -z "$as_dir" && as_dir=.
6252    for ac_exec_ext in '' $ac_executable_extensions; do
6253  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6254    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6255    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6256    break 2
6257  fi
6258done
6259  done
6260IFS=$as_save_IFS
6261
6262  ;;
6263esac
6264fi
6265DIFF=$ac_cv_path_DIFF
6266if test -n "$DIFF"; then
6267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6268$as_echo "$DIFF" >&6; }
6269else
6270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6271$as_echo "no" >&6; }
6272fi
6273
6274
6275        if test "x$DIFF" = x; then
6276          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6277        fi
6278      else
6279        # Otherwise we believe it is a complete path. Use it as it is.
6280        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6281$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6282        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6283$as_echo_n "checking for DIFF... " >&6; }
6284        if test ! -x "$tool_specified"; then
6285          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6286$as_echo "not found" >&6; }
6287          as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6288        fi
6289        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6290$as_echo "$tool_specified" >&6; }
6291      fi
6292    fi
6293  fi
6294
6295
6296
6297  if test "x$DIFF" = x; then
6298    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6299  fi
6300
6301
6302
6303
6304
6305  # Publish this variable in the help.
6306
6307
6308  if test "x$DIRNAME" = x; then
6309    # The variable is not set by user, try to locate tool using the code snippet
6310    for ac_prog in dirname
6311do
6312  # Extract the first word of "$ac_prog", so it can be a program name with args.
6313set dummy $ac_prog; ac_word=$2
6314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6315$as_echo_n "checking for $ac_word... " >&6; }
6316if ${ac_cv_path_DIRNAME+:} false; then :
6317  $as_echo_n "(cached) " >&6
6318else
6319  case $DIRNAME in
6320  [\\/]* | ?:[\\/]*)
6321  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6322  ;;
6323  *)
6324  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6325for as_dir in $PATH
6326do
6327  IFS=$as_save_IFS
6328  test -z "$as_dir" && as_dir=.
6329    for ac_exec_ext in '' $ac_executable_extensions; do
6330  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6331    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6332    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6333    break 2
6334  fi
6335done
6336  done
6337IFS=$as_save_IFS
6338
6339  ;;
6340esac
6341fi
6342DIRNAME=$ac_cv_path_DIRNAME
6343if test -n "$DIRNAME"; then
6344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6345$as_echo "$DIRNAME" >&6; }
6346else
6347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6348$as_echo "no" >&6; }
6349fi
6350
6351
6352  test -n "$DIRNAME" && break
6353done
6354
6355  else
6356    # The variable is set, but is it from the command line or the environment?
6357
6358    # Try to remove the string !DIRNAME! from our list.
6359    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6360    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6361      # If it failed, the variable was not from the command line. Ignore it,
6362      # but warn the user (except for BASH, which is always set by the calling BASH).
6363      if test "xDIRNAME" != xBASH; then
6364        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6365$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6366      fi
6367      # Try to locate tool using the code snippet
6368      for ac_prog in dirname
6369do
6370  # Extract the first word of "$ac_prog", so it can be a program name with args.
6371set dummy $ac_prog; ac_word=$2
6372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6373$as_echo_n "checking for $ac_word... " >&6; }
6374if ${ac_cv_path_DIRNAME+:} false; then :
6375  $as_echo_n "(cached) " >&6
6376else
6377  case $DIRNAME in
6378  [\\/]* | ?:[\\/]*)
6379  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6380  ;;
6381  *)
6382  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6383for as_dir in $PATH
6384do
6385  IFS=$as_save_IFS
6386  test -z "$as_dir" && as_dir=.
6387    for ac_exec_ext in '' $ac_executable_extensions; do
6388  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6389    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6390    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6391    break 2
6392  fi
6393done
6394  done
6395IFS=$as_save_IFS
6396
6397  ;;
6398esac
6399fi
6400DIRNAME=$ac_cv_path_DIRNAME
6401if test -n "$DIRNAME"; then
6402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6403$as_echo "$DIRNAME" >&6; }
6404else
6405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6406$as_echo "no" >&6; }
6407fi
6408
6409
6410  test -n "$DIRNAME" && break
6411done
6412
6413    else
6414      # If it succeeded, then it was overridden by the user. We will use it
6415      # for the tool.
6416
6417      # First remove it from the list of overridden variables, so we can test
6418      # for unknown variables in the end.
6419      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6420
6421      # Check if the provided tool contains a complete path.
6422      tool_specified="$DIRNAME"
6423      tool_basename="${tool_specified##*/}"
6424      if test "x$tool_basename" = "x$tool_specified"; then
6425        # A command without a complete path is provided, search $PATH.
6426        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6427$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6428        # Extract the first word of "$tool_basename", so it can be a program name with args.
6429set dummy $tool_basename; ac_word=$2
6430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6431$as_echo_n "checking for $ac_word... " >&6; }
6432if ${ac_cv_path_DIRNAME+:} false; then :
6433  $as_echo_n "(cached) " >&6
6434else
6435  case $DIRNAME in
6436  [\\/]* | ?:[\\/]*)
6437  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6438  ;;
6439  *)
6440  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6441for as_dir in $PATH
6442do
6443  IFS=$as_save_IFS
6444  test -z "$as_dir" && as_dir=.
6445    for ac_exec_ext in '' $ac_executable_extensions; do
6446  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6447    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6448    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6449    break 2
6450  fi
6451done
6452  done
6453IFS=$as_save_IFS
6454
6455  ;;
6456esac
6457fi
6458DIRNAME=$ac_cv_path_DIRNAME
6459if test -n "$DIRNAME"; then
6460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6461$as_echo "$DIRNAME" >&6; }
6462else
6463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6464$as_echo "no" >&6; }
6465fi
6466
6467
6468        if test "x$DIRNAME" = x; then
6469          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6470        fi
6471      else
6472        # Otherwise we believe it is a complete path. Use it as it is.
6473        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6474$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6475        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6476$as_echo_n "checking for DIRNAME... " >&6; }
6477        if test ! -x "$tool_specified"; then
6478          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6479$as_echo "not found" >&6; }
6480          as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6481        fi
6482        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6483$as_echo "$tool_specified" >&6; }
6484      fi
6485    fi
6486  fi
6487
6488
6489
6490  if test "x$DIRNAME" = x; then
6491    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6492  fi
6493
6494
6495
6496
6497
6498  # Publish this variable in the help.
6499
6500
6501  if test "x$ECHO" = x; then
6502    # The variable is not set by user, try to locate tool using the code snippet
6503    for ac_prog in echo
6504do
6505  # Extract the first word of "$ac_prog", so it can be a program name with args.
6506set dummy $ac_prog; ac_word=$2
6507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6508$as_echo_n "checking for $ac_word... " >&6; }
6509if ${ac_cv_path_ECHO+:} false; then :
6510  $as_echo_n "(cached) " >&6
6511else
6512  case $ECHO in
6513  [\\/]* | ?:[\\/]*)
6514  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6515  ;;
6516  *)
6517  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6518for as_dir in $PATH
6519do
6520  IFS=$as_save_IFS
6521  test -z "$as_dir" && as_dir=.
6522    for ac_exec_ext in '' $ac_executable_extensions; do
6523  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6524    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6525    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6526    break 2
6527  fi
6528done
6529  done
6530IFS=$as_save_IFS
6531
6532  ;;
6533esac
6534fi
6535ECHO=$ac_cv_path_ECHO
6536if test -n "$ECHO"; then
6537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6538$as_echo "$ECHO" >&6; }
6539else
6540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6541$as_echo "no" >&6; }
6542fi
6543
6544
6545  test -n "$ECHO" && break
6546done
6547
6548  else
6549    # The variable is set, but is it from the command line or the environment?
6550
6551    # Try to remove the string !ECHO! from our list.
6552    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6553    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6554      # If it failed, the variable was not from the command line. Ignore it,
6555      # but warn the user (except for BASH, which is always set by the calling BASH).
6556      if test "xECHO" != xBASH; then
6557        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6558$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6559      fi
6560      # Try to locate tool using the code snippet
6561      for ac_prog in echo
6562do
6563  # Extract the first word of "$ac_prog", so it can be a program name with args.
6564set dummy $ac_prog; ac_word=$2
6565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6566$as_echo_n "checking for $ac_word... " >&6; }
6567if ${ac_cv_path_ECHO+:} false; then :
6568  $as_echo_n "(cached) " >&6
6569else
6570  case $ECHO in
6571  [\\/]* | ?:[\\/]*)
6572  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6573  ;;
6574  *)
6575  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6576for as_dir in $PATH
6577do
6578  IFS=$as_save_IFS
6579  test -z "$as_dir" && as_dir=.
6580    for ac_exec_ext in '' $ac_executable_extensions; do
6581  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6582    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6583    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6584    break 2
6585  fi
6586done
6587  done
6588IFS=$as_save_IFS
6589
6590  ;;
6591esac
6592fi
6593ECHO=$ac_cv_path_ECHO
6594if test -n "$ECHO"; then
6595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6596$as_echo "$ECHO" >&6; }
6597else
6598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6599$as_echo "no" >&6; }
6600fi
6601
6602
6603  test -n "$ECHO" && break
6604done
6605
6606    else
6607      # If it succeeded, then it was overridden by the user. We will use it
6608      # for the tool.
6609
6610      # First remove it from the list of overridden variables, so we can test
6611      # for unknown variables in the end.
6612      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6613
6614      # Check if the provided tool contains a complete path.
6615      tool_specified="$ECHO"
6616      tool_basename="${tool_specified##*/}"
6617      if test "x$tool_basename" = "x$tool_specified"; then
6618        # A command without a complete path is provided, search $PATH.
6619        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6620$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6621        # Extract the first word of "$tool_basename", so it can be a program name with args.
6622set dummy $tool_basename; ac_word=$2
6623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6624$as_echo_n "checking for $ac_word... " >&6; }
6625if ${ac_cv_path_ECHO+:} false; then :
6626  $as_echo_n "(cached) " >&6
6627else
6628  case $ECHO in
6629  [\\/]* | ?:[\\/]*)
6630  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6631  ;;
6632  *)
6633  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6634for as_dir in $PATH
6635do
6636  IFS=$as_save_IFS
6637  test -z "$as_dir" && as_dir=.
6638    for ac_exec_ext in '' $ac_executable_extensions; do
6639  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6640    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6642    break 2
6643  fi
6644done
6645  done
6646IFS=$as_save_IFS
6647
6648  ;;
6649esac
6650fi
6651ECHO=$ac_cv_path_ECHO
6652if test -n "$ECHO"; then
6653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6654$as_echo "$ECHO" >&6; }
6655else
6656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6657$as_echo "no" >&6; }
6658fi
6659
6660
6661        if test "x$ECHO" = x; then
6662          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6663        fi
6664      else
6665        # Otherwise we believe it is a complete path. Use it as it is.
6666        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6667$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6668        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6669$as_echo_n "checking for ECHO... " >&6; }
6670        if test ! -x "$tool_specified"; then
6671          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6672$as_echo "not found" >&6; }
6673          as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6674        fi
6675        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6676$as_echo "$tool_specified" >&6; }
6677      fi
6678    fi
6679  fi
6680
6681
6682
6683  if test "x$ECHO" = x; then
6684    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6685  fi
6686
6687
6688
6689
6690
6691  # Publish this variable in the help.
6692
6693
6694  if test "x$EXPR" = x; then
6695    # The variable is not set by user, try to locate tool using the code snippet
6696    for ac_prog in expr
6697do
6698  # Extract the first word of "$ac_prog", so it can be a program name with args.
6699set dummy $ac_prog; ac_word=$2
6700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6701$as_echo_n "checking for $ac_word... " >&6; }
6702if ${ac_cv_path_EXPR+:} false; then :
6703  $as_echo_n "(cached) " >&6
6704else
6705  case $EXPR in
6706  [\\/]* | ?:[\\/]*)
6707  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6708  ;;
6709  *)
6710  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6711for as_dir in $PATH
6712do
6713  IFS=$as_save_IFS
6714  test -z "$as_dir" && as_dir=.
6715    for ac_exec_ext in '' $ac_executable_extensions; do
6716  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6717    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6718    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6719    break 2
6720  fi
6721done
6722  done
6723IFS=$as_save_IFS
6724
6725  ;;
6726esac
6727fi
6728EXPR=$ac_cv_path_EXPR
6729if test -n "$EXPR"; then
6730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6731$as_echo "$EXPR" >&6; }
6732else
6733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6734$as_echo "no" >&6; }
6735fi
6736
6737
6738  test -n "$EXPR" && break
6739done
6740
6741  else
6742    # The variable is set, but is it from the command line or the environment?
6743
6744    # Try to remove the string !EXPR! from our list.
6745    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6746    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6747      # If it failed, the variable was not from the command line. Ignore it,
6748      # but warn the user (except for BASH, which is always set by the calling BASH).
6749      if test "xEXPR" != xBASH; then
6750        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6751$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6752      fi
6753      # Try to locate tool using the code snippet
6754      for ac_prog in expr
6755do
6756  # Extract the first word of "$ac_prog", so it can be a program name with args.
6757set dummy $ac_prog; ac_word=$2
6758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6759$as_echo_n "checking for $ac_word... " >&6; }
6760if ${ac_cv_path_EXPR+:} false; then :
6761  $as_echo_n "(cached) " >&6
6762else
6763  case $EXPR in
6764  [\\/]* | ?:[\\/]*)
6765  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6766  ;;
6767  *)
6768  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6769for as_dir in $PATH
6770do
6771  IFS=$as_save_IFS
6772  test -z "$as_dir" && as_dir=.
6773    for ac_exec_ext in '' $ac_executable_extensions; do
6774  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6775    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6776    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6777    break 2
6778  fi
6779done
6780  done
6781IFS=$as_save_IFS
6782
6783  ;;
6784esac
6785fi
6786EXPR=$ac_cv_path_EXPR
6787if test -n "$EXPR"; then
6788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6789$as_echo "$EXPR" >&6; }
6790else
6791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6792$as_echo "no" >&6; }
6793fi
6794
6795
6796  test -n "$EXPR" && break
6797done
6798
6799    else
6800      # If it succeeded, then it was overridden by the user. We will use it
6801      # for the tool.
6802
6803      # First remove it from the list of overridden variables, so we can test
6804      # for unknown variables in the end.
6805      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6806
6807      # Check if the provided tool contains a complete path.
6808      tool_specified="$EXPR"
6809      tool_basename="${tool_specified##*/}"
6810      if test "x$tool_basename" = "x$tool_specified"; then
6811        # A command without a complete path is provided, search $PATH.
6812        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6813$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6814        # Extract the first word of "$tool_basename", so it can be a program name with args.
6815set dummy $tool_basename; ac_word=$2
6816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6817$as_echo_n "checking for $ac_word... " >&6; }
6818if ${ac_cv_path_EXPR+:} false; then :
6819  $as_echo_n "(cached) " >&6
6820else
6821  case $EXPR in
6822  [\\/]* | ?:[\\/]*)
6823  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6824  ;;
6825  *)
6826  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6827for as_dir in $PATH
6828do
6829  IFS=$as_save_IFS
6830  test -z "$as_dir" && as_dir=.
6831    for ac_exec_ext in '' $ac_executable_extensions; do
6832  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6833    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6835    break 2
6836  fi
6837done
6838  done
6839IFS=$as_save_IFS
6840
6841  ;;
6842esac
6843fi
6844EXPR=$ac_cv_path_EXPR
6845if test -n "$EXPR"; then
6846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6847$as_echo "$EXPR" >&6; }
6848else
6849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6850$as_echo "no" >&6; }
6851fi
6852
6853
6854        if test "x$EXPR" = x; then
6855          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6856        fi
6857      else
6858        # Otherwise we believe it is a complete path. Use it as it is.
6859        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6860$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6861        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6862$as_echo_n "checking for EXPR... " >&6; }
6863        if test ! -x "$tool_specified"; then
6864          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6865$as_echo "not found" >&6; }
6866          as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6867        fi
6868        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6869$as_echo "$tool_specified" >&6; }
6870      fi
6871    fi
6872  fi
6873
6874
6875
6876  if test "x$EXPR" = x; then
6877    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6878  fi
6879
6880
6881
6882
6883
6884  # Publish this variable in the help.
6885
6886
6887  if test "x$FILE" = x; then
6888    # The variable is not set by user, try to locate tool using the code snippet
6889    for ac_prog in file
6890do
6891  # Extract the first word of "$ac_prog", so it can be a program name with args.
6892set dummy $ac_prog; ac_word=$2
6893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6894$as_echo_n "checking for $ac_word... " >&6; }
6895if ${ac_cv_path_FILE+:} false; then :
6896  $as_echo_n "(cached) " >&6
6897else
6898  case $FILE in
6899  [\\/]* | ?:[\\/]*)
6900  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6901  ;;
6902  *)
6903  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6904for as_dir in $PATH
6905do
6906  IFS=$as_save_IFS
6907  test -z "$as_dir" && as_dir=.
6908    for ac_exec_ext in '' $ac_executable_extensions; do
6909  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6910    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6911    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6912    break 2
6913  fi
6914done
6915  done
6916IFS=$as_save_IFS
6917
6918  ;;
6919esac
6920fi
6921FILE=$ac_cv_path_FILE
6922if test -n "$FILE"; then
6923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6924$as_echo "$FILE" >&6; }
6925else
6926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6927$as_echo "no" >&6; }
6928fi
6929
6930
6931  test -n "$FILE" && break
6932done
6933
6934  else
6935    # The variable is set, but is it from the command line or the environment?
6936
6937    # Try to remove the string !FILE! from our list.
6938    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
6939    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6940      # If it failed, the variable was not from the command line. Ignore it,
6941      # but warn the user (except for BASH, which is always set by the calling BASH).
6942      if test "xFILE" != xBASH; then
6943        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
6944$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
6945      fi
6946      # Try to locate tool using the code snippet
6947      for ac_prog in file
6948do
6949  # Extract the first word of "$ac_prog", so it can be a program name with args.
6950set dummy $ac_prog; ac_word=$2
6951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6952$as_echo_n "checking for $ac_word... " >&6; }
6953if ${ac_cv_path_FILE+:} false; then :
6954  $as_echo_n "(cached) " >&6
6955else
6956  case $FILE in
6957  [\\/]* | ?:[\\/]*)
6958  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6959  ;;
6960  *)
6961  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6962for as_dir in $PATH
6963do
6964  IFS=$as_save_IFS
6965  test -z "$as_dir" && as_dir=.
6966    for ac_exec_ext in '' $ac_executable_extensions; do
6967  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6968    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6969    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6970    break 2
6971  fi
6972done
6973  done
6974IFS=$as_save_IFS
6975
6976  ;;
6977esac
6978fi
6979FILE=$ac_cv_path_FILE
6980if test -n "$FILE"; then
6981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6982$as_echo "$FILE" >&6; }
6983else
6984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6985$as_echo "no" >&6; }
6986fi
6987
6988
6989  test -n "$FILE" && break
6990done
6991
6992    else
6993      # If it succeeded, then it was overridden by the user. We will use it
6994      # for the tool.
6995
6996      # First remove it from the list of overridden variables, so we can test
6997      # for unknown variables in the end.
6998      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6999
7000      # Check if the provided tool contains a complete path.
7001      tool_specified="$FILE"
7002      tool_basename="${tool_specified##*/}"
7003      if test "x$tool_basename" = "x$tool_specified"; then
7004        # A command without a complete path is provided, search $PATH.
7005        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7006$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7007        # Extract the first word of "$tool_basename", so it can be a program name with args.
7008set dummy $tool_basename; ac_word=$2
7009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7010$as_echo_n "checking for $ac_word... " >&6; }
7011if ${ac_cv_path_FILE+:} false; then :
7012  $as_echo_n "(cached) " >&6
7013else
7014  case $FILE in
7015  [\\/]* | ?:[\\/]*)
7016  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7017  ;;
7018  *)
7019  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7020for as_dir in $PATH
7021do
7022  IFS=$as_save_IFS
7023  test -z "$as_dir" && as_dir=.
7024    for ac_exec_ext in '' $ac_executable_extensions; do
7025  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7026    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7027    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7028    break 2
7029  fi
7030done
7031  done
7032IFS=$as_save_IFS
7033
7034  ;;
7035esac
7036fi
7037FILE=$ac_cv_path_FILE
7038if test -n "$FILE"; then
7039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7040$as_echo "$FILE" >&6; }
7041else
7042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7043$as_echo "no" >&6; }
7044fi
7045
7046
7047        if test "x$FILE" = x; then
7048          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7049        fi
7050      else
7051        # Otherwise we believe it is a complete path. Use it as it is.
7052        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7053$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7054        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7055$as_echo_n "checking for FILE... " >&6; }
7056        if test ! -x "$tool_specified"; then
7057          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7058$as_echo "not found" >&6; }
7059          as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7060        fi
7061        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7062$as_echo "$tool_specified" >&6; }
7063      fi
7064    fi
7065  fi
7066
7067
7068
7069  if test "x$FILE" = x; then
7070    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7071  fi
7072
7073
7074
7075
7076
7077  # Publish this variable in the help.
7078
7079
7080  if test "x$FIND" = x; then
7081    # The variable is not set by user, try to locate tool using the code snippet
7082    for ac_prog in find
7083do
7084  # Extract the first word of "$ac_prog", so it can be a program name with args.
7085set dummy $ac_prog; ac_word=$2
7086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7087$as_echo_n "checking for $ac_word... " >&6; }
7088if ${ac_cv_path_FIND+:} false; then :
7089  $as_echo_n "(cached) " >&6
7090else
7091  case $FIND in
7092  [\\/]* | ?:[\\/]*)
7093  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7094  ;;
7095  *)
7096  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7097for as_dir in $PATH
7098do
7099  IFS=$as_save_IFS
7100  test -z "$as_dir" && as_dir=.
7101    for ac_exec_ext in '' $ac_executable_extensions; do
7102  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7103    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7104    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7105    break 2
7106  fi
7107done
7108  done
7109IFS=$as_save_IFS
7110
7111  ;;
7112esac
7113fi
7114FIND=$ac_cv_path_FIND
7115if test -n "$FIND"; then
7116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7117$as_echo "$FIND" >&6; }
7118else
7119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7120$as_echo "no" >&6; }
7121fi
7122
7123
7124  test -n "$FIND" && break
7125done
7126
7127  else
7128    # The variable is set, but is it from the command line or the environment?
7129
7130    # Try to remove the string !FIND! from our list.
7131    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7132    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7133      # If it failed, the variable was not from the command line. Ignore it,
7134      # but warn the user (except for BASH, which is always set by the calling BASH).
7135      if test "xFIND" != xBASH; then
7136        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7137$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7138      fi
7139      # Try to locate tool using the code snippet
7140      for ac_prog in find
7141do
7142  # Extract the first word of "$ac_prog", so it can be a program name with args.
7143set dummy $ac_prog; ac_word=$2
7144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7145$as_echo_n "checking for $ac_word... " >&6; }
7146if ${ac_cv_path_FIND+:} false; then :
7147  $as_echo_n "(cached) " >&6
7148else
7149  case $FIND in
7150  [\\/]* | ?:[\\/]*)
7151  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7152  ;;
7153  *)
7154  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7155for as_dir in $PATH
7156do
7157  IFS=$as_save_IFS
7158  test -z "$as_dir" && as_dir=.
7159    for ac_exec_ext in '' $ac_executable_extensions; do
7160  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7161    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7162    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7163    break 2
7164  fi
7165done
7166  done
7167IFS=$as_save_IFS
7168
7169  ;;
7170esac
7171fi
7172FIND=$ac_cv_path_FIND
7173if test -n "$FIND"; then
7174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7175$as_echo "$FIND" >&6; }
7176else
7177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7178$as_echo "no" >&6; }
7179fi
7180
7181
7182  test -n "$FIND" && break
7183done
7184
7185    else
7186      # If it succeeded, then it was overridden by the user. We will use it
7187      # for the tool.
7188
7189      # First remove it from the list of overridden variables, so we can test
7190      # for unknown variables in the end.
7191      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7192
7193      # Check if the provided tool contains a complete path.
7194      tool_specified="$FIND"
7195      tool_basename="${tool_specified##*/}"
7196      if test "x$tool_basename" = "x$tool_specified"; then
7197        # A command without a complete path is provided, search $PATH.
7198        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7199$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7200        # Extract the first word of "$tool_basename", so it can be a program name with args.
7201set dummy $tool_basename; ac_word=$2
7202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7203$as_echo_n "checking for $ac_word... " >&6; }
7204if ${ac_cv_path_FIND+:} false; then :
7205  $as_echo_n "(cached) " >&6
7206else
7207  case $FIND in
7208  [\\/]* | ?:[\\/]*)
7209  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7210  ;;
7211  *)
7212  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7213for as_dir in $PATH
7214do
7215  IFS=$as_save_IFS
7216  test -z "$as_dir" && as_dir=.
7217    for ac_exec_ext in '' $ac_executable_extensions; do
7218  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7219    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7220    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7221    break 2
7222  fi
7223done
7224  done
7225IFS=$as_save_IFS
7226
7227  ;;
7228esac
7229fi
7230FIND=$ac_cv_path_FIND
7231if test -n "$FIND"; then
7232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7233$as_echo "$FIND" >&6; }
7234else
7235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7236$as_echo "no" >&6; }
7237fi
7238
7239
7240        if test "x$FIND" = x; then
7241          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7242        fi
7243      else
7244        # Otherwise we believe it is a complete path. Use it as it is.
7245        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7246$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7247        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7248$as_echo_n "checking for FIND... " >&6; }
7249        if test ! -x "$tool_specified"; then
7250          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7251$as_echo "not found" >&6; }
7252          as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7253        fi
7254        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7255$as_echo "$tool_specified" >&6; }
7256      fi
7257    fi
7258  fi
7259
7260
7261
7262  if test "x$FIND" = x; then
7263    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7264  fi
7265
7266
7267
7268
7269
7270  # Publish this variable in the help.
7271
7272
7273  if test "x$HEAD" = x; then
7274    # The variable is not set by user, try to locate tool using the code snippet
7275    for ac_prog in head
7276do
7277  # Extract the first word of "$ac_prog", so it can be a program name with args.
7278set dummy $ac_prog; ac_word=$2
7279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7280$as_echo_n "checking for $ac_word... " >&6; }
7281if ${ac_cv_path_HEAD+:} false; then :
7282  $as_echo_n "(cached) " >&6
7283else
7284  case $HEAD in
7285  [\\/]* | ?:[\\/]*)
7286  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7287  ;;
7288  *)
7289  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7290for as_dir in $PATH
7291do
7292  IFS=$as_save_IFS
7293  test -z "$as_dir" && as_dir=.
7294    for ac_exec_ext in '' $ac_executable_extensions; do
7295  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7296    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7297    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7298    break 2
7299  fi
7300done
7301  done
7302IFS=$as_save_IFS
7303
7304  ;;
7305esac
7306fi
7307HEAD=$ac_cv_path_HEAD
7308if test -n "$HEAD"; then
7309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7310$as_echo "$HEAD" >&6; }
7311else
7312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7313$as_echo "no" >&6; }
7314fi
7315
7316
7317  test -n "$HEAD" && break
7318done
7319
7320  else
7321    # The variable is set, but is it from the command line or the environment?
7322
7323    # Try to remove the string !HEAD! from our list.
7324    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7325    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7326      # If it failed, the variable was not from the command line. Ignore it,
7327      # but warn the user (except for BASH, which is always set by the calling BASH).
7328      if test "xHEAD" != xBASH; then
7329        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7330$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7331      fi
7332      # Try to locate tool using the code snippet
7333      for ac_prog in head
7334do
7335  # Extract the first word of "$ac_prog", so it can be a program name with args.
7336set dummy $ac_prog; ac_word=$2
7337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7338$as_echo_n "checking for $ac_word... " >&6; }
7339if ${ac_cv_path_HEAD+:} false; then :
7340  $as_echo_n "(cached) " >&6
7341else
7342  case $HEAD in
7343  [\\/]* | ?:[\\/]*)
7344  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7345  ;;
7346  *)
7347  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7348for as_dir in $PATH
7349do
7350  IFS=$as_save_IFS
7351  test -z "$as_dir" && as_dir=.
7352    for ac_exec_ext in '' $ac_executable_extensions; do
7353  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7354    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7355    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7356    break 2
7357  fi
7358done
7359  done
7360IFS=$as_save_IFS
7361
7362  ;;
7363esac
7364fi
7365HEAD=$ac_cv_path_HEAD
7366if test -n "$HEAD"; then
7367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7368$as_echo "$HEAD" >&6; }
7369else
7370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7371$as_echo "no" >&6; }
7372fi
7373
7374
7375  test -n "$HEAD" && break
7376done
7377
7378    else
7379      # If it succeeded, then it was overridden by the user. We will use it
7380      # for the tool.
7381
7382      # First remove it from the list of overridden variables, so we can test
7383      # for unknown variables in the end.
7384      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7385
7386      # Check if the provided tool contains a complete path.
7387      tool_specified="$HEAD"
7388      tool_basename="${tool_specified##*/}"
7389      if test "x$tool_basename" = "x$tool_specified"; then
7390        # A command without a complete path is provided, search $PATH.
7391        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7392$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7393        # Extract the first word of "$tool_basename", so it can be a program name with args.
7394set dummy $tool_basename; ac_word=$2
7395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7396$as_echo_n "checking for $ac_word... " >&6; }
7397if ${ac_cv_path_HEAD+:} false; then :
7398  $as_echo_n "(cached) " >&6
7399else
7400  case $HEAD in
7401  [\\/]* | ?:[\\/]*)
7402  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7403  ;;
7404  *)
7405  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7406for as_dir in $PATH
7407do
7408  IFS=$as_save_IFS
7409  test -z "$as_dir" && as_dir=.
7410    for ac_exec_ext in '' $ac_executable_extensions; do
7411  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7412    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7413    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7414    break 2
7415  fi
7416done
7417  done
7418IFS=$as_save_IFS
7419
7420  ;;
7421esac
7422fi
7423HEAD=$ac_cv_path_HEAD
7424if test -n "$HEAD"; then
7425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7426$as_echo "$HEAD" >&6; }
7427else
7428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7429$as_echo "no" >&6; }
7430fi
7431
7432
7433        if test "x$HEAD" = x; then
7434          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7435        fi
7436      else
7437        # Otherwise we believe it is a complete path. Use it as it is.
7438        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7439$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7440        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7441$as_echo_n "checking for HEAD... " >&6; }
7442        if test ! -x "$tool_specified"; then
7443          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7444$as_echo "not found" >&6; }
7445          as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7446        fi
7447        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7448$as_echo "$tool_specified" >&6; }
7449      fi
7450    fi
7451  fi
7452
7453
7454
7455  if test "x$HEAD" = x; then
7456    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7457  fi
7458
7459
7460
7461
7462
7463  # Publish this variable in the help.
7464
7465
7466  if test "x$LN" = x; then
7467    # The variable is not set by user, try to locate tool using the code snippet
7468    for ac_prog in ln
7469do
7470  # Extract the first word of "$ac_prog", so it can be a program name with args.
7471set dummy $ac_prog; ac_word=$2
7472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7473$as_echo_n "checking for $ac_word... " >&6; }
7474if ${ac_cv_path_LN+:} false; then :
7475  $as_echo_n "(cached) " >&6
7476else
7477  case $LN in
7478  [\\/]* | ?:[\\/]*)
7479  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7480  ;;
7481  *)
7482  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7483for as_dir in $PATH
7484do
7485  IFS=$as_save_IFS
7486  test -z "$as_dir" && as_dir=.
7487    for ac_exec_ext in '' $ac_executable_extensions; do
7488  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7489    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7490    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7491    break 2
7492  fi
7493done
7494  done
7495IFS=$as_save_IFS
7496
7497  ;;
7498esac
7499fi
7500LN=$ac_cv_path_LN
7501if test -n "$LN"; then
7502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7503$as_echo "$LN" >&6; }
7504else
7505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7506$as_echo "no" >&6; }
7507fi
7508
7509
7510  test -n "$LN" && break
7511done
7512
7513  else
7514    # The variable is set, but is it from the command line or the environment?
7515
7516    # Try to remove the string !LN! from our list.
7517    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7518    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7519      # If it failed, the variable was not from the command line. Ignore it,
7520      # but warn the user (except for BASH, which is always set by the calling BASH).
7521      if test "xLN" != xBASH; then
7522        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7523$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7524      fi
7525      # Try to locate tool using the code snippet
7526      for ac_prog in ln
7527do
7528  # Extract the first word of "$ac_prog", so it can be a program name with args.
7529set dummy $ac_prog; ac_word=$2
7530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7531$as_echo_n "checking for $ac_word... " >&6; }
7532if ${ac_cv_path_LN+:} false; then :
7533  $as_echo_n "(cached) " >&6
7534else
7535  case $LN in
7536  [\\/]* | ?:[\\/]*)
7537  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7538  ;;
7539  *)
7540  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7541for as_dir in $PATH
7542do
7543  IFS=$as_save_IFS
7544  test -z "$as_dir" && as_dir=.
7545    for ac_exec_ext in '' $ac_executable_extensions; do
7546  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7547    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7548    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7549    break 2
7550  fi
7551done
7552  done
7553IFS=$as_save_IFS
7554
7555  ;;
7556esac
7557fi
7558LN=$ac_cv_path_LN
7559if test -n "$LN"; then
7560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7561$as_echo "$LN" >&6; }
7562else
7563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7564$as_echo "no" >&6; }
7565fi
7566
7567
7568  test -n "$LN" && break
7569done
7570
7571    else
7572      # If it succeeded, then it was overridden by the user. We will use it
7573      # for the tool.
7574
7575      # First remove it from the list of overridden variables, so we can test
7576      # for unknown variables in the end.
7577      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7578
7579      # Check if the provided tool contains a complete path.
7580      tool_specified="$LN"
7581      tool_basename="${tool_specified##*/}"
7582      if test "x$tool_basename" = "x$tool_specified"; then
7583        # A command without a complete path is provided, search $PATH.
7584        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7585$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7586        # Extract the first word of "$tool_basename", so it can be a program name with args.
7587set dummy $tool_basename; ac_word=$2
7588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7589$as_echo_n "checking for $ac_word... " >&6; }
7590if ${ac_cv_path_LN+:} false; then :
7591  $as_echo_n "(cached) " >&6
7592else
7593  case $LN in
7594  [\\/]* | ?:[\\/]*)
7595  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7596  ;;
7597  *)
7598  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7599for as_dir in $PATH
7600do
7601  IFS=$as_save_IFS
7602  test -z "$as_dir" && as_dir=.
7603    for ac_exec_ext in '' $ac_executable_extensions; do
7604  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7605    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7606    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7607    break 2
7608  fi
7609done
7610  done
7611IFS=$as_save_IFS
7612
7613  ;;
7614esac
7615fi
7616LN=$ac_cv_path_LN
7617if test -n "$LN"; then
7618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7619$as_echo "$LN" >&6; }
7620else
7621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7622$as_echo "no" >&6; }
7623fi
7624
7625
7626        if test "x$LN" = x; then
7627          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7628        fi
7629      else
7630        # Otherwise we believe it is a complete path. Use it as it is.
7631        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7632$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7633        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7634$as_echo_n "checking for LN... " >&6; }
7635        if test ! -x "$tool_specified"; then
7636          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7637$as_echo "not found" >&6; }
7638          as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7639        fi
7640        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7641$as_echo "$tool_specified" >&6; }
7642      fi
7643    fi
7644  fi
7645
7646
7647
7648  if test "x$LN" = x; then
7649    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7650  fi
7651
7652
7653
7654
7655
7656  # Publish this variable in the help.
7657
7658
7659  if test "x$LS" = x; then
7660    # The variable is not set by user, try to locate tool using the code snippet
7661    for ac_prog in ls
7662do
7663  # Extract the first word of "$ac_prog", so it can be a program name with args.
7664set dummy $ac_prog; ac_word=$2
7665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7666$as_echo_n "checking for $ac_word... " >&6; }
7667if ${ac_cv_path_LS+:} false; then :
7668  $as_echo_n "(cached) " >&6
7669else
7670  case $LS in
7671  [\\/]* | ?:[\\/]*)
7672  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7673  ;;
7674  *)
7675  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7676for as_dir in $PATH
7677do
7678  IFS=$as_save_IFS
7679  test -z "$as_dir" && as_dir=.
7680    for ac_exec_ext in '' $ac_executable_extensions; do
7681  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7682    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7683    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7684    break 2
7685  fi
7686done
7687  done
7688IFS=$as_save_IFS
7689
7690  ;;
7691esac
7692fi
7693LS=$ac_cv_path_LS
7694if test -n "$LS"; then
7695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7696$as_echo "$LS" >&6; }
7697else
7698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7699$as_echo "no" >&6; }
7700fi
7701
7702
7703  test -n "$LS" && break
7704done
7705
7706  else
7707    # The variable is set, but is it from the command line or the environment?
7708
7709    # Try to remove the string !LS! from our list.
7710    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7711    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7712      # If it failed, the variable was not from the command line. Ignore it,
7713      # but warn the user (except for BASH, which is always set by the calling BASH).
7714      if test "xLS" != xBASH; then
7715        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7716$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7717      fi
7718      # Try to locate tool using the code snippet
7719      for ac_prog in ls
7720do
7721  # Extract the first word of "$ac_prog", so it can be a program name with args.
7722set dummy $ac_prog; ac_word=$2
7723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7724$as_echo_n "checking for $ac_word... " >&6; }
7725if ${ac_cv_path_LS+:} false; then :
7726  $as_echo_n "(cached) " >&6
7727else
7728  case $LS in
7729  [\\/]* | ?:[\\/]*)
7730  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7731  ;;
7732  *)
7733  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7734for as_dir in $PATH
7735do
7736  IFS=$as_save_IFS
7737  test -z "$as_dir" && as_dir=.
7738    for ac_exec_ext in '' $ac_executable_extensions; do
7739  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7740    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7741    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7742    break 2
7743  fi
7744done
7745  done
7746IFS=$as_save_IFS
7747
7748  ;;
7749esac
7750fi
7751LS=$ac_cv_path_LS
7752if test -n "$LS"; then
7753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7754$as_echo "$LS" >&6; }
7755else
7756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7757$as_echo "no" >&6; }
7758fi
7759
7760
7761  test -n "$LS" && break
7762done
7763
7764    else
7765      # If it succeeded, then it was overridden by the user. We will use it
7766      # for the tool.
7767
7768      # First remove it from the list of overridden variables, so we can test
7769      # for unknown variables in the end.
7770      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7771
7772      # Check if the provided tool contains a complete path.
7773      tool_specified="$LS"
7774      tool_basename="${tool_specified##*/}"
7775      if test "x$tool_basename" = "x$tool_specified"; then
7776        # A command without a complete path is provided, search $PATH.
7777        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7778$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7779        # Extract the first word of "$tool_basename", so it can be a program name with args.
7780set dummy $tool_basename; ac_word=$2
7781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7782$as_echo_n "checking for $ac_word... " >&6; }
7783if ${ac_cv_path_LS+:} false; then :
7784  $as_echo_n "(cached) " >&6
7785else
7786  case $LS in
7787  [\\/]* | ?:[\\/]*)
7788  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7789  ;;
7790  *)
7791  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7792for as_dir in $PATH
7793do
7794  IFS=$as_save_IFS
7795  test -z "$as_dir" && as_dir=.
7796    for ac_exec_ext in '' $ac_executable_extensions; do
7797  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7798    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7799    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7800    break 2
7801  fi
7802done
7803  done
7804IFS=$as_save_IFS
7805
7806  ;;
7807esac
7808fi
7809LS=$ac_cv_path_LS
7810if test -n "$LS"; then
7811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7812$as_echo "$LS" >&6; }
7813else
7814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7815$as_echo "no" >&6; }
7816fi
7817
7818
7819        if test "x$LS" = x; then
7820          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7821        fi
7822      else
7823        # Otherwise we believe it is a complete path. Use it as it is.
7824        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7825$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7826        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7827$as_echo_n "checking for LS... " >&6; }
7828        if test ! -x "$tool_specified"; then
7829          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7830$as_echo "not found" >&6; }
7831          as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7832        fi
7833        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7834$as_echo "$tool_specified" >&6; }
7835      fi
7836    fi
7837  fi
7838
7839
7840
7841  if test "x$LS" = x; then
7842    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7843  fi
7844
7845
7846
7847
7848
7849  # Publish this variable in the help.
7850
7851
7852  if test "x$MKDIR" = x; then
7853    # The variable is not set by user, try to locate tool using the code snippet
7854    for ac_prog in mkdir
7855do
7856  # Extract the first word of "$ac_prog", so it can be a program name with args.
7857set dummy $ac_prog; ac_word=$2
7858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7859$as_echo_n "checking for $ac_word... " >&6; }
7860if ${ac_cv_path_MKDIR+:} false; then :
7861  $as_echo_n "(cached) " >&6
7862else
7863  case $MKDIR in
7864  [\\/]* | ?:[\\/]*)
7865  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7866  ;;
7867  *)
7868  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7869for as_dir in $PATH
7870do
7871  IFS=$as_save_IFS
7872  test -z "$as_dir" && as_dir=.
7873    for ac_exec_ext in '' $ac_executable_extensions; do
7874  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7875    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7876    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7877    break 2
7878  fi
7879done
7880  done
7881IFS=$as_save_IFS
7882
7883  ;;
7884esac
7885fi
7886MKDIR=$ac_cv_path_MKDIR
7887if test -n "$MKDIR"; then
7888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7889$as_echo "$MKDIR" >&6; }
7890else
7891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7892$as_echo "no" >&6; }
7893fi
7894
7895
7896  test -n "$MKDIR" && break
7897done
7898
7899  else
7900    # The variable is set, but is it from the command line or the environment?
7901
7902    # Try to remove the string !MKDIR! from our list.
7903    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
7904    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7905      # If it failed, the variable was not from the command line. Ignore it,
7906      # but warn the user (except for BASH, which is always set by the calling BASH).
7907      if test "xMKDIR" != xBASH; then
7908        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
7909$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
7910      fi
7911      # Try to locate tool using the code snippet
7912      for ac_prog in mkdir
7913do
7914  # Extract the first word of "$ac_prog", so it can be a program name with args.
7915set dummy $ac_prog; ac_word=$2
7916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7917$as_echo_n "checking for $ac_word... " >&6; }
7918if ${ac_cv_path_MKDIR+:} false; then :
7919  $as_echo_n "(cached) " >&6
7920else
7921  case $MKDIR in
7922  [\\/]* | ?:[\\/]*)
7923  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7924  ;;
7925  *)
7926  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7927for as_dir in $PATH
7928do
7929  IFS=$as_save_IFS
7930  test -z "$as_dir" && as_dir=.
7931    for ac_exec_ext in '' $ac_executable_extensions; do
7932  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7933    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7934    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7935    break 2
7936  fi
7937done
7938  done
7939IFS=$as_save_IFS
7940
7941  ;;
7942esac
7943fi
7944MKDIR=$ac_cv_path_MKDIR
7945if test -n "$MKDIR"; then
7946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7947$as_echo "$MKDIR" >&6; }
7948else
7949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7950$as_echo "no" >&6; }
7951fi
7952
7953
7954  test -n "$MKDIR" && break
7955done
7956
7957    else
7958      # If it succeeded, then it was overridden by the user. We will use it
7959      # for the tool.
7960
7961      # First remove it from the list of overridden variables, so we can test
7962      # for unknown variables in the end.
7963      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7964
7965      # Check if the provided tool contains a complete path.
7966      tool_specified="$MKDIR"
7967      tool_basename="${tool_specified##*/}"
7968      if test "x$tool_basename" = "x$tool_specified"; then
7969        # A command without a complete path is provided, search $PATH.
7970        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
7971$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
7972        # Extract the first word of "$tool_basename", so it can be a program name with args.
7973set dummy $tool_basename; ac_word=$2
7974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7975$as_echo_n "checking for $ac_word... " >&6; }
7976if ${ac_cv_path_MKDIR+:} false; then :
7977  $as_echo_n "(cached) " >&6
7978else
7979  case $MKDIR in
7980  [\\/]* | ?:[\\/]*)
7981  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7982  ;;
7983  *)
7984  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7985for as_dir in $PATH
7986do
7987  IFS=$as_save_IFS
7988  test -z "$as_dir" && as_dir=.
7989    for ac_exec_ext in '' $ac_executable_extensions; do
7990  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7991    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7992    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7993    break 2
7994  fi
7995done
7996  done
7997IFS=$as_save_IFS
7998
7999  ;;
8000esac
8001fi
8002MKDIR=$ac_cv_path_MKDIR
8003if test -n "$MKDIR"; then
8004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8005$as_echo "$MKDIR" >&6; }
8006else
8007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8008$as_echo "no" >&6; }
8009fi
8010
8011
8012        if test "x$MKDIR" = x; then
8013          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8014        fi
8015      else
8016        # Otherwise we believe it is a complete path. Use it as it is.
8017        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8018$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8019        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8020$as_echo_n "checking for MKDIR... " >&6; }
8021        if test ! -x "$tool_specified"; then
8022          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8023$as_echo "not found" >&6; }
8024          as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8025        fi
8026        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8027$as_echo "$tool_specified" >&6; }
8028      fi
8029    fi
8030  fi
8031
8032
8033
8034  if test "x$MKDIR" = x; then
8035    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8036  fi
8037
8038
8039
8040
8041
8042  # Publish this variable in the help.
8043
8044
8045  if test "x$MKTEMP" = x; then
8046    # The variable is not set by user, try to locate tool using the code snippet
8047    for ac_prog in mktemp
8048do
8049  # Extract the first word of "$ac_prog", so it can be a program name with args.
8050set dummy $ac_prog; ac_word=$2
8051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8052$as_echo_n "checking for $ac_word... " >&6; }
8053if ${ac_cv_path_MKTEMP+:} false; then :
8054  $as_echo_n "(cached) " >&6
8055else
8056  case $MKTEMP in
8057  [\\/]* | ?:[\\/]*)
8058  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8059  ;;
8060  *)
8061  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8062for as_dir in $PATH
8063do
8064  IFS=$as_save_IFS
8065  test -z "$as_dir" && as_dir=.
8066    for ac_exec_ext in '' $ac_executable_extensions; do
8067  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8068    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8069    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8070    break 2
8071  fi
8072done
8073  done
8074IFS=$as_save_IFS
8075
8076  ;;
8077esac
8078fi
8079MKTEMP=$ac_cv_path_MKTEMP
8080if test -n "$MKTEMP"; then
8081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8082$as_echo "$MKTEMP" >&6; }
8083else
8084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8085$as_echo "no" >&6; }
8086fi
8087
8088
8089  test -n "$MKTEMP" && break
8090done
8091
8092  else
8093    # The variable is set, but is it from the command line or the environment?
8094
8095    # Try to remove the string !MKTEMP! from our list.
8096    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8097    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8098      # If it failed, the variable was not from the command line. Ignore it,
8099      # but warn the user (except for BASH, which is always set by the calling BASH).
8100      if test "xMKTEMP" != xBASH; then
8101        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8102$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8103      fi
8104      # Try to locate tool using the code snippet
8105      for ac_prog in mktemp
8106do
8107  # Extract the first word of "$ac_prog", so it can be a program name with args.
8108set dummy $ac_prog; ac_word=$2
8109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8110$as_echo_n "checking for $ac_word... " >&6; }
8111if ${ac_cv_path_MKTEMP+:} false; then :
8112  $as_echo_n "(cached) " >&6
8113else
8114  case $MKTEMP in
8115  [\\/]* | ?:[\\/]*)
8116  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8117  ;;
8118  *)
8119  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8120for as_dir in $PATH
8121do
8122  IFS=$as_save_IFS
8123  test -z "$as_dir" && as_dir=.
8124    for ac_exec_ext in '' $ac_executable_extensions; do
8125  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8126    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8127    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8128    break 2
8129  fi
8130done
8131  done
8132IFS=$as_save_IFS
8133
8134  ;;
8135esac
8136fi
8137MKTEMP=$ac_cv_path_MKTEMP
8138if test -n "$MKTEMP"; then
8139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8140$as_echo "$MKTEMP" >&6; }
8141else
8142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8143$as_echo "no" >&6; }
8144fi
8145
8146
8147  test -n "$MKTEMP" && break
8148done
8149
8150    else
8151      # If it succeeded, then it was overridden by the user. We will use it
8152      # for the tool.
8153
8154      # First remove it from the list of overridden variables, so we can test
8155      # for unknown variables in the end.
8156      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8157
8158      # Check if the provided tool contains a complete path.
8159      tool_specified="$MKTEMP"
8160      tool_basename="${tool_specified##*/}"
8161      if test "x$tool_basename" = "x$tool_specified"; then
8162        # A command without a complete path is provided, search $PATH.
8163        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8164$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8165        # Extract the first word of "$tool_basename", so it can be a program name with args.
8166set dummy $tool_basename; ac_word=$2
8167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8168$as_echo_n "checking for $ac_word... " >&6; }
8169if ${ac_cv_path_MKTEMP+:} false; then :
8170  $as_echo_n "(cached) " >&6
8171else
8172  case $MKTEMP in
8173  [\\/]* | ?:[\\/]*)
8174  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8175  ;;
8176  *)
8177  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8178for as_dir in $PATH
8179do
8180  IFS=$as_save_IFS
8181  test -z "$as_dir" && as_dir=.
8182    for ac_exec_ext in '' $ac_executable_extensions; do
8183  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8184    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8185    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8186    break 2
8187  fi
8188done
8189  done
8190IFS=$as_save_IFS
8191
8192  ;;
8193esac
8194fi
8195MKTEMP=$ac_cv_path_MKTEMP
8196if test -n "$MKTEMP"; then
8197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8198$as_echo "$MKTEMP" >&6; }
8199else
8200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8201$as_echo "no" >&6; }
8202fi
8203
8204
8205        if test "x$MKTEMP" = x; then
8206          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8207        fi
8208      else
8209        # Otherwise we believe it is a complete path. Use it as it is.
8210        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8211$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8212        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8213$as_echo_n "checking for MKTEMP... " >&6; }
8214        if test ! -x "$tool_specified"; then
8215          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8216$as_echo "not found" >&6; }
8217          as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8218        fi
8219        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8220$as_echo "$tool_specified" >&6; }
8221      fi
8222    fi
8223  fi
8224
8225
8226
8227  if test "x$MKTEMP" = x; then
8228    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8229  fi
8230
8231
8232
8233
8234
8235  # Publish this variable in the help.
8236
8237
8238  if test "x$MV" = x; then
8239    # The variable is not set by user, try to locate tool using the code snippet
8240    for ac_prog in mv
8241do
8242  # Extract the first word of "$ac_prog", so it can be a program name with args.
8243set dummy $ac_prog; ac_word=$2
8244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8245$as_echo_n "checking for $ac_word... " >&6; }
8246if ${ac_cv_path_MV+:} false; then :
8247  $as_echo_n "(cached) " >&6
8248else
8249  case $MV in
8250  [\\/]* | ?:[\\/]*)
8251  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8252  ;;
8253  *)
8254  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8255for as_dir in $PATH
8256do
8257  IFS=$as_save_IFS
8258  test -z "$as_dir" && as_dir=.
8259    for ac_exec_ext in '' $ac_executable_extensions; do
8260  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8261    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8263    break 2
8264  fi
8265done
8266  done
8267IFS=$as_save_IFS
8268
8269  ;;
8270esac
8271fi
8272MV=$ac_cv_path_MV
8273if test -n "$MV"; then
8274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8275$as_echo "$MV" >&6; }
8276else
8277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8278$as_echo "no" >&6; }
8279fi
8280
8281
8282  test -n "$MV" && break
8283done
8284
8285  else
8286    # The variable is set, but is it from the command line or the environment?
8287
8288    # Try to remove the string !MV! from our list.
8289    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8290    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8291      # If it failed, the variable was not from the command line. Ignore it,
8292      # but warn the user (except for BASH, which is always set by the calling BASH).
8293      if test "xMV" != xBASH; then
8294        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8295$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8296      fi
8297      # Try to locate tool using the code snippet
8298      for ac_prog in mv
8299do
8300  # Extract the first word of "$ac_prog", so it can be a program name with args.
8301set dummy $ac_prog; ac_word=$2
8302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8303$as_echo_n "checking for $ac_word... " >&6; }
8304if ${ac_cv_path_MV+:} false; then :
8305  $as_echo_n "(cached) " >&6
8306else
8307  case $MV in
8308  [\\/]* | ?:[\\/]*)
8309  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8310  ;;
8311  *)
8312  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8313for as_dir in $PATH
8314do
8315  IFS=$as_save_IFS
8316  test -z "$as_dir" && as_dir=.
8317    for ac_exec_ext in '' $ac_executable_extensions; do
8318  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8319    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8320    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8321    break 2
8322  fi
8323done
8324  done
8325IFS=$as_save_IFS
8326
8327  ;;
8328esac
8329fi
8330MV=$ac_cv_path_MV
8331if test -n "$MV"; then
8332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8333$as_echo "$MV" >&6; }
8334else
8335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8336$as_echo "no" >&6; }
8337fi
8338
8339
8340  test -n "$MV" && break
8341done
8342
8343    else
8344      # If it succeeded, then it was overridden by the user. We will use it
8345      # for the tool.
8346
8347      # First remove it from the list of overridden variables, so we can test
8348      # for unknown variables in the end.
8349      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8350
8351      # Check if the provided tool contains a complete path.
8352      tool_specified="$MV"
8353      tool_basename="${tool_specified##*/}"
8354      if test "x$tool_basename" = "x$tool_specified"; then
8355        # A command without a complete path is provided, search $PATH.
8356        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8357$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8358        # Extract the first word of "$tool_basename", so it can be a program name with args.
8359set dummy $tool_basename; ac_word=$2
8360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8361$as_echo_n "checking for $ac_word... " >&6; }
8362if ${ac_cv_path_MV+:} false; then :
8363  $as_echo_n "(cached) " >&6
8364else
8365  case $MV in
8366  [\\/]* | ?:[\\/]*)
8367  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8368  ;;
8369  *)
8370  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8371for as_dir in $PATH
8372do
8373  IFS=$as_save_IFS
8374  test -z "$as_dir" && as_dir=.
8375    for ac_exec_ext in '' $ac_executable_extensions; do
8376  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8377    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8378    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8379    break 2
8380  fi
8381done
8382  done
8383IFS=$as_save_IFS
8384
8385  ;;
8386esac
8387fi
8388MV=$ac_cv_path_MV
8389if test -n "$MV"; then
8390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8391$as_echo "$MV" >&6; }
8392else
8393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8394$as_echo "no" >&6; }
8395fi
8396
8397
8398        if test "x$MV" = x; then
8399          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8400        fi
8401      else
8402        # Otherwise we believe it is a complete path. Use it as it is.
8403        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8404$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8405        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8406$as_echo_n "checking for MV... " >&6; }
8407        if test ! -x "$tool_specified"; then
8408          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8409$as_echo "not found" >&6; }
8410          as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8411        fi
8412        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8413$as_echo "$tool_specified" >&6; }
8414      fi
8415    fi
8416  fi
8417
8418
8419
8420  if test "x$MV" = x; then
8421    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8422  fi
8423
8424
8425
8426
8427
8428  # Publish this variable in the help.
8429
8430
8431  if test "x$NAWK" = x; then
8432    # The variable is not set by user, try to locate tool using the code snippet
8433    for ac_prog in nawk gawk awk
8434do
8435  # Extract the first word of "$ac_prog", so it can be a program name with args.
8436set dummy $ac_prog; ac_word=$2
8437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8438$as_echo_n "checking for $ac_word... " >&6; }
8439if ${ac_cv_path_NAWK+:} false; then :
8440  $as_echo_n "(cached) " >&6
8441else
8442  case $NAWK in
8443  [\\/]* | ?:[\\/]*)
8444  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8445  ;;
8446  *)
8447  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8448for as_dir in $PATH
8449do
8450  IFS=$as_save_IFS
8451  test -z "$as_dir" && as_dir=.
8452    for ac_exec_ext in '' $ac_executable_extensions; do
8453  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8454    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8455    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8456    break 2
8457  fi
8458done
8459  done
8460IFS=$as_save_IFS
8461
8462  ;;
8463esac
8464fi
8465NAWK=$ac_cv_path_NAWK
8466if test -n "$NAWK"; then
8467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8468$as_echo "$NAWK" >&6; }
8469else
8470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8471$as_echo "no" >&6; }
8472fi
8473
8474
8475  test -n "$NAWK" && break
8476done
8477
8478  else
8479    # The variable is set, but is it from the command line or the environment?
8480
8481    # Try to remove the string !NAWK! from our list.
8482    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8483    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8484      # If it failed, the variable was not from the command line. Ignore it,
8485      # but warn the user (except for BASH, which is always set by the calling BASH).
8486      if test "xNAWK" != xBASH; then
8487        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8488$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8489      fi
8490      # Try to locate tool using the code snippet
8491      for ac_prog in nawk gawk awk
8492do
8493  # Extract the first word of "$ac_prog", so it can be a program name with args.
8494set dummy $ac_prog; ac_word=$2
8495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8496$as_echo_n "checking for $ac_word... " >&6; }
8497if ${ac_cv_path_NAWK+:} false; then :
8498  $as_echo_n "(cached) " >&6
8499else
8500  case $NAWK in
8501  [\\/]* | ?:[\\/]*)
8502  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8503  ;;
8504  *)
8505  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8506for as_dir in $PATH
8507do
8508  IFS=$as_save_IFS
8509  test -z "$as_dir" && as_dir=.
8510    for ac_exec_ext in '' $ac_executable_extensions; do
8511  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8512    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8513    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8514    break 2
8515  fi
8516done
8517  done
8518IFS=$as_save_IFS
8519
8520  ;;
8521esac
8522fi
8523NAWK=$ac_cv_path_NAWK
8524if test -n "$NAWK"; then
8525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8526$as_echo "$NAWK" >&6; }
8527else
8528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8529$as_echo "no" >&6; }
8530fi
8531
8532
8533  test -n "$NAWK" && break
8534done
8535
8536    else
8537      # If it succeeded, then it was overridden by the user. We will use it
8538      # for the tool.
8539
8540      # First remove it from the list of overridden variables, so we can test
8541      # for unknown variables in the end.
8542      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8543
8544      # Check if the provided tool contains a complete path.
8545      tool_specified="$NAWK"
8546      tool_basename="${tool_specified##*/}"
8547      if test "x$tool_basename" = "x$tool_specified"; then
8548        # A command without a complete path is provided, search $PATH.
8549        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8550$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8551        # Extract the first word of "$tool_basename", so it can be a program name with args.
8552set dummy $tool_basename; ac_word=$2
8553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8554$as_echo_n "checking for $ac_word... " >&6; }
8555if ${ac_cv_path_NAWK+:} false; then :
8556  $as_echo_n "(cached) " >&6
8557else
8558  case $NAWK in
8559  [\\/]* | ?:[\\/]*)
8560  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8561  ;;
8562  *)
8563  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8564for as_dir in $PATH
8565do
8566  IFS=$as_save_IFS
8567  test -z "$as_dir" && as_dir=.
8568    for ac_exec_ext in '' $ac_executable_extensions; do
8569  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8570    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8571    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8572    break 2
8573  fi
8574done
8575  done
8576IFS=$as_save_IFS
8577
8578  ;;
8579esac
8580fi
8581NAWK=$ac_cv_path_NAWK
8582if test -n "$NAWK"; then
8583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8584$as_echo "$NAWK" >&6; }
8585else
8586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8587$as_echo "no" >&6; }
8588fi
8589
8590
8591        if test "x$NAWK" = x; then
8592          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8593        fi
8594      else
8595        # Otherwise we believe it is a complete path. Use it as it is.
8596        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8597$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8598        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8599$as_echo_n "checking for NAWK... " >&6; }
8600        if test ! -x "$tool_specified"; then
8601          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8602$as_echo "not found" >&6; }
8603          as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8604        fi
8605        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8606$as_echo "$tool_specified" >&6; }
8607      fi
8608    fi
8609  fi
8610
8611
8612
8613  if test "x$NAWK" = x; then
8614    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8615  fi
8616
8617
8618
8619
8620
8621  # Publish this variable in the help.
8622
8623
8624  if test "x$PRINTF" = x; then
8625    # The variable is not set by user, try to locate tool using the code snippet
8626    for ac_prog in printf
8627do
8628  # Extract the first word of "$ac_prog", so it can be a program name with args.
8629set dummy $ac_prog; ac_word=$2
8630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8631$as_echo_n "checking for $ac_word... " >&6; }
8632if ${ac_cv_path_PRINTF+:} false; then :
8633  $as_echo_n "(cached) " >&6
8634else
8635  case $PRINTF in
8636  [\\/]* | ?:[\\/]*)
8637  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8638  ;;
8639  *)
8640  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8641for as_dir in $PATH
8642do
8643  IFS=$as_save_IFS
8644  test -z "$as_dir" && as_dir=.
8645    for ac_exec_ext in '' $ac_executable_extensions; do
8646  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8647    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8648    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8649    break 2
8650  fi
8651done
8652  done
8653IFS=$as_save_IFS
8654
8655  ;;
8656esac
8657fi
8658PRINTF=$ac_cv_path_PRINTF
8659if test -n "$PRINTF"; then
8660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8661$as_echo "$PRINTF" >&6; }
8662else
8663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8664$as_echo "no" >&6; }
8665fi
8666
8667
8668  test -n "$PRINTF" && break
8669done
8670
8671  else
8672    # The variable is set, but is it from the command line or the environment?
8673
8674    # Try to remove the string !PRINTF! from our list.
8675    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8676    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8677      # If it failed, the variable was not from the command line. Ignore it,
8678      # but warn the user (except for BASH, which is always set by the calling BASH).
8679      if test "xPRINTF" != xBASH; then
8680        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8681$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8682      fi
8683      # Try to locate tool using the code snippet
8684      for ac_prog in printf
8685do
8686  # Extract the first word of "$ac_prog", so it can be a program name with args.
8687set dummy $ac_prog; ac_word=$2
8688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8689$as_echo_n "checking for $ac_word... " >&6; }
8690if ${ac_cv_path_PRINTF+:} false; then :
8691  $as_echo_n "(cached) " >&6
8692else
8693  case $PRINTF in
8694  [\\/]* | ?:[\\/]*)
8695  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8696  ;;
8697  *)
8698  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8699for as_dir in $PATH
8700do
8701  IFS=$as_save_IFS
8702  test -z "$as_dir" && as_dir=.
8703    for ac_exec_ext in '' $ac_executable_extensions; do
8704  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8705    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8706    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8707    break 2
8708  fi
8709done
8710  done
8711IFS=$as_save_IFS
8712
8713  ;;
8714esac
8715fi
8716PRINTF=$ac_cv_path_PRINTF
8717if test -n "$PRINTF"; then
8718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8719$as_echo "$PRINTF" >&6; }
8720else
8721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8722$as_echo "no" >&6; }
8723fi
8724
8725
8726  test -n "$PRINTF" && break
8727done
8728
8729    else
8730      # If it succeeded, then it was overridden by the user. We will use it
8731      # for the tool.
8732
8733      # First remove it from the list of overridden variables, so we can test
8734      # for unknown variables in the end.
8735      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8736
8737      # Check if the provided tool contains a complete path.
8738      tool_specified="$PRINTF"
8739      tool_basename="${tool_specified##*/}"
8740      if test "x$tool_basename" = "x$tool_specified"; then
8741        # A command without a complete path is provided, search $PATH.
8742        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8743$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8744        # Extract the first word of "$tool_basename", so it can be a program name with args.
8745set dummy $tool_basename; ac_word=$2
8746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8747$as_echo_n "checking for $ac_word... " >&6; }
8748if ${ac_cv_path_PRINTF+:} false; then :
8749  $as_echo_n "(cached) " >&6
8750else
8751  case $PRINTF in
8752  [\\/]* | ?:[\\/]*)
8753  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8754  ;;
8755  *)
8756  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8757for as_dir in $PATH
8758do
8759  IFS=$as_save_IFS
8760  test -z "$as_dir" && as_dir=.
8761    for ac_exec_ext in '' $ac_executable_extensions; do
8762  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8763    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8764    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8765    break 2
8766  fi
8767done
8768  done
8769IFS=$as_save_IFS
8770
8771  ;;
8772esac
8773fi
8774PRINTF=$ac_cv_path_PRINTF
8775if test -n "$PRINTF"; then
8776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8777$as_echo "$PRINTF" >&6; }
8778else
8779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8780$as_echo "no" >&6; }
8781fi
8782
8783
8784        if test "x$PRINTF" = x; then
8785          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8786        fi
8787      else
8788        # Otherwise we believe it is a complete path. Use it as it is.
8789        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8790$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8791        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8792$as_echo_n "checking for PRINTF... " >&6; }
8793        if test ! -x "$tool_specified"; then
8794          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8795$as_echo "not found" >&6; }
8796          as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8797        fi
8798        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8799$as_echo "$tool_specified" >&6; }
8800      fi
8801    fi
8802  fi
8803
8804
8805
8806  if test "x$PRINTF" = x; then
8807    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8808  fi
8809
8810
8811
8812
8813
8814  # Publish this variable in the help.
8815
8816
8817  if test "x$RM" = x; then
8818    # The variable is not set by user, try to locate tool using the code snippet
8819    for ac_prog in rm
8820do
8821  # Extract the first word of "$ac_prog", so it can be a program name with args.
8822set dummy $ac_prog; ac_word=$2
8823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8824$as_echo_n "checking for $ac_word... " >&6; }
8825if ${ac_cv_path_RM+:} false; then :
8826  $as_echo_n "(cached) " >&6
8827else
8828  case $RM in
8829  [\\/]* | ?:[\\/]*)
8830  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8831  ;;
8832  *)
8833  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8834for as_dir in $PATH
8835do
8836  IFS=$as_save_IFS
8837  test -z "$as_dir" && as_dir=.
8838    for ac_exec_ext in '' $ac_executable_extensions; do
8839  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8840    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8841    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8842    break 2
8843  fi
8844done
8845  done
8846IFS=$as_save_IFS
8847
8848  ;;
8849esac
8850fi
8851RM=$ac_cv_path_RM
8852if test -n "$RM"; then
8853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8854$as_echo "$RM" >&6; }
8855else
8856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8857$as_echo "no" >&6; }
8858fi
8859
8860
8861  test -n "$RM" && break
8862done
8863
8864  else
8865    # The variable is set, but is it from the command line or the environment?
8866
8867    # Try to remove the string !RM! from our list.
8868    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8869    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8870      # If it failed, the variable was not from the command line. Ignore it,
8871      # but warn the user (except for BASH, which is always set by the calling BASH).
8872      if test "xRM" != xBASH; then
8873        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8874$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8875      fi
8876      # Try to locate tool using the code snippet
8877      for ac_prog in rm
8878do
8879  # Extract the first word of "$ac_prog", so it can be a program name with args.
8880set dummy $ac_prog; ac_word=$2
8881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8882$as_echo_n "checking for $ac_word... " >&6; }
8883if ${ac_cv_path_RM+:} false; then :
8884  $as_echo_n "(cached) " >&6
8885else
8886  case $RM in
8887  [\\/]* | ?:[\\/]*)
8888  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8889  ;;
8890  *)
8891  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8892for as_dir in $PATH
8893do
8894  IFS=$as_save_IFS
8895  test -z "$as_dir" && as_dir=.
8896    for ac_exec_ext in '' $ac_executable_extensions; do
8897  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8898    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8899    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8900    break 2
8901  fi
8902done
8903  done
8904IFS=$as_save_IFS
8905
8906  ;;
8907esac
8908fi
8909RM=$ac_cv_path_RM
8910if test -n "$RM"; then
8911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8912$as_echo "$RM" >&6; }
8913else
8914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8915$as_echo "no" >&6; }
8916fi
8917
8918
8919  test -n "$RM" && break
8920done
8921
8922    else
8923      # If it succeeded, then it was overridden by the user. We will use it
8924      # for the tool.
8925
8926      # First remove it from the list of overridden variables, so we can test
8927      # for unknown variables in the end.
8928      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8929
8930      # Check if the provided tool contains a complete path.
8931      tool_specified="$RM"
8932      tool_basename="${tool_specified##*/}"
8933      if test "x$tool_basename" = "x$tool_specified"; then
8934        # A command without a complete path is provided, search $PATH.
8935        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
8936$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
8937        # Extract the first word of "$tool_basename", so it can be a program name with args.
8938set dummy $tool_basename; ac_word=$2
8939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8940$as_echo_n "checking for $ac_word... " >&6; }
8941if ${ac_cv_path_RM+:} false; then :
8942  $as_echo_n "(cached) " >&6
8943else
8944  case $RM in
8945  [\\/]* | ?:[\\/]*)
8946  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8947  ;;
8948  *)
8949  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8950for as_dir in $PATH
8951do
8952  IFS=$as_save_IFS
8953  test -z "$as_dir" && as_dir=.
8954    for ac_exec_ext in '' $ac_executable_extensions; do
8955  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8956    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8957    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8958    break 2
8959  fi
8960done
8961  done
8962IFS=$as_save_IFS
8963
8964  ;;
8965esac
8966fi
8967RM=$ac_cv_path_RM
8968if test -n "$RM"; then
8969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8970$as_echo "$RM" >&6; }
8971else
8972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8973$as_echo "no" >&6; }
8974fi
8975
8976
8977        if test "x$RM" = x; then
8978          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8979        fi
8980      else
8981        # Otherwise we believe it is a complete path. Use it as it is.
8982        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
8983$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
8984        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
8985$as_echo_n "checking for RM... " >&6; }
8986        if test ! -x "$tool_specified"; then
8987          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8988$as_echo "not found" >&6; }
8989          as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
8990        fi
8991        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8992$as_echo "$tool_specified" >&6; }
8993      fi
8994    fi
8995  fi
8996
8997
8998
8999  if test "x$RM" = x; then
9000    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9001  fi
9002
9003
9004
9005
9006
9007  # Publish this variable in the help.
9008
9009
9010  if test "x$SH" = x; then
9011    # The variable is not set by user, try to locate tool using the code snippet
9012    for ac_prog in sh
9013do
9014  # Extract the first word of "$ac_prog", so it can be a program name with args.
9015set dummy $ac_prog; ac_word=$2
9016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9017$as_echo_n "checking for $ac_word... " >&6; }
9018if ${ac_cv_path_SH+:} false; then :
9019  $as_echo_n "(cached) " >&6
9020else
9021  case $SH in
9022  [\\/]* | ?:[\\/]*)
9023  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9024  ;;
9025  *)
9026  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9027for as_dir in $PATH
9028do
9029  IFS=$as_save_IFS
9030  test -z "$as_dir" && as_dir=.
9031    for ac_exec_ext in '' $ac_executable_extensions; do
9032  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9033    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9034    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9035    break 2
9036  fi
9037done
9038  done
9039IFS=$as_save_IFS
9040
9041  ;;
9042esac
9043fi
9044SH=$ac_cv_path_SH
9045if test -n "$SH"; then
9046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9047$as_echo "$SH" >&6; }
9048else
9049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9050$as_echo "no" >&6; }
9051fi
9052
9053
9054  test -n "$SH" && break
9055done
9056
9057  else
9058    # The variable is set, but is it from the command line or the environment?
9059
9060    # Try to remove the string !SH! from our list.
9061    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9062    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9063      # If it failed, the variable was not from the command line. Ignore it,
9064      # but warn the user (except for BASH, which is always set by the calling BASH).
9065      if test "xSH" != xBASH; then
9066        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9067$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9068      fi
9069      # Try to locate tool using the code snippet
9070      for ac_prog in sh
9071do
9072  # Extract the first word of "$ac_prog", so it can be a program name with args.
9073set dummy $ac_prog; ac_word=$2
9074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9075$as_echo_n "checking for $ac_word... " >&6; }
9076if ${ac_cv_path_SH+:} false; then :
9077  $as_echo_n "(cached) " >&6
9078else
9079  case $SH in
9080  [\\/]* | ?:[\\/]*)
9081  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9082  ;;
9083  *)
9084  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9085for as_dir in $PATH
9086do
9087  IFS=$as_save_IFS
9088  test -z "$as_dir" && as_dir=.
9089    for ac_exec_ext in '' $ac_executable_extensions; do
9090  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9091    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9092    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9093    break 2
9094  fi
9095done
9096  done
9097IFS=$as_save_IFS
9098
9099  ;;
9100esac
9101fi
9102SH=$ac_cv_path_SH
9103if test -n "$SH"; then
9104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9105$as_echo "$SH" >&6; }
9106else
9107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9108$as_echo "no" >&6; }
9109fi
9110
9111
9112  test -n "$SH" && break
9113done
9114
9115    else
9116      # If it succeeded, then it was overridden by the user. We will use it
9117      # for the tool.
9118
9119      # First remove it from the list of overridden variables, so we can test
9120      # for unknown variables in the end.
9121      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9122
9123      # Check if the provided tool contains a complete path.
9124      tool_specified="$SH"
9125      tool_basename="${tool_specified##*/}"
9126      if test "x$tool_basename" = "x$tool_specified"; then
9127        # A command without a complete path is provided, search $PATH.
9128        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9129$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9130        # Extract the first word of "$tool_basename", so it can be a program name with args.
9131set dummy $tool_basename; ac_word=$2
9132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9133$as_echo_n "checking for $ac_word... " >&6; }
9134if ${ac_cv_path_SH+:} false; then :
9135  $as_echo_n "(cached) " >&6
9136else
9137  case $SH in
9138  [\\/]* | ?:[\\/]*)
9139  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9140  ;;
9141  *)
9142  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9143for as_dir in $PATH
9144do
9145  IFS=$as_save_IFS
9146  test -z "$as_dir" && as_dir=.
9147    for ac_exec_ext in '' $ac_executable_extensions; do
9148  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9149    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9150    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9151    break 2
9152  fi
9153done
9154  done
9155IFS=$as_save_IFS
9156
9157  ;;
9158esac
9159fi
9160SH=$ac_cv_path_SH
9161if test -n "$SH"; then
9162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9163$as_echo "$SH" >&6; }
9164else
9165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9166$as_echo "no" >&6; }
9167fi
9168
9169
9170        if test "x$SH" = x; then
9171          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9172        fi
9173      else
9174        # Otherwise we believe it is a complete path. Use it as it is.
9175        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9176$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9177        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9178$as_echo_n "checking for SH... " >&6; }
9179        if test ! -x "$tool_specified"; then
9180          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9181$as_echo "not found" >&6; }
9182          as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9183        fi
9184        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9185$as_echo "$tool_specified" >&6; }
9186      fi
9187    fi
9188  fi
9189
9190
9191
9192  if test "x$SH" = x; then
9193    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9194  fi
9195
9196
9197
9198
9199
9200  # Publish this variable in the help.
9201
9202
9203  if test "x$SORT" = x; then
9204    # The variable is not set by user, try to locate tool using the code snippet
9205    for ac_prog in sort
9206do
9207  # Extract the first word of "$ac_prog", so it can be a program name with args.
9208set dummy $ac_prog; ac_word=$2
9209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9210$as_echo_n "checking for $ac_word... " >&6; }
9211if ${ac_cv_path_SORT+:} false; then :
9212  $as_echo_n "(cached) " >&6
9213else
9214  case $SORT in
9215  [\\/]* | ?:[\\/]*)
9216  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9217  ;;
9218  *)
9219  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9220for as_dir in $PATH
9221do
9222  IFS=$as_save_IFS
9223  test -z "$as_dir" && as_dir=.
9224    for ac_exec_ext in '' $ac_executable_extensions; do
9225  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9226    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9227    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9228    break 2
9229  fi
9230done
9231  done
9232IFS=$as_save_IFS
9233
9234  ;;
9235esac
9236fi
9237SORT=$ac_cv_path_SORT
9238if test -n "$SORT"; then
9239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9240$as_echo "$SORT" >&6; }
9241else
9242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9243$as_echo "no" >&6; }
9244fi
9245
9246
9247  test -n "$SORT" && break
9248done
9249
9250  else
9251    # The variable is set, but is it from the command line or the environment?
9252
9253    # Try to remove the string !SORT! from our list.
9254    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9255    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9256      # If it failed, the variable was not from the command line. Ignore it,
9257      # but warn the user (except for BASH, which is always set by the calling BASH).
9258      if test "xSORT" != xBASH; then
9259        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9260$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9261      fi
9262      # Try to locate tool using the code snippet
9263      for ac_prog in sort
9264do
9265  # Extract the first word of "$ac_prog", so it can be a program name with args.
9266set dummy $ac_prog; ac_word=$2
9267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9268$as_echo_n "checking for $ac_word... " >&6; }
9269if ${ac_cv_path_SORT+:} false; then :
9270  $as_echo_n "(cached) " >&6
9271else
9272  case $SORT in
9273  [\\/]* | ?:[\\/]*)
9274  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9275  ;;
9276  *)
9277  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9278for as_dir in $PATH
9279do
9280  IFS=$as_save_IFS
9281  test -z "$as_dir" && as_dir=.
9282    for ac_exec_ext in '' $ac_executable_extensions; do
9283  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9284    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9285    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9286    break 2
9287  fi
9288done
9289  done
9290IFS=$as_save_IFS
9291
9292  ;;
9293esac
9294fi
9295SORT=$ac_cv_path_SORT
9296if test -n "$SORT"; then
9297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9298$as_echo "$SORT" >&6; }
9299else
9300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9301$as_echo "no" >&6; }
9302fi
9303
9304
9305  test -n "$SORT" && break
9306done
9307
9308    else
9309      # If it succeeded, then it was overridden by the user. We will use it
9310      # for the tool.
9311
9312      # First remove it from the list of overridden variables, so we can test
9313      # for unknown variables in the end.
9314      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9315
9316      # Check if the provided tool contains a complete path.
9317      tool_specified="$SORT"
9318      tool_basename="${tool_specified##*/}"
9319      if test "x$tool_basename" = "x$tool_specified"; then
9320        # A command without a complete path is provided, search $PATH.
9321        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9322$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9323        # Extract the first word of "$tool_basename", so it can be a program name with args.
9324set dummy $tool_basename; ac_word=$2
9325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9326$as_echo_n "checking for $ac_word... " >&6; }
9327if ${ac_cv_path_SORT+:} false; then :
9328  $as_echo_n "(cached) " >&6
9329else
9330  case $SORT in
9331  [\\/]* | ?:[\\/]*)
9332  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9333  ;;
9334  *)
9335  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9336for as_dir in $PATH
9337do
9338  IFS=$as_save_IFS
9339  test -z "$as_dir" && as_dir=.
9340    for ac_exec_ext in '' $ac_executable_extensions; do
9341  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9342    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9343    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9344    break 2
9345  fi
9346done
9347  done
9348IFS=$as_save_IFS
9349
9350  ;;
9351esac
9352fi
9353SORT=$ac_cv_path_SORT
9354if test -n "$SORT"; then
9355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9356$as_echo "$SORT" >&6; }
9357else
9358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9359$as_echo "no" >&6; }
9360fi
9361
9362
9363        if test "x$SORT" = x; then
9364          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9365        fi
9366      else
9367        # Otherwise we believe it is a complete path. Use it as it is.
9368        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9369$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9370        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9371$as_echo_n "checking for SORT... " >&6; }
9372        if test ! -x "$tool_specified"; then
9373          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9374$as_echo "not found" >&6; }
9375          as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9376        fi
9377        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9378$as_echo "$tool_specified" >&6; }
9379      fi
9380    fi
9381  fi
9382
9383
9384
9385  if test "x$SORT" = x; then
9386    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9387  fi
9388
9389
9390
9391
9392
9393  # Publish this variable in the help.
9394
9395
9396  if test "x$TAIL" = x; then
9397    # The variable is not set by user, try to locate tool using the code snippet
9398    for ac_prog in tail
9399do
9400  # Extract the first word of "$ac_prog", so it can be a program name with args.
9401set dummy $ac_prog; ac_word=$2
9402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9403$as_echo_n "checking for $ac_word... " >&6; }
9404if ${ac_cv_path_TAIL+:} false; then :
9405  $as_echo_n "(cached) " >&6
9406else
9407  case $TAIL in
9408  [\\/]* | ?:[\\/]*)
9409  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9410  ;;
9411  *)
9412  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9413for as_dir in $PATH
9414do
9415  IFS=$as_save_IFS
9416  test -z "$as_dir" && as_dir=.
9417    for ac_exec_ext in '' $ac_executable_extensions; do
9418  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9419    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9420    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9421    break 2
9422  fi
9423done
9424  done
9425IFS=$as_save_IFS
9426
9427  ;;
9428esac
9429fi
9430TAIL=$ac_cv_path_TAIL
9431if test -n "$TAIL"; then
9432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9433$as_echo "$TAIL" >&6; }
9434else
9435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9436$as_echo "no" >&6; }
9437fi
9438
9439
9440  test -n "$TAIL" && break
9441done
9442
9443  else
9444    # The variable is set, but is it from the command line or the environment?
9445
9446    # Try to remove the string !TAIL! from our list.
9447    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9448    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9449      # If it failed, the variable was not from the command line. Ignore it,
9450      # but warn the user (except for BASH, which is always set by the calling BASH).
9451      if test "xTAIL" != xBASH; then
9452        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9453$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9454      fi
9455      # Try to locate tool using the code snippet
9456      for ac_prog in tail
9457do
9458  # Extract the first word of "$ac_prog", so it can be a program name with args.
9459set dummy $ac_prog; ac_word=$2
9460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9461$as_echo_n "checking for $ac_word... " >&6; }
9462if ${ac_cv_path_TAIL+:} false; then :
9463  $as_echo_n "(cached) " >&6
9464else
9465  case $TAIL in
9466  [\\/]* | ?:[\\/]*)
9467  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9468  ;;
9469  *)
9470  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9471for as_dir in $PATH
9472do
9473  IFS=$as_save_IFS
9474  test -z "$as_dir" && as_dir=.
9475    for ac_exec_ext in '' $ac_executable_extensions; do
9476  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9477    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9478    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9479    break 2
9480  fi
9481done
9482  done
9483IFS=$as_save_IFS
9484
9485  ;;
9486esac
9487fi
9488TAIL=$ac_cv_path_TAIL
9489if test -n "$TAIL"; then
9490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9491$as_echo "$TAIL" >&6; }
9492else
9493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9494$as_echo "no" >&6; }
9495fi
9496
9497
9498  test -n "$TAIL" && break
9499done
9500
9501    else
9502      # If it succeeded, then it was overridden by the user. We will use it
9503      # for the tool.
9504
9505      # First remove it from the list of overridden variables, so we can test
9506      # for unknown variables in the end.
9507      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9508
9509      # Check if the provided tool contains a complete path.
9510      tool_specified="$TAIL"
9511      tool_basename="${tool_specified##*/}"
9512      if test "x$tool_basename" = "x$tool_specified"; then
9513        # A command without a complete path is provided, search $PATH.
9514        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9515$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9516        # Extract the first word of "$tool_basename", so it can be a program name with args.
9517set dummy $tool_basename; ac_word=$2
9518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9519$as_echo_n "checking for $ac_word... " >&6; }
9520if ${ac_cv_path_TAIL+:} false; then :
9521  $as_echo_n "(cached) " >&6
9522else
9523  case $TAIL in
9524  [\\/]* | ?:[\\/]*)
9525  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9526  ;;
9527  *)
9528  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9529for as_dir in $PATH
9530do
9531  IFS=$as_save_IFS
9532  test -z "$as_dir" && as_dir=.
9533    for ac_exec_ext in '' $ac_executable_extensions; do
9534  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9535    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9536    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9537    break 2
9538  fi
9539done
9540  done
9541IFS=$as_save_IFS
9542
9543  ;;
9544esac
9545fi
9546TAIL=$ac_cv_path_TAIL
9547if test -n "$TAIL"; then
9548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9549$as_echo "$TAIL" >&6; }
9550else
9551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9552$as_echo "no" >&6; }
9553fi
9554
9555
9556        if test "x$TAIL" = x; then
9557          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9558        fi
9559      else
9560        # Otherwise we believe it is a complete path. Use it as it is.
9561        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9562$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9563        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9564$as_echo_n "checking for TAIL... " >&6; }
9565        if test ! -x "$tool_specified"; then
9566          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9567$as_echo "not found" >&6; }
9568          as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9569        fi
9570        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9571$as_echo "$tool_specified" >&6; }
9572      fi
9573    fi
9574  fi
9575
9576
9577
9578  if test "x$TAIL" = x; then
9579    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9580  fi
9581
9582
9583
9584
9585
9586  # Publish this variable in the help.
9587
9588
9589  if test "x$TAR" = x; then
9590    # The variable is not set by user, try to locate tool using the code snippet
9591    for ac_prog in tar
9592do
9593  # Extract the first word of "$ac_prog", so it can be a program name with args.
9594set dummy $ac_prog; ac_word=$2
9595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9596$as_echo_n "checking for $ac_word... " >&6; }
9597if ${ac_cv_path_TAR+:} false; then :
9598  $as_echo_n "(cached) " >&6
9599else
9600  case $TAR in
9601  [\\/]* | ?:[\\/]*)
9602  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9603  ;;
9604  *)
9605  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9606for as_dir in $PATH
9607do
9608  IFS=$as_save_IFS
9609  test -z "$as_dir" && as_dir=.
9610    for ac_exec_ext in '' $ac_executable_extensions; do
9611  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9612    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9613    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9614    break 2
9615  fi
9616done
9617  done
9618IFS=$as_save_IFS
9619
9620  ;;
9621esac
9622fi
9623TAR=$ac_cv_path_TAR
9624if test -n "$TAR"; then
9625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9626$as_echo "$TAR" >&6; }
9627else
9628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9629$as_echo "no" >&6; }
9630fi
9631
9632
9633  test -n "$TAR" && break
9634done
9635
9636  else
9637    # The variable is set, but is it from the command line or the environment?
9638
9639    # Try to remove the string !TAR! from our list.
9640    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9641    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9642      # If it failed, the variable was not from the command line. Ignore it,
9643      # but warn the user (except for BASH, which is always set by the calling BASH).
9644      if test "xTAR" != xBASH; then
9645        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9646$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9647      fi
9648      # Try to locate tool using the code snippet
9649      for ac_prog in tar
9650do
9651  # Extract the first word of "$ac_prog", so it can be a program name with args.
9652set dummy $ac_prog; ac_word=$2
9653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9654$as_echo_n "checking for $ac_word... " >&6; }
9655if ${ac_cv_path_TAR+:} false; then :
9656  $as_echo_n "(cached) " >&6
9657else
9658  case $TAR in
9659  [\\/]* | ?:[\\/]*)
9660  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9661  ;;
9662  *)
9663  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9664for as_dir in $PATH
9665do
9666  IFS=$as_save_IFS
9667  test -z "$as_dir" && as_dir=.
9668    for ac_exec_ext in '' $ac_executable_extensions; do
9669  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9670    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9671    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9672    break 2
9673  fi
9674done
9675  done
9676IFS=$as_save_IFS
9677
9678  ;;
9679esac
9680fi
9681TAR=$ac_cv_path_TAR
9682if test -n "$TAR"; then
9683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9684$as_echo "$TAR" >&6; }
9685else
9686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9687$as_echo "no" >&6; }
9688fi
9689
9690
9691  test -n "$TAR" && break
9692done
9693
9694    else
9695      # If it succeeded, then it was overridden by the user. We will use it
9696      # for the tool.
9697
9698      # First remove it from the list of overridden variables, so we can test
9699      # for unknown variables in the end.
9700      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9701
9702      # Check if the provided tool contains a complete path.
9703      tool_specified="$TAR"
9704      tool_basename="${tool_specified##*/}"
9705      if test "x$tool_basename" = "x$tool_specified"; then
9706        # A command without a complete path is provided, search $PATH.
9707        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9708$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9709        # Extract the first word of "$tool_basename", so it can be a program name with args.
9710set dummy $tool_basename; ac_word=$2
9711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9712$as_echo_n "checking for $ac_word... " >&6; }
9713if ${ac_cv_path_TAR+:} false; then :
9714  $as_echo_n "(cached) " >&6
9715else
9716  case $TAR in
9717  [\\/]* | ?:[\\/]*)
9718  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9719  ;;
9720  *)
9721  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9722for as_dir in $PATH
9723do
9724  IFS=$as_save_IFS
9725  test -z "$as_dir" && as_dir=.
9726    for ac_exec_ext in '' $ac_executable_extensions; do
9727  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9728    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9729    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9730    break 2
9731  fi
9732done
9733  done
9734IFS=$as_save_IFS
9735
9736  ;;
9737esac
9738fi
9739TAR=$ac_cv_path_TAR
9740if test -n "$TAR"; then
9741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9742$as_echo "$TAR" >&6; }
9743else
9744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9745$as_echo "no" >&6; }
9746fi
9747
9748
9749        if test "x$TAR" = x; then
9750          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9751        fi
9752      else
9753        # Otherwise we believe it is a complete path. Use it as it is.
9754        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9755$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9756        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9757$as_echo_n "checking for TAR... " >&6; }
9758        if test ! -x "$tool_specified"; then
9759          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9760$as_echo "not found" >&6; }
9761          as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9762        fi
9763        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9764$as_echo "$tool_specified" >&6; }
9765      fi
9766    fi
9767  fi
9768
9769
9770
9771  if test "x$TAR" = x; then
9772    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9773  fi
9774
9775
9776
9777
9778
9779  # Publish this variable in the help.
9780
9781
9782  if test "x$TEE" = x; then
9783    # The variable is not set by user, try to locate tool using the code snippet
9784    for ac_prog in tee
9785do
9786  # Extract the first word of "$ac_prog", so it can be a program name with args.
9787set dummy $ac_prog; ac_word=$2
9788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9789$as_echo_n "checking for $ac_word... " >&6; }
9790if ${ac_cv_path_TEE+:} false; then :
9791  $as_echo_n "(cached) " >&6
9792else
9793  case $TEE in
9794  [\\/]* | ?:[\\/]*)
9795  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9796  ;;
9797  *)
9798  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9799for as_dir in $PATH
9800do
9801  IFS=$as_save_IFS
9802  test -z "$as_dir" && as_dir=.
9803    for ac_exec_ext in '' $ac_executable_extensions; do
9804  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9805    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9806    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9807    break 2
9808  fi
9809done
9810  done
9811IFS=$as_save_IFS
9812
9813  ;;
9814esac
9815fi
9816TEE=$ac_cv_path_TEE
9817if test -n "$TEE"; then
9818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9819$as_echo "$TEE" >&6; }
9820else
9821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9822$as_echo "no" >&6; }
9823fi
9824
9825
9826  test -n "$TEE" && break
9827done
9828
9829  else
9830    # The variable is set, but is it from the command line or the environment?
9831
9832    # Try to remove the string !TEE! from our list.
9833    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9834    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9835      # If it failed, the variable was not from the command line. Ignore it,
9836      # but warn the user (except for BASH, which is always set by the calling BASH).
9837      if test "xTEE" != xBASH; then
9838        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9839$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9840      fi
9841      # Try to locate tool using the code snippet
9842      for ac_prog in tee
9843do
9844  # Extract the first word of "$ac_prog", so it can be a program name with args.
9845set dummy $ac_prog; ac_word=$2
9846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9847$as_echo_n "checking for $ac_word... " >&6; }
9848if ${ac_cv_path_TEE+:} false; then :
9849  $as_echo_n "(cached) " >&6
9850else
9851  case $TEE in
9852  [\\/]* | ?:[\\/]*)
9853  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9854  ;;
9855  *)
9856  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9857for as_dir in $PATH
9858do
9859  IFS=$as_save_IFS
9860  test -z "$as_dir" && as_dir=.
9861    for ac_exec_ext in '' $ac_executable_extensions; do
9862  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9863    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9864    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9865    break 2
9866  fi
9867done
9868  done
9869IFS=$as_save_IFS
9870
9871  ;;
9872esac
9873fi
9874TEE=$ac_cv_path_TEE
9875if test -n "$TEE"; then
9876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9877$as_echo "$TEE" >&6; }
9878else
9879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9880$as_echo "no" >&6; }
9881fi
9882
9883
9884  test -n "$TEE" && break
9885done
9886
9887    else
9888      # If it succeeded, then it was overridden by the user. We will use it
9889      # for the tool.
9890
9891      # First remove it from the list of overridden variables, so we can test
9892      # for unknown variables in the end.
9893      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9894
9895      # Check if the provided tool contains a complete path.
9896      tool_specified="$TEE"
9897      tool_basename="${tool_specified##*/}"
9898      if test "x$tool_basename" = "x$tool_specified"; then
9899        # A command without a complete path is provided, search $PATH.
9900        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
9901$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
9902        # Extract the first word of "$tool_basename", so it can be a program name with args.
9903set dummy $tool_basename; ac_word=$2
9904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9905$as_echo_n "checking for $ac_word... " >&6; }
9906if ${ac_cv_path_TEE+:} false; then :
9907  $as_echo_n "(cached) " >&6
9908else
9909  case $TEE in
9910  [\\/]* | ?:[\\/]*)
9911  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9912  ;;
9913  *)
9914  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9915for as_dir in $PATH
9916do
9917  IFS=$as_save_IFS
9918  test -z "$as_dir" && as_dir=.
9919    for ac_exec_ext in '' $ac_executable_extensions; do
9920  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9921    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9922    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9923    break 2
9924  fi
9925done
9926  done
9927IFS=$as_save_IFS
9928
9929  ;;
9930esac
9931fi
9932TEE=$ac_cv_path_TEE
9933if test -n "$TEE"; then
9934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9935$as_echo "$TEE" >&6; }
9936else
9937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9938$as_echo "no" >&6; }
9939fi
9940
9941
9942        if test "x$TEE" = x; then
9943          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9944        fi
9945      else
9946        # Otherwise we believe it is a complete path. Use it as it is.
9947        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
9948$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
9949        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
9950$as_echo_n "checking for TEE... " >&6; }
9951        if test ! -x "$tool_specified"; then
9952          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9953$as_echo "not found" >&6; }
9954          as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
9955        fi
9956        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9957$as_echo "$tool_specified" >&6; }
9958      fi
9959    fi
9960  fi
9961
9962
9963
9964  if test "x$TEE" = x; then
9965    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
9966  fi
9967
9968
9969
9970
9971
9972  # Publish this variable in the help.
9973
9974
9975  if test "x$TOUCH" = x; then
9976    # The variable is not set by user, try to locate tool using the code snippet
9977    for ac_prog in touch
9978do
9979  # Extract the first word of "$ac_prog", so it can be a program name with args.
9980set dummy $ac_prog; ac_word=$2
9981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9982$as_echo_n "checking for $ac_word... " >&6; }
9983if ${ac_cv_path_TOUCH+:} false; then :
9984  $as_echo_n "(cached) " >&6
9985else
9986  case $TOUCH in
9987  [\\/]* | ?:[\\/]*)
9988  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
9989  ;;
9990  *)
9991  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9992for as_dir in $PATH
9993do
9994  IFS=$as_save_IFS
9995  test -z "$as_dir" && as_dir=.
9996    for ac_exec_ext in '' $ac_executable_extensions; do
9997  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9998    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
9999    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10000    break 2
10001  fi
10002done
10003  done
10004IFS=$as_save_IFS
10005
10006  ;;
10007esac
10008fi
10009TOUCH=$ac_cv_path_TOUCH
10010if test -n "$TOUCH"; then
10011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10012$as_echo "$TOUCH" >&6; }
10013else
10014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10015$as_echo "no" >&6; }
10016fi
10017
10018
10019  test -n "$TOUCH" && break
10020done
10021
10022  else
10023    # The variable is set, but is it from the command line or the environment?
10024
10025    # Try to remove the string !TOUCH! from our list.
10026    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10027    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10028      # If it failed, the variable was not from the command line. Ignore it,
10029      # but warn the user (except for BASH, which is always set by the calling BASH).
10030      if test "xTOUCH" != xBASH; then
10031        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10032$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10033      fi
10034      # Try to locate tool using the code snippet
10035      for ac_prog in touch
10036do
10037  # Extract the first word of "$ac_prog", so it can be a program name with args.
10038set dummy $ac_prog; ac_word=$2
10039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10040$as_echo_n "checking for $ac_word... " >&6; }
10041if ${ac_cv_path_TOUCH+:} false; then :
10042  $as_echo_n "(cached) " >&6
10043else
10044  case $TOUCH in
10045  [\\/]* | ?:[\\/]*)
10046  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10047  ;;
10048  *)
10049  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10050for as_dir in $PATH
10051do
10052  IFS=$as_save_IFS
10053  test -z "$as_dir" && as_dir=.
10054    for ac_exec_ext in '' $ac_executable_extensions; do
10055  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10056    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10057    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10058    break 2
10059  fi
10060done
10061  done
10062IFS=$as_save_IFS
10063
10064  ;;
10065esac
10066fi
10067TOUCH=$ac_cv_path_TOUCH
10068if test -n "$TOUCH"; then
10069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10070$as_echo "$TOUCH" >&6; }
10071else
10072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10073$as_echo "no" >&6; }
10074fi
10075
10076
10077  test -n "$TOUCH" && break
10078done
10079
10080    else
10081      # If it succeeded, then it was overridden by the user. We will use it
10082      # for the tool.
10083
10084      # First remove it from the list of overridden variables, so we can test
10085      # for unknown variables in the end.
10086      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10087
10088      # Check if the provided tool contains a complete path.
10089      tool_specified="$TOUCH"
10090      tool_basename="${tool_specified##*/}"
10091      if test "x$tool_basename" = "x$tool_specified"; then
10092        # A command without a complete path is provided, search $PATH.
10093        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10094$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10095        # Extract the first word of "$tool_basename", so it can be a program name with args.
10096set dummy $tool_basename; ac_word=$2
10097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10098$as_echo_n "checking for $ac_word... " >&6; }
10099if ${ac_cv_path_TOUCH+:} false; then :
10100  $as_echo_n "(cached) " >&6
10101else
10102  case $TOUCH in
10103  [\\/]* | ?:[\\/]*)
10104  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10105  ;;
10106  *)
10107  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10108for as_dir in $PATH
10109do
10110  IFS=$as_save_IFS
10111  test -z "$as_dir" && as_dir=.
10112    for ac_exec_ext in '' $ac_executable_extensions; do
10113  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10114    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10116    break 2
10117  fi
10118done
10119  done
10120IFS=$as_save_IFS
10121
10122  ;;
10123esac
10124fi
10125TOUCH=$ac_cv_path_TOUCH
10126if test -n "$TOUCH"; then
10127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10128$as_echo "$TOUCH" >&6; }
10129else
10130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10131$as_echo "no" >&6; }
10132fi
10133
10134
10135        if test "x$TOUCH" = x; then
10136          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10137        fi
10138      else
10139        # Otherwise we believe it is a complete path. Use it as it is.
10140        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10141$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10142        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10143$as_echo_n "checking for TOUCH... " >&6; }
10144        if test ! -x "$tool_specified"; then
10145          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10146$as_echo "not found" >&6; }
10147          as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10148        fi
10149        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10150$as_echo "$tool_specified" >&6; }
10151      fi
10152    fi
10153  fi
10154
10155
10156
10157  if test "x$TOUCH" = x; then
10158    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10159  fi
10160
10161
10162
10163
10164
10165  # Publish this variable in the help.
10166
10167
10168  if test "x$TR" = x; then
10169    # The variable is not set by user, try to locate tool using the code snippet
10170    for ac_prog in tr
10171do
10172  # Extract the first word of "$ac_prog", so it can be a program name with args.
10173set dummy $ac_prog; ac_word=$2
10174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10175$as_echo_n "checking for $ac_word... " >&6; }
10176if ${ac_cv_path_TR+:} false; then :
10177  $as_echo_n "(cached) " >&6
10178else
10179  case $TR in
10180  [\\/]* | ?:[\\/]*)
10181  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10182  ;;
10183  *)
10184  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10185for as_dir in $PATH
10186do
10187  IFS=$as_save_IFS
10188  test -z "$as_dir" && as_dir=.
10189    for ac_exec_ext in '' $ac_executable_extensions; do
10190  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10191    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10192    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10193    break 2
10194  fi
10195done
10196  done
10197IFS=$as_save_IFS
10198
10199  ;;
10200esac
10201fi
10202TR=$ac_cv_path_TR
10203if test -n "$TR"; then
10204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10205$as_echo "$TR" >&6; }
10206else
10207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10208$as_echo "no" >&6; }
10209fi
10210
10211
10212  test -n "$TR" && break
10213done
10214
10215  else
10216    # The variable is set, but is it from the command line or the environment?
10217
10218    # Try to remove the string !TR! from our list.
10219    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10220    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10221      # If it failed, the variable was not from the command line. Ignore it,
10222      # but warn the user (except for BASH, which is always set by the calling BASH).
10223      if test "xTR" != xBASH; then
10224        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10225$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10226      fi
10227      # Try to locate tool using the code snippet
10228      for ac_prog in tr
10229do
10230  # Extract the first word of "$ac_prog", so it can be a program name with args.
10231set dummy $ac_prog; ac_word=$2
10232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10233$as_echo_n "checking for $ac_word... " >&6; }
10234if ${ac_cv_path_TR+:} false; then :
10235  $as_echo_n "(cached) " >&6
10236else
10237  case $TR in
10238  [\\/]* | ?:[\\/]*)
10239  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10240  ;;
10241  *)
10242  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10243for as_dir in $PATH
10244do
10245  IFS=$as_save_IFS
10246  test -z "$as_dir" && as_dir=.
10247    for ac_exec_ext in '' $ac_executable_extensions; do
10248  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10249    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10250    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10251    break 2
10252  fi
10253done
10254  done
10255IFS=$as_save_IFS
10256
10257  ;;
10258esac
10259fi
10260TR=$ac_cv_path_TR
10261if test -n "$TR"; then
10262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10263$as_echo "$TR" >&6; }
10264else
10265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10266$as_echo "no" >&6; }
10267fi
10268
10269
10270  test -n "$TR" && break
10271done
10272
10273    else
10274      # If it succeeded, then it was overridden by the user. We will use it
10275      # for the tool.
10276
10277      # First remove it from the list of overridden variables, so we can test
10278      # for unknown variables in the end.
10279      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10280
10281      # Check if the provided tool contains a complete path.
10282      tool_specified="$TR"
10283      tool_basename="${tool_specified##*/}"
10284      if test "x$tool_basename" = "x$tool_specified"; then
10285        # A command without a complete path is provided, search $PATH.
10286        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10287$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10288        # Extract the first word of "$tool_basename", so it can be a program name with args.
10289set dummy $tool_basename; ac_word=$2
10290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10291$as_echo_n "checking for $ac_word... " >&6; }
10292if ${ac_cv_path_TR+:} false; then :
10293  $as_echo_n "(cached) " >&6
10294else
10295  case $TR in
10296  [\\/]* | ?:[\\/]*)
10297  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10298  ;;
10299  *)
10300  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10301for as_dir in $PATH
10302do
10303  IFS=$as_save_IFS
10304  test -z "$as_dir" && as_dir=.
10305    for ac_exec_ext in '' $ac_executable_extensions; do
10306  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10307    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10308    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10309    break 2
10310  fi
10311done
10312  done
10313IFS=$as_save_IFS
10314
10315  ;;
10316esac
10317fi
10318TR=$ac_cv_path_TR
10319if test -n "$TR"; then
10320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10321$as_echo "$TR" >&6; }
10322else
10323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10324$as_echo "no" >&6; }
10325fi
10326
10327
10328        if test "x$TR" = x; then
10329          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10330        fi
10331      else
10332        # Otherwise we believe it is a complete path. Use it as it is.
10333        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10334$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10335        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10336$as_echo_n "checking for TR... " >&6; }
10337        if test ! -x "$tool_specified"; then
10338          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10339$as_echo "not found" >&6; }
10340          as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10341        fi
10342        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10343$as_echo "$tool_specified" >&6; }
10344      fi
10345    fi
10346  fi
10347
10348
10349
10350  if test "x$TR" = x; then
10351    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10352  fi
10353
10354
10355
10356
10357
10358  # Publish this variable in the help.
10359
10360
10361  if test "x$UNAME" = x; then
10362    # The variable is not set by user, try to locate tool using the code snippet
10363    for ac_prog in uname
10364do
10365  # Extract the first word of "$ac_prog", so it can be a program name with args.
10366set dummy $ac_prog; ac_word=$2
10367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10368$as_echo_n "checking for $ac_word... " >&6; }
10369if ${ac_cv_path_UNAME+:} false; then :
10370  $as_echo_n "(cached) " >&6
10371else
10372  case $UNAME in
10373  [\\/]* | ?:[\\/]*)
10374  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10375  ;;
10376  *)
10377  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10378for as_dir in $PATH
10379do
10380  IFS=$as_save_IFS
10381  test -z "$as_dir" && as_dir=.
10382    for ac_exec_ext in '' $ac_executable_extensions; do
10383  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10384    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10385    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10386    break 2
10387  fi
10388done
10389  done
10390IFS=$as_save_IFS
10391
10392  ;;
10393esac
10394fi
10395UNAME=$ac_cv_path_UNAME
10396if test -n "$UNAME"; then
10397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10398$as_echo "$UNAME" >&6; }
10399else
10400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10401$as_echo "no" >&6; }
10402fi
10403
10404
10405  test -n "$UNAME" && break
10406done
10407
10408  else
10409    # The variable is set, but is it from the command line or the environment?
10410
10411    # Try to remove the string !UNAME! from our list.
10412    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10413    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10414      # If it failed, the variable was not from the command line. Ignore it,
10415      # but warn the user (except for BASH, which is always set by the calling BASH).
10416      if test "xUNAME" != xBASH; then
10417        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10418$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10419      fi
10420      # Try to locate tool using the code snippet
10421      for ac_prog in uname
10422do
10423  # Extract the first word of "$ac_prog", so it can be a program name with args.
10424set dummy $ac_prog; ac_word=$2
10425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10426$as_echo_n "checking for $ac_word... " >&6; }
10427if ${ac_cv_path_UNAME+:} false; then :
10428  $as_echo_n "(cached) " >&6
10429else
10430  case $UNAME in
10431  [\\/]* | ?:[\\/]*)
10432  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10433  ;;
10434  *)
10435  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10436for as_dir in $PATH
10437do
10438  IFS=$as_save_IFS
10439  test -z "$as_dir" && as_dir=.
10440    for ac_exec_ext in '' $ac_executable_extensions; do
10441  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10442    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10443    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10444    break 2
10445  fi
10446done
10447  done
10448IFS=$as_save_IFS
10449
10450  ;;
10451esac
10452fi
10453UNAME=$ac_cv_path_UNAME
10454if test -n "$UNAME"; then
10455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10456$as_echo "$UNAME" >&6; }
10457else
10458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10459$as_echo "no" >&6; }
10460fi
10461
10462
10463  test -n "$UNAME" && break
10464done
10465
10466    else
10467      # If it succeeded, then it was overridden by the user. We will use it
10468      # for the tool.
10469
10470      # First remove it from the list of overridden variables, so we can test
10471      # for unknown variables in the end.
10472      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10473
10474      # Check if the provided tool contains a complete path.
10475      tool_specified="$UNAME"
10476      tool_basename="${tool_specified##*/}"
10477      if test "x$tool_basename" = "x$tool_specified"; then
10478        # A command without a complete path is provided, search $PATH.
10479        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10480$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10481        # Extract the first word of "$tool_basename", so it can be a program name with args.
10482set dummy $tool_basename; ac_word=$2
10483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10484$as_echo_n "checking for $ac_word... " >&6; }
10485if ${ac_cv_path_UNAME+:} false; then :
10486  $as_echo_n "(cached) " >&6
10487else
10488  case $UNAME in
10489  [\\/]* | ?:[\\/]*)
10490  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10491  ;;
10492  *)
10493  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10494for as_dir in $PATH
10495do
10496  IFS=$as_save_IFS
10497  test -z "$as_dir" && as_dir=.
10498    for ac_exec_ext in '' $ac_executable_extensions; do
10499  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10500    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10501    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10502    break 2
10503  fi
10504done
10505  done
10506IFS=$as_save_IFS
10507
10508  ;;
10509esac
10510fi
10511UNAME=$ac_cv_path_UNAME
10512if test -n "$UNAME"; then
10513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10514$as_echo "$UNAME" >&6; }
10515else
10516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10517$as_echo "no" >&6; }
10518fi
10519
10520
10521        if test "x$UNAME" = x; then
10522          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10523        fi
10524      else
10525        # Otherwise we believe it is a complete path. Use it as it is.
10526        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10527$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10528        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10529$as_echo_n "checking for UNAME... " >&6; }
10530        if test ! -x "$tool_specified"; then
10531          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10532$as_echo "not found" >&6; }
10533          as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10534        fi
10535        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10536$as_echo "$tool_specified" >&6; }
10537      fi
10538    fi
10539  fi
10540
10541
10542
10543  if test "x$UNAME" = x; then
10544    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10545  fi
10546
10547
10548
10549
10550
10551  # Publish this variable in the help.
10552
10553
10554  if test "x$UNIQ" = x; then
10555    # The variable is not set by user, try to locate tool using the code snippet
10556    for ac_prog in uniq
10557do
10558  # Extract the first word of "$ac_prog", so it can be a program name with args.
10559set dummy $ac_prog; ac_word=$2
10560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10561$as_echo_n "checking for $ac_word... " >&6; }
10562if ${ac_cv_path_UNIQ+:} false; then :
10563  $as_echo_n "(cached) " >&6
10564else
10565  case $UNIQ in
10566  [\\/]* | ?:[\\/]*)
10567  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10568  ;;
10569  *)
10570  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10571for as_dir in $PATH
10572do
10573  IFS=$as_save_IFS
10574  test -z "$as_dir" && as_dir=.
10575    for ac_exec_ext in '' $ac_executable_extensions; do
10576  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10577    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10578    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10579    break 2
10580  fi
10581done
10582  done
10583IFS=$as_save_IFS
10584
10585  ;;
10586esac
10587fi
10588UNIQ=$ac_cv_path_UNIQ
10589if test -n "$UNIQ"; then
10590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10591$as_echo "$UNIQ" >&6; }
10592else
10593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10594$as_echo "no" >&6; }
10595fi
10596
10597
10598  test -n "$UNIQ" && break
10599done
10600
10601  else
10602    # The variable is set, but is it from the command line or the environment?
10603
10604    # Try to remove the string !UNIQ! from our list.
10605    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10606    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10607      # If it failed, the variable was not from the command line. Ignore it,
10608      # but warn the user (except for BASH, which is always set by the calling BASH).
10609      if test "xUNIQ" != xBASH; then
10610        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10611$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10612      fi
10613      # Try to locate tool using the code snippet
10614      for ac_prog in uniq
10615do
10616  # Extract the first word of "$ac_prog", so it can be a program name with args.
10617set dummy $ac_prog; ac_word=$2
10618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10619$as_echo_n "checking for $ac_word... " >&6; }
10620if ${ac_cv_path_UNIQ+:} false; then :
10621  $as_echo_n "(cached) " >&6
10622else
10623  case $UNIQ in
10624  [\\/]* | ?:[\\/]*)
10625  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10626  ;;
10627  *)
10628  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10629for as_dir in $PATH
10630do
10631  IFS=$as_save_IFS
10632  test -z "$as_dir" && as_dir=.
10633    for ac_exec_ext in '' $ac_executable_extensions; do
10634  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10635    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10636    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10637    break 2
10638  fi
10639done
10640  done
10641IFS=$as_save_IFS
10642
10643  ;;
10644esac
10645fi
10646UNIQ=$ac_cv_path_UNIQ
10647if test -n "$UNIQ"; then
10648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10649$as_echo "$UNIQ" >&6; }
10650else
10651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10652$as_echo "no" >&6; }
10653fi
10654
10655
10656  test -n "$UNIQ" && break
10657done
10658
10659    else
10660      # If it succeeded, then it was overridden by the user. We will use it
10661      # for the tool.
10662
10663      # First remove it from the list of overridden variables, so we can test
10664      # for unknown variables in the end.
10665      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10666
10667      # Check if the provided tool contains a complete path.
10668      tool_specified="$UNIQ"
10669      tool_basename="${tool_specified##*/}"
10670      if test "x$tool_basename" = "x$tool_specified"; then
10671        # A command without a complete path is provided, search $PATH.
10672        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10673$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10674        # Extract the first word of "$tool_basename", so it can be a program name with args.
10675set dummy $tool_basename; ac_word=$2
10676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10677$as_echo_n "checking for $ac_word... " >&6; }
10678if ${ac_cv_path_UNIQ+:} false; then :
10679  $as_echo_n "(cached) " >&6
10680else
10681  case $UNIQ in
10682  [\\/]* | ?:[\\/]*)
10683  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10684  ;;
10685  *)
10686  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10687for as_dir in $PATH
10688do
10689  IFS=$as_save_IFS
10690  test -z "$as_dir" && as_dir=.
10691    for ac_exec_ext in '' $ac_executable_extensions; do
10692  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10693    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10694    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10695    break 2
10696  fi
10697done
10698  done
10699IFS=$as_save_IFS
10700
10701  ;;
10702esac
10703fi
10704UNIQ=$ac_cv_path_UNIQ
10705if test -n "$UNIQ"; then
10706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10707$as_echo "$UNIQ" >&6; }
10708else
10709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10710$as_echo "no" >&6; }
10711fi
10712
10713
10714        if test "x$UNIQ" = x; then
10715          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10716        fi
10717      else
10718        # Otherwise we believe it is a complete path. Use it as it is.
10719        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10720$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10721        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10722$as_echo_n "checking for UNIQ... " >&6; }
10723        if test ! -x "$tool_specified"; then
10724          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10725$as_echo "not found" >&6; }
10726          as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10727        fi
10728        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10729$as_echo "$tool_specified" >&6; }
10730      fi
10731    fi
10732  fi
10733
10734
10735
10736  if test "x$UNIQ" = x; then
10737    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10738  fi
10739
10740
10741
10742
10743
10744  # Publish this variable in the help.
10745
10746
10747  if test "x$WC" = x; then
10748    # The variable is not set by user, try to locate tool using the code snippet
10749    for ac_prog in wc
10750do
10751  # Extract the first word of "$ac_prog", so it can be a program name with args.
10752set dummy $ac_prog; ac_word=$2
10753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10754$as_echo_n "checking for $ac_word... " >&6; }
10755if ${ac_cv_path_WC+:} false; then :
10756  $as_echo_n "(cached) " >&6
10757else
10758  case $WC in
10759  [\\/]* | ?:[\\/]*)
10760  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10761  ;;
10762  *)
10763  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10764for as_dir in $PATH
10765do
10766  IFS=$as_save_IFS
10767  test -z "$as_dir" && as_dir=.
10768    for ac_exec_ext in '' $ac_executable_extensions; do
10769  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10770    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10771    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10772    break 2
10773  fi
10774done
10775  done
10776IFS=$as_save_IFS
10777
10778  ;;
10779esac
10780fi
10781WC=$ac_cv_path_WC
10782if test -n "$WC"; then
10783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10784$as_echo "$WC" >&6; }
10785else
10786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10787$as_echo "no" >&6; }
10788fi
10789
10790
10791  test -n "$WC" && break
10792done
10793
10794  else
10795    # The variable is set, but is it from the command line or the environment?
10796
10797    # Try to remove the string !WC! from our list.
10798    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10799    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10800      # If it failed, the variable was not from the command line. Ignore it,
10801      # but warn the user (except for BASH, which is always set by the calling BASH).
10802      if test "xWC" != xBASH; then
10803        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10804$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10805      fi
10806      # Try to locate tool using the code snippet
10807      for ac_prog in wc
10808do
10809  # Extract the first word of "$ac_prog", so it can be a program name with args.
10810set dummy $ac_prog; ac_word=$2
10811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10812$as_echo_n "checking for $ac_word... " >&6; }
10813if ${ac_cv_path_WC+:} false; then :
10814  $as_echo_n "(cached) " >&6
10815else
10816  case $WC in
10817  [\\/]* | ?:[\\/]*)
10818  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10819  ;;
10820  *)
10821  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10822for as_dir in $PATH
10823do
10824  IFS=$as_save_IFS
10825  test -z "$as_dir" && as_dir=.
10826    for ac_exec_ext in '' $ac_executable_extensions; do
10827  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10828    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10829    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10830    break 2
10831  fi
10832done
10833  done
10834IFS=$as_save_IFS
10835
10836  ;;
10837esac
10838fi
10839WC=$ac_cv_path_WC
10840if test -n "$WC"; then
10841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10842$as_echo "$WC" >&6; }
10843else
10844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10845$as_echo "no" >&6; }
10846fi
10847
10848
10849  test -n "$WC" && break
10850done
10851
10852    else
10853      # If it succeeded, then it was overridden by the user. We will use it
10854      # for the tool.
10855
10856      # First remove it from the list of overridden variables, so we can test
10857      # for unknown variables in the end.
10858      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10859
10860      # Check if the provided tool contains a complete path.
10861      tool_specified="$WC"
10862      tool_basename="${tool_specified##*/}"
10863      if test "x$tool_basename" = "x$tool_specified"; then
10864        # A command without a complete path is provided, search $PATH.
10865        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10866$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10867        # Extract the first word of "$tool_basename", so it can be a program name with args.
10868set dummy $tool_basename; ac_word=$2
10869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10870$as_echo_n "checking for $ac_word... " >&6; }
10871if ${ac_cv_path_WC+:} false; then :
10872  $as_echo_n "(cached) " >&6
10873else
10874  case $WC in
10875  [\\/]* | ?:[\\/]*)
10876  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10877  ;;
10878  *)
10879  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10880for as_dir in $PATH
10881do
10882  IFS=$as_save_IFS
10883  test -z "$as_dir" && as_dir=.
10884    for ac_exec_ext in '' $ac_executable_extensions; do
10885  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10886    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10887    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10888    break 2
10889  fi
10890done
10891  done
10892IFS=$as_save_IFS
10893
10894  ;;
10895esac
10896fi
10897WC=$ac_cv_path_WC
10898if test -n "$WC"; then
10899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10900$as_echo "$WC" >&6; }
10901else
10902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10903$as_echo "no" >&6; }
10904fi
10905
10906
10907        if test "x$WC" = x; then
10908          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10909        fi
10910      else
10911        # Otherwise we believe it is a complete path. Use it as it is.
10912        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
10913$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
10914        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
10915$as_echo_n "checking for WC... " >&6; }
10916        if test ! -x "$tool_specified"; then
10917          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10918$as_echo "not found" >&6; }
10919          as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
10920        fi
10921        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10922$as_echo "$tool_specified" >&6; }
10923      fi
10924    fi
10925  fi
10926
10927
10928
10929  if test "x$WC" = x; then
10930    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
10931  fi
10932
10933
10934
10935
10936
10937  # Publish this variable in the help.
10938
10939
10940  if test "x$WHICH" = x; then
10941    # The variable is not set by user, try to locate tool using the code snippet
10942    for ac_prog in which
10943do
10944  # Extract the first word of "$ac_prog", so it can be a program name with args.
10945set dummy $ac_prog; ac_word=$2
10946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10947$as_echo_n "checking for $ac_word... " >&6; }
10948if ${ac_cv_path_WHICH+:} false; then :
10949  $as_echo_n "(cached) " >&6
10950else
10951  case $WHICH in
10952  [\\/]* | ?:[\\/]*)
10953  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
10954  ;;
10955  *)
10956  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10957for as_dir in $PATH
10958do
10959  IFS=$as_save_IFS
10960  test -z "$as_dir" && as_dir=.
10961    for ac_exec_ext in '' $ac_executable_extensions; do
10962  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10963    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
10964    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10965    break 2
10966  fi
10967done
10968  done
10969IFS=$as_save_IFS
10970
10971  ;;
10972esac
10973fi
10974WHICH=$ac_cv_path_WHICH
10975if test -n "$WHICH"; then
10976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
10977$as_echo "$WHICH" >&6; }
10978else
10979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10980$as_echo "no" >&6; }
10981fi
10982
10983
10984  test -n "$WHICH" && break
10985done
10986
10987  else
10988    # The variable is set, but is it from the command line or the environment?
10989
10990    # Try to remove the string !WHICH! from our list.
10991    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
10992    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10993      # If it failed, the variable was not from the command line. Ignore it,
10994      # but warn the user (except for BASH, which is always set by the calling BASH).
10995      if test "xWHICH" != xBASH; then
10996        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
10997$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
10998      fi
10999      # Try to locate tool using the code snippet
11000      for ac_prog in which
11001do
11002  # Extract the first word of "$ac_prog", so it can be a program name with args.
11003set dummy $ac_prog; ac_word=$2
11004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11005$as_echo_n "checking for $ac_word... " >&6; }
11006if ${ac_cv_path_WHICH+:} false; then :
11007  $as_echo_n "(cached) " >&6
11008else
11009  case $WHICH in
11010  [\\/]* | ?:[\\/]*)
11011  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11012  ;;
11013  *)
11014  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11015for as_dir in $PATH
11016do
11017  IFS=$as_save_IFS
11018  test -z "$as_dir" && as_dir=.
11019    for ac_exec_ext in '' $ac_executable_extensions; do
11020  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11021    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11022    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11023    break 2
11024  fi
11025done
11026  done
11027IFS=$as_save_IFS
11028
11029  ;;
11030esac
11031fi
11032WHICH=$ac_cv_path_WHICH
11033if test -n "$WHICH"; then
11034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11035$as_echo "$WHICH" >&6; }
11036else
11037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11038$as_echo "no" >&6; }
11039fi
11040
11041
11042  test -n "$WHICH" && break
11043done
11044
11045    else
11046      # If it succeeded, then it was overridden by the user. We will use it
11047      # for the tool.
11048
11049      # First remove it from the list of overridden variables, so we can test
11050      # for unknown variables in the end.
11051      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11052
11053      # Check if the provided tool contains a complete path.
11054      tool_specified="$WHICH"
11055      tool_basename="${tool_specified##*/}"
11056      if test "x$tool_basename" = "x$tool_specified"; then
11057        # A command without a complete path is provided, search $PATH.
11058        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11059$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11060        # Extract the first word of "$tool_basename", so it can be a program name with args.
11061set dummy $tool_basename; ac_word=$2
11062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11063$as_echo_n "checking for $ac_word... " >&6; }
11064if ${ac_cv_path_WHICH+:} false; then :
11065  $as_echo_n "(cached) " >&6
11066else
11067  case $WHICH in
11068  [\\/]* | ?:[\\/]*)
11069  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11070  ;;
11071  *)
11072  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11073for as_dir in $PATH
11074do
11075  IFS=$as_save_IFS
11076  test -z "$as_dir" && as_dir=.
11077    for ac_exec_ext in '' $ac_executable_extensions; do
11078  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11079    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11080    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11081    break 2
11082  fi
11083done
11084  done
11085IFS=$as_save_IFS
11086
11087  ;;
11088esac
11089fi
11090WHICH=$ac_cv_path_WHICH
11091if test -n "$WHICH"; then
11092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11093$as_echo "$WHICH" >&6; }
11094else
11095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11096$as_echo "no" >&6; }
11097fi
11098
11099
11100        if test "x$WHICH" = x; then
11101          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11102        fi
11103      else
11104        # Otherwise we believe it is a complete path. Use it as it is.
11105        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11106$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11107        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11108$as_echo_n "checking for WHICH... " >&6; }
11109        if test ! -x "$tool_specified"; then
11110          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11111$as_echo "not found" >&6; }
11112          as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11113        fi
11114        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11115$as_echo "$tool_specified" >&6; }
11116      fi
11117    fi
11118  fi
11119
11120
11121
11122  if test "x$WHICH" = x; then
11123    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11124  fi
11125
11126
11127
11128
11129
11130  # Publish this variable in the help.
11131
11132
11133  if test "x$XARGS" = x; then
11134    # The variable is not set by user, try to locate tool using the code snippet
11135    for ac_prog in xargs
11136do
11137  # Extract the first word of "$ac_prog", so it can be a program name with args.
11138set dummy $ac_prog; ac_word=$2
11139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11140$as_echo_n "checking for $ac_word... " >&6; }
11141if ${ac_cv_path_XARGS+:} false; then :
11142  $as_echo_n "(cached) " >&6
11143else
11144  case $XARGS in
11145  [\\/]* | ?:[\\/]*)
11146  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11147  ;;
11148  *)
11149  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11150for as_dir in $PATH
11151do
11152  IFS=$as_save_IFS
11153  test -z "$as_dir" && as_dir=.
11154    for ac_exec_ext in '' $ac_executable_extensions; do
11155  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11156    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11157    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11158    break 2
11159  fi
11160done
11161  done
11162IFS=$as_save_IFS
11163
11164  ;;
11165esac
11166fi
11167XARGS=$ac_cv_path_XARGS
11168if test -n "$XARGS"; then
11169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11170$as_echo "$XARGS" >&6; }
11171else
11172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11173$as_echo "no" >&6; }
11174fi
11175
11176
11177  test -n "$XARGS" && break
11178done
11179
11180  else
11181    # The variable is set, but is it from the command line or the environment?
11182
11183    # Try to remove the string !XARGS! from our list.
11184    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11185    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11186      # If it failed, the variable was not from the command line. Ignore it,
11187      # but warn the user (except for BASH, which is always set by the calling BASH).
11188      if test "xXARGS" != xBASH; then
11189        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11190$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11191      fi
11192      # Try to locate tool using the code snippet
11193      for ac_prog in xargs
11194do
11195  # Extract the first word of "$ac_prog", so it can be a program name with args.
11196set dummy $ac_prog; ac_word=$2
11197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11198$as_echo_n "checking for $ac_word... " >&6; }
11199if ${ac_cv_path_XARGS+:} false; then :
11200  $as_echo_n "(cached) " >&6
11201else
11202  case $XARGS in
11203  [\\/]* | ?:[\\/]*)
11204  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11205  ;;
11206  *)
11207  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11208for as_dir in $PATH
11209do
11210  IFS=$as_save_IFS
11211  test -z "$as_dir" && as_dir=.
11212    for ac_exec_ext in '' $ac_executable_extensions; do
11213  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11214    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11215    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11216    break 2
11217  fi
11218done
11219  done
11220IFS=$as_save_IFS
11221
11222  ;;
11223esac
11224fi
11225XARGS=$ac_cv_path_XARGS
11226if test -n "$XARGS"; then
11227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11228$as_echo "$XARGS" >&6; }
11229else
11230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11231$as_echo "no" >&6; }
11232fi
11233
11234
11235  test -n "$XARGS" && break
11236done
11237
11238    else
11239      # If it succeeded, then it was overridden by the user. We will use it
11240      # for the tool.
11241
11242      # First remove it from the list of overridden variables, so we can test
11243      # for unknown variables in the end.
11244      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11245
11246      # Check if the provided tool contains a complete path.
11247      tool_specified="$XARGS"
11248      tool_basename="${tool_specified##*/}"
11249      if test "x$tool_basename" = "x$tool_specified"; then
11250        # A command without a complete path is provided, search $PATH.
11251        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11252$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11253        # Extract the first word of "$tool_basename", so it can be a program name with args.
11254set dummy $tool_basename; ac_word=$2
11255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11256$as_echo_n "checking for $ac_word... " >&6; }
11257if ${ac_cv_path_XARGS+:} false; then :
11258  $as_echo_n "(cached) " >&6
11259else
11260  case $XARGS in
11261  [\\/]* | ?:[\\/]*)
11262  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11263  ;;
11264  *)
11265  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11266for as_dir in $PATH
11267do
11268  IFS=$as_save_IFS
11269  test -z "$as_dir" && as_dir=.
11270    for ac_exec_ext in '' $ac_executable_extensions; do
11271  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11272    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11273    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11274    break 2
11275  fi
11276done
11277  done
11278IFS=$as_save_IFS
11279
11280  ;;
11281esac
11282fi
11283XARGS=$ac_cv_path_XARGS
11284if test -n "$XARGS"; then
11285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11286$as_echo "$XARGS" >&6; }
11287else
11288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11289$as_echo "no" >&6; }
11290fi
11291
11292
11293        if test "x$XARGS" = x; then
11294          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11295        fi
11296      else
11297        # Otherwise we believe it is a complete path. Use it as it is.
11298        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11299$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11300        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11301$as_echo_n "checking for XARGS... " >&6; }
11302        if test ! -x "$tool_specified"; then
11303          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11304$as_echo "not found" >&6; }
11305          as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11306        fi
11307        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11308$as_echo "$tool_specified" >&6; }
11309      fi
11310    fi
11311  fi
11312
11313
11314
11315  if test "x$XARGS" = x; then
11316    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11317  fi
11318
11319
11320
11321  # Then required tools that require some special treatment.
11322
11323
11324  # Publish this variable in the help.
11325
11326
11327  if test "x$AWK" = x; then
11328    # The variable is not set by user, try to locate tool using the code snippet
11329    for ac_prog in gawk mawk nawk awk
11330do
11331  # Extract the first word of "$ac_prog", so it can be a program name with args.
11332set dummy $ac_prog; ac_word=$2
11333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11334$as_echo_n "checking for $ac_word... " >&6; }
11335if ${ac_cv_prog_AWK+:} false; then :
11336  $as_echo_n "(cached) " >&6
11337else
11338  if test -n "$AWK"; then
11339  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11340else
11341as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11342for as_dir in $PATH
11343do
11344  IFS=$as_save_IFS
11345  test -z "$as_dir" && as_dir=.
11346    for ac_exec_ext in '' $ac_executable_extensions; do
11347  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11348    ac_cv_prog_AWK="$ac_prog"
11349    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11350    break 2
11351  fi
11352done
11353  done
11354IFS=$as_save_IFS
11355
11356fi
11357fi
11358AWK=$ac_cv_prog_AWK
11359if test -n "$AWK"; then
11360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11361$as_echo "$AWK" >&6; }
11362else
11363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11364$as_echo "no" >&6; }
11365fi
11366
11367
11368  test -n "$AWK" && break
11369done
11370
11371  else
11372    # The variable is set, but is it from the command line or the environment?
11373
11374    # Try to remove the string !AWK! from our list.
11375    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11376    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11377      # If it failed, the variable was not from the command line. Ignore it,
11378      # but warn the user (except for BASH, which is always set by the calling BASH).
11379      if test "xAWK" != xBASH; then
11380        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11381$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11382      fi
11383      # Try to locate tool using the code snippet
11384      for ac_prog in gawk mawk nawk awk
11385do
11386  # Extract the first word of "$ac_prog", so it can be a program name with args.
11387set dummy $ac_prog; ac_word=$2
11388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11389$as_echo_n "checking for $ac_word... " >&6; }
11390if ${ac_cv_prog_AWK+:} false; then :
11391  $as_echo_n "(cached) " >&6
11392else
11393  if test -n "$AWK"; then
11394  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11395else
11396as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11397for as_dir in $PATH
11398do
11399  IFS=$as_save_IFS
11400  test -z "$as_dir" && as_dir=.
11401    for ac_exec_ext in '' $ac_executable_extensions; do
11402  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11403    ac_cv_prog_AWK="$ac_prog"
11404    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11405    break 2
11406  fi
11407done
11408  done
11409IFS=$as_save_IFS
11410
11411fi
11412fi
11413AWK=$ac_cv_prog_AWK
11414if test -n "$AWK"; then
11415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11416$as_echo "$AWK" >&6; }
11417else
11418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11419$as_echo "no" >&6; }
11420fi
11421
11422
11423  test -n "$AWK" && break
11424done
11425
11426    else
11427      # If it succeeded, then it was overridden by the user. We will use it
11428      # for the tool.
11429
11430      # First remove it from the list of overridden variables, so we can test
11431      # for unknown variables in the end.
11432      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11433
11434      # Check if the provided tool contains a complete path.
11435      tool_specified="$AWK"
11436      tool_basename="${tool_specified##*/}"
11437      if test "x$tool_basename" = "x$tool_specified"; then
11438        # A command without a complete path is provided, search $PATH.
11439        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11440$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11441        # Extract the first word of "$tool_basename", so it can be a program name with args.
11442set dummy $tool_basename; ac_word=$2
11443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11444$as_echo_n "checking for $ac_word... " >&6; }
11445if ${ac_cv_path_AWK+:} false; then :
11446  $as_echo_n "(cached) " >&6
11447else
11448  case $AWK in
11449  [\\/]* | ?:[\\/]*)
11450  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11451  ;;
11452  *)
11453  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11454for as_dir in $PATH
11455do
11456  IFS=$as_save_IFS
11457  test -z "$as_dir" && as_dir=.
11458    for ac_exec_ext in '' $ac_executable_extensions; do
11459  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11460    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11461    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11462    break 2
11463  fi
11464done
11465  done
11466IFS=$as_save_IFS
11467
11468  ;;
11469esac
11470fi
11471AWK=$ac_cv_path_AWK
11472if test -n "$AWK"; then
11473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11474$as_echo "$AWK" >&6; }
11475else
11476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11477$as_echo "no" >&6; }
11478fi
11479
11480
11481        if test "x$AWK" = x; then
11482          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11483        fi
11484      else
11485        # Otherwise we believe it is a complete path. Use it as it is.
11486        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11487$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11488        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11489$as_echo_n "checking for AWK... " >&6; }
11490        if test ! -x "$tool_specified"; then
11491          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11492$as_echo "not found" >&6; }
11493          as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11494        fi
11495        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11496$as_echo "$tool_specified" >&6; }
11497      fi
11498    fi
11499  fi
11500
11501
11502  if test "x$AWK" = x; then
11503    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11504  fi
11505
11506
11507
11508
11509  # Publish this variable in the help.
11510
11511
11512  if test "x$GREP" = x; then
11513    # The variable is not set by user, try to locate tool using the code snippet
11514    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11515$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11516if ${ac_cv_path_GREP+:} false; then :
11517  $as_echo_n "(cached) " >&6
11518else
11519  if test -z "$GREP"; then
11520  ac_path_GREP_found=false
11521  # Loop through the user's path and test for each of PROGNAME-LIST
11522  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11523for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11524do
11525  IFS=$as_save_IFS
11526  test -z "$as_dir" && as_dir=.
11527    for ac_prog in grep ggrep; do
11528    for ac_exec_ext in '' $ac_executable_extensions; do
11529      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11530      as_fn_executable_p "$ac_path_GREP" || continue
11531# Check for GNU ac_path_GREP and select it if it is found.
11532  # Check for GNU $ac_path_GREP
11533case `"$ac_path_GREP" --version 2>&1` in
11534*GNU*)
11535  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11536*)
11537  ac_count=0
11538  $as_echo_n 0123456789 >"conftest.in"
11539  while :
11540  do
11541    cat "conftest.in" "conftest.in" >"conftest.tmp"
11542    mv "conftest.tmp" "conftest.in"
11543    cp "conftest.in" "conftest.nl"
11544    $as_echo 'GREP' >> "conftest.nl"
11545    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11546    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11547    as_fn_arith $ac_count + 1 && ac_count=$as_val
11548    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11549      # Best one so far, save it but keep looking for a better one
11550      ac_cv_path_GREP="$ac_path_GREP"
11551      ac_path_GREP_max=$ac_count
11552    fi
11553    # 10*(2^10) chars as input seems more than enough
11554    test $ac_count -gt 10 && break
11555  done
11556  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11557esac
11558
11559      $ac_path_GREP_found && break 3
11560    done
11561  done
11562  done
11563IFS=$as_save_IFS
11564  if test -z "$ac_cv_path_GREP"; then
11565    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11566  fi
11567else
11568  ac_cv_path_GREP=$GREP
11569fi
11570
11571fi
11572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11573$as_echo "$ac_cv_path_GREP" >&6; }
11574 GREP="$ac_cv_path_GREP"
11575
11576
11577  else
11578    # The variable is set, but is it from the command line or the environment?
11579
11580    # Try to remove the string !GREP! from our list.
11581    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11582    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11583      # If it failed, the variable was not from the command line. Ignore it,
11584      # but warn the user (except for BASH, which is always set by the calling BASH).
11585      if test "xGREP" != xBASH; then
11586        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11587$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11588      fi
11589      # Try to locate tool using the code snippet
11590      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11591$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11592if ${ac_cv_path_GREP+:} false; then :
11593  $as_echo_n "(cached) " >&6
11594else
11595  if test -z "$GREP"; then
11596  ac_path_GREP_found=false
11597  # Loop through the user's path and test for each of PROGNAME-LIST
11598  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11599for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11600do
11601  IFS=$as_save_IFS
11602  test -z "$as_dir" && as_dir=.
11603    for ac_prog in grep ggrep; do
11604    for ac_exec_ext in '' $ac_executable_extensions; do
11605      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11606      as_fn_executable_p "$ac_path_GREP" || continue
11607# Check for GNU ac_path_GREP and select it if it is found.
11608  # Check for GNU $ac_path_GREP
11609case `"$ac_path_GREP" --version 2>&1` in
11610*GNU*)
11611  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11612*)
11613  ac_count=0
11614  $as_echo_n 0123456789 >"conftest.in"
11615  while :
11616  do
11617    cat "conftest.in" "conftest.in" >"conftest.tmp"
11618    mv "conftest.tmp" "conftest.in"
11619    cp "conftest.in" "conftest.nl"
11620    $as_echo 'GREP' >> "conftest.nl"
11621    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11622    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11623    as_fn_arith $ac_count + 1 && ac_count=$as_val
11624    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11625      # Best one so far, save it but keep looking for a better one
11626      ac_cv_path_GREP="$ac_path_GREP"
11627      ac_path_GREP_max=$ac_count
11628    fi
11629    # 10*(2^10) chars as input seems more than enough
11630    test $ac_count -gt 10 && break
11631  done
11632  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11633esac
11634
11635      $ac_path_GREP_found && break 3
11636    done
11637  done
11638  done
11639IFS=$as_save_IFS
11640  if test -z "$ac_cv_path_GREP"; then
11641    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11642  fi
11643else
11644  ac_cv_path_GREP=$GREP
11645fi
11646
11647fi
11648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11649$as_echo "$ac_cv_path_GREP" >&6; }
11650 GREP="$ac_cv_path_GREP"
11651
11652
11653    else
11654      # If it succeeded, then it was overridden by the user. We will use it
11655      # for the tool.
11656
11657      # First remove it from the list of overridden variables, so we can test
11658      # for unknown variables in the end.
11659      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11660
11661      # Check if the provided tool contains a complete path.
11662      tool_specified="$GREP"
11663      tool_basename="${tool_specified##*/}"
11664      if test "x$tool_basename" = "x$tool_specified"; then
11665        # A command without a complete path is provided, search $PATH.
11666        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11667$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11668        # Extract the first word of "$tool_basename", so it can be a program name with args.
11669set dummy $tool_basename; ac_word=$2
11670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11671$as_echo_n "checking for $ac_word... " >&6; }
11672if ${ac_cv_path_GREP+:} false; then :
11673  $as_echo_n "(cached) " >&6
11674else
11675  case $GREP in
11676  [\\/]* | ?:[\\/]*)
11677  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11678  ;;
11679  *)
11680  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11681for as_dir in $PATH
11682do
11683  IFS=$as_save_IFS
11684  test -z "$as_dir" && as_dir=.
11685    for ac_exec_ext in '' $ac_executable_extensions; do
11686  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11687    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11688    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11689    break 2
11690  fi
11691done
11692  done
11693IFS=$as_save_IFS
11694
11695  ;;
11696esac
11697fi
11698GREP=$ac_cv_path_GREP
11699if test -n "$GREP"; then
11700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11701$as_echo "$GREP" >&6; }
11702else
11703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11704$as_echo "no" >&6; }
11705fi
11706
11707
11708        if test "x$GREP" = x; then
11709          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11710        fi
11711      else
11712        # Otherwise we believe it is a complete path. Use it as it is.
11713        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11714$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11715        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11716$as_echo_n "checking for GREP... " >&6; }
11717        if test ! -x "$tool_specified"; then
11718          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11719$as_echo "not found" >&6; }
11720          as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11721        fi
11722        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11723$as_echo "$tool_specified" >&6; }
11724      fi
11725    fi
11726  fi
11727
11728
11729  if test "x$GREP" = x; then
11730    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11731  fi
11732
11733
11734
11735
11736  # Publish this variable in the help.
11737
11738
11739  if test "x$EGREP" = x; then
11740    # The variable is not set by user, try to locate tool using the code snippet
11741    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11742$as_echo_n "checking for egrep... " >&6; }
11743if ${ac_cv_path_EGREP+:} false; then :
11744  $as_echo_n "(cached) " >&6
11745else
11746  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11747   then ac_cv_path_EGREP="$GREP -E"
11748   else
11749     if test -z "$EGREP"; then
11750  ac_path_EGREP_found=false
11751  # Loop through the user's path and test for each of PROGNAME-LIST
11752  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11753for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11754do
11755  IFS=$as_save_IFS
11756  test -z "$as_dir" && as_dir=.
11757    for ac_prog in egrep; do
11758    for ac_exec_ext in '' $ac_executable_extensions; do
11759      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11760      as_fn_executable_p "$ac_path_EGREP" || continue
11761# Check for GNU ac_path_EGREP and select it if it is found.
11762  # Check for GNU $ac_path_EGREP
11763case `"$ac_path_EGREP" --version 2>&1` in
11764*GNU*)
11765  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11766*)
11767  ac_count=0
11768  $as_echo_n 0123456789 >"conftest.in"
11769  while :
11770  do
11771    cat "conftest.in" "conftest.in" >"conftest.tmp"
11772    mv "conftest.tmp" "conftest.in"
11773    cp "conftest.in" "conftest.nl"
11774    $as_echo 'EGREP' >> "conftest.nl"
11775    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11776    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11777    as_fn_arith $ac_count + 1 && ac_count=$as_val
11778    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11779      # Best one so far, save it but keep looking for a better one
11780      ac_cv_path_EGREP="$ac_path_EGREP"
11781      ac_path_EGREP_max=$ac_count
11782    fi
11783    # 10*(2^10) chars as input seems more than enough
11784    test $ac_count -gt 10 && break
11785  done
11786  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11787esac
11788
11789      $ac_path_EGREP_found && break 3
11790    done
11791  done
11792  done
11793IFS=$as_save_IFS
11794  if test -z "$ac_cv_path_EGREP"; then
11795    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11796  fi
11797else
11798  ac_cv_path_EGREP=$EGREP
11799fi
11800
11801   fi
11802fi
11803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11804$as_echo "$ac_cv_path_EGREP" >&6; }
11805 EGREP="$ac_cv_path_EGREP"
11806
11807
11808  else
11809    # The variable is set, but is it from the command line or the environment?
11810
11811    # Try to remove the string !EGREP! from our list.
11812    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11813    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11814      # If it failed, the variable was not from the command line. Ignore it,
11815      # but warn the user (except for BASH, which is always set by the calling BASH).
11816      if test "xEGREP" != xBASH; then
11817        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11818$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11819      fi
11820      # Try to locate tool using the code snippet
11821      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11822$as_echo_n "checking for egrep... " >&6; }
11823if ${ac_cv_path_EGREP+:} false; then :
11824  $as_echo_n "(cached) " >&6
11825else
11826  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11827   then ac_cv_path_EGREP="$GREP -E"
11828   else
11829     if test -z "$EGREP"; then
11830  ac_path_EGREP_found=false
11831  # Loop through the user's path and test for each of PROGNAME-LIST
11832  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11833for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11834do
11835  IFS=$as_save_IFS
11836  test -z "$as_dir" && as_dir=.
11837    for ac_prog in egrep; do
11838    for ac_exec_ext in '' $ac_executable_extensions; do
11839      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11840      as_fn_executable_p "$ac_path_EGREP" || continue
11841# Check for GNU ac_path_EGREP and select it if it is found.
11842  # Check for GNU $ac_path_EGREP
11843case `"$ac_path_EGREP" --version 2>&1` in
11844*GNU*)
11845  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11846*)
11847  ac_count=0
11848  $as_echo_n 0123456789 >"conftest.in"
11849  while :
11850  do
11851    cat "conftest.in" "conftest.in" >"conftest.tmp"
11852    mv "conftest.tmp" "conftest.in"
11853    cp "conftest.in" "conftest.nl"
11854    $as_echo 'EGREP' >> "conftest.nl"
11855    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11856    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11857    as_fn_arith $ac_count + 1 && ac_count=$as_val
11858    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11859      # Best one so far, save it but keep looking for a better one
11860      ac_cv_path_EGREP="$ac_path_EGREP"
11861      ac_path_EGREP_max=$ac_count
11862    fi
11863    # 10*(2^10) chars as input seems more than enough
11864    test $ac_count -gt 10 && break
11865  done
11866  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11867esac
11868
11869      $ac_path_EGREP_found && break 3
11870    done
11871  done
11872  done
11873IFS=$as_save_IFS
11874  if test -z "$ac_cv_path_EGREP"; then
11875    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11876  fi
11877else
11878  ac_cv_path_EGREP=$EGREP
11879fi
11880
11881   fi
11882fi
11883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11884$as_echo "$ac_cv_path_EGREP" >&6; }
11885 EGREP="$ac_cv_path_EGREP"
11886
11887
11888    else
11889      # If it succeeded, then it was overridden by the user. We will use it
11890      # for the tool.
11891
11892      # First remove it from the list of overridden variables, so we can test
11893      # for unknown variables in the end.
11894      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11895
11896      # Check if the provided tool contains a complete path.
11897      tool_specified="$EGREP"
11898      tool_basename="${tool_specified##*/}"
11899      if test "x$tool_basename" = "x$tool_specified"; then
11900        # A command without a complete path is provided, search $PATH.
11901        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
11902$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
11903        # Extract the first word of "$tool_basename", so it can be a program name with args.
11904set dummy $tool_basename; ac_word=$2
11905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11906$as_echo_n "checking for $ac_word... " >&6; }
11907if ${ac_cv_path_EGREP+:} false; then :
11908  $as_echo_n "(cached) " >&6
11909else
11910  case $EGREP in
11911  [\\/]* | ?:[\\/]*)
11912  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
11913  ;;
11914  *)
11915  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11916for as_dir in $PATH
11917do
11918  IFS=$as_save_IFS
11919  test -z "$as_dir" && as_dir=.
11920    for ac_exec_ext in '' $ac_executable_extensions; do
11921  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11922    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
11923    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11924    break 2
11925  fi
11926done
11927  done
11928IFS=$as_save_IFS
11929
11930  ;;
11931esac
11932fi
11933EGREP=$ac_cv_path_EGREP
11934if test -n "$EGREP"; then
11935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
11936$as_echo "$EGREP" >&6; }
11937else
11938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11939$as_echo "no" >&6; }
11940fi
11941
11942
11943        if test "x$EGREP" = x; then
11944          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11945        fi
11946      else
11947        # Otherwise we believe it is a complete path. Use it as it is.
11948        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
11949$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
11950        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
11951$as_echo_n "checking for EGREP... " >&6; }
11952        if test ! -x "$tool_specified"; then
11953          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11954$as_echo "not found" >&6; }
11955          as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11956        fi
11957        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11958$as_echo "$tool_specified" >&6; }
11959      fi
11960    fi
11961  fi
11962
11963
11964  if test "x$EGREP" = x; then
11965    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
11966  fi
11967
11968
11969
11970
11971  # Publish this variable in the help.
11972
11973
11974  if test "x$FGREP" = x; then
11975    # The variable is not set by user, try to locate tool using the code snippet
11976    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
11977$as_echo_n "checking for fgrep... " >&6; }
11978if ${ac_cv_path_FGREP+:} false; then :
11979  $as_echo_n "(cached) " >&6
11980else
11981  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
11982   then ac_cv_path_FGREP="$GREP -F"
11983   else
11984     if test -z "$FGREP"; then
11985  ac_path_FGREP_found=false
11986  # Loop through the user's path and test for each of PROGNAME-LIST
11987  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11988for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11989do
11990  IFS=$as_save_IFS
11991  test -z "$as_dir" && as_dir=.
11992    for ac_prog in fgrep; do
11993    for ac_exec_ext in '' $ac_executable_extensions; do
11994      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
11995      as_fn_executable_p "$ac_path_FGREP" || continue
11996# Check for GNU ac_path_FGREP and select it if it is found.
11997  # Check for GNU $ac_path_FGREP
11998case `"$ac_path_FGREP" --version 2>&1` in
11999*GNU*)
12000  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12001*)
12002  ac_count=0
12003  $as_echo_n 0123456789 >"conftest.in"
12004  while :
12005  do
12006    cat "conftest.in" "conftest.in" >"conftest.tmp"
12007    mv "conftest.tmp" "conftest.in"
12008    cp "conftest.in" "conftest.nl"
12009    $as_echo 'FGREP' >> "conftest.nl"
12010    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12011    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12012    as_fn_arith $ac_count + 1 && ac_count=$as_val
12013    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12014      # Best one so far, save it but keep looking for a better one
12015      ac_cv_path_FGREP="$ac_path_FGREP"
12016      ac_path_FGREP_max=$ac_count
12017    fi
12018    # 10*(2^10) chars as input seems more than enough
12019    test $ac_count -gt 10 && break
12020  done
12021  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12022esac
12023
12024      $ac_path_FGREP_found && break 3
12025    done
12026  done
12027  done
12028IFS=$as_save_IFS
12029  if test -z "$ac_cv_path_FGREP"; then
12030    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12031  fi
12032else
12033  ac_cv_path_FGREP=$FGREP
12034fi
12035
12036   fi
12037fi
12038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12039$as_echo "$ac_cv_path_FGREP" >&6; }
12040 FGREP="$ac_cv_path_FGREP"
12041
12042
12043  else
12044    # The variable is set, but is it from the command line or the environment?
12045
12046    # Try to remove the string !FGREP! from our list.
12047    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12048    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12049      # If it failed, the variable was not from the command line. Ignore it,
12050      # but warn the user (except for BASH, which is always set by the calling BASH).
12051      if test "xFGREP" != xBASH; then
12052        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12053$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12054      fi
12055      # Try to locate tool using the code snippet
12056      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12057$as_echo_n "checking for fgrep... " >&6; }
12058if ${ac_cv_path_FGREP+:} false; then :
12059  $as_echo_n "(cached) " >&6
12060else
12061  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12062   then ac_cv_path_FGREP="$GREP -F"
12063   else
12064     if test -z "$FGREP"; then
12065  ac_path_FGREP_found=false
12066  # Loop through the user's path and test for each of PROGNAME-LIST
12067  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12068for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12069do
12070  IFS=$as_save_IFS
12071  test -z "$as_dir" && as_dir=.
12072    for ac_prog in fgrep; do
12073    for ac_exec_ext in '' $ac_executable_extensions; do
12074      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12075      as_fn_executable_p "$ac_path_FGREP" || continue
12076# Check for GNU ac_path_FGREP and select it if it is found.
12077  # Check for GNU $ac_path_FGREP
12078case `"$ac_path_FGREP" --version 2>&1` in
12079*GNU*)
12080  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12081*)
12082  ac_count=0
12083  $as_echo_n 0123456789 >"conftest.in"
12084  while :
12085  do
12086    cat "conftest.in" "conftest.in" >"conftest.tmp"
12087    mv "conftest.tmp" "conftest.in"
12088    cp "conftest.in" "conftest.nl"
12089    $as_echo 'FGREP' >> "conftest.nl"
12090    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12091    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12092    as_fn_arith $ac_count + 1 && ac_count=$as_val
12093    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12094      # Best one so far, save it but keep looking for a better one
12095      ac_cv_path_FGREP="$ac_path_FGREP"
12096      ac_path_FGREP_max=$ac_count
12097    fi
12098    # 10*(2^10) chars as input seems more than enough
12099    test $ac_count -gt 10 && break
12100  done
12101  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12102esac
12103
12104      $ac_path_FGREP_found && break 3
12105    done
12106  done
12107  done
12108IFS=$as_save_IFS
12109  if test -z "$ac_cv_path_FGREP"; then
12110    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12111  fi
12112else
12113  ac_cv_path_FGREP=$FGREP
12114fi
12115
12116   fi
12117fi
12118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12119$as_echo "$ac_cv_path_FGREP" >&6; }
12120 FGREP="$ac_cv_path_FGREP"
12121
12122
12123    else
12124      # If it succeeded, then it was overridden by the user. We will use it
12125      # for the tool.
12126
12127      # First remove it from the list of overridden variables, so we can test
12128      # for unknown variables in the end.
12129      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12130
12131      # Check if the provided tool contains a complete path.
12132      tool_specified="$FGREP"
12133      tool_basename="${tool_specified##*/}"
12134      if test "x$tool_basename" = "x$tool_specified"; then
12135        # A command without a complete path is provided, search $PATH.
12136        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12137$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12138        # Extract the first word of "$tool_basename", so it can be a program name with args.
12139set dummy $tool_basename; ac_word=$2
12140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12141$as_echo_n "checking for $ac_word... " >&6; }
12142if ${ac_cv_path_FGREP+:} false; then :
12143  $as_echo_n "(cached) " >&6
12144else
12145  case $FGREP in
12146  [\\/]* | ?:[\\/]*)
12147  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12148  ;;
12149  *)
12150  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12151for as_dir in $PATH
12152do
12153  IFS=$as_save_IFS
12154  test -z "$as_dir" && as_dir=.
12155    for ac_exec_ext in '' $ac_executable_extensions; do
12156  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12157    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12158    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12159    break 2
12160  fi
12161done
12162  done
12163IFS=$as_save_IFS
12164
12165  ;;
12166esac
12167fi
12168FGREP=$ac_cv_path_FGREP
12169if test -n "$FGREP"; then
12170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12171$as_echo "$FGREP" >&6; }
12172else
12173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12174$as_echo "no" >&6; }
12175fi
12176
12177
12178        if test "x$FGREP" = x; then
12179          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12180        fi
12181      else
12182        # Otherwise we believe it is a complete path. Use it as it is.
12183        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12184$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12185        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12186$as_echo_n "checking for FGREP... " >&6; }
12187        if test ! -x "$tool_specified"; then
12188          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12189$as_echo "not found" >&6; }
12190          as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12191        fi
12192        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12193$as_echo "$tool_specified" >&6; }
12194      fi
12195    fi
12196  fi
12197
12198
12199  if test "x$FGREP" = x; then
12200    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12201  fi
12202
12203
12204
12205
12206  # Publish this variable in the help.
12207
12208
12209  if test "x$SED" = x; then
12210    # The variable is not set by user, try to locate tool using the code snippet
12211    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12212$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12213if ${ac_cv_path_SED+:} false; then :
12214  $as_echo_n "(cached) " >&6
12215else
12216            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12217     for ac_i in 1 2 3 4 5 6 7; do
12218       ac_script="$ac_script$as_nl$ac_script"
12219     done
12220     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12221     { ac_script=; unset ac_script;}
12222     if test -z "$SED"; then
12223  ac_path_SED_found=false
12224  # Loop through the user's path and test for each of PROGNAME-LIST
12225  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12226for as_dir in $PATH
12227do
12228  IFS=$as_save_IFS
12229  test -z "$as_dir" && as_dir=.
12230    for ac_prog in sed gsed; do
12231    for ac_exec_ext in '' $ac_executable_extensions; do
12232      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12233      as_fn_executable_p "$ac_path_SED" || continue
12234# Check for GNU ac_path_SED and select it if it is found.
12235  # Check for GNU $ac_path_SED
12236case `"$ac_path_SED" --version 2>&1` in
12237*GNU*)
12238  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12239*)
12240  ac_count=0
12241  $as_echo_n 0123456789 >"conftest.in"
12242  while :
12243  do
12244    cat "conftest.in" "conftest.in" >"conftest.tmp"
12245    mv "conftest.tmp" "conftest.in"
12246    cp "conftest.in" "conftest.nl"
12247    $as_echo '' >> "conftest.nl"
12248    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12249    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12250    as_fn_arith $ac_count + 1 && ac_count=$as_val
12251    if test $ac_count -gt ${ac_path_SED_max-0}; then
12252      # Best one so far, save it but keep looking for a better one
12253      ac_cv_path_SED="$ac_path_SED"
12254      ac_path_SED_max=$ac_count
12255    fi
12256    # 10*(2^10) chars as input seems more than enough
12257    test $ac_count -gt 10 && break
12258  done
12259  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12260esac
12261
12262      $ac_path_SED_found && break 3
12263    done
12264  done
12265  done
12266IFS=$as_save_IFS
12267  if test -z "$ac_cv_path_SED"; then
12268    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12269  fi
12270else
12271  ac_cv_path_SED=$SED
12272fi
12273
12274fi
12275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12276$as_echo "$ac_cv_path_SED" >&6; }
12277 SED="$ac_cv_path_SED"
12278  rm -f conftest.sed
12279
12280  else
12281    # The variable is set, but is it from the command line or the environment?
12282
12283    # Try to remove the string !SED! from our list.
12284    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12285    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12286      # If it failed, the variable was not from the command line. Ignore it,
12287      # but warn the user (except for BASH, which is always set by the calling BASH).
12288      if test "xSED" != xBASH; then
12289        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12290$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12291      fi
12292      # Try to locate tool using the code snippet
12293      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12294$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12295if ${ac_cv_path_SED+:} false; then :
12296  $as_echo_n "(cached) " >&6
12297else
12298            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12299     for ac_i in 1 2 3 4 5 6 7; do
12300       ac_script="$ac_script$as_nl$ac_script"
12301     done
12302     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12303     { ac_script=; unset ac_script;}
12304     if test -z "$SED"; then
12305  ac_path_SED_found=false
12306  # Loop through the user's path and test for each of PROGNAME-LIST
12307  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12308for as_dir in $PATH
12309do
12310  IFS=$as_save_IFS
12311  test -z "$as_dir" && as_dir=.
12312    for ac_prog in sed gsed; do
12313    for ac_exec_ext in '' $ac_executable_extensions; do
12314      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12315      as_fn_executable_p "$ac_path_SED" || continue
12316# Check for GNU ac_path_SED and select it if it is found.
12317  # Check for GNU $ac_path_SED
12318case `"$ac_path_SED" --version 2>&1` in
12319*GNU*)
12320  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12321*)
12322  ac_count=0
12323  $as_echo_n 0123456789 >"conftest.in"
12324  while :
12325  do
12326    cat "conftest.in" "conftest.in" >"conftest.tmp"
12327    mv "conftest.tmp" "conftest.in"
12328    cp "conftest.in" "conftest.nl"
12329    $as_echo '' >> "conftest.nl"
12330    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12331    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12332    as_fn_arith $ac_count + 1 && ac_count=$as_val
12333    if test $ac_count -gt ${ac_path_SED_max-0}; then
12334      # Best one so far, save it but keep looking for a better one
12335      ac_cv_path_SED="$ac_path_SED"
12336      ac_path_SED_max=$ac_count
12337    fi
12338    # 10*(2^10) chars as input seems more than enough
12339    test $ac_count -gt 10 && break
12340  done
12341  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12342esac
12343
12344      $ac_path_SED_found && break 3
12345    done
12346  done
12347  done
12348IFS=$as_save_IFS
12349  if test -z "$ac_cv_path_SED"; then
12350    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12351  fi
12352else
12353  ac_cv_path_SED=$SED
12354fi
12355
12356fi
12357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12358$as_echo "$ac_cv_path_SED" >&6; }
12359 SED="$ac_cv_path_SED"
12360  rm -f conftest.sed
12361
12362    else
12363      # If it succeeded, then it was overridden by the user. We will use it
12364      # for the tool.
12365
12366      # First remove it from the list of overridden variables, so we can test
12367      # for unknown variables in the end.
12368      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12369
12370      # Check if the provided tool contains a complete path.
12371      tool_specified="$SED"
12372      tool_basename="${tool_specified##*/}"
12373      if test "x$tool_basename" = "x$tool_specified"; then
12374        # A command without a complete path is provided, search $PATH.
12375        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12376$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12377        # Extract the first word of "$tool_basename", so it can be a program name with args.
12378set dummy $tool_basename; ac_word=$2
12379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12380$as_echo_n "checking for $ac_word... " >&6; }
12381if ${ac_cv_path_SED+:} false; then :
12382  $as_echo_n "(cached) " >&6
12383else
12384  case $SED in
12385  [\\/]* | ?:[\\/]*)
12386  ac_cv_path_SED="$SED" # Let the user override the test with a path.
12387  ;;
12388  *)
12389  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12390for as_dir in $PATH
12391do
12392  IFS=$as_save_IFS
12393  test -z "$as_dir" && as_dir=.
12394    for ac_exec_ext in '' $ac_executable_extensions; do
12395  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12396    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12397    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12398    break 2
12399  fi
12400done
12401  done
12402IFS=$as_save_IFS
12403
12404  ;;
12405esac
12406fi
12407SED=$ac_cv_path_SED
12408if test -n "$SED"; then
12409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12410$as_echo "$SED" >&6; }
12411else
12412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12413$as_echo "no" >&6; }
12414fi
12415
12416
12417        if test "x$SED" = x; then
12418          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12419        fi
12420      else
12421        # Otherwise we believe it is a complete path. Use it as it is.
12422        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12423$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12424        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12425$as_echo_n "checking for SED... " >&6; }
12426        if test ! -x "$tool_specified"; then
12427          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12428$as_echo "not found" >&6; }
12429          as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12430        fi
12431        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12432$as_echo "$tool_specified" >&6; }
12433      fi
12434    fi
12435  fi
12436
12437
12438  if test "x$SED" = x; then
12439    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12440  fi
12441
12442
12443
12444  # Always force rm.
12445  RM="$RM -f"
12446
12447  # pwd behaves differently on various platforms and some don't support the -L flag.
12448  # Always use the bash builtin pwd to get uniform behavior.
12449  THEPWDCMD=pwd
12450
12451  # These are not required on all platforms
12452
12453
12454  # Publish this variable in the help.
12455
12456
12457  if test "x$CYGPATH" = x; then
12458    # The variable is not set by user, try to locate tool using the code snippet
12459    for ac_prog in cygpath
12460do
12461  # Extract the first word of "$ac_prog", so it can be a program name with args.
12462set dummy $ac_prog; ac_word=$2
12463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12464$as_echo_n "checking for $ac_word... " >&6; }
12465if ${ac_cv_path_CYGPATH+:} false; then :
12466  $as_echo_n "(cached) " >&6
12467else
12468  case $CYGPATH in
12469  [\\/]* | ?:[\\/]*)
12470  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12471  ;;
12472  *)
12473  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12474for as_dir in $PATH
12475do
12476  IFS=$as_save_IFS
12477  test -z "$as_dir" && as_dir=.
12478    for ac_exec_ext in '' $ac_executable_extensions; do
12479  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12480    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12481    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12482    break 2
12483  fi
12484done
12485  done
12486IFS=$as_save_IFS
12487
12488  ;;
12489esac
12490fi
12491CYGPATH=$ac_cv_path_CYGPATH
12492if test -n "$CYGPATH"; then
12493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12494$as_echo "$CYGPATH" >&6; }
12495else
12496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12497$as_echo "no" >&6; }
12498fi
12499
12500
12501  test -n "$CYGPATH" && break
12502done
12503
12504  else
12505    # The variable is set, but is it from the command line or the environment?
12506
12507    # Try to remove the string !CYGPATH! from our list.
12508    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12509    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12510      # If it failed, the variable was not from the command line. Ignore it,
12511      # but warn the user (except for BASH, which is always set by the calling BASH).
12512      if test "xCYGPATH" != xBASH; then
12513        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12514$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12515      fi
12516      # Try to locate tool using the code snippet
12517      for ac_prog in cygpath
12518do
12519  # Extract the first word of "$ac_prog", so it can be a program name with args.
12520set dummy $ac_prog; ac_word=$2
12521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12522$as_echo_n "checking for $ac_word... " >&6; }
12523if ${ac_cv_path_CYGPATH+:} false; then :
12524  $as_echo_n "(cached) " >&6
12525else
12526  case $CYGPATH in
12527  [\\/]* | ?:[\\/]*)
12528  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12529  ;;
12530  *)
12531  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12532for as_dir in $PATH
12533do
12534  IFS=$as_save_IFS
12535  test -z "$as_dir" && as_dir=.
12536    for ac_exec_ext in '' $ac_executable_extensions; do
12537  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12538    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12539    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12540    break 2
12541  fi
12542done
12543  done
12544IFS=$as_save_IFS
12545
12546  ;;
12547esac
12548fi
12549CYGPATH=$ac_cv_path_CYGPATH
12550if test -n "$CYGPATH"; then
12551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12552$as_echo "$CYGPATH" >&6; }
12553else
12554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12555$as_echo "no" >&6; }
12556fi
12557
12558
12559  test -n "$CYGPATH" && break
12560done
12561
12562    else
12563      # If it succeeded, then it was overridden by the user. We will use it
12564      # for the tool.
12565
12566      # First remove it from the list of overridden variables, so we can test
12567      # for unknown variables in the end.
12568      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12569
12570      # Check if the provided tool contains a complete path.
12571      tool_specified="$CYGPATH"
12572      tool_basename="${tool_specified##*/}"
12573      if test "x$tool_basename" = "x$tool_specified"; then
12574        # A command without a complete path is provided, search $PATH.
12575        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12576$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12577        # Extract the first word of "$tool_basename", so it can be a program name with args.
12578set dummy $tool_basename; ac_word=$2
12579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12580$as_echo_n "checking for $ac_word... " >&6; }
12581if ${ac_cv_path_CYGPATH+:} false; then :
12582  $as_echo_n "(cached) " >&6
12583else
12584  case $CYGPATH in
12585  [\\/]* | ?:[\\/]*)
12586  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12587  ;;
12588  *)
12589  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12590for as_dir in $PATH
12591do
12592  IFS=$as_save_IFS
12593  test -z "$as_dir" && as_dir=.
12594    for ac_exec_ext in '' $ac_executable_extensions; do
12595  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12596    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12597    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12598    break 2
12599  fi
12600done
12601  done
12602IFS=$as_save_IFS
12603
12604  ;;
12605esac
12606fi
12607CYGPATH=$ac_cv_path_CYGPATH
12608if test -n "$CYGPATH"; then
12609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12610$as_echo "$CYGPATH" >&6; }
12611else
12612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12613$as_echo "no" >&6; }
12614fi
12615
12616
12617        if test "x$CYGPATH" = x; then
12618          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12619        fi
12620      else
12621        # Otherwise we believe it is a complete path. Use it as it is.
12622        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12623$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12624        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12625$as_echo_n "checking for CYGPATH... " >&6; }
12626        if test ! -x "$tool_specified"; then
12627          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12628$as_echo "not found" >&6; }
12629          as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12630        fi
12631        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12632$as_echo "$tool_specified" >&6; }
12633      fi
12634    fi
12635  fi
12636
12637
12638
12639
12640  # Publish this variable in the help.
12641
12642
12643  if test "x$READLINK" = x; then
12644    # The variable is not set by user, try to locate tool using the code snippet
12645    for ac_prog in greadlink readlink
12646do
12647  # Extract the first word of "$ac_prog", so it can be a program name with args.
12648set dummy $ac_prog; ac_word=$2
12649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12650$as_echo_n "checking for $ac_word... " >&6; }
12651if ${ac_cv_path_READLINK+:} false; then :
12652  $as_echo_n "(cached) " >&6
12653else
12654  case $READLINK in
12655  [\\/]* | ?:[\\/]*)
12656  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12657  ;;
12658  *)
12659  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12660for as_dir in $PATH
12661do
12662  IFS=$as_save_IFS
12663  test -z "$as_dir" && as_dir=.
12664    for ac_exec_ext in '' $ac_executable_extensions; do
12665  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12666    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12667    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12668    break 2
12669  fi
12670done
12671  done
12672IFS=$as_save_IFS
12673
12674  ;;
12675esac
12676fi
12677READLINK=$ac_cv_path_READLINK
12678if test -n "$READLINK"; then
12679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12680$as_echo "$READLINK" >&6; }
12681else
12682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12683$as_echo "no" >&6; }
12684fi
12685
12686
12687  test -n "$READLINK" && break
12688done
12689
12690  else
12691    # The variable is set, but is it from the command line or the environment?
12692
12693    # Try to remove the string !READLINK! from our list.
12694    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12695    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12696      # If it failed, the variable was not from the command line. Ignore it,
12697      # but warn the user (except for BASH, which is always set by the calling BASH).
12698      if test "xREADLINK" != xBASH; then
12699        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12700$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12701      fi
12702      # Try to locate tool using the code snippet
12703      for ac_prog in greadlink readlink
12704do
12705  # Extract the first word of "$ac_prog", so it can be a program name with args.
12706set dummy $ac_prog; ac_word=$2
12707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12708$as_echo_n "checking for $ac_word... " >&6; }
12709if ${ac_cv_path_READLINK+:} false; then :
12710  $as_echo_n "(cached) " >&6
12711else
12712  case $READLINK in
12713  [\\/]* | ?:[\\/]*)
12714  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12715  ;;
12716  *)
12717  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12718for as_dir in $PATH
12719do
12720  IFS=$as_save_IFS
12721  test -z "$as_dir" && as_dir=.
12722    for ac_exec_ext in '' $ac_executable_extensions; do
12723  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12724    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12725    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12726    break 2
12727  fi
12728done
12729  done
12730IFS=$as_save_IFS
12731
12732  ;;
12733esac
12734fi
12735READLINK=$ac_cv_path_READLINK
12736if test -n "$READLINK"; then
12737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12738$as_echo "$READLINK" >&6; }
12739else
12740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12741$as_echo "no" >&6; }
12742fi
12743
12744
12745  test -n "$READLINK" && break
12746done
12747
12748    else
12749      # If it succeeded, then it was overridden by the user. We will use it
12750      # for the tool.
12751
12752      # First remove it from the list of overridden variables, so we can test
12753      # for unknown variables in the end.
12754      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12755
12756      # Check if the provided tool contains a complete path.
12757      tool_specified="$READLINK"
12758      tool_basename="${tool_specified##*/}"
12759      if test "x$tool_basename" = "x$tool_specified"; then
12760        # A command without a complete path is provided, search $PATH.
12761        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12762$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12763        # Extract the first word of "$tool_basename", so it can be a program name with args.
12764set dummy $tool_basename; ac_word=$2
12765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12766$as_echo_n "checking for $ac_word... " >&6; }
12767if ${ac_cv_path_READLINK+:} false; then :
12768  $as_echo_n "(cached) " >&6
12769else
12770  case $READLINK in
12771  [\\/]* | ?:[\\/]*)
12772  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12773  ;;
12774  *)
12775  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12776for as_dir in $PATH
12777do
12778  IFS=$as_save_IFS
12779  test -z "$as_dir" && as_dir=.
12780    for ac_exec_ext in '' $ac_executable_extensions; do
12781  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12782    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12783    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12784    break 2
12785  fi
12786done
12787  done
12788IFS=$as_save_IFS
12789
12790  ;;
12791esac
12792fi
12793READLINK=$ac_cv_path_READLINK
12794if test -n "$READLINK"; then
12795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12796$as_echo "$READLINK" >&6; }
12797else
12798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12799$as_echo "no" >&6; }
12800fi
12801
12802
12803        if test "x$READLINK" = x; then
12804          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12805        fi
12806      else
12807        # Otherwise we believe it is a complete path. Use it as it is.
12808        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12809$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12810        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12811$as_echo_n "checking for READLINK... " >&6; }
12812        if test ! -x "$tool_specified"; then
12813          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12814$as_echo "not found" >&6; }
12815          as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12816        fi
12817        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12818$as_echo "$tool_specified" >&6; }
12819      fi
12820    fi
12821  fi
12822
12823
12824
12825
12826  # Publish this variable in the help.
12827
12828
12829  if test "x$DF" = x; then
12830    # The variable is not set by user, try to locate tool using the code snippet
12831    for ac_prog in df
12832do
12833  # Extract the first word of "$ac_prog", so it can be a program name with args.
12834set dummy $ac_prog; ac_word=$2
12835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12836$as_echo_n "checking for $ac_word... " >&6; }
12837if ${ac_cv_path_DF+:} false; then :
12838  $as_echo_n "(cached) " >&6
12839else
12840  case $DF in
12841  [\\/]* | ?:[\\/]*)
12842  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12843  ;;
12844  *)
12845  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12846for as_dir in $PATH
12847do
12848  IFS=$as_save_IFS
12849  test -z "$as_dir" && as_dir=.
12850    for ac_exec_ext in '' $ac_executable_extensions; do
12851  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12852    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12853    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12854    break 2
12855  fi
12856done
12857  done
12858IFS=$as_save_IFS
12859
12860  ;;
12861esac
12862fi
12863DF=$ac_cv_path_DF
12864if test -n "$DF"; then
12865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12866$as_echo "$DF" >&6; }
12867else
12868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12869$as_echo "no" >&6; }
12870fi
12871
12872
12873  test -n "$DF" && break
12874done
12875
12876  else
12877    # The variable is set, but is it from the command line or the environment?
12878
12879    # Try to remove the string !DF! from our list.
12880    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
12881    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12882      # If it failed, the variable was not from the command line. Ignore it,
12883      # but warn the user (except for BASH, which is always set by the calling BASH).
12884      if test "xDF" != xBASH; then
12885        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
12886$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
12887      fi
12888      # Try to locate tool using the code snippet
12889      for ac_prog in df
12890do
12891  # Extract the first word of "$ac_prog", so it can be a program name with args.
12892set dummy $ac_prog; ac_word=$2
12893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12894$as_echo_n "checking for $ac_word... " >&6; }
12895if ${ac_cv_path_DF+:} false; then :
12896  $as_echo_n "(cached) " >&6
12897else
12898  case $DF in
12899  [\\/]* | ?:[\\/]*)
12900  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12901  ;;
12902  *)
12903  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12904for as_dir in $PATH
12905do
12906  IFS=$as_save_IFS
12907  test -z "$as_dir" && as_dir=.
12908    for ac_exec_ext in '' $ac_executable_extensions; do
12909  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12910    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12911    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12912    break 2
12913  fi
12914done
12915  done
12916IFS=$as_save_IFS
12917
12918  ;;
12919esac
12920fi
12921DF=$ac_cv_path_DF
12922if test -n "$DF"; then
12923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12924$as_echo "$DF" >&6; }
12925else
12926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12927$as_echo "no" >&6; }
12928fi
12929
12930
12931  test -n "$DF" && break
12932done
12933
12934    else
12935      # If it succeeded, then it was overridden by the user. We will use it
12936      # for the tool.
12937
12938      # First remove it from the list of overridden variables, so we can test
12939      # for unknown variables in the end.
12940      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12941
12942      # Check if the provided tool contains a complete path.
12943      tool_specified="$DF"
12944      tool_basename="${tool_specified##*/}"
12945      if test "x$tool_basename" = "x$tool_specified"; then
12946        # A command without a complete path is provided, search $PATH.
12947        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
12948$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
12949        # Extract the first word of "$tool_basename", so it can be a program name with args.
12950set dummy $tool_basename; ac_word=$2
12951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12952$as_echo_n "checking for $ac_word... " >&6; }
12953if ${ac_cv_path_DF+:} false; then :
12954  $as_echo_n "(cached) " >&6
12955else
12956  case $DF in
12957  [\\/]* | ?:[\\/]*)
12958  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12959  ;;
12960  *)
12961  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12962for as_dir in $PATH
12963do
12964  IFS=$as_save_IFS
12965  test -z "$as_dir" && as_dir=.
12966    for ac_exec_ext in '' $ac_executable_extensions; do
12967  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12968    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12969    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12970    break 2
12971  fi
12972done
12973  done
12974IFS=$as_save_IFS
12975
12976  ;;
12977esac
12978fi
12979DF=$ac_cv_path_DF
12980if test -n "$DF"; then
12981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12982$as_echo "$DF" >&6; }
12983else
12984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12985$as_echo "no" >&6; }
12986fi
12987
12988
12989        if test "x$DF" = x; then
12990          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12991        fi
12992      else
12993        # Otherwise we believe it is a complete path. Use it as it is.
12994        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
12995$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
12996        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
12997$as_echo_n "checking for DF... " >&6; }
12998        if test ! -x "$tool_specified"; then
12999          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13000$as_echo "not found" >&6; }
13001          as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13002        fi
13003        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13004$as_echo "$tool_specified" >&6; }
13005      fi
13006    fi
13007  fi
13008
13009
13010
13011
13012  # Publish this variable in the help.
13013
13014
13015  if test "x$SETFILE" = x; then
13016    # The variable is not set by user, try to locate tool using the code snippet
13017    for ac_prog in SetFile
13018do
13019  # Extract the first word of "$ac_prog", so it can be a program name with args.
13020set dummy $ac_prog; ac_word=$2
13021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13022$as_echo_n "checking for $ac_word... " >&6; }
13023if ${ac_cv_path_SETFILE+:} false; then :
13024  $as_echo_n "(cached) " >&6
13025else
13026  case $SETFILE in
13027  [\\/]* | ?:[\\/]*)
13028  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13029  ;;
13030  *)
13031  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13032for as_dir in $PATH
13033do
13034  IFS=$as_save_IFS
13035  test -z "$as_dir" && as_dir=.
13036    for ac_exec_ext in '' $ac_executable_extensions; do
13037  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13038    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13039    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13040    break 2
13041  fi
13042done
13043  done
13044IFS=$as_save_IFS
13045
13046  ;;
13047esac
13048fi
13049SETFILE=$ac_cv_path_SETFILE
13050if test -n "$SETFILE"; then
13051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13052$as_echo "$SETFILE" >&6; }
13053else
13054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13055$as_echo "no" >&6; }
13056fi
13057
13058
13059  test -n "$SETFILE" && break
13060done
13061
13062  else
13063    # The variable is set, but is it from the command line or the environment?
13064
13065    # Try to remove the string !SETFILE! from our list.
13066    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
13067    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13068      # If it failed, the variable was not from the command line. Ignore it,
13069      # but warn the user (except for BASH, which is always set by the calling BASH).
13070      if test "xSETFILE" != xBASH; then
13071        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
13072$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
13073      fi
13074      # Try to locate tool using the code snippet
13075      for ac_prog in SetFile
13076do
13077  # Extract the first word of "$ac_prog", so it can be a program name with args.
13078set dummy $ac_prog; ac_word=$2
13079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13080$as_echo_n "checking for $ac_word... " >&6; }
13081if ${ac_cv_path_SETFILE+:} false; then :
13082  $as_echo_n "(cached) " >&6
13083else
13084  case $SETFILE in
13085  [\\/]* | ?:[\\/]*)
13086  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13087  ;;
13088  *)
13089  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13090for as_dir in $PATH
13091do
13092  IFS=$as_save_IFS
13093  test -z "$as_dir" && as_dir=.
13094    for ac_exec_ext in '' $ac_executable_extensions; do
13095  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13096    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13097    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13098    break 2
13099  fi
13100done
13101  done
13102IFS=$as_save_IFS
13103
13104  ;;
13105esac
13106fi
13107SETFILE=$ac_cv_path_SETFILE
13108if test -n "$SETFILE"; then
13109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13110$as_echo "$SETFILE" >&6; }
13111else
13112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13113$as_echo "no" >&6; }
13114fi
13115
13116
13117  test -n "$SETFILE" && break
13118done
13119
13120    else
13121      # If it succeeded, then it was overridden by the user. We will use it
13122      # for the tool.
13123
13124      # First remove it from the list of overridden variables, so we can test
13125      # for unknown variables in the end.
13126      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13127
13128      # Check if the provided tool contains a complete path.
13129      tool_specified="$SETFILE"
13130      tool_basename="${tool_specified##*/}"
13131      if test "x$tool_basename" = "x$tool_specified"; then
13132        # A command without a complete path is provided, search $PATH.
13133        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
13134$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
13135        # Extract the first word of "$tool_basename", so it can be a program name with args.
13136set dummy $tool_basename; ac_word=$2
13137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13138$as_echo_n "checking for $ac_word... " >&6; }
13139if ${ac_cv_path_SETFILE+:} false; then :
13140  $as_echo_n "(cached) " >&6
13141else
13142  case $SETFILE in
13143  [\\/]* | ?:[\\/]*)
13144  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13145  ;;
13146  *)
13147  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13148for as_dir in $PATH
13149do
13150  IFS=$as_save_IFS
13151  test -z "$as_dir" && as_dir=.
13152    for ac_exec_ext in '' $ac_executable_extensions; do
13153  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13154    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13155    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13156    break 2
13157  fi
13158done
13159  done
13160IFS=$as_save_IFS
13161
13162  ;;
13163esac
13164fi
13165SETFILE=$ac_cv_path_SETFILE
13166if test -n "$SETFILE"; then
13167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13168$as_echo "$SETFILE" >&6; }
13169else
13170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13171$as_echo "no" >&6; }
13172fi
13173
13174
13175        if test "x$SETFILE" = x; then
13176          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13177        fi
13178      else
13179        # Otherwise we believe it is a complete path. Use it as it is.
13180        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
13181$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
13182        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
13183$as_echo_n "checking for SETFILE... " >&6; }
13184        if test ! -x "$tool_specified"; then
13185          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13186$as_echo "not found" >&6; }
13187          as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
13188        fi
13189        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13190$as_echo "$tool_specified" >&6; }
13191      fi
13192    fi
13193  fi
13194
13195
13196
13197
13198  # Publish this variable in the help.
13199
13200
13201  if test "x$CPIO" = x; then
13202    # The variable is not set by user, try to locate tool using the code snippet
13203    for ac_prog in cpio bsdcpio
13204do
13205  # Extract the first word of "$ac_prog", so it can be a program name with args.
13206set dummy $ac_prog; ac_word=$2
13207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13208$as_echo_n "checking for $ac_word... " >&6; }
13209if ${ac_cv_path_CPIO+:} false; then :
13210  $as_echo_n "(cached) " >&6
13211else
13212  case $CPIO in
13213  [\\/]* | ?:[\\/]*)
13214  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13215  ;;
13216  *)
13217  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13218for as_dir in $PATH
13219do
13220  IFS=$as_save_IFS
13221  test -z "$as_dir" && as_dir=.
13222    for ac_exec_ext in '' $ac_executable_extensions; do
13223  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13224    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13226    break 2
13227  fi
13228done
13229  done
13230IFS=$as_save_IFS
13231
13232  ;;
13233esac
13234fi
13235CPIO=$ac_cv_path_CPIO
13236if test -n "$CPIO"; then
13237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13238$as_echo "$CPIO" >&6; }
13239else
13240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13241$as_echo "no" >&6; }
13242fi
13243
13244
13245  test -n "$CPIO" && break
13246done
13247
13248  else
13249    # The variable is set, but is it from the command line or the environment?
13250
13251    # Try to remove the string !CPIO! from our list.
13252    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
13253    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13254      # If it failed, the variable was not from the command line. Ignore it,
13255      # but warn the user (except for BASH, which is always set by the calling BASH).
13256      if test "xCPIO" != xBASH; then
13257        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
13258$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
13259      fi
13260      # Try to locate tool using the code snippet
13261      for ac_prog in cpio bsdcpio
13262do
13263  # Extract the first word of "$ac_prog", so it can be a program name with args.
13264set dummy $ac_prog; ac_word=$2
13265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13266$as_echo_n "checking for $ac_word... " >&6; }
13267if ${ac_cv_path_CPIO+:} false; then :
13268  $as_echo_n "(cached) " >&6
13269else
13270  case $CPIO in
13271  [\\/]* | ?:[\\/]*)
13272  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13273  ;;
13274  *)
13275  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13276for as_dir in $PATH
13277do
13278  IFS=$as_save_IFS
13279  test -z "$as_dir" && as_dir=.
13280    for ac_exec_ext in '' $ac_executable_extensions; do
13281  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13282    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13283    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13284    break 2
13285  fi
13286done
13287  done
13288IFS=$as_save_IFS
13289
13290  ;;
13291esac
13292fi
13293CPIO=$ac_cv_path_CPIO
13294if test -n "$CPIO"; then
13295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13296$as_echo "$CPIO" >&6; }
13297else
13298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13299$as_echo "no" >&6; }
13300fi
13301
13302
13303  test -n "$CPIO" && break
13304done
13305
13306    else
13307      # If it succeeded, then it was overridden by the user. We will use it
13308      # for the tool.
13309
13310      # First remove it from the list of overridden variables, so we can test
13311      # for unknown variables in the end.
13312      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13313
13314      # Check if the provided tool contains a complete path.
13315      tool_specified="$CPIO"
13316      tool_basename="${tool_specified##*/}"
13317      if test "x$tool_basename" = "x$tool_specified"; then
13318        # A command without a complete path is provided, search $PATH.
13319        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
13320$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
13321        # Extract the first word of "$tool_basename", so it can be a program name with args.
13322set dummy $tool_basename; ac_word=$2
13323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13324$as_echo_n "checking for $ac_word... " >&6; }
13325if ${ac_cv_path_CPIO+:} false; then :
13326  $as_echo_n "(cached) " >&6
13327else
13328  case $CPIO in
13329  [\\/]* | ?:[\\/]*)
13330  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13331  ;;
13332  *)
13333  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13334for as_dir in $PATH
13335do
13336  IFS=$as_save_IFS
13337  test -z "$as_dir" && as_dir=.
13338    for ac_exec_ext in '' $ac_executable_extensions; do
13339  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13340    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13341    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13342    break 2
13343  fi
13344done
13345  done
13346IFS=$as_save_IFS
13347
13348  ;;
13349esac
13350fi
13351CPIO=$ac_cv_path_CPIO
13352if test -n "$CPIO"; then
13353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13354$as_echo "$CPIO" >&6; }
13355else
13356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13357$as_echo "no" >&6; }
13358fi
13359
13360
13361        if test "x$CPIO" = x; then
13362          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13363        fi
13364      else
13365        # Otherwise we believe it is a complete path. Use it as it is.
13366        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
13367$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
13368        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
13369$as_echo_n "checking for CPIO... " >&6; }
13370        if test ! -x "$tool_specified"; then
13371          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13372$as_echo "not found" >&6; }
13373          as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
13374        fi
13375        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13376$as_echo "$tool_specified" >&6; }
13377      fi
13378    fi
13379  fi
13380
13381
13382
13383
13384# Now we can determine OpenJDK build and target platforms. This is required to
13385# have early on.
13386# Make sure we can run config.sub.
13387$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13388  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13389
13390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13391$as_echo_n "checking build system type... " >&6; }
13392if ${ac_cv_build+:} false; then :
13393  $as_echo_n "(cached) " >&6
13394else
13395  ac_build_alias=$build_alias
13396test "x$ac_build_alias" = x &&
13397  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13398test "x$ac_build_alias" = x &&
13399  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13400ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13401  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13402
13403fi
13404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13405$as_echo "$ac_cv_build" >&6; }
13406case $ac_cv_build in
13407*-*-*) ;;
13408*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13409esac
13410build=$ac_cv_build
13411ac_save_IFS=$IFS; IFS='-'
13412set x $ac_cv_build
13413shift
13414build_cpu=$1
13415build_vendor=$2
13416shift; shift
13417# Remember, the first character of IFS is used to create $*,
13418# except with old shells:
13419build_os=$*
13420IFS=$ac_save_IFS
13421case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13422
13423
13424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13425$as_echo_n "checking host system type... " >&6; }
13426if ${ac_cv_host+:} false; then :
13427  $as_echo_n "(cached) " >&6
13428else
13429  if test "x$host_alias" = x; then
13430  ac_cv_host=$ac_cv_build
13431else
13432  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13433    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13434fi
13435
13436fi
13437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13438$as_echo "$ac_cv_host" >&6; }
13439case $ac_cv_host in
13440*-*-*) ;;
13441*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13442esac
13443host=$ac_cv_host
13444ac_save_IFS=$IFS; IFS='-'
13445set x $ac_cv_host
13446shift
13447host_cpu=$1
13448host_vendor=$2
13449shift; shift
13450# Remember, the first character of IFS is used to create $*,
13451# except with old shells:
13452host_os=$*
13453IFS=$ac_save_IFS
13454case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13455
13456
13457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13458$as_echo_n "checking target system type... " >&6; }
13459if ${ac_cv_target+:} false; then :
13460  $as_echo_n "(cached) " >&6
13461else
13462  if test "x$target_alias" = x; then
13463  ac_cv_target=$ac_cv_host
13464else
13465  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13466    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13467fi
13468
13469fi
13470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13471$as_echo "$ac_cv_target" >&6; }
13472case $ac_cv_target in
13473*-*-*) ;;
13474*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13475esac
13476target=$ac_cv_target
13477ac_save_IFS=$IFS; IFS='-'
13478set x $ac_cv_target
13479shift
13480target_cpu=$1
13481target_vendor=$2
13482shift; shift
13483# Remember, the first character of IFS is used to create $*,
13484# except with old shells:
13485target_os=$*
13486IFS=$ac_save_IFS
13487case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13488
13489
13490# The aliases save the names the user supplied, while $host etc.
13491# will get canonicalized.
13492test -n "$target_alias" &&
13493  test "$program_prefix$program_suffix$program_transform_name" = \
13494    NONENONEs,x,x, &&
13495  program_prefix=${target_alias}-
13496
13497  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13498  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13499  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13500  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13501  # to use the configure naming style.
13502
13503
13504
13505
13506
13507  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13508  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13509  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13510  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13511  OPENJDK_TARGET_AUTOCONF_NAME="$host"
13512  OPENJDK_BUILD_AUTOCONF_NAME="$build"
13513
13514
13515
13516  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13517
13518  case "$build_os" in
13519    *linux*)
13520      VAR_OS=linux
13521      VAR_OS_API=posix
13522      VAR_OS_ENV=linux
13523      ;;
13524    *solaris*)
13525      VAR_OS=solaris
13526      VAR_OS_API=posix
13527      VAR_OS_ENV=solaris
13528      ;;
13529    *darwin*)
13530      VAR_OS=macosx
13531      VAR_OS_API=posix
13532      VAR_OS_ENV=macosx
13533      ;;
13534    *bsd*)
13535      VAR_OS=bsd
13536      VAR_OS_API=posix
13537      VAR_OS_ENV=bsd
13538      ;;
13539    *cygwin*)
13540      VAR_OS=windows
13541      VAR_OS_API=winapi
13542      VAR_OS_ENV=windows.cygwin
13543      ;;
13544    *mingw*)
13545      VAR_OS=windows
13546      VAR_OS_API=winapi
13547      VAR_OS_ENV=windows.msys
13548      ;;
13549    *aix*)
13550      VAR_OS=aix
13551      VAR_OS_API=posix
13552      VAR_OS_ENV=aix
13553      ;;
13554    *)
13555      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13556      ;;
13557  esac
13558
13559
13560  # First argument is the cpu name from the trip/quad
13561  case "$build_cpu" in
13562    x86_64)
13563      VAR_CPU=x86_64
13564      VAR_CPU_ARCH=x86
13565      VAR_CPU_BITS=64
13566      VAR_CPU_ENDIAN=little
13567      ;;
13568    i?86)
13569      VAR_CPU=x86
13570      VAR_CPU_ARCH=x86
13571      VAR_CPU_BITS=32
13572      VAR_CPU_ENDIAN=little
13573      ;;
13574    arm*)
13575      VAR_CPU=arm
13576      VAR_CPU_ARCH=arm
13577      VAR_CPU_BITS=32
13578      VAR_CPU_ENDIAN=little
13579      ;;
13580    powerpc)
13581      VAR_CPU=ppc
13582      VAR_CPU_ARCH=ppc
13583      VAR_CPU_BITS=32
13584      VAR_CPU_ENDIAN=big
13585      ;;
13586    powerpc64)
13587      VAR_CPU=ppc64
13588      VAR_CPU_ARCH=ppc
13589      VAR_CPU_BITS=64
13590      VAR_CPU_ENDIAN=big
13591      ;;
13592    powerpc64le)
13593      VAR_CPU=ppc64
13594      VAR_CPU_ARCH=ppc
13595      VAR_CPU_BITS=64
13596      VAR_CPU_ENDIAN=little
13597      ;;
13598    s390)
13599      VAR_CPU=s390
13600      VAR_CPU_ARCH=s390
13601      VAR_CPU_BITS=32
13602      VAR_CPU_ENDIAN=big
13603      ;;
13604    s390x)
13605      VAR_CPU=s390x
13606      VAR_CPU_ARCH=s390
13607      VAR_CPU_BITS=64
13608      VAR_CPU_ENDIAN=big
13609      ;;
13610    sparc)
13611      VAR_CPU=sparc
13612      VAR_CPU_ARCH=sparc
13613      VAR_CPU_BITS=32
13614      VAR_CPU_ENDIAN=big
13615      ;;
13616    sparcv9|sparc64)
13617      VAR_CPU=sparcv9
13618      VAR_CPU_ARCH=sparc
13619      VAR_CPU_BITS=64
13620      VAR_CPU_ENDIAN=big
13621      ;;
13622    *)
13623      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13624      ;;
13625  esac
13626
13627  # ..and setup our own variables. (Do this explicitely to facilitate searching)
13628  OPENJDK_BUILD_OS="$VAR_OS"
13629  OPENJDK_BUILD_OS_API="$VAR_OS_API"
13630  OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13631  OPENJDK_BUILD_CPU="$VAR_CPU"
13632  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13633  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13634  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13635
13636
13637
13638
13639
13640
13641
13642
13643  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13644$as_echo_n "checking openjdk-build os-cpu... " >&6; }
13645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13646$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13647
13648  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13649
13650  case "$host_os" in
13651    *linux*)
13652      VAR_OS=linux
13653      VAR_OS_API=posix
13654      VAR_OS_ENV=linux
13655      ;;
13656    *solaris*)
13657      VAR_OS=solaris
13658      VAR_OS_API=posix
13659      VAR_OS_ENV=solaris
13660      ;;
13661    *darwin*)
13662      VAR_OS=macosx
13663      VAR_OS_API=posix
13664      VAR_OS_ENV=macosx
13665      ;;
13666    *bsd*)
13667      VAR_OS=bsd
13668      VAR_OS_API=posix
13669      VAR_OS_ENV=bsd
13670      ;;
13671    *cygwin*)
13672      VAR_OS=windows
13673      VAR_OS_API=winapi
13674      VAR_OS_ENV=windows.cygwin
13675      ;;
13676    *mingw*)
13677      VAR_OS=windows
13678      VAR_OS_API=winapi
13679      VAR_OS_ENV=windows.msys
13680      ;;
13681    *aix*)
13682      VAR_OS=aix
13683      VAR_OS_API=posix
13684      VAR_OS_ENV=aix
13685      ;;
13686    *)
13687      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13688      ;;
13689  esac
13690
13691
13692  # First argument is the cpu name from the trip/quad
13693  case "$host_cpu" in
13694    x86_64)
13695      VAR_CPU=x86_64
13696      VAR_CPU_ARCH=x86
13697      VAR_CPU_BITS=64
13698      VAR_CPU_ENDIAN=little
13699      ;;
13700    i?86)
13701      VAR_CPU=x86
13702      VAR_CPU_ARCH=x86
13703      VAR_CPU_BITS=32
13704      VAR_CPU_ENDIAN=little
13705      ;;
13706    arm*)
13707      VAR_CPU=arm
13708      VAR_CPU_ARCH=arm
13709      VAR_CPU_BITS=32
13710      VAR_CPU_ENDIAN=little
13711      ;;
13712    powerpc)
13713      VAR_CPU=ppc
13714      VAR_CPU_ARCH=ppc
13715      VAR_CPU_BITS=32
13716      VAR_CPU_ENDIAN=big
13717      ;;
13718    powerpc64)
13719      VAR_CPU=ppc64
13720      VAR_CPU_ARCH=ppc
13721      VAR_CPU_BITS=64
13722      VAR_CPU_ENDIAN=big
13723      ;;
13724    powerpc64le)
13725      VAR_CPU=ppc64
13726      VAR_CPU_ARCH=ppc
13727      VAR_CPU_BITS=64
13728      VAR_CPU_ENDIAN=little
13729      ;;
13730    s390)
13731      VAR_CPU=s390
13732      VAR_CPU_ARCH=s390
13733      VAR_CPU_BITS=32
13734      VAR_CPU_ENDIAN=big
13735      ;;
13736    s390x)
13737      VAR_CPU=s390x
13738      VAR_CPU_ARCH=s390
13739      VAR_CPU_BITS=64
13740      VAR_CPU_ENDIAN=big
13741      ;;
13742    sparc)
13743      VAR_CPU=sparc
13744      VAR_CPU_ARCH=sparc
13745      VAR_CPU_BITS=32
13746      VAR_CPU_ENDIAN=big
13747      ;;
13748    sparcv9|sparc64)
13749      VAR_CPU=sparcv9
13750      VAR_CPU_ARCH=sparc
13751      VAR_CPU_BITS=64
13752      VAR_CPU_ENDIAN=big
13753      ;;
13754    *)
13755      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13756      ;;
13757  esac
13758
13759  # ... and setup our own variables. (Do this explicitely to facilitate searching)
13760  OPENJDK_TARGET_OS="$VAR_OS"
13761  OPENJDK_TARGET_OS_API="$VAR_OS_API"
13762  OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13763  OPENJDK_TARGET_CPU="$VAR_CPU"
13764  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13765  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13766  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13767
13768
13769
13770
13771
13772
13773
13774
13775  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13776$as_echo_n "checking openjdk-target os-cpu... " >&6; }
13777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13778$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13779
13780
13781
13782# Check whether --with-target-bits was given.
13783if test "${with_target_bits+set}" = set; then :
13784  withval=$with_target_bits;
13785fi
13786
13787
13788  # We have three types of compiles:
13789  # native  == normal compilation, target system == build system
13790  # cross   == traditional cross compilation, target system != build system; special toolchain needed
13791  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13792  #
13793  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13794    # We're doing a proper cross-compilation
13795    COMPILE_TYPE="cross"
13796  else
13797    COMPILE_TYPE="native"
13798  fi
13799
13800  if test "x$with_target_bits" != x; then
13801    if test "x$COMPILE_TYPE" = "xcross"; then
13802      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13803    fi
13804
13805    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13806      # A reduced build is requested
13807      COMPILE_TYPE="reduced"
13808      OPENJDK_TARGET_CPU_BITS=32
13809      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13810        OPENJDK_TARGET_CPU=x86
13811      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13812        OPENJDK_TARGET_CPU=sparc
13813      else
13814        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13815      fi
13816    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13817      as_fn_error $? "It is not possible to use --with-target-bits=64 on a 32 bit system. Use proper cross-compilation instead." "$LINENO" 5
13818    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13819      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13820$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13821    else
13822      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13823    fi
13824  fi
13825
13826
13827  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13828$as_echo_n "checking compilation type... " >&6; }
13829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13830$as_echo "$COMPILE_TYPE" >&6; }
13831
13832
13833  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13834    REQUIRED_OS_NAME=SunOS
13835    REQUIRED_OS_VERSION=5.10
13836  fi
13837  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13838    REQUIRED_OS_NAME=Linux
13839    REQUIRED_OS_VERSION=2.6
13840  fi
13841  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13842    REQUIRED_OS_NAME=Windows
13843    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13844      REQUIRED_OS_VERSION=5.2
13845    else
13846      REQUIRED_OS_VERSION=5.1
13847    fi
13848  fi
13849  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13850    REQUIRED_OS_NAME=Darwin
13851    REQUIRED_OS_VERSION=11.2
13852  fi
13853
13854
13855
13856
13857
13858  # Also store the legacy naming of the cpu.
13859  # Ie i586 and amd64 instead of x86 and x86_64
13860  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13861  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13862    OPENJDK_TARGET_CPU_LEGACY="i586"
13863  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13864    # On all platforms except MacOSX replace x86_64 with amd64.
13865    OPENJDK_TARGET_CPU_LEGACY="amd64"
13866  fi
13867
13868
13869  # And the second legacy naming of the cpu.
13870  # Ie i386 and amd64 instead of x86 and x86_64.
13871  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13872  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13873    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13874  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13875    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13876  fi
13877
13878
13879  # This is the name of the cpu (but using i386 and amd64 instead of
13880  # x86 and x86_64, respectively), preceeded by a /, to be used when
13881  # locating libraries. On macosx, it's empty, though.
13882  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13883  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13884    OPENJDK_TARGET_CPU_LIBDIR=""
13885  fi
13886
13887
13888  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13889  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13890  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13891  OPENJDK_TARGET_CPU_ISADIR=""
13892  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13893    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13894      OPENJDK_TARGET_CPU_ISADIR="/amd64"
13895    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13896      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13897    fi
13898  fi
13899
13900
13901  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13902  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13903  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13904    # On linux only, we replace x86 with i386.
13905    OPENJDK_TARGET_CPU_OSARCH="i386"
13906  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13907    # On all platforms except macosx, we replace x86_64 with amd64.
13908    OPENJDK_TARGET_CPU_OSARCH="amd64"
13909  fi
13910
13911
13912  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
13913  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13914    OPENJDK_TARGET_CPU_JLI="i386"
13915  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13916    # On all platforms except macosx, we replace x86_64 with amd64.
13917    OPENJDK_TARGET_CPU_JLI="amd64"
13918  fi
13919  # Now setup the -D flags for building libjli.
13920  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
13921  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13922    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
13923      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
13924    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
13925      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
13926    fi
13927  fi
13928
13929
13930  # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
13931  if test "x$OPENJDK_TARGET_OS_API" = xposix; then
13932    OPENJDK_TARGET_OS_API_DIR="unix"
13933  fi
13934  if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
13935    OPENJDK_TARGET_OS_API_DIR="windows"
13936  fi
13937
13938
13939  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13940      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
13941  else
13942      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_API_DIR}
13943  fi
13944
13945
13946  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13947    A_LP64="LP64:="
13948    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
13949    # unpack200.exe
13950    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
13951      ADD_LP64="-D_LP64=1"
13952    fi
13953  fi
13954  LP64=$A_LP64
13955
13956
13957  if test "x$COMPILE_TYPE" = "xcross"; then
13958    # FIXME: ... or should this include reduced builds..?
13959    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
13960  else
13961    DEFINE_CROSS_COMPILE_ARCH=""
13962  fi
13963
13964
13965  # ZERO_ARCHDEF is used to enable architecture-specific code
13966  case "${OPENJDK_TARGET_CPU}" in
13967    ppc*)    ZERO_ARCHDEF=PPC   ;;
13968    s390*)   ZERO_ARCHDEF=S390  ;;
13969    sparc*)  ZERO_ARCHDEF=SPARC ;;
13970    x86_64*) ZERO_ARCHDEF=AMD64 ;;
13971    x86)     ZERO_ARCHDEF=IA32  ;;
13972    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
13973  esac
13974
13975
13976
13977
13978# Continue setting up basic stuff. Most remaining code require fundamental tools.
13979
13980  # Save the current directory this script was started from
13981  CURDIR="$PWD"
13982
13983  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13984    PATH_SEP=";"
13985
13986  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
13987  if test $SRC_ROOT_LENGTH -gt 100; then
13988    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
13989  fi
13990
13991  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13992    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
13993$as_echo_n "checking cygwin release... " >&6; }
13994    CYGWIN_VERSION=`$UNAME -r`
13995    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
13996$as_echo "$CYGWIN_VERSION" >&6; }
13997    WINDOWS_ENV_VENDOR='cygwin'
13998    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
13999
14000    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
14001    if test "x$CYGWIN_VERSION_OK" = x; then
14002      { $as_echo "$as_me:${as_lineno-$LINENO}: Your cygwin is too old. You are running $CYGWIN_VERSION, but at least cygwin 1.7 is required. Please upgrade." >&5
14003$as_echo "$as_me: Your cygwin is too old. You are running $CYGWIN_VERSION, but at least cygwin 1.7 is required. Please upgrade." >&6;}
14004      as_fn_error $? "Cannot continue" "$LINENO" 5
14005    fi
14006    if test "x$CYGPATH" = x; then
14007      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
14008    fi
14009    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
14010$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
14011    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14012    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
14013    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
14014    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
14015    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
14016$as_echo "$CYGWIN_ROOT_PATH" >&6; }
14017    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
14018    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
14019    if test "x$test_cygdrive_prefix" = x; then
14020      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
14021    fi
14022  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14023    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
14024$as_echo_n "checking msys release... " >&6; }
14025    MSYS_VERSION=`$UNAME -r`
14026    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
14027$as_echo "$MSYS_VERSION" >&6; }
14028
14029    WINDOWS_ENV_VENDOR='msys'
14030    WINDOWS_ENV_VERSION="$MSYS_VERSION"
14031
14032    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
14033$as_echo_n "checking msys root directory as unix-style path... " >&6; }
14034    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14035    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
14036
14037  windows_path="$MSYS_ROOT_PATH"
14038  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14039    unix_path=`$CYGPATH -u "$windows_path"`
14040    MSYS_ROOT_PATH="$unix_path"
14041  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14042    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14043    MSYS_ROOT_PATH="$unix_path"
14044  fi
14045
14046    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
14047$as_echo "$MSYS_ROOT_PATH" >&6; }
14048    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
14049  else
14050    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
14051  fi
14052
14053  # Test if windows or unix (cygwin/msys) find is first in path.
14054  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
14055$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
14056  FIND_BINARY_OUTPUT=`find --version 2>&1`
14057  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
14058    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
14059$as_echo "unix style" >&6; }
14060  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
14061    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
14062$as_echo "Windows" >&6; }
14063    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
14064$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
14065    { $as_echo "$as_me:${as_lineno-$LINENO}: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&5
14066$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
14067    as_fn_error $? "Cannot continue" "$LINENO" 5
14068  else
14069    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
14070$as_echo "unknown" >&6; }
14071    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
14072$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
14073  fi
14074
14075  else
14076    PATH_SEP=":"
14077  fi
14078
14079
14080  # We get the top-level directory from the supporting wrappers.
14081  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
14082$as_echo_n "checking for top-level directory... " >&6; }
14083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
14084$as_echo "$TOPDIR" >&6; }
14085
14086
14087  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
14088
14089  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14090
14091  # Input might be given as Windows format, start by converting to
14092  # unix format.
14093  path="$CURDIR"
14094  new_path=`$CYGPATH -u "$path"`
14095
14096  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14097  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14098  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14099  # "foo.exe" is OK but "foo" is an error.
14100  #
14101  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14102  # It is also a way to make sure we got the proper file name for the real test later on.
14103  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14104  if test "x$test_shortpath" = x; then
14105    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14106$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14107    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
14108  fi
14109
14110  # Call helper function which possibly converts this using DOS-style short mode.
14111  # If so, the updated path is stored in $new_path.
14112
14113  input_path="$new_path"
14114  # Check if we need to convert this using DOS-style short mode. If the path
14115  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14116  # take no chances and rewrite it.
14117  # Note: m4 eats our [], so we need to use [ and ] instead.
14118  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14119  if test "x$has_forbidden_chars" != x; then
14120    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14121    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14122    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14123    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14124      # Going to short mode and back again did indeed matter. Since short mode is
14125      # case insensitive, let's make it lowercase to improve readability.
14126      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14127      # Now convert it back to Unix-stile (cygpath)
14128      input_path=`$CYGPATH -u "$shortmode_path"`
14129      new_path="$input_path"
14130    fi
14131  fi
14132
14133  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14134  if test "x$test_cygdrive_prefix" = x; then
14135    # As a simple fix, exclude /usr/bin since it's not a real path.
14136    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14137      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14138      # a path prefixed by /cygdrive for fixpath to work.
14139      new_path="$CYGWIN_ROOT_PATH$input_path"
14140    fi
14141  fi
14142
14143
14144  if test "x$path" != "x$new_path"; then
14145    CURDIR="$new_path"
14146    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14147$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14148  fi
14149
14150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14151
14152  path="$CURDIR"
14153  has_colon=`$ECHO $path | $GREP ^.:`
14154  new_path="$path"
14155  if test "x$has_colon" = x; then
14156    # Not in mixed or Windows style, start by that.
14157    new_path=`cmd //c echo $path`
14158  fi
14159
14160
14161  input_path="$new_path"
14162  # Check if we need to convert this using DOS-style short mode. If the path
14163  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14164  # take no chances and rewrite it.
14165  # Note: m4 eats our [], so we need to use [ and ] instead.
14166  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14167  if test "x$has_forbidden_chars" != x; then
14168    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14169    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14170  fi
14171
14172
14173  windows_path="$new_path"
14174  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14175    unix_path=`$CYGPATH -u "$windows_path"`
14176    new_path="$unix_path"
14177  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14178    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14179    new_path="$unix_path"
14180  fi
14181
14182  if test "x$path" != "x$new_path"; then
14183    CURDIR="$new_path"
14184    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14185$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14186  fi
14187
14188  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14189  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14190
14191  else
14192    # We're on a posix platform. Hooray! :)
14193    path="$CURDIR"
14194    has_space=`$ECHO "$path" | $GREP " "`
14195    if test "x$has_space" != x; then
14196      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14197$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14198      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14199    fi
14200
14201    # Use eval to expand a potential ~
14202    eval path="$path"
14203    if test ! -f "$path" && test ! -d "$path"; then
14204      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14205    fi
14206
14207    CURDIR="`cd "$path"; $THEPWDCMD -L`"
14208  fi
14209
14210
14211  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14212
14213  # Input might be given as Windows format, start by converting to
14214  # unix format.
14215  path="$TOPDIR"
14216  new_path=`$CYGPATH -u "$path"`
14217
14218  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14219  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14220  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14221  # "foo.exe" is OK but "foo" is an error.
14222  #
14223  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14224  # It is also a way to make sure we got the proper file name for the real test later on.
14225  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14226  if test "x$test_shortpath" = x; then
14227    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14228$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14229    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14230  fi
14231
14232  # Call helper function which possibly converts this using DOS-style short mode.
14233  # If so, the updated path is stored in $new_path.
14234
14235  input_path="$new_path"
14236  # Check if we need to convert this using DOS-style short mode. If the path
14237  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14238  # take no chances and rewrite it.
14239  # Note: m4 eats our [], so we need to use [ and ] instead.
14240  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14241  if test "x$has_forbidden_chars" != x; then
14242    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14243    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14244    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14245    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14246      # Going to short mode and back again did indeed matter. Since short mode is
14247      # case insensitive, let's make it lowercase to improve readability.
14248      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14249      # Now convert it back to Unix-stile (cygpath)
14250      input_path=`$CYGPATH -u "$shortmode_path"`
14251      new_path="$input_path"
14252    fi
14253  fi
14254
14255  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14256  if test "x$test_cygdrive_prefix" = x; then
14257    # As a simple fix, exclude /usr/bin since it's not a real path.
14258    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14259      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14260      # a path prefixed by /cygdrive for fixpath to work.
14261      new_path="$CYGWIN_ROOT_PATH$input_path"
14262    fi
14263  fi
14264
14265
14266  if test "x$path" != "x$new_path"; then
14267    TOPDIR="$new_path"
14268    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14269$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14270  fi
14271
14272  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14273
14274  path="$TOPDIR"
14275  has_colon=`$ECHO $path | $GREP ^.:`
14276  new_path="$path"
14277  if test "x$has_colon" = x; then
14278    # Not in mixed or Windows style, start by that.
14279    new_path=`cmd //c echo $path`
14280  fi
14281
14282
14283  input_path="$new_path"
14284  # Check if we need to convert this using DOS-style short mode. If the path
14285  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14286  # take no chances and rewrite it.
14287  # Note: m4 eats our [], so we need to use [ and ] instead.
14288  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14289  if test "x$has_forbidden_chars" != x; then
14290    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14291    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14292  fi
14293
14294
14295  windows_path="$new_path"
14296  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14297    unix_path=`$CYGPATH -u "$windows_path"`
14298    new_path="$unix_path"
14299  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14300    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14301    new_path="$unix_path"
14302  fi
14303
14304  if test "x$path" != "x$new_path"; then
14305    TOPDIR="$new_path"
14306    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14307$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14308  fi
14309
14310  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14311  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14312
14313  else
14314    # We're on a posix platform. Hooray! :)
14315    path="$TOPDIR"
14316    has_space=`$ECHO "$path" | $GREP " "`
14317    if test "x$has_space" != x; then
14318      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14319$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14320      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14321    fi
14322
14323    # Use eval to expand a potential ~
14324    eval path="$path"
14325    if test ! -f "$path" && test ! -d "$path"; then
14326      as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14327    fi
14328
14329    TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14330  fi
14331
14332  # SRC_ROOT is a traditional alias for TOPDIR.
14333  SRC_ROOT=$TOPDIR
14334
14335  # Locate the directory of this script.
14336  AUTOCONF_DIR=$TOPDIR/common/autoconf
14337
14338
14339  # Setup default logging of stdout and stderr to build.log in the output root.
14340  BUILD_LOG='$(OUTPUT_ROOT)/build.log'
14341  BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
14342  BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
14343
14344
14345
14346
14347
14348# Check if it's a pure open build or if custom sources are to be used.
14349
14350  # Check whether --enable-openjdk-only was given.
14351if test "${enable_openjdk_only+set}" = set; then :
14352  enableval=$enable_openjdk_only;
14353else
14354  enable_openjdk_only="no"
14355fi
14356
14357
14358  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14359$as_echo_n "checking for presence of closed sources... " >&6; }
14360  if test -d "$SRC_ROOT/jdk/src/closed"; then
14361    CLOSED_SOURCE_PRESENT=yes
14362  else
14363    CLOSED_SOURCE_PRESENT=no
14364  fi
14365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14366$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14367
14368  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14369$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14370  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14372$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14373
14374  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14375    OPENJDK=true
14376    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14377      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14378$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14379    fi
14380  else
14381    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14382      OPENJDK=true
14383    else
14384      OPENJDK=false
14385    fi
14386  fi
14387
14388  if test "x$OPENJDK" = "xtrue"; then
14389    SET_OPENJDK="OPENJDK=true"
14390  fi
14391
14392
14393
14394  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
14395  # the IncludeCustomExtension macro.
14396
14397
14398# Check whether --with-custom-make-dir was given.
14399if test "${with_custom_make_dir+set}" = set; then :
14400  withval=$with_custom_make_dir; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&5
14401$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
14402fi
14403
14404
14405
14406
14407# These are needed to be able to create a configuration name (and thus the output directory)
14408
14409  ###############################################################################
14410  #
14411  # Check which variant of the JDK that we want to build.
14412  # Currently we have:
14413  #    normal:   standard edition
14414  # but the custom make system may add other variants
14415  #
14416  # Effectively the JDK variant gives a name to a specific set of
14417  # modules to compile into the JDK. In the future, these modules
14418  # might even be Jigsaw modules.
14419  #
14420  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14421$as_echo_n "checking which variant of the JDK to build... " >&6; }
14422
14423# Check whether --with-jdk-variant was given.
14424if test "${with_jdk_variant+set}" = set; then :
14425  withval=$with_jdk_variant;
14426fi
14427
14428
14429  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14430    JDK_VARIANT="normal"
14431  else
14432    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14433  fi
14434
14435
14436
14437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14438$as_echo "$JDK_VARIANT" >&6; }
14439
14440
14441###############################################################################
14442#
14443# Check which interpreter of the JVM we want to build.
14444# Currently we have:
14445#    template: Template interpreter (the default)
14446#    cpp     : C++ interpreter
14447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14448$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14449
14450# Check whether --with-jvm-interpreter was given.
14451if test "${with_jvm_interpreter+set}" = set; then :
14452  withval=$with_jvm_interpreter;
14453fi
14454
14455
14456if test "x$with_jvm_interpreter" = x; then
14457     with_jvm_interpreter="template"
14458fi
14459
14460JVM_INTERPRETER="$with_jvm_interpreter"
14461
14462if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14463   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14464fi
14465
14466
14467
14468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14469$as_echo "$with_jvm_interpreter" >&6; }
14470
14471
14472
14473  ###############################################################################
14474  #
14475  # Check which variants of the JVM that we want to build.
14476  # Currently we have:
14477  #    server: normal interpreter and a tiered C1/C2 compiler
14478  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14479  #    minimal1: reduced form of client with optional VM services and features stripped out
14480  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14481  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14482  #    zero: no machine code interpreter, no compiler
14483  #    zeroshark: zero interpreter and shark/llvm compiler backend
14484#    core: interpreter only, no compiler (only works on some platforms)
14485  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14486$as_echo_n "checking which variants of the JVM to build... " >&6; }
14487
14488# Check whether --with-jvm-variants was given.
14489if test "${with_jvm_variants+set}" = set; then :
14490  withval=$with_jvm_variants;
14491fi
14492
14493
14494  if test "x$with_jvm_variants" = x; then
14495    with_jvm_variants="server"
14496  fi
14497
14498  JVM_VARIANTS=",$with_jvm_variants,"
14499  TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//' -e 's/core,//'`
14500
14501  if test "x$TEST_VARIANTS" != "x,"; then
14502     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14503  fi
14504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14505$as_echo "$with_jvm_variants" >&6; }
14506
14507  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14508  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14509  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14510  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14511  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14512  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14513  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14514
14515  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14516    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14517      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14518    fi
14519  fi
14520  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14521    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14522      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14523    fi
14524  fi
14525  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14526    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14527      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14528    fi
14529  fi
14530
14531  # Replace the commas with AND for use in the build directory name.
14532  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14533  COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/' -e 's/core,/1/'`
14534  if test "x$COUNT_VARIANTS" != "x,1"; then
14535    BUILDING_MULTIPLE_JVM_VARIANTS=yes
14536  else
14537    BUILDING_MULTIPLE_JVM_VARIANTS=no
14538  fi
14539
14540
14541
14542
14543
14544
14545
14546
14547
14548
14549  INCLUDE_SA=true
14550  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14551    INCLUDE_SA=false
14552  fi
14553  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14554    INCLUDE_SA=false
14555  fi
14556  if test "x$OPENJDK_TARGET_OS" = xaix ; then
14557    INCLUDE_SA=false
14558  fi
14559
14560
14561  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14562    MACOSX_UNIVERSAL="true"
14563  fi
14564
14565
14566
14567
14568  ###############################################################################
14569  #
14570  # Set the debug level
14571  #    release: no debug information, all optimizations, no asserts.
14572  #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
14573  #    fastdebug: debug information (-g), all optimizations, all asserts
14574  #    slowdebug: debug information (-g), no optimizations, all asserts
14575  #
14576  DEBUG_LEVEL="release"
14577  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14578$as_echo_n "checking which debug level to use... " >&6; }
14579  # Check whether --enable-debug was given.
14580if test "${enable_debug+set}" = set; then :
14581  enableval=$enable_debug;
14582        ENABLE_DEBUG="${enableval}"
14583        DEBUG_LEVEL="fastdebug"
14584
14585else
14586  ENABLE_DEBUG="no"
14587fi
14588
14589
14590
14591# Check whether --with-debug-level was given.
14592if test "${with_debug_level+set}" = set; then :
14593  withval=$with_debug_level;
14594        DEBUG_LEVEL="${withval}"
14595        if test "x$ENABLE_DEBUG" = xyes; then
14596          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14597        fi
14598
14599fi
14600
14601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14602$as_echo "$DEBUG_LEVEL" >&6; }
14603
14604  if test "x$DEBUG_LEVEL" != xrelease && \
14605      test "x$DEBUG_LEVEL" != xoptimized && \
14606      test "x$DEBUG_LEVEL" != xfastdebug && \
14607      test "x$DEBUG_LEVEL" != xslowdebug; then
14608    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14609  fi
14610
14611
14612  ###############################################################################
14613  #
14614  # Setup legacy vars/targets and new vars to deal with different debug levels.
14615  #
14616
14617  case $DEBUG_LEVEL in
14618    release )
14619      VARIANT="OPT"
14620      FASTDEBUG="false"
14621      DEBUG_CLASSFILES="false"
14622      BUILD_VARIANT_RELEASE=""
14623      HOTSPOT_DEBUG_LEVEL="product"
14624      HOTSPOT_EXPORT="product"
14625      ;;
14626    fastdebug )
14627      VARIANT="DBG"
14628      FASTDEBUG="true"
14629      DEBUG_CLASSFILES="true"
14630      BUILD_VARIANT_RELEASE="-fastdebug"
14631      HOTSPOT_DEBUG_LEVEL="fastdebug"
14632      HOTSPOT_EXPORT="fastdebug"
14633      ;;
14634    slowdebug )
14635      VARIANT="DBG"
14636      FASTDEBUG="false"
14637      DEBUG_CLASSFILES="true"
14638      BUILD_VARIANT_RELEASE="-debug"
14639      HOTSPOT_DEBUG_LEVEL="jvmg"
14640      HOTSPOT_EXPORT="debug"
14641      ;;
14642    optimized )
14643      VARIANT="OPT"
14644      FASTDEBUG="false"
14645      DEBUG_CLASSFILES="false"
14646      BUILD_VARIANT_RELEASE="-optimized"
14647      HOTSPOT_DEBUG_LEVEL="optimized"
14648      HOTSPOT_EXPORT="optimized"
14649      ;;
14650  esac
14651
14652  # The debug level 'optimized' is a little special because it is currently only
14653  # applicable to the HotSpot build where it means to build a completely
14654  # optimized version of the VM without any debugging code (like for the
14655  # 'release' debug level which is called 'product' in the HotSpot build) but
14656  # with the exception that it can contain additional code which is otherwise
14657  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
14658  # test new and/or experimental features which are not intended for customer
14659  # shipment. Because these new features need to be tested and benchmarked in
14660  # real world scenarios, we want to build the containing JDK at the 'release'
14661  # debug level.
14662  if test "x$DEBUG_LEVEL" = xoptimized; then
14663    DEBUG_LEVEL="release"
14664  fi
14665
14666  #####
14667  # Generate the legacy makefile targets for hotspot.
14668  # The hotspot api for selecting the build artifacts, really, needs to be improved.
14669  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14670  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14671  # But until then ...
14672  HOTSPOT_TARGET=""
14673
14674  if test "x$JVM_VARIANT_SERVER" = xtrue; then
14675    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14676  fi
14677
14678  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14679    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14680  fi
14681
14682  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14683    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14684  fi
14685
14686  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14687    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14688  fi
14689
14690  if test "x$JVM_VARIANT_ZERO" = xtrue; then
14691    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14692  fi
14693
14694  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14695    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14696  fi
14697
14698  if test "x$JVM_VARIANT_CORE" = xtrue; then
14699    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14700  fi
14701
14702  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14703
14704  # On Macosx universal binaries are produced, but they only contain
14705  # 64 bit intel. This invalidates control of which jvms are built
14706  # from configure, but only server is valid anyway. Fix this
14707  # when hotspot makefiles are rewritten.
14708  if test "x$MACOSX_UNIVERSAL" = xtrue; then
14709    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14710  fi
14711
14712  #####
14713
14714
14715
14716
14717
14718
14719
14720
14721# With basic setup done, call the custom early hook.
14722
14723
14724# Check if we have devkits, extra paths or sysroot set.
14725
14726
14727# Check whether --with-devkit was given.
14728if test "${with_devkit+set}" = set; then :
14729  withval=$with_devkit;
14730
14731  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14732
14733  # Input might be given as Windows format, start by converting to
14734  # unix format.
14735  path="$with_devkit"
14736  new_path=`$CYGPATH -u "$path"`
14737
14738  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14739  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14740  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14741  # "foo.exe" is OK but "foo" is an error.
14742  #
14743  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14744  # It is also a way to make sure we got the proper file name for the real test later on.
14745  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14746  if test "x$test_shortpath" = x; then
14747    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14748$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14749    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14750  fi
14751
14752  # Call helper function which possibly converts this using DOS-style short mode.
14753  # If so, the updated path is stored in $new_path.
14754
14755  input_path="$new_path"
14756  # Check if we need to convert this using DOS-style short mode. If the path
14757  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14758  # take no chances and rewrite it.
14759  # Note: m4 eats our [], so we need to use [ and ] instead.
14760  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14761  if test "x$has_forbidden_chars" != x; then
14762    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14763    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14764    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14765    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14766      # Going to short mode and back again did indeed matter. Since short mode is
14767      # case insensitive, let's make it lowercase to improve readability.
14768      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14769      # Now convert it back to Unix-stile (cygpath)
14770      input_path=`$CYGPATH -u "$shortmode_path"`
14771      new_path="$input_path"
14772    fi
14773  fi
14774
14775  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14776  if test "x$test_cygdrive_prefix" = x; then
14777    # As a simple fix, exclude /usr/bin since it's not a real path.
14778    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14779      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14780      # a path prefixed by /cygdrive for fixpath to work.
14781      new_path="$CYGWIN_ROOT_PATH$input_path"
14782    fi
14783  fi
14784
14785
14786  if test "x$path" != "x$new_path"; then
14787    with_devkit="$new_path"
14788    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14789$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14790  fi
14791
14792  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14793
14794  path="$with_devkit"
14795  has_colon=`$ECHO $path | $GREP ^.:`
14796  new_path="$path"
14797  if test "x$has_colon" = x; then
14798    # Not in mixed or Windows style, start by that.
14799    new_path=`cmd //c echo $path`
14800  fi
14801
14802
14803  input_path="$new_path"
14804  # Check if we need to convert this using DOS-style short mode. If the path
14805  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14806  # take no chances and rewrite it.
14807  # Note: m4 eats our [], so we need to use [ and ] instead.
14808  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14809  if test "x$has_forbidden_chars" != x; then
14810    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14811    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14812  fi
14813
14814
14815  windows_path="$new_path"
14816  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14817    unix_path=`$CYGPATH -u "$windows_path"`
14818    new_path="$unix_path"
14819  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14820    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14821    new_path="$unix_path"
14822  fi
14823
14824  if test "x$path" != "x$new_path"; then
14825    with_devkit="$new_path"
14826    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14827$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14828  fi
14829
14830  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14831  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14832
14833  else
14834    # We're on a posix platform. Hooray! :)
14835    path="$with_devkit"
14836    has_space=`$ECHO "$path" | $GREP " "`
14837    if test "x$has_space" != x; then
14838      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14839$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14840      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14841    fi
14842
14843    # Use eval to expand a potential ~
14844    eval path="$path"
14845    if test ! -f "$path" && test ! -d "$path"; then
14846      as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14847    fi
14848
14849    with_devkit="`cd "$path"; $THEPWDCMD -L`"
14850  fi
14851
14852        DEVKIT_ROOT="$with_devkit"
14853        # Check for a meta data info file in the root of the devkit
14854        if test -f "$DEVKIT_ROOT/devkit.info"; then
14855          # This potentially sets the following:
14856          # DEVKIT_NAME: A descriptive name of the devkit
14857          # DEVKIT_TOOLCHAIN_PATH: Corresponds to --with-toolchain-path
14858          # DEVKIT_EXTRA_PATH: Corresponds to --with-extra-path
14859          # DEVKIT_SYSROOT: Corresponds to --with-sysroot
14860          . $DEVKIT_ROOT/devkit.info
14861        fi
14862
14863        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
14864$as_echo_n "checking for devkit... " >&6; }
14865        if test "x$DEVKIT_NAME" != x; then
14866          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
14867$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
14868        else
14869          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
14870$as_echo "$DEVKIT_ROOT" >&6; }
14871        fi
14872
14873        if test "x$DEVKIT_EXTRA_PATH" != x; then
14874
14875  if test "x$DEVKIT_EXTRA_PATH" != x; then
14876    if test "x$EXTRA_PATH" = x; then
14877      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
14878    else
14879      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
14880    fi
14881  fi
14882
14883        fi
14884
14885        # Fallback default of just /bin if DEVKIT_PATH is not defined
14886        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14887          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
14888        fi
14889
14890  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
14891    if test "x$TOOLCHAIN_PATH" = x; then
14892      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
14893    else
14894      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
14895    fi
14896  fi
14897
14898
14899        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
14900        # places for backwards compatiblity.
14901        if test "x$DEVKIT_SYSROOT" != x; then
14902          SYSROOT="$DEVKIT_SYSROOT"
14903        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
14904          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
14905        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
14906          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
14907        fi
14908
14909
14910fi
14911
14912
14913  # You can force the sysroot if the sysroot encoded into the compiler tools
14914  # is not correct.
14915
14916# Check whether --with-sys-root was given.
14917if test "${with_sys_root+set}" = set; then :
14918  withval=$with_sys_root; SYSROOT=$with_sys_root
14919
14920fi
14921
14922
14923
14924# Check whether --with-sysroot was given.
14925if test "${with_sysroot+set}" = set; then :
14926  withval=$with_sysroot; SYSROOT=$with_sysroot
14927
14928fi
14929
14930
14931
14932# Check whether --with-tools-dir was given.
14933if test "${with_tools_dir+set}" = set; then :
14934  withval=$with_tools_dir;
14935  if test "x$with_tools_dir" != x; then
14936    if test "x$TOOLCHAIN_PATH" = x; then
14937      TOOLCHAIN_PATH="$with_tools_dir"
14938    else
14939      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
14940    fi
14941  fi
14942
14943
14944fi
14945
14946
14947
14948# Check whether --with-toolchain-path was given.
14949if test "${with_toolchain_path+set}" = set; then :
14950  withval=$with_toolchain_path;
14951  if test "x$with_toolchain_path" != x; then
14952    if test "x$TOOLCHAIN_PATH" = x; then
14953      TOOLCHAIN_PATH="$with_toolchain_path"
14954    else
14955      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
14956    fi
14957  fi
14958
14959
14960fi
14961
14962
14963
14964# Check whether --with-extra-path was given.
14965if test "${with_extra_path+set}" = set; then :
14966  withval=$with_extra_path;
14967  if test "x$with_extra_path" != x; then
14968    if test "x$EXTRA_PATH" = x; then
14969      EXTRA_PATH="$with_extra_path"
14970    else
14971      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
14972    fi
14973  fi
14974
14975
14976fi
14977
14978
14979  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
14980    # detect if Xcode is installed by running xcodebuild -version
14981    # if no Xcode installed, xcodebuild exits with 1
14982    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
14983    if /usr/bin/xcodebuild -version >/dev/null 2>&1; then
14984      # We need to use xcodebuild in the toolchain dir provided by the user, this will
14985      # fall back on the stub binary in /usr/bin/xcodebuild
14986      # Extract the first word of "xcodebuild", so it can be a program name with args.
14987set dummy xcodebuild; ac_word=$2
14988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14989$as_echo_n "checking for $ac_word... " >&6; }
14990if ${ac_cv_path_XCODEBUILD+:} false; then :
14991  $as_echo_n "(cached) " >&6
14992else
14993  case $XCODEBUILD in
14994  [\\/]* | ?:[\\/]*)
14995  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
14996  ;;
14997  *)
14998  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14999for as_dir in $TOOLCHAIN_PATH
15000do
15001  IFS=$as_save_IFS
15002  test -z "$as_dir" && as_dir=.
15003    for ac_exec_ext in '' $ac_executable_extensions; do
15004  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15005    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
15006    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15007    break 2
15008  fi
15009done
15010  done
15011IFS=$as_save_IFS
15012
15013  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
15014  ;;
15015esac
15016fi
15017XCODEBUILD=$ac_cv_path_XCODEBUILD
15018if test -n "$XCODEBUILD"; then
15019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
15020$as_echo "$XCODEBUILD" >&6; }
15021else
15022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15023$as_echo "no" >&6; }
15024fi
15025
15026
15027    else
15028      # this should result in SYSROOT being empty, unless --with-sysroot is provided
15029      # when only the command line tools are installed there are no SDKs, so headers
15030      # are copied into the system frameworks
15031      XCODEBUILD=
15032
15033    fi
15034
15035    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
15036$as_echo_n "checking for sdk name... " >&6; }
15037
15038# Check whether --with-sdk-name was given.
15039if test "${with_sdk_name+set}" = set; then :
15040  withval=$with_sdk_name; SDKNAME=$with_sdk_name
15041
15042fi
15043
15044    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
15045$as_echo "$SDKNAME" >&6; }
15046
15047    # if toolchain path is specified then don't rely on system headers, they may not compile
15048    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
15049    test -z "$TOOLCHAIN_PATH" && \
15050      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
15051
15052    if test -z "$SYSROOT"; then
15053      if test -n "$XCODEBUILD"; then
15054        # if we don't have system headers, use default SDK name (last resort)
15055        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15056          SDKNAME=${SDKNAME:-macosx}
15057        fi
15058
15059        if test -n "$SDKNAME"; then
15060          # Call xcodebuild to determine SYSROOT
15061          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
15062        fi
15063      else
15064        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15065          as_fn_error $? "No xcodebuild tool and no system framework headers found, use --with-sysroot or --with-sdk-name to provide a path to a valid SDK" "$LINENO" 5
15066        fi
15067      fi
15068    else
15069      # warn user if --with-sdk-name was also set
15070      if test -n "$with_sdk_name"; then
15071        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
15072$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
15073      fi
15074    fi
15075
15076    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
15077      # If no system framework headers, then SYSROOT must be set, or we won't build
15078      as_fn_error $? "Unable to determine SYSROOT and no headers found in /System/Library/Frameworks. Check Xcode configuration, --with-sysroot or --with-sdk-name arguments." "$LINENO" 5
15079    fi
15080
15081    # Perform a basic sanity test
15082    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
15083      if test -z "$SYSROOT"; then
15084        as_fn_error $? "Unable to find required framework headers, provide a path to an SDK via --with-sysroot or --with-sdk-name and be sure Xcode is installed properly" "$LINENO" 5
15085      else
15086        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
15087      fi
15088    fi
15089
15090    # set SDKROOT too, Xcode tools will pick it up
15091    SDKROOT=$SYSROOT
15092
15093  fi
15094
15095  # Prepend the extra path to the global path
15096
15097  if test "x$EXTRA_PATH" != x; then
15098    if test "x$PATH" = x; then
15099      PATH="$EXTRA_PATH"
15100    else
15101      PATH="$EXTRA_PATH:$PATH"
15102    fi
15103  fi
15104
15105
15106  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
15107    # Add extra search paths on solaris for utilities like ar and as etc...
15108    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
15109  fi
15110
15111  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
15112$as_echo_n "checking for sysroot... " >&6; }
15113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
15114$as_echo "$SYSROOT" >&6; }
15115  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
15116$as_echo_n "checking for toolchain path... " >&6; }
15117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
15118$as_echo "$TOOLCHAIN_PATH" >&6; }
15119  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
15120$as_echo_n "checking for extra path... " >&6; }
15121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
15122$as_echo "$EXTRA_PATH" >&6; }
15123
15124
15125# To properly create a configuration name, we need to have the OpenJDK target
15126# and options (variants and debug level) parsed.
15127
15128
15129
15130# Check whether --with-conf-name was given.
15131if test "${with_conf_name+set}" = set; then :
15132  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
15133fi
15134
15135
15136  # Test from where we are running configure, in or outside of src root.
15137  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
15138$as_echo_n "checking where to store configuration... " >&6; }
15139  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
15140      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
15141      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
15142    # We are running configure from the src root.
15143    # Create a default ./build/target-variant-debuglevel output root.
15144    if test "x${CONF_NAME}" = x; then
15145      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
15146$as_echo "in default location" >&6; }
15147      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
15148    else
15149      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
15150$as_echo "in build directory with custom name" >&6; }
15151    fi
15152    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
15153    $MKDIR -p "$OUTPUT_ROOT"
15154    if test ! -d "$OUTPUT_ROOT"; then
15155      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
15156    fi
15157  else
15158    # We are running configure from outside of the src dir.
15159    # Then use the current directory as output dir!
15160    # If configuration is situated in normal build directory, just use the build
15161    # directory name as configuration name, otherwise use the complete path.
15162    if test "x${CONF_NAME}" = x; then
15163      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
15164    fi
15165    OUTPUT_ROOT="$CURDIR"
15166    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
15167$as_echo "in current directory" >&6; }
15168
15169    # WARNING: This might be a bad thing to do. You need to be sure you want to
15170    # have a configuration in this directory. Do some sanity checks!
15171
15172    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
15173      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
15174      # other files
15175      files_present=`$LS $OUTPUT_ROOT`
15176      # Configure has already touched config.log and confdefs.h in the current dir when this check
15177      # is performed.
15178      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
15179      | $TR -d '\n'`
15180      if test "x$filtered_files" != x; then
15181        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
15182$as_echo "$as_me: Current directory is $CURDIR." >&6;}
15183        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
15184$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
15185        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
15186$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
15187        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
15188$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
15189        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
15190$as_echo "$as_me: seriously mess up just about everything." >&6;}
15191        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
15192$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
15193        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
15194$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
15195        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
15196      fi
15197    fi
15198  fi
15199  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
15200$as_echo_n "checking what configuration name to use... " >&6; }
15201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
15202$as_echo "$CONF_NAME" >&6; }
15203
15204
15205  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15206
15207  # Input might be given as Windows format, start by converting to
15208  # unix format.
15209  path="$OUTPUT_ROOT"
15210  new_path=`$CYGPATH -u "$path"`
15211
15212  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15213  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15214  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15215  # "foo.exe" is OK but "foo" is an error.
15216  #
15217  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15218  # It is also a way to make sure we got the proper file name for the real test later on.
15219  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15220  if test "x$test_shortpath" = x; then
15221    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15222$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15223    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
15224  fi
15225
15226  # Call helper function which possibly converts this using DOS-style short mode.
15227  # If so, the updated path is stored in $new_path.
15228
15229  input_path="$new_path"
15230  # Check if we need to convert this using DOS-style short mode. If the path
15231  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15232  # take no chances and rewrite it.
15233  # Note: m4 eats our [], so we need to use [ and ] instead.
15234  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15235  if test "x$has_forbidden_chars" != x; then
15236    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15237    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15238    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15239    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15240      # Going to short mode and back again did indeed matter. Since short mode is
15241      # case insensitive, let's make it lowercase to improve readability.
15242      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15243      # Now convert it back to Unix-stile (cygpath)
15244      input_path=`$CYGPATH -u "$shortmode_path"`
15245      new_path="$input_path"
15246    fi
15247  fi
15248
15249  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15250  if test "x$test_cygdrive_prefix" = x; then
15251    # As a simple fix, exclude /usr/bin since it's not a real path.
15252    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15253      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15254      # a path prefixed by /cygdrive for fixpath to work.
15255      new_path="$CYGWIN_ROOT_PATH$input_path"
15256    fi
15257  fi
15258
15259
15260  if test "x$path" != "x$new_path"; then
15261    OUTPUT_ROOT="$new_path"
15262    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15263$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15264  fi
15265
15266  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15267
15268  path="$OUTPUT_ROOT"
15269  has_colon=`$ECHO $path | $GREP ^.:`
15270  new_path="$path"
15271  if test "x$has_colon" = x; then
15272    # Not in mixed or Windows style, start by that.
15273    new_path=`cmd //c echo $path`
15274  fi
15275
15276
15277  input_path="$new_path"
15278  # Check if we need to convert this using DOS-style short mode. If the path
15279  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15280  # take no chances and rewrite it.
15281  # Note: m4 eats our [], so we need to use [ and ] instead.
15282  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15283  if test "x$has_forbidden_chars" != x; then
15284    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15285    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15286  fi
15287
15288
15289  windows_path="$new_path"
15290  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15291    unix_path=`$CYGPATH -u "$windows_path"`
15292    new_path="$unix_path"
15293  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15294    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15295    new_path="$unix_path"
15296  fi
15297
15298  if test "x$path" != "x$new_path"; then
15299    OUTPUT_ROOT="$new_path"
15300    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15301$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15302  fi
15303
15304  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15305  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15306
15307  else
15308    # We're on a posix platform. Hooray! :)
15309    path="$OUTPUT_ROOT"
15310    has_space=`$ECHO "$path" | $GREP " "`
15311    if test "x$has_space" != x; then
15312      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15313$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15314      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15315    fi
15316
15317    # Use eval to expand a potential ~
15318    eval path="$path"
15319    if test ! -f "$path" && test ! -d "$path"; then
15320      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
15321    fi
15322
15323    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
15324  fi
15325
15326
15327  SPEC=$OUTPUT_ROOT/spec.gmk
15328
15329  CONF_NAME=$CONF_NAME
15330
15331  OUTPUT_ROOT=$OUTPUT_ROOT
15332
15333
15334  # Most of the probed defines are put into config.h
15335  ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
15336
15337  # The spec.gmk file contains all variables for the make system.
15338  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
15339
15340  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
15341  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
15342
15343  # The bootcycle-spec.gmk file contains support for boot cycle builds.
15344  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
15345
15346  # The compare.sh is used to compare the build output to other builds.
15347  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
15348
15349  # Spec.sh is currently used by compare-objects.sh
15350  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
15351
15352  # The generated Makefile knows where the spec.gmk is and where the source is.
15353  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
15354  # which will look for generated configurations
15355  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
15356
15357
15358
15359# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15360
15361  for ac_prog in apt-get yum port pkgutil pkgadd
15362do
15363  # Extract the first word of "$ac_prog", so it can be a program name with args.
15364set dummy $ac_prog; ac_word=$2
15365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15366$as_echo_n "checking for $ac_word... " >&6; }
15367if ${ac_cv_prog_PKGHANDLER+:} false; then :
15368  $as_echo_n "(cached) " >&6
15369else
15370  if test -n "$PKGHANDLER"; then
15371  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15372else
15373as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15374for as_dir in $PATH
15375do
15376  IFS=$as_save_IFS
15377  test -z "$as_dir" && as_dir=.
15378    for ac_exec_ext in '' $ac_executable_extensions; do
15379  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15380    ac_cv_prog_PKGHANDLER="$ac_prog"
15381    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15382    break 2
15383  fi
15384done
15385  done
15386IFS=$as_save_IFS
15387
15388fi
15389fi
15390PKGHANDLER=$ac_cv_prog_PKGHANDLER
15391if test -n "$PKGHANDLER"; then
15392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15393$as_echo "$PKGHANDLER" >&6; }
15394else
15395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15396$as_echo "no" >&6; }
15397fi
15398
15399
15400  test -n "$PKGHANDLER" && break
15401done
15402
15403
15404
15405# Setup tools that requires more complex handling, or that is not needed by the configure script.
15406
15407
15408  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15409  if test "x$MAKE" != x; then
15410    # User has supplied a make, test it.
15411    if test ! -f "$MAKE"; then
15412      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15413    fi
15414
15415  MAKE_CANDIDATE=""$MAKE""
15416  DESCRIPTION="user supplied MAKE=$MAKE"
15417  if test "x$MAKE_CANDIDATE" != x; then
15418    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15419$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15420    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15421    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15422    if test "x$IS_GNU_MAKE" = x; then
15423      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15424$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15425    else
15426      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15427      if test "x$IS_MODERN_MAKE" = x; then
15428        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
15429$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
15430      else
15431        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15432          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15433            MAKE_EXPECTED_ENV='cygwin'
15434          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15435            MAKE_EXPECTED_ENV='msys'
15436          else
15437            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15438          fi
15439          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15440          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15441        else
15442          # Not relevant for non-Windows
15443          IS_MAKE_CORRECT_ENV=true
15444        fi
15445        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15446          { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
15447$as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
15448        else
15449          FOUND_MAKE=$MAKE_CANDIDATE
15450
15451  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15452
15453  # First separate the path from the arguments. This will split at the first
15454  # space.
15455  complete="$FOUND_MAKE"
15456  path="${complete%% *}"
15457  tmp="$complete EOL"
15458  arguments="${tmp#* }"
15459
15460  # Input might be given as Windows format, start by converting to
15461  # unix format.
15462  new_path=`$CYGPATH -u "$path"`
15463
15464  # Now try to locate executable using which
15465  new_path=`$WHICH "$new_path" 2> /dev/null`
15466  # bat and cmd files are not always considered executable in cygwin causing which
15467  # to not find them
15468  if test "x$new_path" = x \
15469      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15470      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15471    new_path=`$CYGPATH -u "$path"`
15472  fi
15473  if test "x$new_path" = x; then
15474    # Oops. Which didn't find the executable.
15475    # The splitting of arguments from the executable at a space might have been incorrect,
15476    # since paths with space are more likely in Windows. Give it another try with the whole
15477    # argument.
15478    path="$complete"
15479    arguments="EOL"
15480    new_path=`$CYGPATH -u "$path"`
15481    new_path=`$WHICH "$new_path" 2> /dev/null`
15482    # bat and cmd files are not always considered executable in cygwin causing which
15483    # to not find them
15484    if test "x$new_path" = x \
15485        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15486        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15487      new_path=`$CYGPATH -u "$path"`
15488    fi
15489    if test "x$new_path" = x; then
15490      # It's still not found. Now this is an unrecoverable error.
15491      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15492$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15493      has_space=`$ECHO "$complete" | $GREP " "`
15494      if test "x$has_space" != x; then
15495        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15496$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15497      fi
15498      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15499    fi
15500  fi
15501
15502  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15503  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15504  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15505  # "foo.exe" is OK but "foo" is an error.
15506  #
15507  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15508  # It is also a way to make sure we got the proper file name for the real test later on.
15509  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15510  if test "x$test_shortpath" = x; then
15511    # Short path failed, file does not exist as specified.
15512    # Try adding .exe or .cmd
15513    if test -f "${new_path}.exe"; then
15514      input_to_shortpath="${new_path}.exe"
15515    elif test -f "${new_path}.cmd"; then
15516      input_to_shortpath="${new_path}.cmd"
15517    else
15518      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15519$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15520      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15521$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15522      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15523    fi
15524  else
15525    input_to_shortpath="$new_path"
15526  fi
15527
15528  # Call helper function which possibly converts this using DOS-style short mode.
15529  # If so, the updated path is stored in $new_path.
15530  new_path="$input_to_shortpath"
15531
15532  input_path="$input_to_shortpath"
15533  # Check if we need to convert this using DOS-style short mode. If the path
15534  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15535  # take no chances and rewrite it.
15536  # Note: m4 eats our [], so we need to use [ and ] instead.
15537  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15538  if test "x$has_forbidden_chars" != x; then
15539    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15540    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15541    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15542    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15543      # Going to short mode and back again did indeed matter. Since short mode is
15544      # case insensitive, let's make it lowercase to improve readability.
15545      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15546      # Now convert it back to Unix-stile (cygpath)
15547      input_path=`$CYGPATH -u "$shortmode_path"`
15548      new_path="$input_path"
15549    fi
15550  fi
15551
15552  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15553  if test "x$test_cygdrive_prefix" = x; then
15554    # As a simple fix, exclude /usr/bin since it's not a real path.
15555    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15556      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15557      # a path prefixed by /cygdrive for fixpath to work.
15558      new_path="$CYGWIN_ROOT_PATH$input_path"
15559    fi
15560  fi
15561
15562  # remove trailing .exe if any
15563  new_path="${new_path/%.exe/}"
15564
15565  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15566
15567  # First separate the path from the arguments. This will split at the first
15568  # space.
15569  complete="$FOUND_MAKE"
15570  path="${complete%% *}"
15571  tmp="$complete EOL"
15572  arguments="${tmp#* }"
15573
15574  # Input might be given as Windows format, start by converting to
15575  # unix format.
15576  new_path="$path"
15577
15578  windows_path="$new_path"
15579  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15580    unix_path=`$CYGPATH -u "$windows_path"`
15581    new_path="$unix_path"
15582  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15583    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15584    new_path="$unix_path"
15585  fi
15586
15587
15588  # Now try to locate executable using which
15589  new_path=`$WHICH "$new_path" 2> /dev/null`
15590
15591  if test "x$new_path" = x; then
15592    # Oops. Which didn't find the executable.
15593    # The splitting of arguments from the executable at a space might have been incorrect,
15594    # since paths with space are more likely in Windows. Give it another try with the whole
15595    # argument.
15596    path="$complete"
15597    arguments="EOL"
15598    new_path="$path"
15599
15600  windows_path="$new_path"
15601  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15602    unix_path=`$CYGPATH -u "$windows_path"`
15603    new_path="$unix_path"
15604  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15605    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15606    new_path="$unix_path"
15607  fi
15608
15609
15610    new_path=`$WHICH "$new_path" 2> /dev/null`
15611    # bat and cmd files are not always considered executable in MSYS causing which
15612    # to not find them
15613    if test "x$new_path" = x \
15614        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15615        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15616      new_path="$path"
15617
15618  windows_path="$new_path"
15619  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15620    unix_path=`$CYGPATH -u "$windows_path"`
15621    new_path="$unix_path"
15622  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15623    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15624    new_path="$unix_path"
15625  fi
15626
15627    fi
15628
15629    if test "x$new_path" = x; then
15630      # It's still not found. Now this is an unrecoverable error.
15631      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15632$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15633      has_space=`$ECHO "$complete" | $GREP " "`
15634      if test "x$has_space" != x; then
15635        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15636$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15637      fi
15638      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15639    fi
15640  fi
15641
15642  # Now new_path has a complete unix path to the binary
15643  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15644    # Keep paths in /bin as-is, but remove trailing .exe if any
15645    new_path="${new_path/%.exe/}"
15646    # Do not save /bin paths to all_fixpath_prefixes!
15647  else
15648    # Not in mixed or Windows style, start by that.
15649    new_path=`cmd //c echo $new_path`
15650
15651  input_path="$new_path"
15652  # Check if we need to convert this using DOS-style short mode. If the path
15653  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15654  # take no chances and rewrite it.
15655  # Note: m4 eats our [], so we need to use [ and ] instead.
15656  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15657  if test "x$has_forbidden_chars" != x; then
15658    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15659    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15660  fi
15661
15662    # Output is in $new_path
15663
15664  windows_path="$new_path"
15665  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15666    unix_path=`$CYGPATH -u "$windows_path"`
15667    new_path="$unix_path"
15668  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15669    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15670    new_path="$unix_path"
15671  fi
15672
15673    # remove trailing .exe if any
15674    new_path="${new_path/%.exe/}"
15675
15676    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15677    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15678  fi
15679
15680  else
15681    # We're on a posix platform. Hooray! :)
15682    # First separate the path from the arguments. This will split at the first
15683    # space.
15684    complete="$FOUND_MAKE"
15685    path="${complete%% *}"
15686    tmp="$complete EOL"
15687    arguments="${tmp#* }"
15688
15689    # Cannot rely on the command "which" here since it doesn't always work.
15690    is_absolute_path=`$ECHO "$path" | $GREP ^/`
15691    if test -z "$is_absolute_path"; then
15692      # Path to executable is not absolute. Find it.
15693      IFS_save="$IFS"
15694      IFS=:
15695      for p in $PATH; do
15696        if test -f "$p/$path" && test -x "$p/$path"; then
15697          new_path="$p/$path"
15698          break
15699        fi
15700      done
15701      IFS="$IFS_save"
15702    else
15703      # This is an absolute path, we can use it without further modifications.
15704      new_path="$path"
15705    fi
15706
15707    if test "x$new_path" = x; then
15708      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15709$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15710      has_space=`$ECHO "$complete" | $GREP " "`
15711      if test "x$has_space" != x; then
15712        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15713$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15714      fi
15715      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15716    fi
15717  fi
15718
15719  # Now join together the path and the arguments once again
15720  if test "x$arguments" != xEOL; then
15721    new_complete="$new_path ${arguments% *}"
15722  else
15723    new_complete="$new_path"
15724  fi
15725
15726  if test "x$complete" != "x$new_complete"; then
15727    FOUND_MAKE="$new_complete"
15728    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15729$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15730  fi
15731
15732        fi
15733      fi
15734    fi
15735  fi
15736
15737    if test "x$FOUND_MAKE" = x; then
15738      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
15739    fi
15740  else
15741    # Try our hardest to locate a correct version of GNU make
15742    for ac_prog in gmake
15743do
15744  # Extract the first word of "$ac_prog", so it can be a program name with args.
15745set dummy $ac_prog; ac_word=$2
15746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15747$as_echo_n "checking for $ac_word... " >&6; }
15748if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15749  $as_echo_n "(cached) " >&6
15750else
15751  case $CHECK_GMAKE in
15752  [\\/]* | ?:[\\/]*)
15753  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15754  ;;
15755  *)
15756  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15757for as_dir in $PATH
15758do
15759  IFS=$as_save_IFS
15760  test -z "$as_dir" && as_dir=.
15761    for ac_exec_ext in '' $ac_executable_extensions; do
15762  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15763    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15764    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15765    break 2
15766  fi
15767done
15768  done
15769IFS=$as_save_IFS
15770
15771  ;;
15772esac
15773fi
15774CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15775if test -n "$CHECK_GMAKE"; then
15776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15777$as_echo "$CHECK_GMAKE" >&6; }
15778else
15779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15780$as_echo "no" >&6; }
15781fi
15782
15783
15784  test -n "$CHECK_GMAKE" && break
15785done
15786
15787
15788  MAKE_CANDIDATE=""$CHECK_GMAKE""
15789  DESCRIPTION="gmake in PATH"
15790  if test "x$MAKE_CANDIDATE" != x; then
15791    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15792$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15793    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15794    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15795    if test "x$IS_GNU_MAKE" = x; then
15796      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15797$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15798    else
15799      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15800      if test "x$IS_MODERN_MAKE" = x; then
15801        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
15802$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
15803      else
15804        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15805          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15806            MAKE_EXPECTED_ENV='cygwin'
15807          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15808            MAKE_EXPECTED_ENV='msys'
15809          else
15810            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15811          fi
15812          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15813          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15814        else
15815          # Not relevant for non-Windows
15816          IS_MAKE_CORRECT_ENV=true
15817        fi
15818        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15819          { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
15820$as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
15821        else
15822          FOUND_MAKE=$MAKE_CANDIDATE
15823
15824  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15825
15826  # First separate the path from the arguments. This will split at the first
15827  # space.
15828  complete="$FOUND_MAKE"
15829  path="${complete%% *}"
15830  tmp="$complete EOL"
15831  arguments="${tmp#* }"
15832
15833  # Input might be given as Windows format, start by converting to
15834  # unix format.
15835  new_path=`$CYGPATH -u "$path"`
15836
15837  # Now try to locate executable using which
15838  new_path=`$WHICH "$new_path" 2> /dev/null`
15839  # bat and cmd files are not always considered executable in cygwin causing which
15840  # to not find them
15841  if test "x$new_path" = x \
15842      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15843      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15844    new_path=`$CYGPATH -u "$path"`
15845  fi
15846  if test "x$new_path" = x; then
15847    # Oops. Which didn't find the executable.
15848    # The splitting of arguments from the executable at a space might have been incorrect,
15849    # since paths with space are more likely in Windows. Give it another try with the whole
15850    # argument.
15851    path="$complete"
15852    arguments="EOL"
15853    new_path=`$CYGPATH -u "$path"`
15854    new_path=`$WHICH "$new_path" 2> /dev/null`
15855    # bat and cmd files are not always considered executable in cygwin causing which
15856    # to not find them
15857    if test "x$new_path" = x \
15858        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15859        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15860      new_path=`$CYGPATH -u "$path"`
15861    fi
15862    if test "x$new_path" = x; then
15863      # It's still not found. Now this is an unrecoverable error.
15864      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15865$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15866      has_space=`$ECHO "$complete" | $GREP " "`
15867      if test "x$has_space" != x; then
15868        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15869$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15870      fi
15871      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15872    fi
15873  fi
15874
15875  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15876  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15877  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15878  # "foo.exe" is OK but "foo" is an error.
15879  #
15880  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15881  # It is also a way to make sure we got the proper file name for the real test later on.
15882  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15883  if test "x$test_shortpath" = x; then
15884    # Short path failed, file does not exist as specified.
15885    # Try adding .exe or .cmd
15886    if test -f "${new_path}.exe"; then
15887      input_to_shortpath="${new_path}.exe"
15888    elif test -f "${new_path}.cmd"; then
15889      input_to_shortpath="${new_path}.cmd"
15890    else
15891      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15892$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15893      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15894$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15895      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15896    fi
15897  else
15898    input_to_shortpath="$new_path"
15899  fi
15900
15901  # Call helper function which possibly converts this using DOS-style short mode.
15902  # If so, the updated path is stored in $new_path.
15903  new_path="$input_to_shortpath"
15904
15905  input_path="$input_to_shortpath"
15906  # Check if we need to convert this using DOS-style short mode. If the path
15907  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15908  # take no chances and rewrite it.
15909  # Note: m4 eats our [], so we need to use [ and ] instead.
15910  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15911  if test "x$has_forbidden_chars" != x; then
15912    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15913    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15914    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15915    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15916      # Going to short mode and back again did indeed matter. Since short mode is
15917      # case insensitive, let's make it lowercase to improve readability.
15918      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15919      # Now convert it back to Unix-stile (cygpath)
15920      input_path=`$CYGPATH -u "$shortmode_path"`
15921      new_path="$input_path"
15922    fi
15923  fi
15924
15925  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15926  if test "x$test_cygdrive_prefix" = x; then
15927    # As a simple fix, exclude /usr/bin since it's not a real path.
15928    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15929      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15930      # a path prefixed by /cygdrive for fixpath to work.
15931      new_path="$CYGWIN_ROOT_PATH$input_path"
15932    fi
15933  fi
15934
15935  # remove trailing .exe if any
15936  new_path="${new_path/%.exe/}"
15937
15938  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15939
15940  # First separate the path from the arguments. This will split at the first
15941  # space.
15942  complete="$FOUND_MAKE"
15943  path="${complete%% *}"
15944  tmp="$complete EOL"
15945  arguments="${tmp#* }"
15946
15947  # Input might be given as Windows format, start by converting to
15948  # unix format.
15949  new_path="$path"
15950
15951  windows_path="$new_path"
15952  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15953    unix_path=`$CYGPATH -u "$windows_path"`
15954    new_path="$unix_path"
15955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15956    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15957    new_path="$unix_path"
15958  fi
15959
15960
15961  # Now try to locate executable using which
15962  new_path=`$WHICH "$new_path" 2> /dev/null`
15963
15964  if test "x$new_path" = x; then
15965    # Oops. Which didn't find the executable.
15966    # The splitting of arguments from the executable at a space might have been incorrect,
15967    # since paths with space are more likely in Windows. Give it another try with the whole
15968    # argument.
15969    path="$complete"
15970    arguments="EOL"
15971    new_path="$path"
15972
15973  windows_path="$new_path"
15974  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15975    unix_path=`$CYGPATH -u "$windows_path"`
15976    new_path="$unix_path"
15977  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15978    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15979    new_path="$unix_path"
15980  fi
15981
15982
15983    new_path=`$WHICH "$new_path" 2> /dev/null`
15984    # bat and cmd files are not always considered executable in MSYS causing which
15985    # to not find them
15986    if test "x$new_path" = x \
15987        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15988        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15989      new_path="$path"
15990
15991  windows_path="$new_path"
15992  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15993    unix_path=`$CYGPATH -u "$windows_path"`
15994    new_path="$unix_path"
15995  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15996    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15997    new_path="$unix_path"
15998  fi
15999
16000    fi
16001
16002    if test "x$new_path" = x; then
16003      # It's still not found. Now this is an unrecoverable error.
16004      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16005$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16006      has_space=`$ECHO "$complete" | $GREP " "`
16007      if test "x$has_space" != x; then
16008        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16009$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16010      fi
16011      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16012    fi
16013  fi
16014
16015  # Now new_path has a complete unix path to the binary
16016  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16017    # Keep paths in /bin as-is, but remove trailing .exe if any
16018    new_path="${new_path/%.exe/}"
16019    # Do not save /bin paths to all_fixpath_prefixes!
16020  else
16021    # Not in mixed or Windows style, start by that.
16022    new_path=`cmd //c echo $new_path`
16023
16024  input_path="$new_path"
16025  # Check if we need to convert this using DOS-style short mode. If the path
16026  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16027  # take no chances and rewrite it.
16028  # Note: m4 eats our [], so we need to use [ and ] instead.
16029  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16030  if test "x$has_forbidden_chars" != x; then
16031    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16032    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16033  fi
16034
16035    # Output is in $new_path
16036
16037  windows_path="$new_path"
16038  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16039    unix_path=`$CYGPATH -u "$windows_path"`
16040    new_path="$unix_path"
16041  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16042    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16043    new_path="$unix_path"
16044  fi
16045
16046    # remove trailing .exe if any
16047    new_path="${new_path/%.exe/}"
16048
16049    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16050    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16051  fi
16052
16053  else
16054    # We're on a posix platform. Hooray! :)
16055    # First separate the path from the arguments. This will split at the first
16056    # space.
16057    complete="$FOUND_MAKE"
16058    path="${complete%% *}"
16059    tmp="$complete EOL"
16060    arguments="${tmp#* }"
16061
16062    # Cannot rely on the command "which" here since it doesn't always work.
16063    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16064    if test -z "$is_absolute_path"; then
16065      # Path to executable is not absolute. Find it.
16066      IFS_save="$IFS"
16067      IFS=:
16068      for p in $PATH; do
16069        if test -f "$p/$path" && test -x "$p/$path"; then
16070          new_path="$p/$path"
16071          break
16072        fi
16073      done
16074      IFS="$IFS_save"
16075    else
16076      # This is an absolute path, we can use it without further modifications.
16077      new_path="$path"
16078    fi
16079
16080    if test "x$new_path" = x; then
16081      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16082$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16083      has_space=`$ECHO "$complete" | $GREP " "`
16084      if test "x$has_space" != x; then
16085        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16086$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16087      fi
16088      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16089    fi
16090  fi
16091
16092  # Now join together the path and the arguments once again
16093  if test "x$arguments" != xEOL; then
16094    new_complete="$new_path ${arguments% *}"
16095  else
16096    new_complete="$new_path"
16097  fi
16098
16099  if test "x$complete" != "x$new_complete"; then
16100    FOUND_MAKE="$new_complete"
16101    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16102$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16103  fi
16104
16105        fi
16106      fi
16107    fi
16108  fi
16109
16110
16111    if test "x$FOUND_MAKE" = x; then
16112      for ac_prog in make
16113do
16114  # Extract the first word of "$ac_prog", so it can be a program name with args.
16115set dummy $ac_prog; ac_word=$2
16116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16117$as_echo_n "checking for $ac_word... " >&6; }
16118if ${ac_cv_path_CHECK_MAKE+:} false; then :
16119  $as_echo_n "(cached) " >&6
16120else
16121  case $CHECK_MAKE in
16122  [\\/]* | ?:[\\/]*)
16123  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
16124  ;;
16125  *)
16126  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16127for as_dir in $PATH
16128do
16129  IFS=$as_save_IFS
16130  test -z "$as_dir" && as_dir=.
16131    for ac_exec_ext in '' $ac_executable_extensions; do
16132  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16133    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
16134    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16135    break 2
16136  fi
16137done
16138  done
16139IFS=$as_save_IFS
16140
16141  ;;
16142esac
16143fi
16144CHECK_MAKE=$ac_cv_path_CHECK_MAKE
16145if test -n "$CHECK_MAKE"; then
16146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
16147$as_echo "$CHECK_MAKE" >&6; }
16148else
16149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16150$as_echo "no" >&6; }
16151fi
16152
16153
16154  test -n "$CHECK_MAKE" && break
16155done
16156
16157
16158  MAKE_CANDIDATE=""$CHECK_MAKE""
16159  DESCRIPTION="make in PATH"
16160  if test "x$MAKE_CANDIDATE" != x; then
16161    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16162$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16163    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16164    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16165    if test "x$IS_GNU_MAKE" = x; then
16166      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16167$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16168    else
16169      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16170      if test "x$IS_MODERN_MAKE" = x; then
16171        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
16172$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
16173      else
16174        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16175          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16176            MAKE_EXPECTED_ENV='cygwin'
16177          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16178            MAKE_EXPECTED_ENV='msys'
16179          else
16180            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16181          fi
16182          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16183          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16184        else
16185          # Not relevant for non-Windows
16186          IS_MAKE_CORRECT_ENV=true
16187        fi
16188        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16189          { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
16190$as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
16191        else
16192          FOUND_MAKE=$MAKE_CANDIDATE
16193
16194  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16195
16196  # First separate the path from the arguments. This will split at the first
16197  # space.
16198  complete="$FOUND_MAKE"
16199  path="${complete%% *}"
16200  tmp="$complete EOL"
16201  arguments="${tmp#* }"
16202
16203  # Input might be given as Windows format, start by converting to
16204  # unix format.
16205  new_path=`$CYGPATH -u "$path"`
16206
16207  # Now try to locate executable using which
16208  new_path=`$WHICH "$new_path" 2> /dev/null`
16209  # bat and cmd files are not always considered executable in cygwin causing which
16210  # to not find them
16211  if test "x$new_path" = x \
16212      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16213      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16214    new_path=`$CYGPATH -u "$path"`
16215  fi
16216  if test "x$new_path" = x; then
16217    # Oops. Which didn't find the executable.
16218    # The splitting of arguments from the executable at a space might have been incorrect,
16219    # since paths with space are more likely in Windows. Give it another try with the whole
16220    # argument.
16221    path="$complete"
16222    arguments="EOL"
16223    new_path=`$CYGPATH -u "$path"`
16224    new_path=`$WHICH "$new_path" 2> /dev/null`
16225    # bat and cmd files are not always considered executable in cygwin causing which
16226    # to not find them
16227    if test "x$new_path" = x \
16228        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16229        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16230      new_path=`$CYGPATH -u "$path"`
16231    fi
16232    if test "x$new_path" = x; then
16233      # It's still not found. Now this is an unrecoverable error.
16234      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16235$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16236      has_space=`$ECHO "$complete" | $GREP " "`
16237      if test "x$has_space" != x; then
16238        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16239$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16240      fi
16241      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16242    fi
16243  fi
16244
16245  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16246  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16247  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16248  # "foo.exe" is OK but "foo" is an error.
16249  #
16250  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16251  # It is also a way to make sure we got the proper file name for the real test later on.
16252  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16253  if test "x$test_shortpath" = x; then
16254    # Short path failed, file does not exist as specified.
16255    # Try adding .exe or .cmd
16256    if test -f "${new_path}.exe"; then
16257      input_to_shortpath="${new_path}.exe"
16258    elif test -f "${new_path}.cmd"; then
16259      input_to_shortpath="${new_path}.cmd"
16260    else
16261      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16262$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16263      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16264$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16265      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16266    fi
16267  else
16268    input_to_shortpath="$new_path"
16269  fi
16270
16271  # Call helper function which possibly converts this using DOS-style short mode.
16272  # If so, the updated path is stored in $new_path.
16273  new_path="$input_to_shortpath"
16274
16275  input_path="$input_to_shortpath"
16276  # Check if we need to convert this using DOS-style short mode. If the path
16277  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16278  # take no chances and rewrite it.
16279  # Note: m4 eats our [], so we need to use [ and ] instead.
16280  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16281  if test "x$has_forbidden_chars" != x; then
16282    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16283    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16284    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16285    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16286      # Going to short mode and back again did indeed matter. Since short mode is
16287      # case insensitive, let's make it lowercase to improve readability.
16288      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16289      # Now convert it back to Unix-stile (cygpath)
16290      input_path=`$CYGPATH -u "$shortmode_path"`
16291      new_path="$input_path"
16292    fi
16293  fi
16294
16295  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16296  if test "x$test_cygdrive_prefix" = x; then
16297    # As a simple fix, exclude /usr/bin since it's not a real path.
16298    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16299      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16300      # a path prefixed by /cygdrive for fixpath to work.
16301      new_path="$CYGWIN_ROOT_PATH$input_path"
16302    fi
16303  fi
16304
16305  # remove trailing .exe if any
16306  new_path="${new_path/%.exe/}"
16307
16308  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16309
16310  # First separate the path from the arguments. This will split at the first
16311  # space.
16312  complete="$FOUND_MAKE"
16313  path="${complete%% *}"
16314  tmp="$complete EOL"
16315  arguments="${tmp#* }"
16316
16317  # Input might be given as Windows format, start by converting to
16318  # unix format.
16319  new_path="$path"
16320
16321  windows_path="$new_path"
16322  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16323    unix_path=`$CYGPATH -u "$windows_path"`
16324    new_path="$unix_path"
16325  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16326    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16327    new_path="$unix_path"
16328  fi
16329
16330
16331  # Now try to locate executable using which
16332  new_path=`$WHICH "$new_path" 2> /dev/null`
16333
16334  if test "x$new_path" = x; then
16335    # Oops. Which didn't find the executable.
16336    # The splitting of arguments from the executable at a space might have been incorrect,
16337    # since paths with space are more likely in Windows. Give it another try with the whole
16338    # argument.
16339    path="$complete"
16340    arguments="EOL"
16341    new_path="$path"
16342
16343  windows_path="$new_path"
16344  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16345    unix_path=`$CYGPATH -u "$windows_path"`
16346    new_path="$unix_path"
16347  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16348    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16349    new_path="$unix_path"
16350  fi
16351
16352
16353    new_path=`$WHICH "$new_path" 2> /dev/null`
16354    # bat and cmd files are not always considered executable in MSYS causing which
16355    # to not find them
16356    if test "x$new_path" = x \
16357        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16358        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16359      new_path="$path"
16360
16361  windows_path="$new_path"
16362  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16363    unix_path=`$CYGPATH -u "$windows_path"`
16364    new_path="$unix_path"
16365  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16366    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16367    new_path="$unix_path"
16368  fi
16369
16370    fi
16371
16372    if test "x$new_path" = x; then
16373      # It's still not found. Now this is an unrecoverable error.
16374      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16375$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16376      has_space=`$ECHO "$complete" | $GREP " "`
16377      if test "x$has_space" != x; then
16378        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16379$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16380      fi
16381      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16382    fi
16383  fi
16384
16385  # Now new_path has a complete unix path to the binary
16386  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16387    # Keep paths in /bin as-is, but remove trailing .exe if any
16388    new_path="${new_path/%.exe/}"
16389    # Do not save /bin paths to all_fixpath_prefixes!
16390  else
16391    # Not in mixed or Windows style, start by that.
16392    new_path=`cmd //c echo $new_path`
16393
16394  input_path="$new_path"
16395  # Check if we need to convert this using DOS-style short mode. If the path
16396  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16397  # take no chances and rewrite it.
16398  # Note: m4 eats our [], so we need to use [ and ] instead.
16399  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16400  if test "x$has_forbidden_chars" != x; then
16401    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16402    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16403  fi
16404
16405    # Output is in $new_path
16406
16407  windows_path="$new_path"
16408  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16409    unix_path=`$CYGPATH -u "$windows_path"`
16410    new_path="$unix_path"
16411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16412    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16413    new_path="$unix_path"
16414  fi
16415
16416    # remove trailing .exe if any
16417    new_path="${new_path/%.exe/}"
16418
16419    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16420    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16421  fi
16422
16423  else
16424    # We're on a posix platform. Hooray! :)
16425    # First separate the path from the arguments. This will split at the first
16426    # space.
16427    complete="$FOUND_MAKE"
16428    path="${complete%% *}"
16429    tmp="$complete EOL"
16430    arguments="${tmp#* }"
16431
16432    # Cannot rely on the command "which" here since it doesn't always work.
16433    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16434    if test -z "$is_absolute_path"; then
16435      # Path to executable is not absolute. Find it.
16436      IFS_save="$IFS"
16437      IFS=:
16438      for p in $PATH; do
16439        if test -f "$p/$path" && test -x "$p/$path"; then
16440          new_path="$p/$path"
16441          break
16442        fi
16443      done
16444      IFS="$IFS_save"
16445    else
16446      # This is an absolute path, we can use it without further modifications.
16447      new_path="$path"
16448    fi
16449
16450    if test "x$new_path" = x; then
16451      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16452$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16453      has_space=`$ECHO "$complete" | $GREP " "`
16454      if test "x$has_space" != x; then
16455        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16456$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16457      fi
16458      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16459    fi
16460  fi
16461
16462  # Now join together the path and the arguments once again
16463  if test "x$arguments" != xEOL; then
16464    new_complete="$new_path ${arguments% *}"
16465  else
16466    new_complete="$new_path"
16467  fi
16468
16469  if test "x$complete" != "x$new_complete"; then
16470    FOUND_MAKE="$new_complete"
16471    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16472$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16473  fi
16474
16475        fi
16476      fi
16477    fi
16478  fi
16479
16480    fi
16481
16482    if test "x$FOUND_MAKE" = x; then
16483      if test "x$TOOLCHAIN_PATH" != x; then
16484        # We have a toolchain path, check that as well before giving up.
16485        OLD_PATH=$PATH
16486        PATH=$TOOLCHAIN_PATH:$PATH
16487        for ac_prog in gmake
16488do
16489  # Extract the first word of "$ac_prog", so it can be a program name with args.
16490set dummy $ac_prog; ac_word=$2
16491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16492$as_echo_n "checking for $ac_word... " >&6; }
16493if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16494  $as_echo_n "(cached) " >&6
16495else
16496  case $CHECK_TOOLSDIR_GMAKE in
16497  [\\/]* | ?:[\\/]*)
16498  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16499  ;;
16500  *)
16501  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16502for as_dir in $PATH
16503do
16504  IFS=$as_save_IFS
16505  test -z "$as_dir" && as_dir=.
16506    for ac_exec_ext in '' $ac_executable_extensions; do
16507  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16508    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16509    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16510    break 2
16511  fi
16512done
16513  done
16514IFS=$as_save_IFS
16515
16516  ;;
16517esac
16518fi
16519CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16520if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16522$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16523else
16524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16525$as_echo "no" >&6; }
16526fi
16527
16528
16529  test -n "$CHECK_TOOLSDIR_GMAKE" && break
16530done
16531
16532
16533  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16534  DESCRIPTION="gmake in tools-dir"
16535  if test "x$MAKE_CANDIDATE" != x; then
16536    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16537$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16538    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16539    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16540    if test "x$IS_GNU_MAKE" = x; then
16541      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16542$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16543    else
16544      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16545      if test "x$IS_MODERN_MAKE" = x; then
16546        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
16547$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
16548      else
16549        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16550          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16551            MAKE_EXPECTED_ENV='cygwin'
16552          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16553            MAKE_EXPECTED_ENV='msys'
16554          else
16555            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16556          fi
16557          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16558          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16559        else
16560          # Not relevant for non-Windows
16561          IS_MAKE_CORRECT_ENV=true
16562        fi
16563        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16564          { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
16565$as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
16566        else
16567          FOUND_MAKE=$MAKE_CANDIDATE
16568
16569  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16570
16571  # First separate the path from the arguments. This will split at the first
16572  # space.
16573  complete="$FOUND_MAKE"
16574  path="${complete%% *}"
16575  tmp="$complete EOL"
16576  arguments="${tmp#* }"
16577
16578  # Input might be given as Windows format, start by converting to
16579  # unix format.
16580  new_path=`$CYGPATH -u "$path"`
16581
16582  # Now try to locate executable using which
16583  new_path=`$WHICH "$new_path" 2> /dev/null`
16584  # bat and cmd files are not always considered executable in cygwin causing which
16585  # to not find them
16586  if test "x$new_path" = x \
16587      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16588      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16589    new_path=`$CYGPATH -u "$path"`
16590  fi
16591  if test "x$new_path" = x; then
16592    # Oops. Which didn't find the executable.
16593    # The splitting of arguments from the executable at a space might have been incorrect,
16594    # since paths with space are more likely in Windows. Give it another try with the whole
16595    # argument.
16596    path="$complete"
16597    arguments="EOL"
16598    new_path=`$CYGPATH -u "$path"`
16599    new_path=`$WHICH "$new_path" 2> /dev/null`
16600    # bat and cmd files are not always considered executable in cygwin causing which
16601    # to not find them
16602    if test "x$new_path" = x \
16603        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16604        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16605      new_path=`$CYGPATH -u "$path"`
16606    fi
16607    if test "x$new_path" = x; then
16608      # It's still not found. Now this is an unrecoverable error.
16609      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16610$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16611      has_space=`$ECHO "$complete" | $GREP " "`
16612      if test "x$has_space" != x; then
16613        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16614$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16615      fi
16616      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16617    fi
16618  fi
16619
16620  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16621  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16622  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16623  # "foo.exe" is OK but "foo" is an error.
16624  #
16625  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16626  # It is also a way to make sure we got the proper file name for the real test later on.
16627  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16628  if test "x$test_shortpath" = x; then
16629    # Short path failed, file does not exist as specified.
16630    # Try adding .exe or .cmd
16631    if test -f "${new_path}.exe"; then
16632      input_to_shortpath="${new_path}.exe"
16633    elif test -f "${new_path}.cmd"; then
16634      input_to_shortpath="${new_path}.cmd"
16635    else
16636      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16637$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16638      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16639$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16640      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16641    fi
16642  else
16643    input_to_shortpath="$new_path"
16644  fi
16645
16646  # Call helper function which possibly converts this using DOS-style short mode.
16647  # If so, the updated path is stored in $new_path.
16648  new_path="$input_to_shortpath"
16649
16650  input_path="$input_to_shortpath"
16651  # Check if we need to convert this using DOS-style short mode. If the path
16652  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16653  # take no chances and rewrite it.
16654  # Note: m4 eats our [], so we need to use [ and ] instead.
16655  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16656  if test "x$has_forbidden_chars" != x; then
16657    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16658    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16659    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16660    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16661      # Going to short mode and back again did indeed matter. Since short mode is
16662      # case insensitive, let's make it lowercase to improve readability.
16663      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16664      # Now convert it back to Unix-stile (cygpath)
16665      input_path=`$CYGPATH -u "$shortmode_path"`
16666      new_path="$input_path"
16667    fi
16668  fi
16669
16670  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16671  if test "x$test_cygdrive_prefix" = x; then
16672    # As a simple fix, exclude /usr/bin since it's not a real path.
16673    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16674      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16675      # a path prefixed by /cygdrive for fixpath to work.
16676      new_path="$CYGWIN_ROOT_PATH$input_path"
16677    fi
16678  fi
16679
16680  # remove trailing .exe if any
16681  new_path="${new_path/%.exe/}"
16682
16683  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16684
16685  # First separate the path from the arguments. This will split at the first
16686  # space.
16687  complete="$FOUND_MAKE"
16688  path="${complete%% *}"
16689  tmp="$complete EOL"
16690  arguments="${tmp#* }"
16691
16692  # Input might be given as Windows format, start by converting to
16693  # unix format.
16694  new_path="$path"
16695
16696  windows_path="$new_path"
16697  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16698    unix_path=`$CYGPATH -u "$windows_path"`
16699    new_path="$unix_path"
16700  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16701    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16702    new_path="$unix_path"
16703  fi
16704
16705
16706  # Now try to locate executable using which
16707  new_path=`$WHICH "$new_path" 2> /dev/null`
16708
16709  if test "x$new_path" = x; then
16710    # Oops. Which didn't find the executable.
16711    # The splitting of arguments from the executable at a space might have been incorrect,
16712    # since paths with space are more likely in Windows. Give it another try with the whole
16713    # argument.
16714    path="$complete"
16715    arguments="EOL"
16716    new_path="$path"
16717
16718  windows_path="$new_path"
16719  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16720    unix_path=`$CYGPATH -u "$windows_path"`
16721    new_path="$unix_path"
16722  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16723    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16724    new_path="$unix_path"
16725  fi
16726
16727
16728    new_path=`$WHICH "$new_path" 2> /dev/null`
16729    # bat and cmd files are not always considered executable in MSYS causing which
16730    # to not find them
16731    if test "x$new_path" = x \
16732        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16733        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16734      new_path="$path"
16735
16736  windows_path="$new_path"
16737  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16738    unix_path=`$CYGPATH -u "$windows_path"`
16739    new_path="$unix_path"
16740  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16741    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16742    new_path="$unix_path"
16743  fi
16744
16745    fi
16746
16747    if test "x$new_path" = x; then
16748      # It's still not found. Now this is an unrecoverable error.
16749      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16750$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16751      has_space=`$ECHO "$complete" | $GREP " "`
16752      if test "x$has_space" != x; then
16753        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16754$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16755      fi
16756      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16757    fi
16758  fi
16759
16760  # Now new_path has a complete unix path to the binary
16761  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16762    # Keep paths in /bin as-is, but remove trailing .exe if any
16763    new_path="${new_path/%.exe/}"
16764    # Do not save /bin paths to all_fixpath_prefixes!
16765  else
16766    # Not in mixed or Windows style, start by that.
16767    new_path=`cmd //c echo $new_path`
16768
16769  input_path="$new_path"
16770  # Check if we need to convert this using DOS-style short mode. If the path
16771  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16772  # take no chances and rewrite it.
16773  # Note: m4 eats our [], so we need to use [ and ] instead.
16774  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16775  if test "x$has_forbidden_chars" != x; then
16776    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16777    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16778  fi
16779
16780    # Output is in $new_path
16781
16782  windows_path="$new_path"
16783  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16784    unix_path=`$CYGPATH -u "$windows_path"`
16785    new_path="$unix_path"
16786  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16787    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16788    new_path="$unix_path"
16789  fi
16790
16791    # remove trailing .exe if any
16792    new_path="${new_path/%.exe/}"
16793
16794    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16795    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16796  fi
16797
16798  else
16799    # We're on a posix platform. Hooray! :)
16800    # First separate the path from the arguments. This will split at the first
16801    # space.
16802    complete="$FOUND_MAKE"
16803    path="${complete%% *}"
16804    tmp="$complete EOL"
16805    arguments="${tmp#* }"
16806
16807    # Cannot rely on the command "which" here since it doesn't always work.
16808    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16809    if test -z "$is_absolute_path"; then
16810      # Path to executable is not absolute. Find it.
16811      IFS_save="$IFS"
16812      IFS=:
16813      for p in $PATH; do
16814        if test -f "$p/$path" && test -x "$p/$path"; then
16815          new_path="$p/$path"
16816          break
16817        fi
16818      done
16819      IFS="$IFS_save"
16820    else
16821      # This is an absolute path, we can use it without further modifications.
16822      new_path="$path"
16823    fi
16824
16825    if test "x$new_path" = x; then
16826      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16827$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16828      has_space=`$ECHO "$complete" | $GREP " "`
16829      if test "x$has_space" != x; then
16830        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16831$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16832      fi
16833      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16834    fi
16835  fi
16836
16837  # Now join together the path and the arguments once again
16838  if test "x$arguments" != xEOL; then
16839    new_complete="$new_path ${arguments% *}"
16840  else
16841    new_complete="$new_path"
16842  fi
16843
16844  if test "x$complete" != "x$new_complete"; then
16845    FOUND_MAKE="$new_complete"
16846    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16847$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16848  fi
16849
16850        fi
16851      fi
16852    fi
16853  fi
16854
16855        if test "x$FOUND_MAKE" = x; then
16856          for ac_prog in make
16857do
16858  # Extract the first word of "$ac_prog", so it can be a program name with args.
16859set dummy $ac_prog; ac_word=$2
16860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16861$as_echo_n "checking for $ac_word... " >&6; }
16862if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
16863  $as_echo_n "(cached) " >&6
16864else
16865  case $CHECK_TOOLSDIR_MAKE in
16866  [\\/]* | ?:[\\/]*)
16867  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
16868  ;;
16869  *)
16870  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16871for as_dir in $PATH
16872do
16873  IFS=$as_save_IFS
16874  test -z "$as_dir" && as_dir=.
16875    for ac_exec_ext in '' $ac_executable_extensions; do
16876  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16877    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
16878    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16879    break 2
16880  fi
16881done
16882  done
16883IFS=$as_save_IFS
16884
16885  ;;
16886esac
16887fi
16888CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
16889if test -n "$CHECK_TOOLSDIR_MAKE"; then
16890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
16891$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
16892else
16893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16894$as_echo "no" >&6; }
16895fi
16896
16897
16898  test -n "$CHECK_TOOLSDIR_MAKE" && break
16899done
16900
16901
16902  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
16903  DESCRIPTION="make in tools-dir"
16904  if test "x$MAKE_CANDIDATE" != x; then
16905    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16906$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16907    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16908    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16909    if test "x$IS_GNU_MAKE" = x; then
16910      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16911$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16912    else
16913      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16914      if test "x$IS_MODERN_MAKE" = x; then
16915        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
16916$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
16917      else
16918        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16919          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16920            MAKE_EXPECTED_ENV='cygwin'
16921          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16922            MAKE_EXPECTED_ENV='msys'
16923          else
16924            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16925          fi
16926          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16927          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16928        else
16929          # Not relevant for non-Windows
16930          IS_MAKE_CORRECT_ENV=true
16931        fi
16932        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16933          { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
16934$as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
16935        else
16936          FOUND_MAKE=$MAKE_CANDIDATE
16937
16938  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16939
16940  # First separate the path from the arguments. This will split at the first
16941  # space.
16942  complete="$FOUND_MAKE"
16943  path="${complete%% *}"
16944  tmp="$complete EOL"
16945  arguments="${tmp#* }"
16946
16947  # Input might be given as Windows format, start by converting to
16948  # unix format.
16949  new_path=`$CYGPATH -u "$path"`
16950
16951  # Now try to locate executable using which
16952  new_path=`$WHICH "$new_path" 2> /dev/null`
16953  # bat and cmd files are not always considered executable in cygwin causing which
16954  # to not find them
16955  if test "x$new_path" = x \
16956      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16957      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16958    new_path=`$CYGPATH -u "$path"`
16959  fi
16960  if test "x$new_path" = x; then
16961    # Oops. Which didn't find the executable.
16962    # The splitting of arguments from the executable at a space might have been incorrect,
16963    # since paths with space are more likely in Windows. Give it another try with the whole
16964    # argument.
16965    path="$complete"
16966    arguments="EOL"
16967    new_path=`$CYGPATH -u "$path"`
16968    new_path=`$WHICH "$new_path" 2> /dev/null`
16969    # bat and cmd files are not always considered executable in cygwin causing which
16970    # to not find them
16971    if test "x$new_path" = x \
16972        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16973        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16974      new_path=`$CYGPATH -u "$path"`
16975    fi
16976    if test "x$new_path" = x; then
16977      # It's still not found. Now this is an unrecoverable error.
16978      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16979$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16980      has_space=`$ECHO "$complete" | $GREP " "`
16981      if test "x$has_space" != x; then
16982        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16983$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16984      fi
16985      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16986    fi
16987  fi
16988
16989  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16990  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16991  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16992  # "foo.exe" is OK but "foo" is an error.
16993  #
16994  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16995  # It is also a way to make sure we got the proper file name for the real test later on.
16996  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16997  if test "x$test_shortpath" = x; then
16998    # Short path failed, file does not exist as specified.
16999    # Try adding .exe or .cmd
17000    if test -f "${new_path}.exe"; then
17001      input_to_shortpath="${new_path}.exe"
17002    elif test -f "${new_path}.cmd"; then
17003      input_to_shortpath="${new_path}.cmd"
17004    else
17005      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17006$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17007      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17008$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17009      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17010    fi
17011  else
17012    input_to_shortpath="$new_path"
17013  fi
17014
17015  # Call helper function which possibly converts this using DOS-style short mode.
17016  # If so, the updated path is stored in $new_path.
17017  new_path="$input_to_shortpath"
17018
17019  input_path="$input_to_shortpath"
17020  # Check if we need to convert this using DOS-style short mode. If the path
17021  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17022  # take no chances and rewrite it.
17023  # Note: m4 eats our [], so we need to use [ and ] instead.
17024  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17025  if test "x$has_forbidden_chars" != x; then
17026    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17027    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17028    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17029    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17030      # Going to short mode and back again did indeed matter. Since short mode is
17031      # case insensitive, let's make it lowercase to improve readability.
17032      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17033      # Now convert it back to Unix-stile (cygpath)
17034      input_path=`$CYGPATH -u "$shortmode_path"`
17035      new_path="$input_path"
17036    fi
17037  fi
17038
17039  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17040  if test "x$test_cygdrive_prefix" = x; then
17041    # As a simple fix, exclude /usr/bin since it's not a real path.
17042    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17043      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17044      # a path prefixed by /cygdrive for fixpath to work.
17045      new_path="$CYGWIN_ROOT_PATH$input_path"
17046    fi
17047  fi
17048
17049  # remove trailing .exe if any
17050  new_path="${new_path/%.exe/}"
17051
17052  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17053
17054  # First separate the path from the arguments. This will split at the first
17055  # space.
17056  complete="$FOUND_MAKE"
17057  path="${complete%% *}"
17058  tmp="$complete EOL"
17059  arguments="${tmp#* }"
17060
17061  # Input might be given as Windows format, start by converting to
17062  # unix format.
17063  new_path="$path"
17064
17065  windows_path="$new_path"
17066  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17067    unix_path=`$CYGPATH -u "$windows_path"`
17068    new_path="$unix_path"
17069  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17070    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17071    new_path="$unix_path"
17072  fi
17073
17074
17075  # Now try to locate executable using which
17076  new_path=`$WHICH "$new_path" 2> /dev/null`
17077
17078  if test "x$new_path" = x; then
17079    # Oops. Which didn't find the executable.
17080    # The splitting of arguments from the executable at a space might have been incorrect,
17081    # since paths with space are more likely in Windows. Give it another try with the whole
17082    # argument.
17083    path="$complete"
17084    arguments="EOL"
17085    new_path="$path"
17086
17087  windows_path="$new_path"
17088  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17089    unix_path=`$CYGPATH -u "$windows_path"`
17090    new_path="$unix_path"
17091  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17092    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17093    new_path="$unix_path"
17094  fi
17095
17096
17097    new_path=`$WHICH "$new_path" 2> /dev/null`
17098    # bat and cmd files are not always considered executable in MSYS causing which
17099    # to not find them
17100    if test "x$new_path" = x \
17101        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17102        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17103      new_path="$path"
17104
17105  windows_path="$new_path"
17106  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17107    unix_path=`$CYGPATH -u "$windows_path"`
17108    new_path="$unix_path"
17109  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17110    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17111    new_path="$unix_path"
17112  fi
17113
17114    fi
17115
17116    if test "x$new_path" = x; then
17117      # It's still not found. Now this is an unrecoverable error.
17118      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17119$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17120      has_space=`$ECHO "$complete" | $GREP " "`
17121      if test "x$has_space" != x; then
17122        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17123$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17124      fi
17125      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17126    fi
17127  fi
17128
17129  # Now new_path has a complete unix path to the binary
17130  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17131    # Keep paths in /bin as-is, but remove trailing .exe if any
17132    new_path="${new_path/%.exe/}"
17133    # Do not save /bin paths to all_fixpath_prefixes!
17134  else
17135    # Not in mixed or Windows style, start by that.
17136    new_path=`cmd //c echo $new_path`
17137
17138  input_path="$new_path"
17139  # Check if we need to convert this using DOS-style short mode. If the path
17140  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17141  # take no chances and rewrite it.
17142  # Note: m4 eats our [], so we need to use [ and ] instead.
17143  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17144  if test "x$has_forbidden_chars" != x; then
17145    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17146    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17147  fi
17148
17149    # Output is in $new_path
17150
17151  windows_path="$new_path"
17152  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17153    unix_path=`$CYGPATH -u "$windows_path"`
17154    new_path="$unix_path"
17155  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17156    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17157    new_path="$unix_path"
17158  fi
17159
17160    # remove trailing .exe if any
17161    new_path="${new_path/%.exe/}"
17162
17163    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17164    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17165  fi
17166
17167  else
17168    # We're on a posix platform. Hooray! :)
17169    # First separate the path from the arguments. This will split at the first
17170    # space.
17171    complete="$FOUND_MAKE"
17172    path="${complete%% *}"
17173    tmp="$complete EOL"
17174    arguments="${tmp#* }"
17175
17176    # Cannot rely on the command "which" here since it doesn't always work.
17177    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17178    if test -z "$is_absolute_path"; then
17179      # Path to executable is not absolute. Find it.
17180      IFS_save="$IFS"
17181      IFS=:
17182      for p in $PATH; do
17183        if test -f "$p/$path" && test -x "$p/$path"; then
17184          new_path="$p/$path"
17185          break
17186        fi
17187      done
17188      IFS="$IFS_save"
17189    else
17190      # This is an absolute path, we can use it without further modifications.
17191      new_path="$path"
17192    fi
17193
17194    if test "x$new_path" = x; then
17195      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17196$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17197      has_space=`$ECHO "$complete" | $GREP " "`
17198      if test "x$has_space" != x; then
17199        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17200$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17201      fi
17202      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17203    fi
17204  fi
17205
17206  # Now join together the path and the arguments once again
17207  if test "x$arguments" != xEOL; then
17208    new_complete="$new_path ${arguments% *}"
17209  else
17210    new_complete="$new_path"
17211  fi
17212
17213  if test "x$complete" != "x$new_complete"; then
17214    FOUND_MAKE="$new_complete"
17215    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17216$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17217  fi
17218
17219        fi
17220      fi
17221    fi
17222  fi
17223
17224        fi
17225        PATH=$OLD_PATH
17226      fi
17227    fi
17228
17229    if test "x$FOUND_MAKE" = x; then
17230      as_fn_error $? "Cannot find GNU make 3.81 or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure." "$LINENO" 5
17231    fi
17232  fi
17233
17234  MAKE=$FOUND_MAKE
17235
17236  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
17237$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
17238
17239
17240  # Check if make supports the output sync option and if so, setup using it.
17241  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
17242$as_echo_n "checking if make --output-sync is supported... " >&6; }
17243  if $MAKE --version -O > /dev/null 2>&1; then
17244    OUTPUT_SYNC_SUPPORTED=true
17245    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17246$as_echo "yes" >&6; }
17247    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
17248$as_echo_n "checking for output-sync value... " >&6; }
17249
17250# Check whether --with-output-sync was given.
17251if test "${with_output_sync+set}" = set; then :
17252  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
17253fi
17254
17255    if test "x$OUTPUT_SYNC" = "x"; then
17256      OUTPUT_SYNC=none
17257    fi
17258    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
17259$as_echo "$OUTPUT_SYNC" >&6; }
17260    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
17261      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
17262    fi
17263  else
17264    OUTPUT_SYNC_SUPPORTED=false
17265    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17266$as_echo "no" >&6; }
17267  fi
17268
17269
17270
17271
17272
17273
17274  # Test if find supports -delete
17275  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
17276$as_echo_n "checking if find supports -delete... " >&6; }
17277  FIND_DELETE="-delete"
17278
17279  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
17280
17281  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
17282
17283  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
17284  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
17285    # No, it does not.
17286    rm $DELETEDIR/TestIfFindSupportsDelete
17287    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
17288      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
17289      FIND_DELETE="-print | xargs rm"
17290    else
17291      FIND_DELETE="-exec rm \{\} \+"
17292    fi
17293    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17294$as_echo "no" >&6; }
17295  else
17296    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17297$as_echo "yes" >&6; }
17298  fi
17299  rmdir $DELETEDIR
17300
17301
17302
17303  # These tools might not be installed by default,
17304  # need hint on how to install them.
17305
17306
17307
17308  # Publish this variable in the help.
17309
17310
17311  if test "x$UNZIP" = x; then
17312    # The variable is not set by user, try to locate tool using the code snippet
17313    for ac_prog in unzip
17314do
17315  # Extract the first word of "$ac_prog", so it can be a program name with args.
17316set dummy $ac_prog; ac_word=$2
17317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17318$as_echo_n "checking for $ac_word... " >&6; }
17319if ${ac_cv_path_UNZIP+:} false; then :
17320  $as_echo_n "(cached) " >&6
17321else
17322  case $UNZIP in
17323  [\\/]* | ?:[\\/]*)
17324  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17325  ;;
17326  *)
17327  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17328for as_dir in $PATH
17329do
17330  IFS=$as_save_IFS
17331  test -z "$as_dir" && as_dir=.
17332    for ac_exec_ext in '' $ac_executable_extensions; do
17333  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17334    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17336    break 2
17337  fi
17338done
17339  done
17340IFS=$as_save_IFS
17341
17342  ;;
17343esac
17344fi
17345UNZIP=$ac_cv_path_UNZIP
17346if test -n "$UNZIP"; then
17347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17348$as_echo "$UNZIP" >&6; }
17349else
17350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17351$as_echo "no" >&6; }
17352fi
17353
17354
17355  test -n "$UNZIP" && break
17356done
17357
17358  else
17359    # The variable is set, but is it from the command line or the environment?
17360
17361    # Try to remove the string !UNZIP! from our list.
17362    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
17363    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17364      # If it failed, the variable was not from the command line. Ignore it,
17365      # but warn the user (except for BASH, which is always set by the calling BASH).
17366      if test "xUNZIP" != xBASH; then
17367        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
17368$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
17369      fi
17370      # Try to locate tool using the code snippet
17371      for ac_prog in unzip
17372do
17373  # Extract the first word of "$ac_prog", so it can be a program name with args.
17374set dummy $ac_prog; ac_word=$2
17375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17376$as_echo_n "checking for $ac_word... " >&6; }
17377if ${ac_cv_path_UNZIP+:} false; then :
17378  $as_echo_n "(cached) " >&6
17379else
17380  case $UNZIP in
17381  [\\/]* | ?:[\\/]*)
17382  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17383  ;;
17384  *)
17385  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17386for as_dir in $PATH
17387do
17388  IFS=$as_save_IFS
17389  test -z "$as_dir" && as_dir=.
17390    for ac_exec_ext in '' $ac_executable_extensions; do
17391  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17392    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17393    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17394    break 2
17395  fi
17396done
17397  done
17398IFS=$as_save_IFS
17399
17400  ;;
17401esac
17402fi
17403UNZIP=$ac_cv_path_UNZIP
17404if test -n "$UNZIP"; then
17405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17406$as_echo "$UNZIP" >&6; }
17407else
17408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17409$as_echo "no" >&6; }
17410fi
17411
17412
17413  test -n "$UNZIP" && break
17414done
17415
17416    else
17417      # If it succeeded, then it was overridden by the user. We will use it
17418      # for the tool.
17419
17420      # First remove it from the list of overridden variables, so we can test
17421      # for unknown variables in the end.
17422      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17423
17424      # Check if the provided tool contains a complete path.
17425      tool_specified="$UNZIP"
17426      tool_basename="${tool_specified##*/}"
17427      if test "x$tool_basename" = "x$tool_specified"; then
17428        # A command without a complete path is provided, search $PATH.
17429        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
17430$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
17431        # Extract the first word of "$tool_basename", so it can be a program name with args.
17432set dummy $tool_basename; ac_word=$2
17433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17434$as_echo_n "checking for $ac_word... " >&6; }
17435if ${ac_cv_path_UNZIP+:} false; then :
17436  $as_echo_n "(cached) " >&6
17437else
17438  case $UNZIP in
17439  [\\/]* | ?:[\\/]*)
17440  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17441  ;;
17442  *)
17443  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17444for as_dir in $PATH
17445do
17446  IFS=$as_save_IFS
17447  test -z "$as_dir" && as_dir=.
17448    for ac_exec_ext in '' $ac_executable_extensions; do
17449  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17450    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17451    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17452    break 2
17453  fi
17454done
17455  done
17456IFS=$as_save_IFS
17457
17458  ;;
17459esac
17460fi
17461UNZIP=$ac_cv_path_UNZIP
17462if test -n "$UNZIP"; then
17463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17464$as_echo "$UNZIP" >&6; }
17465else
17466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17467$as_echo "no" >&6; }
17468fi
17469
17470
17471        if test "x$UNZIP" = x; then
17472          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17473        fi
17474      else
17475        # Otherwise we believe it is a complete path. Use it as it is.
17476        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
17477$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
17478        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
17479$as_echo_n "checking for UNZIP... " >&6; }
17480        if test ! -x "$tool_specified"; then
17481          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17482$as_echo "not found" >&6; }
17483          as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17484        fi
17485        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17486$as_echo "$tool_specified" >&6; }
17487      fi
17488    fi
17489  fi
17490
17491
17492
17493  if test "x$UNZIP" = x; then
17494    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17495  fi
17496
17497
17498
17499
17500
17501  # Publish this variable in the help.
17502
17503
17504  if test "x$ZIP" = x; then
17505    # The variable is not set by user, try to locate tool using the code snippet
17506    for ac_prog in zip
17507do
17508  # Extract the first word of "$ac_prog", so it can be a program name with args.
17509set dummy $ac_prog; ac_word=$2
17510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17511$as_echo_n "checking for $ac_word... " >&6; }
17512if ${ac_cv_path_ZIP+:} false; then :
17513  $as_echo_n "(cached) " >&6
17514else
17515  case $ZIP in
17516  [\\/]* | ?:[\\/]*)
17517  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17518  ;;
17519  *)
17520  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17521for as_dir in $PATH
17522do
17523  IFS=$as_save_IFS
17524  test -z "$as_dir" && as_dir=.
17525    for ac_exec_ext in '' $ac_executable_extensions; do
17526  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17527    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17528    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17529    break 2
17530  fi
17531done
17532  done
17533IFS=$as_save_IFS
17534
17535  ;;
17536esac
17537fi
17538ZIP=$ac_cv_path_ZIP
17539if test -n "$ZIP"; then
17540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17541$as_echo "$ZIP" >&6; }
17542else
17543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17544$as_echo "no" >&6; }
17545fi
17546
17547
17548  test -n "$ZIP" && break
17549done
17550
17551  else
17552    # The variable is set, but is it from the command line or the environment?
17553
17554    # Try to remove the string !ZIP! from our list.
17555    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17556    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17557      # If it failed, the variable was not from the command line. Ignore it,
17558      # but warn the user (except for BASH, which is always set by the calling BASH).
17559      if test "xZIP" != xBASH; then
17560        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17561$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17562      fi
17563      # Try to locate tool using the code snippet
17564      for ac_prog in zip
17565do
17566  # Extract the first word of "$ac_prog", so it can be a program name with args.
17567set dummy $ac_prog; ac_word=$2
17568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17569$as_echo_n "checking for $ac_word... " >&6; }
17570if ${ac_cv_path_ZIP+:} false; then :
17571  $as_echo_n "(cached) " >&6
17572else
17573  case $ZIP in
17574  [\\/]* | ?:[\\/]*)
17575  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17576  ;;
17577  *)
17578  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17579for as_dir in $PATH
17580do
17581  IFS=$as_save_IFS
17582  test -z "$as_dir" && as_dir=.
17583    for ac_exec_ext in '' $ac_executable_extensions; do
17584  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17585    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17586    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17587    break 2
17588  fi
17589done
17590  done
17591IFS=$as_save_IFS
17592
17593  ;;
17594esac
17595fi
17596ZIP=$ac_cv_path_ZIP
17597if test -n "$ZIP"; then
17598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17599$as_echo "$ZIP" >&6; }
17600else
17601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17602$as_echo "no" >&6; }
17603fi
17604
17605
17606  test -n "$ZIP" && break
17607done
17608
17609    else
17610      # If it succeeded, then it was overridden by the user. We will use it
17611      # for the tool.
17612
17613      # First remove it from the list of overridden variables, so we can test
17614      # for unknown variables in the end.
17615      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17616
17617      # Check if the provided tool contains a complete path.
17618      tool_specified="$ZIP"
17619      tool_basename="${tool_specified##*/}"
17620      if test "x$tool_basename" = "x$tool_specified"; then
17621        # A command without a complete path is provided, search $PATH.
17622        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17623$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17624        # Extract the first word of "$tool_basename", so it can be a program name with args.
17625set dummy $tool_basename; ac_word=$2
17626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17627$as_echo_n "checking for $ac_word... " >&6; }
17628if ${ac_cv_path_ZIP+:} false; then :
17629  $as_echo_n "(cached) " >&6
17630else
17631  case $ZIP in
17632  [\\/]* | ?:[\\/]*)
17633  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17634  ;;
17635  *)
17636  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17637for as_dir in $PATH
17638do
17639  IFS=$as_save_IFS
17640  test -z "$as_dir" && as_dir=.
17641    for ac_exec_ext in '' $ac_executable_extensions; do
17642  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17643    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17644    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17645    break 2
17646  fi
17647done
17648  done
17649IFS=$as_save_IFS
17650
17651  ;;
17652esac
17653fi
17654ZIP=$ac_cv_path_ZIP
17655if test -n "$ZIP"; then
17656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17657$as_echo "$ZIP" >&6; }
17658else
17659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17660$as_echo "no" >&6; }
17661fi
17662
17663
17664        if test "x$ZIP" = x; then
17665          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17666        fi
17667      else
17668        # Otherwise we believe it is a complete path. Use it as it is.
17669        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17670$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17671        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17672$as_echo_n "checking for ZIP... " >&6; }
17673        if test ! -x "$tool_specified"; then
17674          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17675$as_echo "not found" >&6; }
17676          as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17677        fi
17678        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17679$as_echo "$tool_specified" >&6; }
17680      fi
17681    fi
17682  fi
17683
17684
17685
17686  if test "x$ZIP" = x; then
17687    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17688  fi
17689
17690
17691
17692  # Non-required basic tools
17693
17694
17695
17696  # Publish this variable in the help.
17697
17698
17699  if test "x$LDD" = x; then
17700    # The variable is not set by user, try to locate tool using the code snippet
17701    for ac_prog in ldd
17702do
17703  # Extract the first word of "$ac_prog", so it can be a program name with args.
17704set dummy $ac_prog; ac_word=$2
17705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17706$as_echo_n "checking for $ac_word... " >&6; }
17707if ${ac_cv_path_LDD+:} false; then :
17708  $as_echo_n "(cached) " >&6
17709else
17710  case $LDD in
17711  [\\/]* | ?:[\\/]*)
17712  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17713  ;;
17714  *)
17715  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17716for as_dir in $PATH
17717do
17718  IFS=$as_save_IFS
17719  test -z "$as_dir" && as_dir=.
17720    for ac_exec_ext in '' $ac_executable_extensions; do
17721  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17722    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17723    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17724    break 2
17725  fi
17726done
17727  done
17728IFS=$as_save_IFS
17729
17730  ;;
17731esac
17732fi
17733LDD=$ac_cv_path_LDD
17734if test -n "$LDD"; then
17735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17736$as_echo "$LDD" >&6; }
17737else
17738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17739$as_echo "no" >&6; }
17740fi
17741
17742
17743  test -n "$LDD" && break
17744done
17745
17746  else
17747    # The variable is set, but is it from the command line or the environment?
17748
17749    # Try to remove the string !LDD! from our list.
17750    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17751    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17752      # If it failed, the variable was not from the command line. Ignore it,
17753      # but warn the user (except for BASH, which is always set by the calling BASH).
17754      if test "xLDD" != xBASH; then
17755        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17756$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17757      fi
17758      # Try to locate tool using the code snippet
17759      for ac_prog in ldd
17760do
17761  # Extract the first word of "$ac_prog", so it can be a program name with args.
17762set dummy $ac_prog; ac_word=$2
17763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17764$as_echo_n "checking for $ac_word... " >&6; }
17765if ${ac_cv_path_LDD+:} false; then :
17766  $as_echo_n "(cached) " >&6
17767else
17768  case $LDD in
17769  [\\/]* | ?:[\\/]*)
17770  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17771  ;;
17772  *)
17773  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17774for as_dir in $PATH
17775do
17776  IFS=$as_save_IFS
17777  test -z "$as_dir" && as_dir=.
17778    for ac_exec_ext in '' $ac_executable_extensions; do
17779  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17780    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17781    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17782    break 2
17783  fi
17784done
17785  done
17786IFS=$as_save_IFS
17787
17788  ;;
17789esac
17790fi
17791LDD=$ac_cv_path_LDD
17792if test -n "$LDD"; then
17793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17794$as_echo "$LDD" >&6; }
17795else
17796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17797$as_echo "no" >&6; }
17798fi
17799
17800
17801  test -n "$LDD" && break
17802done
17803
17804    else
17805      # If it succeeded, then it was overridden by the user. We will use it
17806      # for the tool.
17807
17808      # First remove it from the list of overridden variables, so we can test
17809      # for unknown variables in the end.
17810      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17811
17812      # Check if the provided tool contains a complete path.
17813      tool_specified="$LDD"
17814      tool_basename="${tool_specified##*/}"
17815      if test "x$tool_basename" = "x$tool_specified"; then
17816        # A command without a complete path is provided, search $PATH.
17817        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
17818$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
17819        # Extract the first word of "$tool_basename", so it can be a program name with args.
17820set dummy $tool_basename; ac_word=$2
17821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17822$as_echo_n "checking for $ac_word... " >&6; }
17823if ${ac_cv_path_LDD+:} false; then :
17824  $as_echo_n "(cached) " >&6
17825else
17826  case $LDD in
17827  [\\/]* | ?:[\\/]*)
17828  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17829  ;;
17830  *)
17831  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17832for as_dir in $PATH
17833do
17834  IFS=$as_save_IFS
17835  test -z "$as_dir" && as_dir=.
17836    for ac_exec_ext in '' $ac_executable_extensions; do
17837  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17838    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17839    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17840    break 2
17841  fi
17842done
17843  done
17844IFS=$as_save_IFS
17845
17846  ;;
17847esac
17848fi
17849LDD=$ac_cv_path_LDD
17850if test -n "$LDD"; then
17851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17852$as_echo "$LDD" >&6; }
17853else
17854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17855$as_echo "no" >&6; }
17856fi
17857
17858
17859        if test "x$LDD" = x; then
17860          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17861        fi
17862      else
17863        # Otherwise we believe it is a complete path. Use it as it is.
17864        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
17865$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
17866        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
17867$as_echo_n "checking for LDD... " >&6; }
17868        if test ! -x "$tool_specified"; then
17869          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17870$as_echo "not found" >&6; }
17871          as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
17872        fi
17873        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17874$as_echo "$tool_specified" >&6; }
17875      fi
17876    fi
17877  fi
17878
17879
17880  if test "x$LDD" = "x"; then
17881    # List shared lib dependencies is used for
17882    # debug output and checking for forbidden dependencies.
17883    # We can build without it.
17884    LDD="true"
17885  fi
17886
17887
17888  # Publish this variable in the help.
17889
17890
17891  if test "x$OTOOL" = x; then
17892    # The variable is not set by user, try to locate tool using the code snippet
17893    for ac_prog in otool
17894do
17895  # Extract the first word of "$ac_prog", so it can be a program name with args.
17896set dummy $ac_prog; ac_word=$2
17897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17898$as_echo_n "checking for $ac_word... " >&6; }
17899if ${ac_cv_path_OTOOL+:} false; then :
17900  $as_echo_n "(cached) " >&6
17901else
17902  case $OTOOL in
17903  [\\/]* | ?:[\\/]*)
17904  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17905  ;;
17906  *)
17907  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17908for as_dir in $PATH
17909do
17910  IFS=$as_save_IFS
17911  test -z "$as_dir" && as_dir=.
17912    for ac_exec_ext in '' $ac_executable_extensions; do
17913  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17914    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17915    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17916    break 2
17917  fi
17918done
17919  done
17920IFS=$as_save_IFS
17921
17922  ;;
17923esac
17924fi
17925OTOOL=$ac_cv_path_OTOOL
17926if test -n "$OTOOL"; then
17927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17928$as_echo "$OTOOL" >&6; }
17929else
17930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17931$as_echo "no" >&6; }
17932fi
17933
17934
17935  test -n "$OTOOL" && break
17936done
17937
17938  else
17939    # The variable is set, but is it from the command line or the environment?
17940
17941    # Try to remove the string !OTOOL! from our list.
17942    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
17943    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17944      # If it failed, the variable was not from the command line. Ignore it,
17945      # but warn the user (except for BASH, which is always set by the calling BASH).
17946      if test "xOTOOL" != xBASH; then
17947        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
17948$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
17949      fi
17950      # Try to locate tool using the code snippet
17951      for ac_prog in otool
17952do
17953  # Extract the first word of "$ac_prog", so it can be a program name with args.
17954set dummy $ac_prog; ac_word=$2
17955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17956$as_echo_n "checking for $ac_word... " >&6; }
17957if ${ac_cv_path_OTOOL+:} false; then :
17958  $as_echo_n "(cached) " >&6
17959else
17960  case $OTOOL in
17961  [\\/]* | ?:[\\/]*)
17962  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17963  ;;
17964  *)
17965  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17966for as_dir in $PATH
17967do
17968  IFS=$as_save_IFS
17969  test -z "$as_dir" && as_dir=.
17970    for ac_exec_ext in '' $ac_executable_extensions; do
17971  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17972    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17973    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17974    break 2
17975  fi
17976done
17977  done
17978IFS=$as_save_IFS
17979
17980  ;;
17981esac
17982fi
17983OTOOL=$ac_cv_path_OTOOL
17984if test -n "$OTOOL"; then
17985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17986$as_echo "$OTOOL" >&6; }
17987else
17988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17989$as_echo "no" >&6; }
17990fi
17991
17992
17993  test -n "$OTOOL" && break
17994done
17995
17996    else
17997      # If it succeeded, then it was overridden by the user. We will use it
17998      # for the tool.
17999
18000      # First remove it from the list of overridden variables, so we can test
18001      # for unknown variables in the end.
18002      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18003
18004      # Check if the provided tool contains a complete path.
18005      tool_specified="$OTOOL"
18006      tool_basename="${tool_specified##*/}"
18007      if test "x$tool_basename" = "x$tool_specified"; then
18008        # A command without a complete path is provided, search $PATH.
18009        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
18010$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
18011        # Extract the first word of "$tool_basename", so it can be a program name with args.
18012set dummy $tool_basename; ac_word=$2
18013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18014$as_echo_n "checking for $ac_word... " >&6; }
18015if ${ac_cv_path_OTOOL+:} false; then :
18016  $as_echo_n "(cached) " >&6
18017else
18018  case $OTOOL in
18019  [\\/]* | ?:[\\/]*)
18020  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18021  ;;
18022  *)
18023  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18024for as_dir in $PATH
18025do
18026  IFS=$as_save_IFS
18027  test -z "$as_dir" && as_dir=.
18028    for ac_exec_ext in '' $ac_executable_extensions; do
18029  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18030    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18031    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18032    break 2
18033  fi
18034done
18035  done
18036IFS=$as_save_IFS
18037
18038  ;;
18039esac
18040fi
18041OTOOL=$ac_cv_path_OTOOL
18042if test -n "$OTOOL"; then
18043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18044$as_echo "$OTOOL" >&6; }
18045else
18046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18047$as_echo "no" >&6; }
18048fi
18049
18050
18051        if test "x$OTOOL" = x; then
18052          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18053        fi
18054      else
18055        # Otherwise we believe it is a complete path. Use it as it is.
18056        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
18057$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
18058        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
18059$as_echo_n "checking for OTOOL... " >&6; }
18060        if test ! -x "$tool_specified"; then
18061          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18062$as_echo "not found" >&6; }
18063          as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
18064        fi
18065        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18066$as_echo "$tool_specified" >&6; }
18067      fi
18068    fi
18069  fi
18070
18071
18072  if test "x$OTOOL" = "x"; then
18073    OTOOL="true"
18074  fi
18075
18076
18077  # Publish this variable in the help.
18078
18079
18080  if test "x$READELF" = x; then
18081    # The variable is not set by user, try to locate tool using the code snippet
18082    for ac_prog in greadelf readelf
18083do
18084  # Extract the first word of "$ac_prog", so it can be a program name with args.
18085set dummy $ac_prog; ac_word=$2
18086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18087$as_echo_n "checking for $ac_word... " >&6; }
18088if ${ac_cv_path_READELF+:} false; then :
18089  $as_echo_n "(cached) " >&6
18090else
18091  case $READELF in
18092  [\\/]* | ?:[\\/]*)
18093  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18094  ;;
18095  *)
18096  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18097for as_dir in $PATH
18098do
18099  IFS=$as_save_IFS
18100  test -z "$as_dir" && as_dir=.
18101    for ac_exec_ext in '' $ac_executable_extensions; do
18102  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18103    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18104    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18105    break 2
18106  fi
18107done
18108  done
18109IFS=$as_save_IFS
18110
18111  ;;
18112esac
18113fi
18114READELF=$ac_cv_path_READELF
18115if test -n "$READELF"; then
18116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18117$as_echo "$READELF" >&6; }
18118else
18119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18120$as_echo "no" >&6; }
18121fi
18122
18123
18124  test -n "$READELF" && break
18125done
18126
18127  else
18128    # The variable is set, but is it from the command line or the environment?
18129
18130    # Try to remove the string !READELF! from our list.
18131    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
18132    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18133      # If it failed, the variable was not from the command line. Ignore it,
18134      # but warn the user (except for BASH, which is always set by the calling BASH).
18135      if test "xREADELF" != xBASH; then
18136        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
18137$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
18138      fi
18139      # Try to locate tool using the code snippet
18140      for ac_prog in greadelf readelf
18141do
18142  # Extract the first word of "$ac_prog", so it can be a program name with args.
18143set dummy $ac_prog; ac_word=$2
18144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18145$as_echo_n "checking for $ac_word... " >&6; }
18146if ${ac_cv_path_READELF+:} false; then :
18147  $as_echo_n "(cached) " >&6
18148else
18149  case $READELF in
18150  [\\/]* | ?:[\\/]*)
18151  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18152  ;;
18153  *)
18154  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18155for as_dir in $PATH
18156do
18157  IFS=$as_save_IFS
18158  test -z "$as_dir" && as_dir=.
18159    for ac_exec_ext in '' $ac_executable_extensions; do
18160  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18161    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18162    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18163    break 2
18164  fi
18165done
18166  done
18167IFS=$as_save_IFS
18168
18169  ;;
18170esac
18171fi
18172READELF=$ac_cv_path_READELF
18173if test -n "$READELF"; then
18174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18175$as_echo "$READELF" >&6; }
18176else
18177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18178$as_echo "no" >&6; }
18179fi
18180
18181
18182  test -n "$READELF" && break
18183done
18184
18185    else
18186      # If it succeeded, then it was overridden by the user. We will use it
18187      # for the tool.
18188
18189      # First remove it from the list of overridden variables, so we can test
18190      # for unknown variables in the end.
18191      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18192
18193      # Check if the provided tool contains a complete path.
18194      tool_specified="$READELF"
18195      tool_basename="${tool_specified##*/}"
18196      if test "x$tool_basename" = "x$tool_specified"; then
18197        # A command without a complete path is provided, search $PATH.
18198        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
18199$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
18200        # Extract the first word of "$tool_basename", so it can be a program name with args.
18201set dummy $tool_basename; ac_word=$2
18202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18203$as_echo_n "checking for $ac_word... " >&6; }
18204if ${ac_cv_path_READELF+:} false; then :
18205  $as_echo_n "(cached) " >&6
18206else
18207  case $READELF in
18208  [\\/]* | ?:[\\/]*)
18209  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18210  ;;
18211  *)
18212  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18213for as_dir in $PATH
18214do
18215  IFS=$as_save_IFS
18216  test -z "$as_dir" && as_dir=.
18217    for ac_exec_ext in '' $ac_executable_extensions; do
18218  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18219    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18220    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18221    break 2
18222  fi
18223done
18224  done
18225IFS=$as_save_IFS
18226
18227  ;;
18228esac
18229fi
18230READELF=$ac_cv_path_READELF
18231if test -n "$READELF"; then
18232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18233$as_echo "$READELF" >&6; }
18234else
18235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18236$as_echo "no" >&6; }
18237fi
18238
18239
18240        if test "x$READELF" = x; then
18241          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18242        fi
18243      else
18244        # Otherwise we believe it is a complete path. Use it as it is.
18245        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
18246$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
18247        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
18248$as_echo_n "checking for READELF... " >&6; }
18249        if test ! -x "$tool_specified"; then
18250          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18251$as_echo "not found" >&6; }
18252          as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
18253        fi
18254        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18255$as_echo "$tool_specified" >&6; }
18256      fi
18257    fi
18258  fi
18259
18260
18261
18262
18263  # Publish this variable in the help.
18264
18265
18266  if test "x$HG" = x; then
18267    # The variable is not set by user, try to locate tool using the code snippet
18268    for ac_prog in hg
18269do
18270  # Extract the first word of "$ac_prog", so it can be a program name with args.
18271set dummy $ac_prog; ac_word=$2
18272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18273$as_echo_n "checking for $ac_word... " >&6; }
18274if ${ac_cv_path_HG+:} false; then :
18275  $as_echo_n "(cached) " >&6
18276else
18277  case $HG in
18278  [\\/]* | ?:[\\/]*)
18279  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18280  ;;
18281  *)
18282  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18283for as_dir in $PATH
18284do
18285  IFS=$as_save_IFS
18286  test -z "$as_dir" && as_dir=.
18287    for ac_exec_ext in '' $ac_executable_extensions; do
18288  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18289    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18290    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18291    break 2
18292  fi
18293done
18294  done
18295IFS=$as_save_IFS
18296
18297  ;;
18298esac
18299fi
18300HG=$ac_cv_path_HG
18301if test -n "$HG"; then
18302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18303$as_echo "$HG" >&6; }
18304else
18305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18306$as_echo "no" >&6; }
18307fi
18308
18309
18310  test -n "$HG" && break
18311done
18312
18313  else
18314    # The variable is set, but is it from the command line or the environment?
18315
18316    # Try to remove the string !HG! from our list.
18317    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
18318    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18319      # If it failed, the variable was not from the command line. Ignore it,
18320      # but warn the user (except for BASH, which is always set by the calling BASH).
18321      if test "xHG" != xBASH; then
18322        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
18323$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
18324      fi
18325      # Try to locate tool using the code snippet
18326      for ac_prog in hg
18327do
18328  # Extract the first word of "$ac_prog", so it can be a program name with args.
18329set dummy $ac_prog; ac_word=$2
18330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18331$as_echo_n "checking for $ac_word... " >&6; }
18332if ${ac_cv_path_HG+:} false; then :
18333  $as_echo_n "(cached) " >&6
18334else
18335  case $HG in
18336  [\\/]* | ?:[\\/]*)
18337  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18338  ;;
18339  *)
18340  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18341for as_dir in $PATH
18342do
18343  IFS=$as_save_IFS
18344  test -z "$as_dir" && as_dir=.
18345    for ac_exec_ext in '' $ac_executable_extensions; do
18346  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18347    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18348    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18349    break 2
18350  fi
18351done
18352  done
18353IFS=$as_save_IFS
18354
18355  ;;
18356esac
18357fi
18358HG=$ac_cv_path_HG
18359if test -n "$HG"; then
18360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18361$as_echo "$HG" >&6; }
18362else
18363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18364$as_echo "no" >&6; }
18365fi
18366
18367
18368  test -n "$HG" && break
18369done
18370
18371    else
18372      # If it succeeded, then it was overridden by the user. We will use it
18373      # for the tool.
18374
18375      # First remove it from the list of overridden variables, so we can test
18376      # for unknown variables in the end.
18377      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18378
18379      # Check if the provided tool contains a complete path.
18380      tool_specified="$HG"
18381      tool_basename="${tool_specified##*/}"
18382      if test "x$tool_basename" = "x$tool_specified"; then
18383        # A command without a complete path is provided, search $PATH.
18384        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
18385$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
18386        # Extract the first word of "$tool_basename", so it can be a program name with args.
18387set dummy $tool_basename; ac_word=$2
18388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18389$as_echo_n "checking for $ac_word... " >&6; }
18390if ${ac_cv_path_HG+:} false; then :
18391  $as_echo_n "(cached) " >&6
18392else
18393  case $HG in
18394  [\\/]* | ?:[\\/]*)
18395  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18396  ;;
18397  *)
18398  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18399for as_dir in $PATH
18400do
18401  IFS=$as_save_IFS
18402  test -z "$as_dir" && as_dir=.
18403    for ac_exec_ext in '' $ac_executable_extensions; do
18404  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18405    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18406    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18407    break 2
18408  fi
18409done
18410  done
18411IFS=$as_save_IFS
18412
18413  ;;
18414esac
18415fi
18416HG=$ac_cv_path_HG
18417if test -n "$HG"; then
18418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18419$as_echo "$HG" >&6; }
18420else
18421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18422$as_echo "no" >&6; }
18423fi
18424
18425
18426        if test "x$HG" = x; then
18427          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18428        fi
18429      else
18430        # Otherwise we believe it is a complete path. Use it as it is.
18431        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
18432$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
18433        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
18434$as_echo_n "checking for HG... " >&6; }
18435        if test ! -x "$tool_specified"; then
18436          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18437$as_echo "not found" >&6; }
18438          as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
18439        fi
18440        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18441$as_echo "$tool_specified" >&6; }
18442      fi
18443    fi
18444  fi
18445
18446
18447
18448
18449  # Publish this variable in the help.
18450
18451
18452  if test "x$STAT" = x; then
18453    # The variable is not set by user, try to locate tool using the code snippet
18454    for ac_prog in stat
18455do
18456  # Extract the first word of "$ac_prog", so it can be a program name with args.
18457set dummy $ac_prog; ac_word=$2
18458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18459$as_echo_n "checking for $ac_word... " >&6; }
18460if ${ac_cv_path_STAT+:} false; then :
18461  $as_echo_n "(cached) " >&6
18462else
18463  case $STAT in
18464  [\\/]* | ?:[\\/]*)
18465  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18466  ;;
18467  *)
18468  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18469for as_dir in $PATH
18470do
18471  IFS=$as_save_IFS
18472  test -z "$as_dir" && as_dir=.
18473    for ac_exec_ext in '' $ac_executable_extensions; do
18474  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18475    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18476    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18477    break 2
18478  fi
18479done
18480  done
18481IFS=$as_save_IFS
18482
18483  ;;
18484esac
18485fi
18486STAT=$ac_cv_path_STAT
18487if test -n "$STAT"; then
18488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18489$as_echo "$STAT" >&6; }
18490else
18491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18492$as_echo "no" >&6; }
18493fi
18494
18495
18496  test -n "$STAT" && break
18497done
18498
18499  else
18500    # The variable is set, but is it from the command line or the environment?
18501
18502    # Try to remove the string !STAT! from our list.
18503    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18504    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18505      # If it failed, the variable was not from the command line. Ignore it,
18506      # but warn the user (except for BASH, which is always set by the calling BASH).
18507      if test "xSTAT" != xBASH; then
18508        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18509$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18510      fi
18511      # Try to locate tool using the code snippet
18512      for ac_prog in stat
18513do
18514  # Extract the first word of "$ac_prog", so it can be a program name with args.
18515set dummy $ac_prog; ac_word=$2
18516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18517$as_echo_n "checking for $ac_word... " >&6; }
18518if ${ac_cv_path_STAT+:} false; then :
18519  $as_echo_n "(cached) " >&6
18520else
18521  case $STAT in
18522  [\\/]* | ?:[\\/]*)
18523  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18524  ;;
18525  *)
18526  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18527for as_dir in $PATH
18528do
18529  IFS=$as_save_IFS
18530  test -z "$as_dir" && as_dir=.
18531    for ac_exec_ext in '' $ac_executable_extensions; do
18532  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18533    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18534    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18535    break 2
18536  fi
18537done
18538  done
18539IFS=$as_save_IFS
18540
18541  ;;
18542esac
18543fi
18544STAT=$ac_cv_path_STAT
18545if test -n "$STAT"; then
18546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18547$as_echo "$STAT" >&6; }
18548else
18549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18550$as_echo "no" >&6; }
18551fi
18552
18553
18554  test -n "$STAT" && break
18555done
18556
18557    else
18558      # If it succeeded, then it was overridden by the user. We will use it
18559      # for the tool.
18560
18561      # First remove it from the list of overridden variables, so we can test
18562      # for unknown variables in the end.
18563      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18564
18565      # Check if the provided tool contains a complete path.
18566      tool_specified="$STAT"
18567      tool_basename="${tool_specified##*/}"
18568      if test "x$tool_basename" = "x$tool_specified"; then
18569        # A command without a complete path is provided, search $PATH.
18570        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18571$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18572        # Extract the first word of "$tool_basename", so it can be a program name with args.
18573set dummy $tool_basename; ac_word=$2
18574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18575$as_echo_n "checking for $ac_word... " >&6; }
18576if ${ac_cv_path_STAT+:} false; then :
18577  $as_echo_n "(cached) " >&6
18578else
18579  case $STAT in
18580  [\\/]* | ?:[\\/]*)
18581  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18582  ;;
18583  *)
18584  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18585for as_dir in $PATH
18586do
18587  IFS=$as_save_IFS
18588  test -z "$as_dir" && as_dir=.
18589    for ac_exec_ext in '' $ac_executable_extensions; do
18590  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18591    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18592    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18593    break 2
18594  fi
18595done
18596  done
18597IFS=$as_save_IFS
18598
18599  ;;
18600esac
18601fi
18602STAT=$ac_cv_path_STAT
18603if test -n "$STAT"; then
18604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18605$as_echo "$STAT" >&6; }
18606else
18607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18608$as_echo "no" >&6; }
18609fi
18610
18611
18612        if test "x$STAT" = x; then
18613          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18614        fi
18615      else
18616        # Otherwise we believe it is a complete path. Use it as it is.
18617        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18618$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18619        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18620$as_echo_n "checking for STAT... " >&6; }
18621        if test ! -x "$tool_specified"; then
18622          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18623$as_echo "not found" >&6; }
18624          as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18625        fi
18626        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18627$as_echo "$tool_specified" >&6; }
18628      fi
18629    fi
18630  fi
18631
18632
18633
18634
18635  # Publish this variable in the help.
18636
18637
18638  if test "x$TIME" = x; then
18639    # The variable is not set by user, try to locate tool using the code snippet
18640    for ac_prog in time
18641do
18642  # Extract the first word of "$ac_prog", so it can be a program name with args.
18643set dummy $ac_prog; ac_word=$2
18644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18645$as_echo_n "checking for $ac_word... " >&6; }
18646if ${ac_cv_path_TIME+:} false; then :
18647  $as_echo_n "(cached) " >&6
18648else
18649  case $TIME in
18650  [\\/]* | ?:[\\/]*)
18651  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18652  ;;
18653  *)
18654  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18655for as_dir in $PATH
18656do
18657  IFS=$as_save_IFS
18658  test -z "$as_dir" && as_dir=.
18659    for ac_exec_ext in '' $ac_executable_extensions; do
18660  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18661    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18662    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18663    break 2
18664  fi
18665done
18666  done
18667IFS=$as_save_IFS
18668
18669  ;;
18670esac
18671fi
18672TIME=$ac_cv_path_TIME
18673if test -n "$TIME"; then
18674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18675$as_echo "$TIME" >&6; }
18676else
18677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18678$as_echo "no" >&6; }
18679fi
18680
18681
18682  test -n "$TIME" && break
18683done
18684
18685  else
18686    # The variable is set, but is it from the command line or the environment?
18687
18688    # Try to remove the string !TIME! from our list.
18689    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18690    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18691      # If it failed, the variable was not from the command line. Ignore it,
18692      # but warn the user (except for BASH, which is always set by the calling BASH).
18693      if test "xTIME" != xBASH; then
18694        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18695$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18696      fi
18697      # Try to locate tool using the code snippet
18698      for ac_prog in time
18699do
18700  # Extract the first word of "$ac_prog", so it can be a program name with args.
18701set dummy $ac_prog; ac_word=$2
18702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18703$as_echo_n "checking for $ac_word... " >&6; }
18704if ${ac_cv_path_TIME+:} false; then :
18705  $as_echo_n "(cached) " >&6
18706else
18707  case $TIME in
18708  [\\/]* | ?:[\\/]*)
18709  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18710  ;;
18711  *)
18712  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18713for as_dir in $PATH
18714do
18715  IFS=$as_save_IFS
18716  test -z "$as_dir" && as_dir=.
18717    for ac_exec_ext in '' $ac_executable_extensions; do
18718  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18719    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18721    break 2
18722  fi
18723done
18724  done
18725IFS=$as_save_IFS
18726
18727  ;;
18728esac
18729fi
18730TIME=$ac_cv_path_TIME
18731if test -n "$TIME"; then
18732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18733$as_echo "$TIME" >&6; }
18734else
18735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18736$as_echo "no" >&6; }
18737fi
18738
18739
18740  test -n "$TIME" && break
18741done
18742
18743    else
18744      # If it succeeded, then it was overridden by the user. We will use it
18745      # for the tool.
18746
18747      # First remove it from the list of overridden variables, so we can test
18748      # for unknown variables in the end.
18749      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18750
18751      # Check if the provided tool contains a complete path.
18752      tool_specified="$TIME"
18753      tool_basename="${tool_specified##*/}"
18754      if test "x$tool_basename" = "x$tool_specified"; then
18755        # A command without a complete path is provided, search $PATH.
18756        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18757$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18758        # Extract the first word of "$tool_basename", so it can be a program name with args.
18759set dummy $tool_basename; ac_word=$2
18760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18761$as_echo_n "checking for $ac_word... " >&6; }
18762if ${ac_cv_path_TIME+:} false; then :
18763  $as_echo_n "(cached) " >&6
18764else
18765  case $TIME in
18766  [\\/]* | ?:[\\/]*)
18767  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18768  ;;
18769  *)
18770  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18771for as_dir in $PATH
18772do
18773  IFS=$as_save_IFS
18774  test -z "$as_dir" && as_dir=.
18775    for ac_exec_ext in '' $ac_executable_extensions; do
18776  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18777    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18778    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18779    break 2
18780  fi
18781done
18782  done
18783IFS=$as_save_IFS
18784
18785  ;;
18786esac
18787fi
18788TIME=$ac_cv_path_TIME
18789if test -n "$TIME"; then
18790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18791$as_echo "$TIME" >&6; }
18792else
18793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18794$as_echo "no" >&6; }
18795fi
18796
18797
18798        if test "x$TIME" = x; then
18799          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18800        fi
18801      else
18802        # Otherwise we believe it is a complete path. Use it as it is.
18803        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
18804$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
18805        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
18806$as_echo_n "checking for TIME... " >&6; }
18807        if test ! -x "$tool_specified"; then
18808          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18809$as_echo "not found" >&6; }
18810          as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
18811        fi
18812        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18813$as_echo "$tool_specified" >&6; }
18814      fi
18815    fi
18816  fi
18817
18818
18819  # Check if it's GNU time
18820  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
18821  if test "x$IS_GNU_TIME" != x; then
18822    IS_GNU_TIME=yes
18823  else
18824    IS_GNU_TIME=no
18825  fi
18826
18827
18828  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18829
18830
18831
18832  # Publish this variable in the help.
18833
18834
18835  if test "x$COMM" = x; then
18836    # The variable is not set by user, try to locate tool using the code snippet
18837    for ac_prog in comm
18838do
18839  # Extract the first word of "$ac_prog", so it can be a program name with args.
18840set dummy $ac_prog; ac_word=$2
18841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18842$as_echo_n "checking for $ac_word... " >&6; }
18843if ${ac_cv_path_COMM+:} false; then :
18844  $as_echo_n "(cached) " >&6
18845else
18846  case $COMM in
18847  [\\/]* | ?:[\\/]*)
18848  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18849  ;;
18850  *)
18851  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18852for as_dir in $PATH
18853do
18854  IFS=$as_save_IFS
18855  test -z "$as_dir" && as_dir=.
18856    for ac_exec_ext in '' $ac_executable_extensions; do
18857  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18858    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18859    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18860    break 2
18861  fi
18862done
18863  done
18864IFS=$as_save_IFS
18865
18866  ;;
18867esac
18868fi
18869COMM=$ac_cv_path_COMM
18870if test -n "$COMM"; then
18871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18872$as_echo "$COMM" >&6; }
18873else
18874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18875$as_echo "no" >&6; }
18876fi
18877
18878
18879  test -n "$COMM" && break
18880done
18881
18882  else
18883    # The variable is set, but is it from the command line or the environment?
18884
18885    # Try to remove the string !COMM! from our list.
18886    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
18887    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18888      # If it failed, the variable was not from the command line. Ignore it,
18889      # but warn the user (except for BASH, which is always set by the calling BASH).
18890      if test "xCOMM" != xBASH; then
18891        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
18892$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
18893      fi
18894      # Try to locate tool using the code snippet
18895      for ac_prog in comm
18896do
18897  # Extract the first word of "$ac_prog", so it can be a program name with args.
18898set dummy $ac_prog; ac_word=$2
18899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18900$as_echo_n "checking for $ac_word... " >&6; }
18901if ${ac_cv_path_COMM+:} false; then :
18902  $as_echo_n "(cached) " >&6
18903else
18904  case $COMM in
18905  [\\/]* | ?:[\\/]*)
18906  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18907  ;;
18908  *)
18909  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18910for as_dir in $PATH
18911do
18912  IFS=$as_save_IFS
18913  test -z "$as_dir" && as_dir=.
18914    for ac_exec_ext in '' $ac_executable_extensions; do
18915  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18916    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18917    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18918    break 2
18919  fi
18920done
18921  done
18922IFS=$as_save_IFS
18923
18924  ;;
18925esac
18926fi
18927COMM=$ac_cv_path_COMM
18928if test -n "$COMM"; then
18929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18930$as_echo "$COMM" >&6; }
18931else
18932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18933$as_echo "no" >&6; }
18934fi
18935
18936
18937  test -n "$COMM" && break
18938done
18939
18940    else
18941      # If it succeeded, then it was overridden by the user. We will use it
18942      # for the tool.
18943
18944      # First remove it from the list of overridden variables, so we can test
18945      # for unknown variables in the end.
18946      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18947
18948      # Check if the provided tool contains a complete path.
18949      tool_specified="$COMM"
18950      tool_basename="${tool_specified##*/}"
18951      if test "x$tool_basename" = "x$tool_specified"; then
18952        # A command without a complete path is provided, search $PATH.
18953        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
18954$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
18955        # Extract the first word of "$tool_basename", so it can be a program name with args.
18956set dummy $tool_basename; ac_word=$2
18957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18958$as_echo_n "checking for $ac_word... " >&6; }
18959if ${ac_cv_path_COMM+:} false; then :
18960  $as_echo_n "(cached) " >&6
18961else
18962  case $COMM in
18963  [\\/]* | ?:[\\/]*)
18964  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18965  ;;
18966  *)
18967  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18968for as_dir in $PATH
18969do
18970  IFS=$as_save_IFS
18971  test -z "$as_dir" && as_dir=.
18972    for ac_exec_ext in '' $ac_executable_extensions; do
18973  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18974    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18975    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18976    break 2
18977  fi
18978done
18979  done
18980IFS=$as_save_IFS
18981
18982  ;;
18983esac
18984fi
18985COMM=$ac_cv_path_COMM
18986if test -n "$COMM"; then
18987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18988$as_echo "$COMM" >&6; }
18989else
18990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18991$as_echo "no" >&6; }
18992fi
18993
18994
18995        if test "x$COMM" = x; then
18996          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18997        fi
18998      else
18999        # Otherwise we believe it is a complete path. Use it as it is.
19000        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
19001$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
19002        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
19003$as_echo_n "checking for COMM... " >&6; }
19004        if test ! -x "$tool_specified"; then
19005          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19006$as_echo "not found" >&6; }
19007          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
19008        fi
19009        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19010$as_echo "$tool_specified" >&6; }
19011      fi
19012    fi
19013  fi
19014
19015
19016
19017  if test "x$COMM" = x; then
19018    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
19019  fi
19020
19021
19022  fi
19023
19024  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
19025
19026
19027
19028  # Publish this variable in the help.
19029
19030
19031  if test "x$DSYMUTIL" = x; then
19032    # The variable is not set by user, try to locate tool using the code snippet
19033    for ac_prog in dsymutil
19034do
19035  # Extract the first word of "$ac_prog", so it can be a program name with args.
19036set dummy $ac_prog; ac_word=$2
19037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19038$as_echo_n "checking for $ac_word... " >&6; }
19039if ${ac_cv_path_DSYMUTIL+:} false; then :
19040  $as_echo_n "(cached) " >&6
19041else
19042  case $DSYMUTIL in
19043  [\\/]* | ?:[\\/]*)
19044  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19045  ;;
19046  *)
19047  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19048for as_dir in $PATH
19049do
19050  IFS=$as_save_IFS
19051  test -z "$as_dir" && as_dir=.
19052    for ac_exec_ext in '' $ac_executable_extensions; do
19053  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19054    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19055    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19056    break 2
19057  fi
19058done
19059  done
19060IFS=$as_save_IFS
19061
19062  ;;
19063esac
19064fi
19065DSYMUTIL=$ac_cv_path_DSYMUTIL
19066if test -n "$DSYMUTIL"; then
19067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19068$as_echo "$DSYMUTIL" >&6; }
19069else
19070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19071$as_echo "no" >&6; }
19072fi
19073
19074
19075  test -n "$DSYMUTIL" && break
19076done
19077
19078  else
19079    # The variable is set, but is it from the command line or the environment?
19080
19081    # Try to remove the string !DSYMUTIL! from our list.
19082    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
19083    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19084      # If it failed, the variable was not from the command line. Ignore it,
19085      # but warn the user (except for BASH, which is always set by the calling BASH).
19086      if test "xDSYMUTIL" != xBASH; then
19087        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
19088$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
19089      fi
19090      # Try to locate tool using the code snippet
19091      for ac_prog in dsymutil
19092do
19093  # Extract the first word of "$ac_prog", so it can be a program name with args.
19094set dummy $ac_prog; ac_word=$2
19095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19096$as_echo_n "checking for $ac_word... " >&6; }
19097if ${ac_cv_path_DSYMUTIL+:} false; then :
19098  $as_echo_n "(cached) " >&6
19099else
19100  case $DSYMUTIL in
19101  [\\/]* | ?:[\\/]*)
19102  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19103  ;;
19104  *)
19105  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19106for as_dir in $PATH
19107do
19108  IFS=$as_save_IFS
19109  test -z "$as_dir" && as_dir=.
19110    for ac_exec_ext in '' $ac_executable_extensions; do
19111  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19112    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19113    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19114    break 2
19115  fi
19116done
19117  done
19118IFS=$as_save_IFS
19119
19120  ;;
19121esac
19122fi
19123DSYMUTIL=$ac_cv_path_DSYMUTIL
19124if test -n "$DSYMUTIL"; then
19125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19126$as_echo "$DSYMUTIL" >&6; }
19127else
19128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19129$as_echo "no" >&6; }
19130fi
19131
19132
19133  test -n "$DSYMUTIL" && break
19134done
19135
19136    else
19137      # If it succeeded, then it was overridden by the user. We will use it
19138      # for the tool.
19139
19140      # First remove it from the list of overridden variables, so we can test
19141      # for unknown variables in the end.
19142      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19143
19144      # Check if the provided tool contains a complete path.
19145      tool_specified="$DSYMUTIL"
19146      tool_basename="${tool_specified##*/}"
19147      if test "x$tool_basename" = "x$tool_specified"; then
19148        # A command without a complete path is provided, search $PATH.
19149        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
19150$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
19151        # Extract the first word of "$tool_basename", so it can be a program name with args.
19152set dummy $tool_basename; ac_word=$2
19153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19154$as_echo_n "checking for $ac_word... " >&6; }
19155if ${ac_cv_path_DSYMUTIL+:} false; then :
19156  $as_echo_n "(cached) " >&6
19157else
19158  case $DSYMUTIL in
19159  [\\/]* | ?:[\\/]*)
19160  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19161  ;;
19162  *)
19163  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19164for as_dir in $PATH
19165do
19166  IFS=$as_save_IFS
19167  test -z "$as_dir" && as_dir=.
19168    for ac_exec_ext in '' $ac_executable_extensions; do
19169  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19170    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19171    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19172    break 2
19173  fi
19174done
19175  done
19176IFS=$as_save_IFS
19177
19178  ;;
19179esac
19180fi
19181DSYMUTIL=$ac_cv_path_DSYMUTIL
19182if test -n "$DSYMUTIL"; then
19183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19184$as_echo "$DSYMUTIL" >&6; }
19185else
19186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19187$as_echo "no" >&6; }
19188fi
19189
19190
19191        if test "x$DSYMUTIL" = x; then
19192          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19193        fi
19194      else
19195        # Otherwise we believe it is a complete path. Use it as it is.
19196        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
19197$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
19198        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
19199$as_echo_n "checking for DSYMUTIL... " >&6; }
19200        if test ! -x "$tool_specified"; then
19201          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19202$as_echo "not found" >&6; }
19203          as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
19204        fi
19205        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19206$as_echo "$tool_specified" >&6; }
19207      fi
19208    fi
19209  fi
19210
19211
19212
19213  if test "x$DSYMUTIL" = x; then
19214    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
19215  fi
19216
19217
19218
19219
19220
19221  # Publish this variable in the help.
19222
19223
19224  if test "x$XATTR" = x; then
19225    # The variable is not set by user, try to locate tool using the code snippet
19226    for ac_prog in xattr
19227do
19228  # Extract the first word of "$ac_prog", so it can be a program name with args.
19229set dummy $ac_prog; ac_word=$2
19230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19231$as_echo_n "checking for $ac_word... " >&6; }
19232if ${ac_cv_path_XATTR+:} false; then :
19233  $as_echo_n "(cached) " >&6
19234else
19235  case $XATTR in
19236  [\\/]* | ?:[\\/]*)
19237  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19238  ;;
19239  *)
19240  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19241for as_dir in $PATH
19242do
19243  IFS=$as_save_IFS
19244  test -z "$as_dir" && as_dir=.
19245    for ac_exec_ext in '' $ac_executable_extensions; do
19246  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19247    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19248    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19249    break 2
19250  fi
19251done
19252  done
19253IFS=$as_save_IFS
19254
19255  ;;
19256esac
19257fi
19258XATTR=$ac_cv_path_XATTR
19259if test -n "$XATTR"; then
19260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19261$as_echo "$XATTR" >&6; }
19262else
19263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19264$as_echo "no" >&6; }
19265fi
19266
19267
19268  test -n "$XATTR" && break
19269done
19270
19271  else
19272    # The variable is set, but is it from the command line or the environment?
19273
19274    # Try to remove the string !XATTR! from our list.
19275    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
19276    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19277      # If it failed, the variable was not from the command line. Ignore it,
19278      # but warn the user (except for BASH, which is always set by the calling BASH).
19279      if test "xXATTR" != xBASH; then
19280        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
19281$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
19282      fi
19283      # Try to locate tool using the code snippet
19284      for ac_prog in xattr
19285do
19286  # Extract the first word of "$ac_prog", so it can be a program name with args.
19287set dummy $ac_prog; ac_word=$2
19288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19289$as_echo_n "checking for $ac_word... " >&6; }
19290if ${ac_cv_path_XATTR+:} false; then :
19291  $as_echo_n "(cached) " >&6
19292else
19293  case $XATTR in
19294  [\\/]* | ?:[\\/]*)
19295  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19296  ;;
19297  *)
19298  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19299for as_dir in $PATH
19300do
19301  IFS=$as_save_IFS
19302  test -z "$as_dir" && as_dir=.
19303    for ac_exec_ext in '' $ac_executable_extensions; do
19304  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19305    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19306    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19307    break 2
19308  fi
19309done
19310  done
19311IFS=$as_save_IFS
19312
19313  ;;
19314esac
19315fi
19316XATTR=$ac_cv_path_XATTR
19317if test -n "$XATTR"; then
19318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19319$as_echo "$XATTR" >&6; }
19320else
19321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19322$as_echo "no" >&6; }
19323fi
19324
19325
19326  test -n "$XATTR" && break
19327done
19328
19329    else
19330      # If it succeeded, then it was overridden by the user. We will use it
19331      # for the tool.
19332
19333      # First remove it from the list of overridden variables, so we can test
19334      # for unknown variables in the end.
19335      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19336
19337      # Check if the provided tool contains a complete path.
19338      tool_specified="$XATTR"
19339      tool_basename="${tool_specified##*/}"
19340      if test "x$tool_basename" = "x$tool_specified"; then
19341        # A command without a complete path is provided, search $PATH.
19342        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
19343$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
19344        # Extract the first word of "$tool_basename", so it can be a program name with args.
19345set dummy $tool_basename; ac_word=$2
19346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19347$as_echo_n "checking for $ac_word... " >&6; }
19348if ${ac_cv_path_XATTR+:} false; then :
19349  $as_echo_n "(cached) " >&6
19350else
19351  case $XATTR in
19352  [\\/]* | ?:[\\/]*)
19353  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19354  ;;
19355  *)
19356  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19357for as_dir in $PATH
19358do
19359  IFS=$as_save_IFS
19360  test -z "$as_dir" && as_dir=.
19361    for ac_exec_ext in '' $ac_executable_extensions; do
19362  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19363    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19364    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19365    break 2
19366  fi
19367done
19368  done
19369IFS=$as_save_IFS
19370
19371  ;;
19372esac
19373fi
19374XATTR=$ac_cv_path_XATTR
19375if test -n "$XATTR"; then
19376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19377$as_echo "$XATTR" >&6; }
19378else
19379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19380$as_echo "no" >&6; }
19381fi
19382
19383
19384        if test "x$XATTR" = x; then
19385          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19386        fi
19387      else
19388        # Otherwise we believe it is a complete path. Use it as it is.
19389        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
19390$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
19391        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
19392$as_echo_n "checking for XATTR... " >&6; }
19393        if test ! -x "$tool_specified"; then
19394          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19395$as_echo "not found" >&6; }
19396          as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
19397        fi
19398        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19399$as_echo "$tool_specified" >&6; }
19400      fi
19401    fi
19402  fi
19403
19404
19405
19406  if test "x$XATTR" = x; then
19407    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
19408  fi
19409
19410
19411
19412
19413  # Publish this variable in the help.
19414
19415
19416  if test "x$CODESIGN" = x; then
19417    # The variable is not set by user, try to locate tool using the code snippet
19418    for ac_prog in codesign
19419do
19420  # Extract the first word of "$ac_prog", so it can be a program name with args.
19421set dummy $ac_prog; ac_word=$2
19422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19423$as_echo_n "checking for $ac_word... " >&6; }
19424if ${ac_cv_path_CODESIGN+:} false; then :
19425  $as_echo_n "(cached) " >&6
19426else
19427  case $CODESIGN in
19428  [\\/]* | ?:[\\/]*)
19429  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19430  ;;
19431  *)
19432  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19433for as_dir in $PATH
19434do
19435  IFS=$as_save_IFS
19436  test -z "$as_dir" && as_dir=.
19437    for ac_exec_ext in '' $ac_executable_extensions; do
19438  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19439    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19440    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19441    break 2
19442  fi
19443done
19444  done
19445IFS=$as_save_IFS
19446
19447  ;;
19448esac
19449fi
19450CODESIGN=$ac_cv_path_CODESIGN
19451if test -n "$CODESIGN"; then
19452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19453$as_echo "$CODESIGN" >&6; }
19454else
19455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19456$as_echo "no" >&6; }
19457fi
19458
19459
19460  test -n "$CODESIGN" && break
19461done
19462
19463  else
19464    # The variable is set, but is it from the command line or the environment?
19465
19466    # Try to remove the string !CODESIGN! from our list.
19467    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
19468    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19469      # If it failed, the variable was not from the command line. Ignore it,
19470      # but warn the user (except for BASH, which is always set by the calling BASH).
19471      if test "xCODESIGN" != xBASH; then
19472        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
19473$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
19474      fi
19475      # Try to locate tool using the code snippet
19476      for ac_prog in codesign
19477do
19478  # Extract the first word of "$ac_prog", so it can be a program name with args.
19479set dummy $ac_prog; ac_word=$2
19480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19481$as_echo_n "checking for $ac_word... " >&6; }
19482if ${ac_cv_path_CODESIGN+:} false; then :
19483  $as_echo_n "(cached) " >&6
19484else
19485  case $CODESIGN in
19486  [\\/]* | ?:[\\/]*)
19487  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19488  ;;
19489  *)
19490  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19491for as_dir in $PATH
19492do
19493  IFS=$as_save_IFS
19494  test -z "$as_dir" && as_dir=.
19495    for ac_exec_ext in '' $ac_executable_extensions; do
19496  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19497    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19498    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19499    break 2
19500  fi
19501done
19502  done
19503IFS=$as_save_IFS
19504
19505  ;;
19506esac
19507fi
19508CODESIGN=$ac_cv_path_CODESIGN
19509if test -n "$CODESIGN"; then
19510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19511$as_echo "$CODESIGN" >&6; }
19512else
19513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19514$as_echo "no" >&6; }
19515fi
19516
19517
19518  test -n "$CODESIGN" && break
19519done
19520
19521    else
19522      # If it succeeded, then it was overridden by the user. We will use it
19523      # for the tool.
19524
19525      # First remove it from the list of overridden variables, so we can test
19526      # for unknown variables in the end.
19527      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19528
19529      # Check if the provided tool contains a complete path.
19530      tool_specified="$CODESIGN"
19531      tool_basename="${tool_specified##*/}"
19532      if test "x$tool_basename" = "x$tool_specified"; then
19533        # A command without a complete path is provided, search $PATH.
19534        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19535$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19536        # Extract the first word of "$tool_basename", so it can be a program name with args.
19537set dummy $tool_basename; ac_word=$2
19538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19539$as_echo_n "checking for $ac_word... " >&6; }
19540if ${ac_cv_path_CODESIGN+:} false; then :
19541  $as_echo_n "(cached) " >&6
19542else
19543  case $CODESIGN in
19544  [\\/]* | ?:[\\/]*)
19545  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19546  ;;
19547  *)
19548  as_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_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
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
19563  ;;
19564esac
19565fi
19566CODESIGN=$ac_cv_path_CODESIGN
19567if test -n "$CODESIGN"; then
19568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19569$as_echo "$CODESIGN" >&6; }
19570else
19571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19572$as_echo "no" >&6; }
19573fi
19574
19575
19576        if test "x$CODESIGN" = x; then
19577          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19578        fi
19579      else
19580        # Otherwise we believe it is a complete path. Use it as it is.
19581        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19582$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19583        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19584$as_echo_n "checking for CODESIGN... " >&6; }
19585        if test ! -x "$tool_specified"; then
19586          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19587$as_echo "not found" >&6; }
19588          as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19589        fi
19590        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19591$as_echo "$tool_specified" >&6; }
19592      fi
19593    fi
19594  fi
19595
19596
19597    if test "x$CODESIGN" != "x"; then
19598      # Verify that the openjdk_codesign certificate is present
19599      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19600$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19601      rm -f codesign-testfile
19602      touch codesign-testfile
19603      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19604      rm -f codesign-testfile
19605      if test "x$CODESIGN" = x; then
19606        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19607$as_echo "no" >&6; }
19608      else
19609        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19610$as_echo "yes" >&6; }
19611      fi
19612    fi
19613  fi
19614
19615
19616# Check if pkg-config is available.
19617
19618
19619if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19620	if test -n "$ac_tool_prefix"; then
19621  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19622set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19624$as_echo_n "checking for $ac_word... " >&6; }
19625if ${ac_cv_path_PKG_CONFIG+:} false; then :
19626  $as_echo_n "(cached) " >&6
19627else
19628  case $PKG_CONFIG in
19629  [\\/]* | ?:[\\/]*)
19630  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19631  ;;
19632  *)
19633  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19634for as_dir in $PATH
19635do
19636  IFS=$as_save_IFS
19637  test -z "$as_dir" && as_dir=.
19638    for ac_exec_ext in '' $ac_executable_extensions; do
19639  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19640    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19642    break 2
19643  fi
19644done
19645  done
19646IFS=$as_save_IFS
19647
19648  ;;
19649esac
19650fi
19651PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19652if test -n "$PKG_CONFIG"; then
19653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19654$as_echo "$PKG_CONFIG" >&6; }
19655else
19656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19657$as_echo "no" >&6; }
19658fi
19659
19660
19661fi
19662if test -z "$ac_cv_path_PKG_CONFIG"; then
19663  ac_pt_PKG_CONFIG=$PKG_CONFIG
19664  # Extract the first word of "pkg-config", so it can be a program name with args.
19665set dummy pkg-config; ac_word=$2
19666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19667$as_echo_n "checking for $ac_word... " >&6; }
19668if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19669  $as_echo_n "(cached) " >&6
19670else
19671  case $ac_pt_PKG_CONFIG in
19672  [\\/]* | ?:[\\/]*)
19673  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19674  ;;
19675  *)
19676  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19677for as_dir in $PATH
19678do
19679  IFS=$as_save_IFS
19680  test -z "$as_dir" && as_dir=.
19681    for ac_exec_ext in '' $ac_executable_extensions; do
19682  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19683    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19684    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19685    break 2
19686  fi
19687done
19688  done
19689IFS=$as_save_IFS
19690
19691  ;;
19692esac
19693fi
19694ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19695if test -n "$ac_pt_PKG_CONFIG"; then
19696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19697$as_echo "$ac_pt_PKG_CONFIG" >&6; }
19698else
19699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19700$as_echo "no" >&6; }
19701fi
19702
19703  if test "x$ac_pt_PKG_CONFIG" = x; then
19704    PKG_CONFIG=""
19705  else
19706    case $cross_compiling:$ac_tool_warned in
19707yes:)
19708{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19709$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19710ac_tool_warned=yes ;;
19711esac
19712    PKG_CONFIG=$ac_pt_PKG_CONFIG
19713  fi
19714else
19715  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19716fi
19717
19718fi
19719if test -n "$PKG_CONFIG"; then
19720	_pkg_min_version=0.9.0
19721	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19722$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19723	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19724		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19725$as_echo "yes" >&6; }
19726	else
19727		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19728$as_echo "no" >&6; }
19729		PKG_CONFIG=""
19730	fi
19731
19732fi
19733
19734# After basic tools have been setup, we can check build os specific details.
19735
19736  ###############################################################################
19737
19738  # Note that this is the build platform OS version!
19739
19740  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19741  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19742  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19743  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19744
19745
19746
19747
19748
19749# Setup builddeps, for automatic downloading of tools we need.
19750# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19751# boot-jdk setup, but we need to have basic tools setup first.
19752
19753
19754# Check whether --with-builddeps-conf was given.
19755if test "${with_builddeps_conf+set}" = set; then :
19756  withval=$with_builddeps_conf;
19757fi
19758
19759
19760
19761# Check whether --with-builddeps-server was given.
19762if test "${with_builddeps_server+set}" = set; then :
19763  withval=$with_builddeps_server;
19764fi
19765
19766
19767
19768# Check whether --with-builddeps-dir was given.
19769if test "${with_builddeps_dir+set}" = set; then :
19770  withval=$with_builddeps_dir;
19771else
19772  with_builddeps_dir=/localhome/builddeps
19773fi
19774
19775
19776
19777# Check whether --with-builddeps-group was given.
19778if test "${with_builddeps_group+set}" = set; then :
19779  withval=$with_builddeps_group;
19780fi
19781
19782
19783
19784
19785  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19786    if test "x$with_builddeps_conf" != x; then
19787      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19788$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19789      builddepsfile=$with_builddeps_conf
19790      if test -s $builddepsfile; then
19791        . $builddepsfile
19792        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19793$as_echo "loaded!" >&6; }
19794      else
19795        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19796      fi
19797    else
19798      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19799$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19800      builddepsfile=`mktemp`
19801      touch $builddepsfile
19802      # Put all found confs into a single file.
19803      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19804      # Source the file to acquire the variables
19805      if test -s $builddepsfile; then
19806        . $builddepsfile
19807        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19808$as_echo "found at least one!" >&6; }
19809      else
19810        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19811      fi
19812    fi
19813    # Create build and target names that use _ instead of "-" and ".".
19814    # This is necessary to use them in variable names.
19815    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19816    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19817    # Extract rewrite information for build and target
19818    eval rewritten_build=\${REWRITE_${build_var}}
19819    if test "x$rewritten_build" = x; then
19820      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19821      echo Build stays the same $rewritten_build
19822    else
19823      echo Rewriting build for builddeps into $rewritten_build
19824    fi
19825    eval rewritten_target=\${REWRITE_${target_var}}
19826    if test "x$rewritten_target" = x; then
19827      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19828      echo Target stays the same $rewritten_target
19829    else
19830      echo Rewriting target for builddeps into $rewritten_target
19831    fi
19832    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19833    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19834  fi
19835  for ac_prog in 7z unzip
19836do
19837  # Extract the first word of "$ac_prog", so it can be a program name with args.
19838set dummy $ac_prog; ac_word=$2
19839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19840$as_echo_n "checking for $ac_word... " >&6; }
19841if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19842  $as_echo_n "(cached) " >&6
19843else
19844  if test -n "$BDEPS_UNZIP"; then
19845  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19846else
19847as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19848for as_dir in $PATH
19849do
19850  IFS=$as_save_IFS
19851  test -z "$as_dir" && as_dir=.
19852    for ac_exec_ext in '' $ac_executable_extensions; do
19853  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19854    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
19855    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19856    break 2
19857  fi
19858done
19859  done
19860IFS=$as_save_IFS
19861
19862fi
19863fi
19864BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
19865if test -n "$BDEPS_UNZIP"; then
19866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
19867$as_echo "$BDEPS_UNZIP" >&6; }
19868else
19869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19870$as_echo "no" >&6; }
19871fi
19872
19873
19874  test -n "$BDEPS_UNZIP" && break
19875done
19876
19877  if test "x$BDEPS_UNZIP" = x7z; then
19878    BDEPS_UNZIP="7z x"
19879  fi
19880
19881  for ac_prog in wget lftp ftp
19882do
19883  # Extract the first word of "$ac_prog", so it can be a program name with args.
19884set dummy $ac_prog; ac_word=$2
19885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19886$as_echo_n "checking for $ac_word... " >&6; }
19887if ${ac_cv_prog_BDEPS_FTP+:} false; then :
19888  $as_echo_n "(cached) " >&6
19889else
19890  if test -n "$BDEPS_FTP"; then
19891  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
19892else
19893as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19894for as_dir in $PATH
19895do
19896  IFS=$as_save_IFS
19897  test -z "$as_dir" && as_dir=.
19898    for ac_exec_ext in '' $ac_executable_extensions; do
19899  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19900    ac_cv_prog_BDEPS_FTP="$ac_prog"
19901    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19902    break 2
19903  fi
19904done
19905  done
19906IFS=$as_save_IFS
19907
19908fi
19909fi
19910BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
19911if test -n "$BDEPS_FTP"; then
19912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
19913$as_echo "$BDEPS_FTP" >&6; }
19914else
19915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19916$as_echo "no" >&6; }
19917fi
19918
19919
19920  test -n "$BDEPS_FTP" && break
19921done
19922
19923
19924
19925###############################################################################
19926#
19927# Determine OpenJDK variants, options and version numbers.
19928#
19929###############################################################################
19930
19931# We need build & target for this.
19932
19933
19934  ###############################################################################
19935  #
19936  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
19937  # We always build headless support.
19938  #
19939  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
19940$as_echo_n "checking headful support... " >&6; }
19941  # Check whether --enable-headful was given.
19942if test "${enable_headful+set}" = set; then :
19943  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
19944else
19945  SUPPORT_HEADFUL=yes
19946fi
19947
19948
19949  SUPPORT_HEADLESS=yes
19950  BUILD_HEADLESS="BUILD_HEADLESS:=true"
19951
19952  if test "x$SUPPORT_HEADFUL" = xyes; then
19953    # We are building both headful and headless.
19954    headful_msg="include support for both headful and headless"
19955  fi
19956
19957  if test "x$SUPPORT_HEADFUL" = xno; then
19958    # Thus we are building headless only.
19959    BUILD_HEADLESS="BUILD_HEADLESS:=true"
19960    headful_msg="headless only"
19961  fi
19962
19963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
19964$as_echo "$headful_msg" >&6; }
19965
19966
19967
19968
19969
19970  # Control wether Hotspot runs Queens test after build.
19971  # Check whether --enable-hotspot-test-in-build was given.
19972if test "${enable_hotspot_test_in_build+set}" = set; then :
19973  enableval=$enable_hotspot_test_in_build;
19974else
19975  enable_hotspot_test_in_build=no
19976fi
19977
19978  if test "x$enable_hotspot_test_in_build" = "xyes"; then
19979    TEST_IN_BUILD=true
19980  else
19981    TEST_IN_BUILD=false
19982  fi
19983
19984
19985  ###############################################################################
19986  #
19987  # Choose cacerts source file
19988  #
19989
19990# Check whether --with-cacerts-file was given.
19991if test "${with_cacerts_file+set}" = set; then :
19992  withval=$with_cacerts_file;
19993fi
19994
19995  if test "x$with_cacerts_file" != x; then
19996    CACERTS_FILE=$with_cacerts_file
19997  fi
19998
19999
20000  ###############################################################################
20001  #
20002  # Enable or disable unlimited crypto
20003  #
20004  # Check whether --enable-unlimited-crypto was given.
20005if test "${enable_unlimited_crypto+set}" = set; then :
20006  enableval=$enable_unlimited_crypto;
20007else
20008  enable_unlimited_crypto=no
20009fi
20010
20011  if test "x$enable_unlimited_crypto" = "xyes"; then
20012    UNLIMITED_CRYPTO=true
20013  else
20014    UNLIMITED_CRYPTO=false
20015  fi
20016
20017
20018  ###############################################################################
20019  #
20020  # Enable or disable the elliptic curve crypto implementation
20021  #
20022
20023
20024  ###############################################################################
20025  #
20026  # --enable-rmiconnector-iiop
20027  #
20028  # Check whether --enable-rmiconnector-iiop was given.
20029if test "${enable_rmiconnector_iiop+set}" = set; then :
20030  enableval=$enable_rmiconnector_iiop;
20031fi
20032
20033  if test "x$enable_rmiconnector_iiop" = "xyes"; then
20034    RMICONNECTOR_IIOP=true
20035  else
20036    RMICONNECTOR_IIOP=false
20037  fi
20038
20039
20040  ###############################################################################
20041  #
20042  # Compress jars
20043  #
20044  COMPRESS_JARS=false
20045
20046
20047
20048
20049  # Source the version numbers
20050  . $AUTOCONF_DIR/version-numbers
20051
20052  # Get the settings from parameters
20053
20054# Check whether --with-milestone was given.
20055if test "${with_milestone+set}" = set; then :
20056  withval=$with_milestone;
20057fi
20058
20059  if test "x$with_milestone" = xyes; then
20060    as_fn_error $? "Milestone must have a value" "$LINENO" 5
20061  elif test "x$with_milestone" != x; then
20062    MILESTONE="$with_milestone"
20063  fi
20064  if test "x$MILESTONE" = x; then
20065    MILESTONE=internal
20066  fi
20067
20068
20069# Check whether --with-update-version was given.
20070if test "${with_update_version+set}" = set; then :
20071  withval=$with_update_version;
20072fi
20073
20074  if test "x$with_update_version" = xyes; then
20075    as_fn_error $? "Update version must have a value" "$LINENO" 5
20076  elif test "x$with_update_version" != x; then
20077    JDK_UPDATE_VERSION="$with_update_version"
20078    # On macosx 10.7, it's not possible to set --with-update-version=0X due
20079    # to a bug in expr (which reduces it to just X). To work around this, we
20080    # always add a 0 to one digit update versions.
20081    if test "${#JDK_UPDATE_VERSION}" = "1"; then
20082      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
20083    fi
20084  fi
20085
20086
20087# Check whether --with-user-release-suffix was given.
20088if test "${with_user_release_suffix+set}" = set; then :
20089  withval=$with_user_release_suffix;
20090fi
20091
20092  if test "x$with_user_release_suffix" = xyes; then
20093    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
20094  elif test "x$with_user_release_suffix" != x; then
20095    USER_RELEASE_SUFFIX="$with_user_release_suffix"
20096  fi
20097
20098
20099# Check whether --with-build-number was given.
20100if test "${with_build_number+set}" = set; then :
20101  withval=$with_build_number;
20102fi
20103
20104  if test "x$with_build_number" = xyes; then
20105    as_fn_error $? "Build number must have a value" "$LINENO" 5
20106  elif test "x$with_build_number" != x; then
20107    JDK_BUILD_NUMBER="$with_build_number"
20108  fi
20109  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
20110  if test "x$JDK_BUILD_NUMBER" = x; then
20111    JDK_BUILD_NUMBER=b00
20112    if test "x$USER_RELEASE_SUFFIX" = x; then
20113      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
20114      # Avoid [:alnum:] since it depends on the locale.
20115      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
20116      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20117    fi
20118  fi
20119
20120  # Now set the JDK version, milestone, build number etc.
20121
20122
20123
20124
20125
20126
20127
20128
20129
20130
20131
20132
20133
20134
20135
20136  COPYRIGHT_YEAR=`date +'%Y'`
20137
20138
20139  if test "x$JDK_UPDATE_VERSION" != x; then
20140    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
20141  else
20142    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
20143  fi
20144
20145
20146  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
20147
20148
20149
20150###############################################################################
20151#
20152# Setup BootJDK, used to bootstrap the build.
20153#
20154###############################################################################
20155
20156
20157  BOOT_JDK_FOUND=no
20158
20159# Check whether --with-boot-jdk was given.
20160if test "${with_boot_jdk+set}" = set; then :
20161  withval=$with_boot_jdk;
20162fi
20163
20164
20165  # We look for the Boot JDK through various means, going from more certain to
20166  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
20167  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
20168  # must check if this is indeed valid; otherwise we'll continue looking.
20169
20170  # Test: Is bootjdk explicitely set by command line arguments?
20171
20172  if test "x$BOOT_JDK_FOUND" = xno; then
20173    # Now execute the test
20174
20175  if test "x$with_boot_jdk" != x; then
20176    BOOT_JDK=$with_boot_jdk
20177    BOOT_JDK_FOUND=maybe
20178    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
20179$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
20180  fi
20181
20182
20183    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20184    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20185      # Do we have a bin/java?
20186      if test ! -x "$BOOT_JDK/bin/java"; then
20187        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20188$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20189        BOOT_JDK_FOUND=no
20190      else
20191        # Do we have a bin/javac?
20192        if test ! -x "$BOOT_JDK/bin/javac"; then
20193          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20194$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20195          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20196$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20197          BOOT_JDK_FOUND=no
20198        else
20199          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20200          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20201            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20202$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20203            BOOT_JDK_FOUND=no
20204          else
20205            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20206            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20207
20208            # Extra M4 quote needed to protect [] in grep expression.
20209            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20210            if test "x$FOUND_CORRECT_VERSION" = x; then
20211              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20212$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20213              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20214$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20215              BOOT_JDK_FOUND=no
20216            else
20217              # We're done! :-)
20218              BOOT_JDK_FOUND=yes
20219
20220  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20221
20222  # Input might be given as Windows format, start by converting to
20223  # unix format.
20224  path="$BOOT_JDK"
20225  new_path=`$CYGPATH -u "$path"`
20226
20227  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20228  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20229  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20230  # "foo.exe" is OK but "foo" is an error.
20231  #
20232  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20233  # It is also a way to make sure we got the proper file name for the real test later on.
20234  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20235  if test "x$test_shortpath" = x; then
20236    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20237$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20238    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20239  fi
20240
20241  # Call helper function which possibly converts this using DOS-style short mode.
20242  # If so, the updated path is stored in $new_path.
20243
20244  input_path="$new_path"
20245  # Check if we need to convert this using DOS-style short mode. If the path
20246  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20247  # take no chances and rewrite it.
20248  # Note: m4 eats our [], so we need to use [ and ] instead.
20249  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20250  if test "x$has_forbidden_chars" != x; then
20251    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20252    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20253    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20254    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20255      # Going to short mode and back again did indeed matter. Since short mode is
20256      # case insensitive, let's make it lowercase to improve readability.
20257      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20258      # Now convert it back to Unix-stile (cygpath)
20259      input_path=`$CYGPATH -u "$shortmode_path"`
20260      new_path="$input_path"
20261    fi
20262  fi
20263
20264  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20265  if test "x$test_cygdrive_prefix" = x; then
20266    # As a simple fix, exclude /usr/bin since it's not a real path.
20267    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20268      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20269      # a path prefixed by /cygdrive for fixpath to work.
20270      new_path="$CYGWIN_ROOT_PATH$input_path"
20271    fi
20272  fi
20273
20274
20275  if test "x$path" != "x$new_path"; then
20276    BOOT_JDK="$new_path"
20277    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20278$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20279  fi
20280
20281  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20282
20283  path="$BOOT_JDK"
20284  has_colon=`$ECHO $path | $GREP ^.:`
20285  new_path="$path"
20286  if test "x$has_colon" = x; then
20287    # Not in mixed or Windows style, start by that.
20288    new_path=`cmd //c echo $path`
20289  fi
20290
20291
20292  input_path="$new_path"
20293  # Check if we need to convert this using DOS-style short mode. If the path
20294  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20295  # take no chances and rewrite it.
20296  # Note: m4 eats our [], so we need to use [ and ] instead.
20297  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20298  if test "x$has_forbidden_chars" != x; then
20299    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20300    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20301  fi
20302
20303
20304  windows_path="$new_path"
20305  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20306    unix_path=`$CYGPATH -u "$windows_path"`
20307    new_path="$unix_path"
20308  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20309    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20310    new_path="$unix_path"
20311  fi
20312
20313  if test "x$path" != "x$new_path"; then
20314    BOOT_JDK="$new_path"
20315    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20316$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20317  fi
20318
20319  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20320  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20321
20322  else
20323    # We're on a posix platform. Hooray! :)
20324    path="$BOOT_JDK"
20325    has_space=`$ECHO "$path" | $GREP " "`
20326    if test "x$has_space" != x; then
20327      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20328$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20329      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20330    fi
20331
20332    # Use eval to expand a potential ~
20333    eval path="$path"
20334    if test ! -f "$path" && test ! -d "$path"; then
20335      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20336    fi
20337
20338    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20339  fi
20340
20341              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20342$as_echo_n "checking for Boot JDK... " >&6; }
20343              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20344$as_echo "$BOOT_JDK" >&6; }
20345              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20346$as_echo_n "checking Boot JDK version... " >&6; }
20347              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20348              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20349$as_echo "$BOOT_JDK_VERSION" >&6; }
20350            fi # end check jdk version
20351          fi # end check rt.jar
20352        fi # end check javac
20353      fi # end check java
20354    fi # end check boot jdk found
20355  fi
20356
20357  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
20358    # Having specified an argument which is incorrect will produce an instant failure;
20359    # we should not go on looking
20360    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
20361  fi
20362
20363  # Test: Is bootjdk available from builddeps?
20364
20365  if test "x$BOOT_JDK_FOUND" = xno; then
20366    # Now execute the test
20367
20368
20369
20370  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
20371    # Source the builddeps file again, to make sure it uses the latest variables!
20372    . $builddepsfile
20373    # Look for a target and build machine specific resource!
20374    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
20375    if test "x$resource" = x; then
20376      # Ok, lets instead look for a target specific resource
20377      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
20378    fi
20379    if test "x$resource" = x; then
20380      # Ok, lets instead look for a build specific resource
20381      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
20382    fi
20383    if test "x$resource" = x; then
20384      # Ok, lets instead look for a generic resource
20385      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
20386      resource=${builddep_bootjdk}
20387    fi
20388    if test "x$resource" != x; then
20389      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
20390$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
20391      # If the resource in the builddeps.conf file is an existing directory,
20392      # for example /java/linux/cups
20393      if test -d ${resource}; then
20394        depdir=${resource}
20395      else
20396
20397  # bootjdk is for example mymodule
20398  # $resource is for example libs/general/libmymod_1_2_3.zip
20399  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
20400  # $with_builddeps_dir is for example /localhome/builddeps
20401  # depdir is the name of the variable into which we store the depdir, eg MYMOD
20402  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
20403  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
20404  filename=`basename $resource`
20405  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
20406  filebase=${filename%%.*}
20407  extension=${filename#*.}
20408  installdir=$with_builddeps_dir/$filebase
20409  if test ! -f $installdir/$filename.unpacked; then
20410    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
20411$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
20412    if test ! -d $installdir; then
20413      mkdir -p $installdir
20414    fi
20415    if test ! -d $installdir; then
20416      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
20417    fi
20418    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
20419    touch $tmpfile
20420    if test ! -f $tmpfile; then
20421      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
20422    fi
20423
20424  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
20425  # $tmpfile is the local file name for the downloaded file.
20426  VALID_TOOL=no
20427  if test "x$BDEPS_FTP" = xwget; then
20428    VALID_TOOL=yes
20429    wget -O $tmpfile $with_builddeps_server/$resource
20430  fi
20431  if test "x$BDEPS_FTP" = xlftp; then
20432    VALID_TOOL=yes
20433    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
20434  fi
20435  if test "x$BDEPS_FTP" = xftp; then
20436    VALID_TOOL=yes
20437    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
20438    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
20439    FTPUSERPWD=${FTPSERVER%%@*}
20440    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
20441      FTPUSER=${userpwd%%:*}
20442      FTPPWD=${userpwd#*@}
20443      FTPSERVER=${FTPSERVER#*@}
20444    else
20445      FTPUSER=ftp
20446      FTPPWD=ftp
20447    fi
20448    # the "pass" command does not work on some
20449    # ftp clients (read ftp.exe) but if it works,
20450    # passive mode is better!
20451    ( \
20452        echo "user $FTPUSER $FTPPWD"        ; \
20453        echo "pass"                         ; \
20454        echo "bin"                          ; \
20455        echo "get $FTPPATH $tmpfile"              ; \
20456    ) | ftp -in $FTPSERVER
20457  fi
20458  if test "x$VALID_TOOL" != xyes; then
20459    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
20460  fi
20461
20462    mv $tmpfile $installdir/$filename
20463    if test ! -s $installdir/$filename; then
20464      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
20465    fi
20466    case "$extension" in
20467      zip)  echo "Unzipping $installdir/$filename..."
20468        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
20469        ;;
20470      tar.gz) echo "Untaring $installdir/$filename..."
20471        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20472        ;;
20473      tgz) echo "Untaring $installdir/$filename..."
20474        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20475        ;;
20476      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
20477        ;;
20478    esac
20479  fi
20480  if test -f $installdir/$filename.unpacked; then
20481    depdir=$installdir
20482  fi
20483
20484      fi
20485      # Source the builddeps file again, because in the previous command, the depdir
20486      # was updated to point at the current build dependency install directory.
20487      . $builddepsfile
20488      # Now extract variables from the builddeps.conf files.
20489      theroot=${builddep_bootjdk_ROOT}
20490      thecflags=${builddep_bootjdk_CFLAGS}
20491      thelibs=${builddep_bootjdk_LIBS}
20492      if test "x$depdir" = x; then
20493        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
20494      fi
20495      BOOT_JDK=$depdir
20496      if test "x$theroot" != x; then
20497        BOOT_JDK="$theroot"
20498      fi
20499      if test "x$thecflags" != x; then
20500        BOOT_JDK_CFLAGS="$thecflags"
20501      fi
20502      if test "x$thelibs" != x; then
20503        BOOT_JDK_LIBS="$thelibs"
20504      fi
20505      BOOT_JDK_FOUND=maybe
20506      else BOOT_JDK_FOUND=no
20507
20508    fi
20509    else BOOT_JDK_FOUND=no
20510
20511  fi
20512
20513
20514
20515    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20516    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20517      # Do we have a bin/java?
20518      if test ! -x "$BOOT_JDK/bin/java"; then
20519        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20520$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20521        BOOT_JDK_FOUND=no
20522      else
20523        # Do we have a bin/javac?
20524        if test ! -x "$BOOT_JDK/bin/javac"; then
20525          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20526$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20527          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20528$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20529          BOOT_JDK_FOUND=no
20530        else
20531          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20532          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20533            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20534$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20535            BOOT_JDK_FOUND=no
20536          else
20537            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20538            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20539
20540            # Extra M4 quote needed to protect [] in grep expression.
20541            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20542            if test "x$FOUND_CORRECT_VERSION" = x; then
20543              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20544$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20545              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20546$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20547              BOOT_JDK_FOUND=no
20548            else
20549              # We're done! :-)
20550              BOOT_JDK_FOUND=yes
20551
20552  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20553
20554  # Input might be given as Windows format, start by converting to
20555  # unix format.
20556  path="$BOOT_JDK"
20557  new_path=`$CYGPATH -u "$path"`
20558
20559  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20560  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20561  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20562  # "foo.exe" is OK but "foo" is an error.
20563  #
20564  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20565  # It is also a way to make sure we got the proper file name for the real test later on.
20566  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20567  if test "x$test_shortpath" = x; then
20568    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20569$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20570    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20571  fi
20572
20573  # Call helper function which possibly converts this using DOS-style short mode.
20574  # If so, the updated path is stored in $new_path.
20575
20576  input_path="$new_path"
20577  # Check if we need to convert this using DOS-style short mode. If the path
20578  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20579  # take no chances and rewrite it.
20580  # Note: m4 eats our [], so we need to use [ and ] instead.
20581  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20582  if test "x$has_forbidden_chars" != x; then
20583    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20584    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20585    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20586    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20587      # Going to short mode and back again did indeed matter. Since short mode is
20588      # case insensitive, let's make it lowercase to improve readability.
20589      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20590      # Now convert it back to Unix-stile (cygpath)
20591      input_path=`$CYGPATH -u "$shortmode_path"`
20592      new_path="$input_path"
20593    fi
20594  fi
20595
20596  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20597  if test "x$test_cygdrive_prefix" = x; then
20598    # As a simple fix, exclude /usr/bin since it's not a real path.
20599    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20600      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20601      # a path prefixed by /cygdrive for fixpath to work.
20602      new_path="$CYGWIN_ROOT_PATH$input_path"
20603    fi
20604  fi
20605
20606
20607  if test "x$path" != "x$new_path"; then
20608    BOOT_JDK="$new_path"
20609    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20610$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20611  fi
20612
20613  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20614
20615  path="$BOOT_JDK"
20616  has_colon=`$ECHO $path | $GREP ^.:`
20617  new_path="$path"
20618  if test "x$has_colon" = x; then
20619    # Not in mixed or Windows style, start by that.
20620    new_path=`cmd //c echo $path`
20621  fi
20622
20623
20624  input_path="$new_path"
20625  # Check if we need to convert this using DOS-style short mode. If the path
20626  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20627  # take no chances and rewrite it.
20628  # Note: m4 eats our [], so we need to use [ and ] instead.
20629  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20630  if test "x$has_forbidden_chars" != x; then
20631    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20632    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20633  fi
20634
20635
20636  windows_path="$new_path"
20637  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20638    unix_path=`$CYGPATH -u "$windows_path"`
20639    new_path="$unix_path"
20640  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20641    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20642    new_path="$unix_path"
20643  fi
20644
20645  if test "x$path" != "x$new_path"; then
20646    BOOT_JDK="$new_path"
20647    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20648$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20649  fi
20650
20651  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20652  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20653
20654  else
20655    # We're on a posix platform. Hooray! :)
20656    path="$BOOT_JDK"
20657    has_space=`$ECHO "$path" | $GREP " "`
20658    if test "x$has_space" != x; then
20659      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20660$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20661      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20662    fi
20663
20664    # Use eval to expand a potential ~
20665    eval path="$path"
20666    if test ! -f "$path" && test ! -d "$path"; then
20667      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20668    fi
20669
20670    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20671  fi
20672
20673              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20674$as_echo_n "checking for Boot JDK... " >&6; }
20675              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20676$as_echo "$BOOT_JDK" >&6; }
20677              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20678$as_echo_n "checking Boot JDK version... " >&6; }
20679              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20680              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20681$as_echo "$BOOT_JDK_VERSION" >&6; }
20682            fi # end check jdk version
20683          fi # end check rt.jar
20684        fi # end check javac
20685      fi # end check java
20686    fi # end check boot jdk found
20687  fi
20688
20689
20690  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
20691
20692  if test "x$BOOT_JDK_FOUND" = xno; then
20693    # Now execute the test
20694
20695  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20696    # First check at user selected default
20697
20698  if test "x$BOOT_JDK_FOUND" = xno; then
20699    # Now execute the test
20700
20701  if test -x /usr/libexec/java_home; then
20702    BOOT_JDK=`/usr/libexec/java_home `
20703    BOOT_JDK_FOUND=maybe
20704    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
20705$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
20706  fi
20707
20708
20709    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20710    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20711      # Do we have a bin/java?
20712      if test ! -x "$BOOT_JDK/bin/java"; then
20713        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20714$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20715        BOOT_JDK_FOUND=no
20716      else
20717        # Do we have a bin/javac?
20718        if test ! -x "$BOOT_JDK/bin/javac"; then
20719          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20720$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20721          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20722$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20723          BOOT_JDK_FOUND=no
20724        else
20725          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20726          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20727            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20728$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20729            BOOT_JDK_FOUND=no
20730          else
20731            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20732            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20733
20734            # Extra M4 quote needed to protect [] in grep expression.
20735            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20736            if test "x$FOUND_CORRECT_VERSION" = x; then
20737              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20738$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20739              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20740$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20741              BOOT_JDK_FOUND=no
20742            else
20743              # We're done! :-)
20744              BOOT_JDK_FOUND=yes
20745
20746  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20747
20748  # Input might be given as Windows format, start by converting to
20749  # unix format.
20750  path="$BOOT_JDK"
20751  new_path=`$CYGPATH -u "$path"`
20752
20753  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20754  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20755  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20756  # "foo.exe" is OK but "foo" is an error.
20757  #
20758  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20759  # It is also a way to make sure we got the proper file name for the real test later on.
20760  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20761  if test "x$test_shortpath" = x; then
20762    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20763$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20764    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20765  fi
20766
20767  # Call helper function which possibly converts this using DOS-style short mode.
20768  # If so, the updated path is stored in $new_path.
20769
20770  input_path="$new_path"
20771  # Check if we need to convert this using DOS-style short mode. If the path
20772  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20773  # take no chances and rewrite it.
20774  # Note: m4 eats our [], so we need to use [ and ] instead.
20775  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20776  if test "x$has_forbidden_chars" != x; then
20777    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20778    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20779    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20780    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20781      # Going to short mode and back again did indeed matter. Since short mode is
20782      # case insensitive, let's make it lowercase to improve readability.
20783      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20784      # Now convert it back to Unix-stile (cygpath)
20785      input_path=`$CYGPATH -u "$shortmode_path"`
20786      new_path="$input_path"
20787    fi
20788  fi
20789
20790  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20791  if test "x$test_cygdrive_prefix" = x; then
20792    # As a simple fix, exclude /usr/bin since it's not a real path.
20793    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20794      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20795      # a path prefixed by /cygdrive for fixpath to work.
20796      new_path="$CYGWIN_ROOT_PATH$input_path"
20797    fi
20798  fi
20799
20800
20801  if test "x$path" != "x$new_path"; then
20802    BOOT_JDK="$new_path"
20803    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20804$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20805  fi
20806
20807  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20808
20809  path="$BOOT_JDK"
20810  has_colon=`$ECHO $path | $GREP ^.:`
20811  new_path="$path"
20812  if test "x$has_colon" = x; then
20813    # Not in mixed or Windows style, start by that.
20814    new_path=`cmd //c echo $path`
20815  fi
20816
20817
20818  input_path="$new_path"
20819  # Check if we need to convert this using DOS-style short mode. If the path
20820  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20821  # take no chances and rewrite it.
20822  # Note: m4 eats our [], so we need to use [ and ] instead.
20823  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20824  if test "x$has_forbidden_chars" != x; then
20825    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20826    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20827  fi
20828
20829
20830  windows_path="$new_path"
20831  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20832    unix_path=`$CYGPATH -u "$windows_path"`
20833    new_path="$unix_path"
20834  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20835    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20836    new_path="$unix_path"
20837  fi
20838
20839  if test "x$path" != "x$new_path"; then
20840    BOOT_JDK="$new_path"
20841    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20842$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20843  fi
20844
20845  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20846  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20847
20848  else
20849    # We're on a posix platform. Hooray! :)
20850    path="$BOOT_JDK"
20851    has_space=`$ECHO "$path" | $GREP " "`
20852    if test "x$has_space" != x; then
20853      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20854$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20855      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20856    fi
20857
20858    # Use eval to expand a potential ~
20859    eval path="$path"
20860    if test ! -f "$path" && test ! -d "$path"; then
20861      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20862    fi
20863
20864    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20865  fi
20866
20867              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20868$as_echo_n "checking for Boot JDK... " >&6; }
20869              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20870$as_echo "$BOOT_JDK" >&6; }
20871              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20872$as_echo_n "checking Boot JDK version... " >&6; }
20873              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20874              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20875$as_echo "$BOOT_JDK_VERSION" >&6; }
20876            fi # end check jdk version
20877          fi # end check rt.jar
20878        fi # end check javac
20879      fi # end check java
20880    fi # end check boot jdk found
20881  fi
20882
20883    # If that did not work out (e.g. too old), try explicit versions instead
20884
20885  if test "x$BOOT_JDK_FOUND" = xno; then
20886    # Now execute the test
20887
20888  if test -x /usr/libexec/java_home; then
20889    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
20890    BOOT_JDK_FOUND=maybe
20891    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
20892$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
20893  fi
20894
20895
20896    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20897    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20898      # Do we have a bin/java?
20899      if test ! -x "$BOOT_JDK/bin/java"; then
20900        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20901$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20902        BOOT_JDK_FOUND=no
20903      else
20904        # Do we have a bin/javac?
20905        if test ! -x "$BOOT_JDK/bin/javac"; then
20906          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20907$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20908          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20909$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20910          BOOT_JDK_FOUND=no
20911        else
20912          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20913          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20914            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20915$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20916            BOOT_JDK_FOUND=no
20917          else
20918            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20919            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20920
20921            # Extra M4 quote needed to protect [] in grep expression.
20922            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20923            if test "x$FOUND_CORRECT_VERSION" = x; then
20924              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20925$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20926              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20927$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20928              BOOT_JDK_FOUND=no
20929            else
20930              # We're done! :-)
20931              BOOT_JDK_FOUND=yes
20932
20933  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20934
20935  # Input might be given as Windows format, start by converting to
20936  # unix format.
20937  path="$BOOT_JDK"
20938  new_path=`$CYGPATH -u "$path"`
20939
20940  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20941  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20942  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20943  # "foo.exe" is OK but "foo" is an error.
20944  #
20945  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20946  # It is also a way to make sure we got the proper file name for the real test later on.
20947  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20948  if test "x$test_shortpath" = x; then
20949    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20950$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20951    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20952  fi
20953
20954  # Call helper function which possibly converts this using DOS-style short mode.
20955  # If so, the updated path is stored in $new_path.
20956
20957  input_path="$new_path"
20958  # Check if we need to convert this using DOS-style short mode. If the path
20959  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20960  # take no chances and rewrite it.
20961  # Note: m4 eats our [], so we need to use [ and ] instead.
20962  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20963  if test "x$has_forbidden_chars" != x; then
20964    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20965    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20966    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20967    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20968      # Going to short mode and back again did indeed matter. Since short mode is
20969      # case insensitive, let's make it lowercase to improve readability.
20970      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20971      # Now convert it back to Unix-stile (cygpath)
20972      input_path=`$CYGPATH -u "$shortmode_path"`
20973      new_path="$input_path"
20974    fi
20975  fi
20976
20977  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20978  if test "x$test_cygdrive_prefix" = x; then
20979    # As a simple fix, exclude /usr/bin since it's not a real path.
20980    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20981      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20982      # a path prefixed by /cygdrive for fixpath to work.
20983      new_path="$CYGWIN_ROOT_PATH$input_path"
20984    fi
20985  fi
20986
20987
20988  if test "x$path" != "x$new_path"; then
20989    BOOT_JDK="$new_path"
20990    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20991$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20992  fi
20993
20994  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20995
20996  path="$BOOT_JDK"
20997  has_colon=`$ECHO $path | $GREP ^.:`
20998  new_path="$path"
20999  if test "x$has_colon" = x; then
21000    # Not in mixed or Windows style, start by that.
21001    new_path=`cmd //c echo $path`
21002  fi
21003
21004
21005  input_path="$new_path"
21006  # Check if we need to convert this using DOS-style short mode. If the path
21007  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21008  # take no chances and rewrite it.
21009  # Note: m4 eats our [], so we need to use [ and ] instead.
21010  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21011  if test "x$has_forbidden_chars" != x; then
21012    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21013    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21014  fi
21015
21016
21017  windows_path="$new_path"
21018  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21019    unix_path=`$CYGPATH -u "$windows_path"`
21020    new_path="$unix_path"
21021  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21022    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21023    new_path="$unix_path"
21024  fi
21025
21026  if test "x$path" != "x$new_path"; then
21027    BOOT_JDK="$new_path"
21028    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21029$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21030  fi
21031
21032  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21033  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21034
21035  else
21036    # We're on a posix platform. Hooray! :)
21037    path="$BOOT_JDK"
21038    has_space=`$ECHO "$path" | $GREP " "`
21039    if test "x$has_space" != x; then
21040      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21041$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21042      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21043    fi
21044
21045    # Use eval to expand a potential ~
21046    eval path="$path"
21047    if test ! -f "$path" && test ! -d "$path"; then
21048      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21049    fi
21050
21051    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21052  fi
21053
21054              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21055$as_echo_n "checking for Boot JDK... " >&6; }
21056              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21057$as_echo "$BOOT_JDK" >&6; }
21058              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21059$as_echo_n "checking Boot JDK version... " >&6; }
21060              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21061              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21062$as_echo "$BOOT_JDK_VERSION" >&6; }
21063            fi # end check jdk version
21064          fi # end check rt.jar
21065        fi # end check javac
21066      fi # end check java
21067    fi # end check boot jdk found
21068  fi
21069
21070
21071  if test "x$BOOT_JDK_FOUND" = xno; then
21072    # Now execute the test
21073
21074  if test -x /usr/libexec/java_home; then
21075    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
21076    BOOT_JDK_FOUND=maybe
21077    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
21078$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
21079  fi
21080
21081
21082    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21083    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21084      # Do we have a bin/java?
21085      if test ! -x "$BOOT_JDK/bin/java"; then
21086        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21087$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21088        BOOT_JDK_FOUND=no
21089      else
21090        # Do we have a bin/javac?
21091        if test ! -x "$BOOT_JDK/bin/javac"; then
21092          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21093$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21094          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21095$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21096          BOOT_JDK_FOUND=no
21097        else
21098          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21099          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21100            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21101$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21102            BOOT_JDK_FOUND=no
21103          else
21104            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21105            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21106
21107            # Extra M4 quote needed to protect [] in grep expression.
21108            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21109            if test "x$FOUND_CORRECT_VERSION" = x; then
21110              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21111$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21112              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21113$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21114              BOOT_JDK_FOUND=no
21115            else
21116              # We're done! :-)
21117              BOOT_JDK_FOUND=yes
21118
21119  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21120
21121  # Input might be given as Windows format, start by converting to
21122  # unix format.
21123  path="$BOOT_JDK"
21124  new_path=`$CYGPATH -u "$path"`
21125
21126  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21127  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21128  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21129  # "foo.exe" is OK but "foo" is an error.
21130  #
21131  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21132  # It is also a way to make sure we got the proper file name for the real test later on.
21133  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21134  if test "x$test_shortpath" = x; then
21135    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21136$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21137    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21138  fi
21139
21140  # Call helper function which possibly converts this using DOS-style short mode.
21141  # If so, the updated path is stored in $new_path.
21142
21143  input_path="$new_path"
21144  # Check if we need to convert this using DOS-style short mode. If the path
21145  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21146  # take no chances and rewrite it.
21147  # Note: m4 eats our [], so we need to use [ and ] instead.
21148  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21149  if test "x$has_forbidden_chars" != x; then
21150    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21151    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21152    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21153    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21154      # Going to short mode and back again did indeed matter. Since short mode is
21155      # case insensitive, let's make it lowercase to improve readability.
21156      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21157      # Now convert it back to Unix-stile (cygpath)
21158      input_path=`$CYGPATH -u "$shortmode_path"`
21159      new_path="$input_path"
21160    fi
21161  fi
21162
21163  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21164  if test "x$test_cygdrive_prefix" = x; then
21165    # As a simple fix, exclude /usr/bin since it's not a real path.
21166    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21167      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21168      # a path prefixed by /cygdrive for fixpath to work.
21169      new_path="$CYGWIN_ROOT_PATH$input_path"
21170    fi
21171  fi
21172
21173
21174  if test "x$path" != "x$new_path"; then
21175    BOOT_JDK="$new_path"
21176    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21177$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21178  fi
21179
21180  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21181
21182  path="$BOOT_JDK"
21183  has_colon=`$ECHO $path | $GREP ^.:`
21184  new_path="$path"
21185  if test "x$has_colon" = x; then
21186    # Not in mixed or Windows style, start by that.
21187    new_path=`cmd //c echo $path`
21188  fi
21189
21190
21191  input_path="$new_path"
21192  # Check if we need to convert this using DOS-style short mode. If the path
21193  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21194  # take no chances and rewrite it.
21195  # Note: m4 eats our [], so we need to use [ and ] instead.
21196  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21197  if test "x$has_forbidden_chars" != x; then
21198    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21199    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21200  fi
21201
21202
21203  windows_path="$new_path"
21204  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21205    unix_path=`$CYGPATH -u "$windows_path"`
21206    new_path="$unix_path"
21207  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21208    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21209    new_path="$unix_path"
21210  fi
21211
21212  if test "x$path" != "x$new_path"; then
21213    BOOT_JDK="$new_path"
21214    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21215$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21216  fi
21217
21218  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21219  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21220
21221  else
21222    # We're on a posix platform. Hooray! :)
21223    path="$BOOT_JDK"
21224    has_space=`$ECHO "$path" | $GREP " "`
21225    if test "x$has_space" != x; then
21226      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21227$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21228      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21229    fi
21230
21231    # Use eval to expand a potential ~
21232    eval path="$path"
21233    if test ! -f "$path" && test ! -d "$path"; then
21234      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21235    fi
21236
21237    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21238  fi
21239
21240              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21241$as_echo_n "checking for Boot JDK... " >&6; }
21242              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21243$as_echo "$BOOT_JDK" >&6; }
21244              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21245$as_echo_n "checking Boot JDK version... " >&6; }
21246              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21247              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21248$as_echo "$BOOT_JDK_VERSION" >&6; }
21249            fi # end check jdk version
21250          fi # end check rt.jar
21251        fi # end check javac
21252      fi # end check java
21253    fi # end check boot jdk found
21254  fi
21255
21256
21257  if test "x$BOOT_JDK_FOUND" = xno; then
21258    # Now execute the test
21259
21260  if test -x /usr/libexec/java_home; then
21261    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
21262    BOOT_JDK_FOUND=maybe
21263    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
21264$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
21265  fi
21266
21267
21268    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21269    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21270      # Do we have a bin/java?
21271      if test ! -x "$BOOT_JDK/bin/java"; then
21272        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21273$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21274        BOOT_JDK_FOUND=no
21275      else
21276        # Do we have a bin/javac?
21277        if test ! -x "$BOOT_JDK/bin/javac"; then
21278          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21279$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21280          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21281$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21282          BOOT_JDK_FOUND=no
21283        else
21284          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21285          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21286            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21287$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21288            BOOT_JDK_FOUND=no
21289          else
21290            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21291            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21292
21293            # Extra M4 quote needed to protect [] in grep expression.
21294            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21295            if test "x$FOUND_CORRECT_VERSION" = x; then
21296              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21297$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21298              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21299$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21300              BOOT_JDK_FOUND=no
21301            else
21302              # We're done! :-)
21303              BOOT_JDK_FOUND=yes
21304
21305  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21306
21307  # Input might be given as Windows format, start by converting to
21308  # unix format.
21309  path="$BOOT_JDK"
21310  new_path=`$CYGPATH -u "$path"`
21311
21312  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21313  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21314  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21315  # "foo.exe" is OK but "foo" is an error.
21316  #
21317  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21318  # It is also a way to make sure we got the proper file name for the real test later on.
21319  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21320  if test "x$test_shortpath" = x; then
21321    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21322$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21323    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21324  fi
21325
21326  # Call helper function which possibly converts this using DOS-style short mode.
21327  # If so, the updated path is stored in $new_path.
21328
21329  input_path="$new_path"
21330  # Check if we need to convert this using DOS-style short mode. If the path
21331  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21332  # take no chances and rewrite it.
21333  # Note: m4 eats our [], so we need to use [ and ] instead.
21334  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21335  if test "x$has_forbidden_chars" != x; then
21336    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21337    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21338    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21339    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21340      # Going to short mode and back again did indeed matter. Since short mode is
21341      # case insensitive, let's make it lowercase to improve readability.
21342      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21343      # Now convert it back to Unix-stile (cygpath)
21344      input_path=`$CYGPATH -u "$shortmode_path"`
21345      new_path="$input_path"
21346    fi
21347  fi
21348
21349  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21350  if test "x$test_cygdrive_prefix" = x; then
21351    # As a simple fix, exclude /usr/bin since it's not a real path.
21352    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21353      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21354      # a path prefixed by /cygdrive for fixpath to work.
21355      new_path="$CYGWIN_ROOT_PATH$input_path"
21356    fi
21357  fi
21358
21359
21360  if test "x$path" != "x$new_path"; then
21361    BOOT_JDK="$new_path"
21362    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21363$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21364  fi
21365
21366  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21367
21368  path="$BOOT_JDK"
21369  has_colon=`$ECHO $path | $GREP ^.:`
21370  new_path="$path"
21371  if test "x$has_colon" = x; then
21372    # Not in mixed or Windows style, start by that.
21373    new_path=`cmd //c echo $path`
21374  fi
21375
21376
21377  input_path="$new_path"
21378  # Check if we need to convert this using DOS-style short mode. If the path
21379  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21380  # take no chances and rewrite it.
21381  # Note: m4 eats our [], so we need to use [ and ] instead.
21382  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21383  if test "x$has_forbidden_chars" != x; then
21384    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21385    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21386  fi
21387
21388
21389  windows_path="$new_path"
21390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21391    unix_path=`$CYGPATH -u "$windows_path"`
21392    new_path="$unix_path"
21393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21394    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21395    new_path="$unix_path"
21396  fi
21397
21398  if test "x$path" != "x$new_path"; then
21399    BOOT_JDK="$new_path"
21400    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21401$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21402  fi
21403
21404  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21405  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21406
21407  else
21408    # We're on a posix platform. Hooray! :)
21409    path="$BOOT_JDK"
21410    has_space=`$ECHO "$path" | $GREP " "`
21411    if test "x$has_space" != x; then
21412      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21413$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21414      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21415    fi
21416
21417    # Use eval to expand a potential ~
21418    eval path="$path"
21419    if test ! -f "$path" && test ! -d "$path"; then
21420      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21421    fi
21422
21423    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21424  fi
21425
21426              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21427$as_echo_n "checking for Boot JDK... " >&6; }
21428              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21429$as_echo "$BOOT_JDK" >&6; }
21430              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21431$as_echo_n "checking Boot JDK version... " >&6; }
21432              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21433              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21434$as_echo "$BOOT_JDK_VERSION" >&6; }
21435            fi # end check jdk version
21436          fi # end check rt.jar
21437        fi # end check javac
21438      fi # end check java
21439    fi # end check boot jdk found
21440  fi
21441
21442  fi
21443
21444
21445    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21446    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21447      # Do we have a bin/java?
21448      if test ! -x "$BOOT_JDK/bin/java"; then
21449        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21450$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21451        BOOT_JDK_FOUND=no
21452      else
21453        # Do we have a bin/javac?
21454        if test ! -x "$BOOT_JDK/bin/javac"; then
21455          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21456$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21457          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21458$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21459          BOOT_JDK_FOUND=no
21460        else
21461          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21462          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21463            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21464$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21465            BOOT_JDK_FOUND=no
21466          else
21467            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21468            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21469
21470            # Extra M4 quote needed to protect [] in grep expression.
21471            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21472            if test "x$FOUND_CORRECT_VERSION" = x; then
21473              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21474$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21475              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21476$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21477              BOOT_JDK_FOUND=no
21478            else
21479              # We're done! :-)
21480              BOOT_JDK_FOUND=yes
21481
21482  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21483
21484  # Input might be given as Windows format, start by converting to
21485  # unix format.
21486  path="$BOOT_JDK"
21487  new_path=`$CYGPATH -u "$path"`
21488
21489  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21490  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21491  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21492  # "foo.exe" is OK but "foo" is an error.
21493  #
21494  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21495  # It is also a way to make sure we got the proper file name for the real test later on.
21496  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21497  if test "x$test_shortpath" = x; then
21498    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21499$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21500    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21501  fi
21502
21503  # Call helper function which possibly converts this using DOS-style short mode.
21504  # If so, the updated path is stored in $new_path.
21505
21506  input_path="$new_path"
21507  # Check if we need to convert this using DOS-style short mode. If the path
21508  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21509  # take no chances and rewrite it.
21510  # Note: m4 eats our [], so we need to use [ and ] instead.
21511  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21512  if test "x$has_forbidden_chars" != x; then
21513    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21514    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21515    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21516    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21517      # Going to short mode and back again did indeed matter. Since short mode is
21518      # case insensitive, let's make it lowercase to improve readability.
21519      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21520      # Now convert it back to Unix-stile (cygpath)
21521      input_path=`$CYGPATH -u "$shortmode_path"`
21522      new_path="$input_path"
21523    fi
21524  fi
21525
21526  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21527  if test "x$test_cygdrive_prefix" = x; then
21528    # As a simple fix, exclude /usr/bin since it's not a real path.
21529    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21530      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21531      # a path prefixed by /cygdrive for fixpath to work.
21532      new_path="$CYGWIN_ROOT_PATH$input_path"
21533    fi
21534  fi
21535
21536
21537  if test "x$path" != "x$new_path"; then
21538    BOOT_JDK="$new_path"
21539    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21540$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21541  fi
21542
21543  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21544
21545  path="$BOOT_JDK"
21546  has_colon=`$ECHO $path | $GREP ^.:`
21547  new_path="$path"
21548  if test "x$has_colon" = x; then
21549    # Not in mixed or Windows style, start by that.
21550    new_path=`cmd //c echo $path`
21551  fi
21552
21553
21554  input_path="$new_path"
21555  # Check if we need to convert this using DOS-style short mode. If the path
21556  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21557  # take no chances and rewrite it.
21558  # Note: m4 eats our [], so we need to use [ and ] instead.
21559  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21560  if test "x$has_forbidden_chars" != x; then
21561    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21562    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21563  fi
21564
21565
21566  windows_path="$new_path"
21567  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21568    unix_path=`$CYGPATH -u "$windows_path"`
21569    new_path="$unix_path"
21570  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21571    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21572    new_path="$unix_path"
21573  fi
21574
21575  if test "x$path" != "x$new_path"; then
21576    BOOT_JDK="$new_path"
21577    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21578$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21579  fi
21580
21581  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21582  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21583
21584  else
21585    # We're on a posix platform. Hooray! :)
21586    path="$BOOT_JDK"
21587    has_space=`$ECHO "$path" | $GREP " "`
21588    if test "x$has_space" != x; then
21589      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21590$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21591      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21592    fi
21593
21594    # Use eval to expand a potential ~
21595    eval path="$path"
21596    if test ! -f "$path" && test ! -d "$path"; then
21597      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21598    fi
21599
21600    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21601  fi
21602
21603              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21604$as_echo_n "checking for Boot JDK... " >&6; }
21605              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21606$as_echo "$BOOT_JDK" >&6; }
21607              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21608$as_echo_n "checking Boot JDK version... " >&6; }
21609              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21610              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21611$as_echo "$BOOT_JDK_VERSION" >&6; }
21612            fi # end check jdk version
21613          fi # end check rt.jar
21614        fi # end check javac
21615      fi # end check java
21616    fi # end check boot jdk found
21617  fi
21618
21619
21620  # Test: Is $JAVA_HOME set?
21621
21622  if test "x$BOOT_JDK_FOUND" = xno; then
21623    # Now execute the test
21624
21625  if test "x$JAVA_HOME" != x; then
21626    JAVA_HOME_PROCESSED="$JAVA_HOME"
21627
21628  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21629
21630  # Input might be given as Windows format, start by converting to
21631  # unix format.
21632  path="$JAVA_HOME_PROCESSED"
21633  new_path=`$CYGPATH -u "$path"`
21634
21635  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21636  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21637  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21638  # "foo.exe" is OK but "foo" is an error.
21639  #
21640  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21641  # It is also a way to make sure we got the proper file name for the real test later on.
21642  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21643  if test "x$test_shortpath" = x; then
21644    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21645$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21646    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
21647  fi
21648
21649  # Call helper function which possibly converts this using DOS-style short mode.
21650  # If so, the updated path is stored in $new_path.
21651
21652  input_path="$new_path"
21653  # Check if we need to convert this using DOS-style short mode. If the path
21654  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21655  # take no chances and rewrite it.
21656  # Note: m4 eats our [], so we need to use [ and ] instead.
21657  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21658  if test "x$has_forbidden_chars" != x; then
21659    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21660    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21661    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21662    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21663      # Going to short mode and back again did indeed matter. Since short mode is
21664      # case insensitive, let's make it lowercase to improve readability.
21665      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21666      # Now convert it back to Unix-stile (cygpath)
21667      input_path=`$CYGPATH -u "$shortmode_path"`
21668      new_path="$input_path"
21669    fi
21670  fi
21671
21672  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21673  if test "x$test_cygdrive_prefix" = x; then
21674    # As a simple fix, exclude /usr/bin since it's not a real path.
21675    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21676      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21677      # a path prefixed by /cygdrive for fixpath to work.
21678      new_path="$CYGWIN_ROOT_PATH$input_path"
21679    fi
21680  fi
21681
21682
21683  if test "x$path" != "x$new_path"; then
21684    JAVA_HOME_PROCESSED="$new_path"
21685    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21686$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21687  fi
21688
21689  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21690
21691  path="$JAVA_HOME_PROCESSED"
21692  has_colon=`$ECHO $path | $GREP ^.:`
21693  new_path="$path"
21694  if test "x$has_colon" = x; then
21695    # Not in mixed or Windows style, start by that.
21696    new_path=`cmd //c echo $path`
21697  fi
21698
21699
21700  input_path="$new_path"
21701  # Check if we need to convert this using DOS-style short mode. If the path
21702  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21703  # take no chances and rewrite it.
21704  # Note: m4 eats our [], so we need to use [ and ] instead.
21705  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21706  if test "x$has_forbidden_chars" != x; then
21707    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21708    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21709  fi
21710
21711
21712  windows_path="$new_path"
21713  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21714    unix_path=`$CYGPATH -u "$windows_path"`
21715    new_path="$unix_path"
21716  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21717    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21718    new_path="$unix_path"
21719  fi
21720
21721  if test "x$path" != "x$new_path"; then
21722    JAVA_HOME_PROCESSED="$new_path"
21723    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21724$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21725  fi
21726
21727  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21728  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21729
21730  else
21731    # We're on a posix platform. Hooray! :)
21732    path="$JAVA_HOME_PROCESSED"
21733    has_space=`$ECHO "$path" | $GREP " "`
21734    if test "x$has_space" != x; then
21735      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21736$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21737      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21738    fi
21739
21740    # Use eval to expand a potential ~
21741    eval path="$path"
21742    if test ! -f "$path" && test ! -d "$path"; then
21743      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
21744    fi
21745
21746    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
21747  fi
21748
21749    if test ! -d "$JAVA_HOME_PROCESSED"; then
21750      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
21751$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
21752    else
21753      # Aha, the user has set a JAVA_HOME
21754      # let us use that as the Boot JDK.
21755      BOOT_JDK="$JAVA_HOME_PROCESSED"
21756      BOOT_JDK_FOUND=maybe
21757      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
21758$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
21759    fi
21760  fi
21761
21762
21763    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21764    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21765      # Do we have a bin/java?
21766      if test ! -x "$BOOT_JDK/bin/java"; then
21767        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21768$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21769        BOOT_JDK_FOUND=no
21770      else
21771        # Do we have a bin/javac?
21772        if test ! -x "$BOOT_JDK/bin/javac"; then
21773          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21774$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21775          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21776$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21777          BOOT_JDK_FOUND=no
21778        else
21779          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21780          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21781            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21782$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21783            BOOT_JDK_FOUND=no
21784          else
21785            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21786            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21787
21788            # Extra M4 quote needed to protect [] in grep expression.
21789            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21790            if test "x$FOUND_CORRECT_VERSION" = x; then
21791              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21792$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21793              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21794$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21795              BOOT_JDK_FOUND=no
21796            else
21797              # We're done! :-)
21798              BOOT_JDK_FOUND=yes
21799
21800  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21801
21802  # Input might be given as Windows format, start by converting to
21803  # unix format.
21804  path="$BOOT_JDK"
21805  new_path=`$CYGPATH -u "$path"`
21806
21807  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21808  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21809  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21810  # "foo.exe" is OK but "foo" is an error.
21811  #
21812  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21813  # It is also a way to make sure we got the proper file name for the real test later on.
21814  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21815  if test "x$test_shortpath" = x; then
21816    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21817$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21818    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21819  fi
21820
21821  # Call helper function which possibly converts this using DOS-style short mode.
21822  # If so, the updated path is stored in $new_path.
21823
21824  input_path="$new_path"
21825  # Check if we need to convert this using DOS-style short mode. If the path
21826  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21827  # take no chances and rewrite it.
21828  # Note: m4 eats our [], so we need to use [ and ] instead.
21829  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21830  if test "x$has_forbidden_chars" != x; then
21831    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21832    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21833    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21834    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21835      # Going to short mode and back again did indeed matter. Since short mode is
21836      # case insensitive, let's make it lowercase to improve readability.
21837      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21838      # Now convert it back to Unix-stile (cygpath)
21839      input_path=`$CYGPATH -u "$shortmode_path"`
21840      new_path="$input_path"
21841    fi
21842  fi
21843
21844  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21845  if test "x$test_cygdrive_prefix" = x; then
21846    # As a simple fix, exclude /usr/bin since it's not a real path.
21847    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21848      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21849      # a path prefixed by /cygdrive for fixpath to work.
21850      new_path="$CYGWIN_ROOT_PATH$input_path"
21851    fi
21852  fi
21853
21854
21855  if test "x$path" != "x$new_path"; then
21856    BOOT_JDK="$new_path"
21857    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21858$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21859  fi
21860
21861  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21862
21863  path="$BOOT_JDK"
21864  has_colon=`$ECHO $path | $GREP ^.:`
21865  new_path="$path"
21866  if test "x$has_colon" = x; then
21867    # Not in mixed or Windows style, start by that.
21868    new_path=`cmd //c echo $path`
21869  fi
21870
21871
21872  input_path="$new_path"
21873  # Check if we need to convert this using DOS-style short mode. If the path
21874  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21875  # take no chances and rewrite it.
21876  # Note: m4 eats our [], so we need to use [ and ] instead.
21877  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21878  if test "x$has_forbidden_chars" != x; then
21879    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21880    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21881  fi
21882
21883
21884  windows_path="$new_path"
21885  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21886    unix_path=`$CYGPATH -u "$windows_path"`
21887    new_path="$unix_path"
21888  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21889    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21890    new_path="$unix_path"
21891  fi
21892
21893  if test "x$path" != "x$new_path"; then
21894    BOOT_JDK="$new_path"
21895    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21896$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21897  fi
21898
21899  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21900  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21901
21902  else
21903    # We're on a posix platform. Hooray! :)
21904    path="$BOOT_JDK"
21905    has_space=`$ECHO "$path" | $GREP " "`
21906    if test "x$has_space" != x; then
21907      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21908$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21909      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21910    fi
21911
21912    # Use eval to expand a potential ~
21913    eval path="$path"
21914    if test ! -f "$path" && test ! -d "$path"; then
21915      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21916    fi
21917
21918    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21919  fi
21920
21921              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21922$as_echo_n "checking for Boot JDK... " >&6; }
21923              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21924$as_echo "$BOOT_JDK" >&6; }
21925              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21926$as_echo_n "checking Boot JDK version... " >&6; }
21927              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21928              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21929$as_echo "$BOOT_JDK_VERSION" >&6; }
21930            fi # end check jdk version
21931          fi # end check rt.jar
21932        fi # end check javac
21933      fi # end check java
21934    fi # end check boot jdk found
21935  fi
21936
21937
21938  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
21939
21940  if test "x$BOOT_JDK_FOUND" = xno; then
21941    # Now execute the test
21942
21943  # Extract the first word of "javac", so it can be a program name with args.
21944set dummy javac; ac_word=$2
21945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21946$as_echo_n "checking for $ac_word... " >&6; }
21947if ${ac_cv_path_JAVAC_CHECK+:} false; then :
21948  $as_echo_n "(cached) " >&6
21949else
21950  case $JAVAC_CHECK in
21951  [\\/]* | ?:[\\/]*)
21952  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
21953  ;;
21954  *)
21955  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21956for as_dir in $PATH
21957do
21958  IFS=$as_save_IFS
21959  test -z "$as_dir" && as_dir=.
21960    for ac_exec_ext in '' $ac_executable_extensions; do
21961  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21962    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
21963    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21964    break 2
21965  fi
21966done
21967  done
21968IFS=$as_save_IFS
21969
21970  ;;
21971esac
21972fi
21973JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
21974if test -n "$JAVAC_CHECK"; then
21975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
21976$as_echo "$JAVAC_CHECK" >&6; }
21977else
21978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21979$as_echo "no" >&6; }
21980fi
21981
21982
21983  # Extract the first word of "java", so it can be a program name with args.
21984set dummy java; ac_word=$2
21985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21986$as_echo_n "checking for $ac_word... " >&6; }
21987if ${ac_cv_path_JAVA_CHECK+:} false; then :
21988  $as_echo_n "(cached) " >&6
21989else
21990  case $JAVA_CHECK in
21991  [\\/]* | ?:[\\/]*)
21992  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
21993  ;;
21994  *)
21995  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21996for as_dir in $PATH
21997do
21998  IFS=$as_save_IFS
21999  test -z "$as_dir" && as_dir=.
22000    for ac_exec_ext in '' $ac_executable_extensions; do
22001  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22002    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
22003    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22004    break 2
22005  fi
22006done
22007  done
22008IFS=$as_save_IFS
22009
22010  ;;
22011esac
22012fi
22013JAVA_CHECK=$ac_cv_path_JAVA_CHECK
22014if test -n "$JAVA_CHECK"; then
22015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
22016$as_echo "$JAVA_CHECK" >&6; }
22017else
22018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22019$as_echo "no" >&6; }
22020fi
22021
22022
22023  BINARY="$JAVAC_CHECK"
22024  if test "x$JAVAC_CHECK" = x; then
22025    BINARY="$JAVA_CHECK"
22026  fi
22027  if test "x$BINARY" != x; then
22028    # So there is a java(c) binary, it might be part of a JDK.
22029    # Lets find the JDK/JRE directory by following symbolic links.
22030    # Linux/GNU systems often have links from /usr/bin/java to
22031    # /etc/alternatives/java to the real JDK binary.
22032
22033  if test "x$OPENJDK_BUILD_OS" != xwindows; then
22034    # Follow a chain of symbolic links. Use readlink
22035    # where it exists, else fall back to horribly
22036    # complicated shell code.
22037    if test "x$READLINK_TESTED" != yes; then
22038      # On MacOSX there is a readlink tool with a different
22039      # purpose than the GNU readlink tool. Check the found readlink.
22040      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
22041      if test "x$ISGNU" = x; then
22042        # A readlink that we do not know how to use.
22043        # Are there other non-GNU readlinks out there?
22044        READLINK_TESTED=yes
22045        READLINK=
22046      fi
22047    fi
22048
22049    if test "x$READLINK" != x; then
22050      BINARY=`$READLINK -f $BINARY`
22051    else
22052      # Save the current directory for restoring afterwards
22053      STARTDIR=$PWD
22054      COUNTER=0
22055      sym_link_dir=`$DIRNAME $BINARY`
22056      sym_link_file=`$BASENAME $BINARY`
22057      cd $sym_link_dir
22058      # Use -P flag to resolve symlinks in directories.
22059      cd `$THEPWDCMD -P`
22060      sym_link_dir=`$THEPWDCMD -P`
22061      # Resolve file symlinks
22062      while test $COUNTER -lt 20; do
22063        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
22064        if test "x$ISLINK" == x; then
22065          # This is not a symbolic link! We are done!
22066          break
22067        fi
22068        # Again resolve directory symlinks since the target of the just found
22069        # link could be in a different directory
22070        cd `$DIRNAME $ISLINK`
22071        sym_link_dir=`$THEPWDCMD -P`
22072        sym_link_file=`$BASENAME $ISLINK`
22073        let COUNTER=COUNTER+1
22074      done
22075      cd $STARTDIR
22076      BINARY=$sym_link_dir/$sym_link_file
22077    fi
22078  fi
22079
22080    BOOT_JDK=`dirname "$BINARY"`
22081    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
22082    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
22083      # Looks like we found ourselves an JDK
22084      BOOT_JDK_FOUND=maybe
22085      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
22086$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
22087    fi
22088  fi
22089
22090
22091    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22092    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22093      # Do we have a bin/java?
22094      if test ! -x "$BOOT_JDK/bin/java"; then
22095        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22096$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22097        BOOT_JDK_FOUND=no
22098      else
22099        # Do we have a bin/javac?
22100        if test ! -x "$BOOT_JDK/bin/javac"; then
22101          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22102$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22103          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22104$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22105          BOOT_JDK_FOUND=no
22106        else
22107          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22108          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22109            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22110$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22111            BOOT_JDK_FOUND=no
22112          else
22113            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22114            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22115
22116            # Extra M4 quote needed to protect [] in grep expression.
22117            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22118            if test "x$FOUND_CORRECT_VERSION" = x; then
22119              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22120$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22121              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22122$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22123              BOOT_JDK_FOUND=no
22124            else
22125              # We're done! :-)
22126              BOOT_JDK_FOUND=yes
22127
22128  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22129
22130  # Input might be given as Windows format, start by converting to
22131  # unix format.
22132  path="$BOOT_JDK"
22133  new_path=`$CYGPATH -u "$path"`
22134
22135  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22136  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22137  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22138  # "foo.exe" is OK but "foo" is an error.
22139  #
22140  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22141  # It is also a way to make sure we got the proper file name for the real test later on.
22142  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22143  if test "x$test_shortpath" = x; then
22144    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22145$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22146    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22147  fi
22148
22149  # Call helper function which possibly converts this using DOS-style short mode.
22150  # If so, the updated path is stored in $new_path.
22151
22152  input_path="$new_path"
22153  # Check if we need to convert this using DOS-style short mode. If the path
22154  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22155  # take no chances and rewrite it.
22156  # Note: m4 eats our [], so we need to use [ and ] instead.
22157  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22158  if test "x$has_forbidden_chars" != x; then
22159    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22160    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22161    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22162    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22163      # Going to short mode and back again did indeed matter. Since short mode is
22164      # case insensitive, let's make it lowercase to improve readability.
22165      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22166      # Now convert it back to Unix-stile (cygpath)
22167      input_path=`$CYGPATH -u "$shortmode_path"`
22168      new_path="$input_path"
22169    fi
22170  fi
22171
22172  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22173  if test "x$test_cygdrive_prefix" = x; then
22174    # As a simple fix, exclude /usr/bin since it's not a real path.
22175    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22176      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22177      # a path prefixed by /cygdrive for fixpath to work.
22178      new_path="$CYGWIN_ROOT_PATH$input_path"
22179    fi
22180  fi
22181
22182
22183  if test "x$path" != "x$new_path"; then
22184    BOOT_JDK="$new_path"
22185    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22186$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22187  fi
22188
22189  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22190
22191  path="$BOOT_JDK"
22192  has_colon=`$ECHO $path | $GREP ^.:`
22193  new_path="$path"
22194  if test "x$has_colon" = x; then
22195    # Not in mixed or Windows style, start by that.
22196    new_path=`cmd //c echo $path`
22197  fi
22198
22199
22200  input_path="$new_path"
22201  # Check if we need to convert this using DOS-style short mode. If the path
22202  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22203  # take no chances and rewrite it.
22204  # Note: m4 eats our [], so we need to use [ and ] instead.
22205  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22206  if test "x$has_forbidden_chars" != x; then
22207    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22208    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22209  fi
22210
22211
22212  windows_path="$new_path"
22213  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22214    unix_path=`$CYGPATH -u "$windows_path"`
22215    new_path="$unix_path"
22216  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22217    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22218    new_path="$unix_path"
22219  fi
22220
22221  if test "x$path" != "x$new_path"; then
22222    BOOT_JDK="$new_path"
22223    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22224$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22225  fi
22226
22227  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22228  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22229
22230  else
22231    # We're on a posix platform. Hooray! :)
22232    path="$BOOT_JDK"
22233    has_space=`$ECHO "$path" | $GREP " "`
22234    if test "x$has_space" != x; then
22235      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22236$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22237      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22238    fi
22239
22240    # Use eval to expand a potential ~
22241    eval path="$path"
22242    if test ! -f "$path" && test ! -d "$path"; then
22243      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22244    fi
22245
22246    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22247  fi
22248
22249              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22250$as_echo_n "checking for Boot JDK... " >&6; }
22251              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22252$as_echo "$BOOT_JDK" >&6; }
22253              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22254$as_echo_n "checking Boot JDK version... " >&6; }
22255              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22256              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22257$as_echo "$BOOT_JDK_VERSION" >&6; }
22258            fi # end check jdk version
22259          fi # end check rt.jar
22260        fi # end check javac
22261      fi # end check java
22262    fi # end check boot jdk found
22263  fi
22264
22265
22266  # Test: Is there a JDK installed in default, well-known locations?
22267
22268  if test "x$BOOT_JDK_FOUND" = xno; then
22269    # Now execute the test
22270
22271  if test "x$OPENJDK_TARGET_OS" = xwindows; then
22272
22273  if test "x$BOOT_JDK_FOUND" = xno; then
22274    # Now execute the test
22275
22276  if test "x$ProgramW6432" != x; then
22277    VIRTUAL_DIR="$ProgramW6432/Java"
22278
22279  windows_path="$VIRTUAL_DIR"
22280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22281    unix_path=`$CYGPATH -u "$windows_path"`
22282    VIRTUAL_DIR="$unix_path"
22283  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22284    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22285    VIRTUAL_DIR="$unix_path"
22286  fi
22287
22288
22289  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22290  BOOT_JDK_SUFFIX=""
22291  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22292  if test "x$ALL_JDKS_FOUND" != x; then
22293    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22294
22295  if test "x$BOOT_JDK_FOUND" = xno; then
22296    # Now execute the test
22297
22298        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22299        if test -d "$BOOT_JDK"; then
22300          BOOT_JDK_FOUND=maybe
22301          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22302$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22303        fi
22304
22305
22306    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22307    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22308      # Do we have a bin/java?
22309      if test ! -x "$BOOT_JDK/bin/java"; then
22310        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22311$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22312        BOOT_JDK_FOUND=no
22313      else
22314        # Do we have a bin/javac?
22315        if test ! -x "$BOOT_JDK/bin/javac"; then
22316          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22317$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22318          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22319$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22320          BOOT_JDK_FOUND=no
22321        else
22322          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22323          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22324            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22325$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22326            BOOT_JDK_FOUND=no
22327          else
22328            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22329            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22330
22331            # Extra M4 quote needed to protect [] in grep expression.
22332            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22333            if test "x$FOUND_CORRECT_VERSION" = x; then
22334              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22335$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22336              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22337$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22338              BOOT_JDK_FOUND=no
22339            else
22340              # We're done! :-)
22341              BOOT_JDK_FOUND=yes
22342
22343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22344
22345  # Input might be given as Windows format, start by converting to
22346  # unix format.
22347  path="$BOOT_JDK"
22348  new_path=`$CYGPATH -u "$path"`
22349
22350  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22351  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22352  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22353  # "foo.exe" is OK but "foo" is an error.
22354  #
22355  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22356  # It is also a way to make sure we got the proper file name for the real test later on.
22357  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22358  if test "x$test_shortpath" = x; then
22359    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22360$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22361    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22362  fi
22363
22364  # Call helper function which possibly converts this using DOS-style short mode.
22365  # If so, the updated path is stored in $new_path.
22366
22367  input_path="$new_path"
22368  # Check if we need to convert this using DOS-style short mode. If the path
22369  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22370  # take no chances and rewrite it.
22371  # Note: m4 eats our [], so we need to use [ and ] instead.
22372  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22373  if test "x$has_forbidden_chars" != x; then
22374    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22375    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22376    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22377    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22378      # Going to short mode and back again did indeed matter. Since short mode is
22379      # case insensitive, let's make it lowercase to improve readability.
22380      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22381      # Now convert it back to Unix-stile (cygpath)
22382      input_path=`$CYGPATH -u "$shortmode_path"`
22383      new_path="$input_path"
22384    fi
22385  fi
22386
22387  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22388  if test "x$test_cygdrive_prefix" = x; then
22389    # As a simple fix, exclude /usr/bin since it's not a real path.
22390    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22391      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22392      # a path prefixed by /cygdrive for fixpath to work.
22393      new_path="$CYGWIN_ROOT_PATH$input_path"
22394    fi
22395  fi
22396
22397
22398  if test "x$path" != "x$new_path"; then
22399    BOOT_JDK="$new_path"
22400    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22401$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22402  fi
22403
22404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22405
22406  path="$BOOT_JDK"
22407  has_colon=`$ECHO $path | $GREP ^.:`
22408  new_path="$path"
22409  if test "x$has_colon" = x; then
22410    # Not in mixed or Windows style, start by that.
22411    new_path=`cmd //c echo $path`
22412  fi
22413
22414
22415  input_path="$new_path"
22416  # Check if we need to convert this using DOS-style short mode. If the path
22417  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22418  # take no chances and rewrite it.
22419  # Note: m4 eats our [], so we need to use [ and ] instead.
22420  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22421  if test "x$has_forbidden_chars" != x; then
22422    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22423    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22424  fi
22425
22426
22427  windows_path="$new_path"
22428  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22429    unix_path=`$CYGPATH -u "$windows_path"`
22430    new_path="$unix_path"
22431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22432    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22433    new_path="$unix_path"
22434  fi
22435
22436  if test "x$path" != "x$new_path"; then
22437    BOOT_JDK="$new_path"
22438    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22439$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22440  fi
22441
22442  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22443  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22444
22445  else
22446    # We're on a posix platform. Hooray! :)
22447    path="$BOOT_JDK"
22448    has_space=`$ECHO "$path" | $GREP " "`
22449    if test "x$has_space" != 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 $? "Spaces are not allowed in this path." "$LINENO" 5
22453    fi
22454
22455    # Use eval to expand a potential ~
22456    eval path="$path"
22457    if test ! -f "$path" && test ! -d "$path"; then
22458      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22459    fi
22460
22461    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22462  fi
22463
22464              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22465$as_echo_n "checking for Boot JDK... " >&6; }
22466              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22467$as_echo "$BOOT_JDK" >&6; }
22468              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22469$as_echo_n "checking Boot JDK version... " >&6; }
22470              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22471              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22472$as_echo "$BOOT_JDK_VERSION" >&6; }
22473            fi # end check jdk version
22474          fi # end check rt.jar
22475        fi # end check javac
22476      fi # end check java
22477    fi # end check boot jdk found
22478  fi
22479
22480    done
22481  fi
22482
22483  fi
22484
22485
22486    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22487    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22488      # Do we have a bin/java?
22489      if test ! -x "$BOOT_JDK/bin/java"; then
22490        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22491$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22492        BOOT_JDK_FOUND=no
22493      else
22494        # Do we have a bin/javac?
22495        if test ! -x "$BOOT_JDK/bin/javac"; then
22496          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22497$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22498          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22499$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22500          BOOT_JDK_FOUND=no
22501        else
22502          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22503          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22504            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22505$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22506            BOOT_JDK_FOUND=no
22507          else
22508            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22509            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22510
22511            # Extra M4 quote needed to protect [] in grep expression.
22512            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22513            if test "x$FOUND_CORRECT_VERSION" = x; then
22514              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22515$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22516              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22517$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22518              BOOT_JDK_FOUND=no
22519            else
22520              # We're done! :-)
22521              BOOT_JDK_FOUND=yes
22522
22523  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22524
22525  # Input might be given as Windows format, start by converting to
22526  # unix format.
22527  path="$BOOT_JDK"
22528  new_path=`$CYGPATH -u "$path"`
22529
22530  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22531  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22532  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22533  # "foo.exe" is OK but "foo" is an error.
22534  #
22535  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22536  # It is also a way to make sure we got the proper file name for the real test later on.
22537  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22538  if test "x$test_shortpath" = x; then
22539    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22540$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22541    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22542  fi
22543
22544  # Call helper function which possibly converts this using DOS-style short mode.
22545  # If so, the updated path is stored in $new_path.
22546
22547  input_path="$new_path"
22548  # Check if we need to convert this using DOS-style short mode. If the path
22549  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22550  # take no chances and rewrite it.
22551  # Note: m4 eats our [], so we need to use [ and ] instead.
22552  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22553  if test "x$has_forbidden_chars" != x; then
22554    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22555    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22556    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22557    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22558      # Going to short mode and back again did indeed matter. Since short mode is
22559      # case insensitive, let's make it lowercase to improve readability.
22560      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22561      # Now convert it back to Unix-stile (cygpath)
22562      input_path=`$CYGPATH -u "$shortmode_path"`
22563      new_path="$input_path"
22564    fi
22565  fi
22566
22567  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22568  if test "x$test_cygdrive_prefix" = x; then
22569    # As a simple fix, exclude /usr/bin since it's not a real path.
22570    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22571      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22572      # a path prefixed by /cygdrive for fixpath to work.
22573      new_path="$CYGWIN_ROOT_PATH$input_path"
22574    fi
22575  fi
22576
22577
22578  if test "x$path" != "x$new_path"; then
22579    BOOT_JDK="$new_path"
22580    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22581$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22582  fi
22583
22584  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22585
22586  path="$BOOT_JDK"
22587  has_colon=`$ECHO $path | $GREP ^.:`
22588  new_path="$path"
22589  if test "x$has_colon" = x; then
22590    # Not in mixed or Windows style, start by that.
22591    new_path=`cmd //c echo $path`
22592  fi
22593
22594
22595  input_path="$new_path"
22596  # Check if we need to convert this using DOS-style short mode. If the path
22597  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22598  # take no chances and rewrite it.
22599  # Note: m4 eats our [], so we need to use [ and ] instead.
22600  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22601  if test "x$has_forbidden_chars" != x; then
22602    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22603    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22604  fi
22605
22606
22607  windows_path="$new_path"
22608  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22609    unix_path=`$CYGPATH -u "$windows_path"`
22610    new_path="$unix_path"
22611  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22612    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22613    new_path="$unix_path"
22614  fi
22615
22616  if test "x$path" != "x$new_path"; then
22617    BOOT_JDK="$new_path"
22618    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22619$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22620  fi
22621
22622  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22623  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22624
22625  else
22626    # We're on a posix platform. Hooray! :)
22627    path="$BOOT_JDK"
22628    has_space=`$ECHO "$path" | $GREP " "`
22629    if test "x$has_space" != 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 $? "Spaces are not allowed in this path." "$LINENO" 5
22633    fi
22634
22635    # Use eval to expand a potential ~
22636    eval path="$path"
22637    if test ! -f "$path" && test ! -d "$path"; then
22638      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22639    fi
22640
22641    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22642  fi
22643
22644              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22645$as_echo_n "checking for Boot JDK... " >&6; }
22646              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22647$as_echo "$BOOT_JDK" >&6; }
22648              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22649$as_echo_n "checking Boot JDK version... " >&6; }
22650              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22651              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22652$as_echo "$BOOT_JDK_VERSION" >&6; }
22653            fi # end check jdk version
22654          fi # end check rt.jar
22655        fi # end check javac
22656      fi # end check java
22657    fi # end check boot jdk found
22658  fi
22659
22660
22661  if test "x$BOOT_JDK_FOUND" = xno; then
22662    # Now execute the test
22663
22664  if test "x$PROGRAMW6432" != x; then
22665    VIRTUAL_DIR="$PROGRAMW6432/Java"
22666
22667  windows_path="$VIRTUAL_DIR"
22668  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22669    unix_path=`$CYGPATH -u "$windows_path"`
22670    VIRTUAL_DIR="$unix_path"
22671  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22672    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22673    VIRTUAL_DIR="$unix_path"
22674  fi
22675
22676
22677  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22678  BOOT_JDK_SUFFIX=""
22679  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22680  if test "x$ALL_JDKS_FOUND" != x; then
22681    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22682
22683  if test "x$BOOT_JDK_FOUND" = xno; then
22684    # Now execute the test
22685
22686        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22687        if test -d "$BOOT_JDK"; then
22688          BOOT_JDK_FOUND=maybe
22689          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22690$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22691        fi
22692
22693
22694    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22695    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22696      # Do we have a bin/java?
22697      if test ! -x "$BOOT_JDK/bin/java"; then
22698        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22699$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22700        BOOT_JDK_FOUND=no
22701      else
22702        # Do we have a bin/javac?
22703        if test ! -x "$BOOT_JDK/bin/javac"; then
22704          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22705$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22706          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22707$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22708          BOOT_JDK_FOUND=no
22709        else
22710          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22711          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22712            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22713$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22714            BOOT_JDK_FOUND=no
22715          else
22716            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22717            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22718
22719            # Extra M4 quote needed to protect [] in grep expression.
22720            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22721            if test "x$FOUND_CORRECT_VERSION" = x; then
22722              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22723$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22724              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22725$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22726              BOOT_JDK_FOUND=no
22727            else
22728              # We're done! :-)
22729              BOOT_JDK_FOUND=yes
22730
22731  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22732
22733  # Input might be given as Windows format, start by converting to
22734  # unix format.
22735  path="$BOOT_JDK"
22736  new_path=`$CYGPATH -u "$path"`
22737
22738  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22739  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22740  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22741  # "foo.exe" is OK but "foo" is an error.
22742  #
22743  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22744  # It is also a way to make sure we got the proper file name for the real test later on.
22745  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22746  if test "x$test_shortpath" = x; then
22747    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22748$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22749    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22750  fi
22751
22752  # Call helper function which possibly converts this using DOS-style short mode.
22753  # If so, the updated path is stored in $new_path.
22754
22755  input_path="$new_path"
22756  # Check if we need to convert this using DOS-style short mode. If the path
22757  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22758  # take no chances and rewrite it.
22759  # Note: m4 eats our [], so we need to use [ and ] instead.
22760  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22761  if test "x$has_forbidden_chars" != x; then
22762    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22763    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22764    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22765    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22766      # Going to short mode and back again did indeed matter. Since short mode is
22767      # case insensitive, let's make it lowercase to improve readability.
22768      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22769      # Now convert it back to Unix-stile (cygpath)
22770      input_path=`$CYGPATH -u "$shortmode_path"`
22771      new_path="$input_path"
22772    fi
22773  fi
22774
22775  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22776  if test "x$test_cygdrive_prefix" = x; then
22777    # As a simple fix, exclude /usr/bin since it's not a real path.
22778    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22779      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22780      # a path prefixed by /cygdrive for fixpath to work.
22781      new_path="$CYGWIN_ROOT_PATH$input_path"
22782    fi
22783  fi
22784
22785
22786  if test "x$path" != "x$new_path"; then
22787    BOOT_JDK="$new_path"
22788    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22789$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22790  fi
22791
22792  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22793
22794  path="$BOOT_JDK"
22795  has_colon=`$ECHO $path | $GREP ^.:`
22796  new_path="$path"
22797  if test "x$has_colon" = x; then
22798    # Not in mixed or Windows style, start by that.
22799    new_path=`cmd //c echo $path`
22800  fi
22801
22802
22803  input_path="$new_path"
22804  # Check if we need to convert this using DOS-style short mode. If the path
22805  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22806  # take no chances and rewrite it.
22807  # Note: m4 eats our [], so we need to use [ and ] instead.
22808  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22809  if test "x$has_forbidden_chars" != x; then
22810    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22811    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22812  fi
22813
22814
22815  windows_path="$new_path"
22816  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22817    unix_path=`$CYGPATH -u "$windows_path"`
22818    new_path="$unix_path"
22819  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22820    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22821    new_path="$unix_path"
22822  fi
22823
22824  if test "x$path" != "x$new_path"; then
22825    BOOT_JDK="$new_path"
22826    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22827$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22828  fi
22829
22830  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22831  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22832
22833  else
22834    # We're on a posix platform. Hooray! :)
22835    path="$BOOT_JDK"
22836    has_space=`$ECHO "$path" | $GREP " "`
22837    if test "x$has_space" != 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 $? "Spaces are not allowed in this path." "$LINENO" 5
22841    fi
22842
22843    # Use eval to expand a potential ~
22844    eval path="$path"
22845    if test ! -f "$path" && test ! -d "$path"; then
22846      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22847    fi
22848
22849    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22850  fi
22851
22852              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22853$as_echo_n "checking for Boot JDK... " >&6; }
22854              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22855$as_echo "$BOOT_JDK" >&6; }
22856              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22857$as_echo_n "checking Boot JDK version... " >&6; }
22858              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22859              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22860$as_echo "$BOOT_JDK_VERSION" >&6; }
22861            fi # end check jdk version
22862          fi # end check rt.jar
22863        fi # end check javac
22864      fi # end check java
22865    fi # end check boot jdk found
22866  fi
22867
22868    done
22869  fi
22870
22871  fi
22872
22873
22874    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22875    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22876      # Do we have a bin/java?
22877      if test ! -x "$BOOT_JDK/bin/java"; then
22878        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22879$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22880        BOOT_JDK_FOUND=no
22881      else
22882        # Do we have a bin/javac?
22883        if test ! -x "$BOOT_JDK/bin/javac"; then
22884          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22885$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22886          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22887$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22888          BOOT_JDK_FOUND=no
22889        else
22890          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22891          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22892            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22893$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22894            BOOT_JDK_FOUND=no
22895          else
22896            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22897            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22898
22899            # Extra M4 quote needed to protect [] in grep expression.
22900            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22901            if test "x$FOUND_CORRECT_VERSION" = x; then
22902              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22903$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22904              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22905$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22906              BOOT_JDK_FOUND=no
22907            else
22908              # We're done! :-)
22909              BOOT_JDK_FOUND=yes
22910
22911  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22912
22913  # Input might be given as Windows format, start by converting to
22914  # unix format.
22915  path="$BOOT_JDK"
22916  new_path=`$CYGPATH -u "$path"`
22917
22918  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22919  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22920  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22921  # "foo.exe" is OK but "foo" is an error.
22922  #
22923  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22924  # It is also a way to make sure we got the proper file name for the real test later on.
22925  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22926  if test "x$test_shortpath" = x; then
22927    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22928$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22929    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22930  fi
22931
22932  # Call helper function which possibly converts this using DOS-style short mode.
22933  # If so, the updated path is stored in $new_path.
22934
22935  input_path="$new_path"
22936  # Check if we need to convert this using DOS-style short mode. If the path
22937  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22938  # take no chances and rewrite it.
22939  # Note: m4 eats our [], so we need to use [ and ] instead.
22940  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22941  if test "x$has_forbidden_chars" != x; then
22942    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22943    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22944    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22945    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22946      # Going to short mode and back again did indeed matter. Since short mode is
22947      # case insensitive, let's make it lowercase to improve readability.
22948      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22949      # Now convert it back to Unix-stile (cygpath)
22950      input_path=`$CYGPATH -u "$shortmode_path"`
22951      new_path="$input_path"
22952    fi
22953  fi
22954
22955  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22956  if test "x$test_cygdrive_prefix" = x; then
22957    # As a simple fix, exclude /usr/bin since it's not a real path.
22958    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22959      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22960      # a path prefixed by /cygdrive for fixpath to work.
22961      new_path="$CYGWIN_ROOT_PATH$input_path"
22962    fi
22963  fi
22964
22965
22966  if test "x$path" != "x$new_path"; then
22967    BOOT_JDK="$new_path"
22968    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22969$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22970  fi
22971
22972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22973
22974  path="$BOOT_JDK"
22975  has_colon=`$ECHO $path | $GREP ^.:`
22976  new_path="$path"
22977  if test "x$has_colon" = x; then
22978    # Not in mixed or Windows style, start by that.
22979    new_path=`cmd //c echo $path`
22980  fi
22981
22982
22983  input_path="$new_path"
22984  # Check if we need to convert this using DOS-style short mode. If the path
22985  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22986  # take no chances and rewrite it.
22987  # Note: m4 eats our [], so we need to use [ and ] instead.
22988  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22989  if test "x$has_forbidden_chars" != x; then
22990    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22991    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22992  fi
22993
22994
22995  windows_path="$new_path"
22996  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22997    unix_path=`$CYGPATH -u "$windows_path"`
22998    new_path="$unix_path"
22999  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23000    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23001    new_path="$unix_path"
23002  fi
23003
23004  if test "x$path" != "x$new_path"; then
23005    BOOT_JDK="$new_path"
23006    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23007$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23008  fi
23009
23010  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23011  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23012
23013  else
23014    # We're on a posix platform. Hooray! :)
23015    path="$BOOT_JDK"
23016    has_space=`$ECHO "$path" | $GREP " "`
23017    if test "x$has_space" != 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 $? "Spaces are not allowed in this path." "$LINENO" 5
23021    fi
23022
23023    # Use eval to expand a potential ~
23024    eval path="$path"
23025    if test ! -f "$path" && test ! -d "$path"; then
23026      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23027    fi
23028
23029    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23030  fi
23031
23032              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23033$as_echo_n "checking for Boot JDK... " >&6; }
23034              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23035$as_echo "$BOOT_JDK" >&6; }
23036              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23037$as_echo_n "checking Boot JDK version... " >&6; }
23038              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23039              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23040$as_echo "$BOOT_JDK_VERSION" >&6; }
23041            fi # end check jdk version
23042          fi # end check rt.jar
23043        fi # end check javac
23044      fi # end check java
23045    fi # end check boot jdk found
23046  fi
23047
23048
23049  if test "x$BOOT_JDK_FOUND" = xno; then
23050    # Now execute the test
23051
23052  if test "x$PROGRAMFILES" != x; then
23053    VIRTUAL_DIR="$PROGRAMFILES/Java"
23054
23055  windows_path="$VIRTUAL_DIR"
23056  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23057    unix_path=`$CYGPATH -u "$windows_path"`
23058    VIRTUAL_DIR="$unix_path"
23059  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23060    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23061    VIRTUAL_DIR="$unix_path"
23062  fi
23063
23064
23065  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23066  BOOT_JDK_SUFFIX=""
23067  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23068  if test "x$ALL_JDKS_FOUND" != x; then
23069    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23070
23071  if test "x$BOOT_JDK_FOUND" = xno; then
23072    # Now execute the test
23073
23074        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23075        if test -d "$BOOT_JDK"; then
23076          BOOT_JDK_FOUND=maybe
23077          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23078$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23079        fi
23080
23081
23082    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23083    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23084      # Do we have a bin/java?
23085      if test ! -x "$BOOT_JDK/bin/java"; then
23086        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23087$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23088        BOOT_JDK_FOUND=no
23089      else
23090        # Do we have a bin/javac?
23091        if test ! -x "$BOOT_JDK/bin/javac"; then
23092          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23093$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23094          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23095$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23096          BOOT_JDK_FOUND=no
23097        else
23098          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23099          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23100            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23101$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23102            BOOT_JDK_FOUND=no
23103          else
23104            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23105            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23106
23107            # Extra M4 quote needed to protect [] in grep expression.
23108            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23109            if test "x$FOUND_CORRECT_VERSION" = x; then
23110              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23111$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23112              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23113$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23114              BOOT_JDK_FOUND=no
23115            else
23116              # We're done! :-)
23117              BOOT_JDK_FOUND=yes
23118
23119  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23120
23121  # Input might be given as Windows format, start by converting to
23122  # unix format.
23123  path="$BOOT_JDK"
23124  new_path=`$CYGPATH -u "$path"`
23125
23126  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23127  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23128  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23129  # "foo.exe" is OK but "foo" is an error.
23130  #
23131  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23132  # It is also a way to make sure we got the proper file name for the real test later on.
23133  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23134  if test "x$test_shortpath" = x; then
23135    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23136$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23137    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23138  fi
23139
23140  # Call helper function which possibly converts this using DOS-style short mode.
23141  # If so, the updated path is stored in $new_path.
23142
23143  input_path="$new_path"
23144  # Check if we need to convert this using DOS-style short mode. If the path
23145  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23146  # take no chances and rewrite it.
23147  # Note: m4 eats our [], so we need to use [ and ] instead.
23148  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23149  if test "x$has_forbidden_chars" != x; then
23150    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23151    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23152    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23153    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23154      # Going to short mode and back again did indeed matter. Since short mode is
23155      # case insensitive, let's make it lowercase to improve readability.
23156      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23157      # Now convert it back to Unix-stile (cygpath)
23158      input_path=`$CYGPATH -u "$shortmode_path"`
23159      new_path="$input_path"
23160    fi
23161  fi
23162
23163  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23164  if test "x$test_cygdrive_prefix" = x; then
23165    # As a simple fix, exclude /usr/bin since it's not a real path.
23166    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23167      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23168      # a path prefixed by /cygdrive for fixpath to work.
23169      new_path="$CYGWIN_ROOT_PATH$input_path"
23170    fi
23171  fi
23172
23173
23174  if test "x$path" != "x$new_path"; then
23175    BOOT_JDK="$new_path"
23176    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23177$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23178  fi
23179
23180  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23181
23182  path="$BOOT_JDK"
23183  has_colon=`$ECHO $path | $GREP ^.:`
23184  new_path="$path"
23185  if test "x$has_colon" = x; then
23186    # Not in mixed or Windows style, start by that.
23187    new_path=`cmd //c echo $path`
23188  fi
23189
23190
23191  input_path="$new_path"
23192  # Check if we need to convert this using DOS-style short mode. If the path
23193  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23194  # take no chances and rewrite it.
23195  # Note: m4 eats our [], so we need to use [ and ] instead.
23196  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23197  if test "x$has_forbidden_chars" != x; then
23198    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23199    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23200  fi
23201
23202
23203  windows_path="$new_path"
23204  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23205    unix_path=`$CYGPATH -u "$windows_path"`
23206    new_path="$unix_path"
23207  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23208    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23209    new_path="$unix_path"
23210  fi
23211
23212  if test "x$path" != "x$new_path"; then
23213    BOOT_JDK="$new_path"
23214    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23215$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23216  fi
23217
23218  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23219  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23220
23221  else
23222    # We're on a posix platform. Hooray! :)
23223    path="$BOOT_JDK"
23224    has_space=`$ECHO "$path" | $GREP " "`
23225    if test "x$has_space" != 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 $? "Spaces are not allowed in this path." "$LINENO" 5
23229    fi
23230
23231    # Use eval to expand a potential ~
23232    eval path="$path"
23233    if test ! -f "$path" && test ! -d "$path"; then
23234      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23235    fi
23236
23237    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23238  fi
23239
23240              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23241$as_echo_n "checking for Boot JDK... " >&6; }
23242              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23243$as_echo "$BOOT_JDK" >&6; }
23244              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23245$as_echo_n "checking Boot JDK version... " >&6; }
23246              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23247              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23248$as_echo "$BOOT_JDK_VERSION" >&6; }
23249            fi # end check jdk version
23250          fi # end check rt.jar
23251        fi # end check javac
23252      fi # end check java
23253    fi # end check boot jdk found
23254  fi
23255
23256    done
23257  fi
23258
23259  fi
23260
23261
23262    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23263    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23264      # Do we have a bin/java?
23265      if test ! -x "$BOOT_JDK/bin/java"; then
23266        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23267$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23268        BOOT_JDK_FOUND=no
23269      else
23270        # Do we have a bin/javac?
23271        if test ! -x "$BOOT_JDK/bin/javac"; then
23272          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23273$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23274          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23275$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23276          BOOT_JDK_FOUND=no
23277        else
23278          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23279          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23280            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23281$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23282            BOOT_JDK_FOUND=no
23283          else
23284            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23285            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23286
23287            # Extra M4 quote needed to protect [] in grep expression.
23288            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23289            if test "x$FOUND_CORRECT_VERSION" = x; then
23290              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23291$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23292              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23293$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23294              BOOT_JDK_FOUND=no
23295            else
23296              # We're done! :-)
23297              BOOT_JDK_FOUND=yes
23298
23299  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23300
23301  # Input might be given as Windows format, start by converting to
23302  # unix format.
23303  path="$BOOT_JDK"
23304  new_path=`$CYGPATH -u "$path"`
23305
23306  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23307  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23308  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23309  # "foo.exe" is OK but "foo" is an error.
23310  #
23311  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23312  # It is also a way to make sure we got the proper file name for the real test later on.
23313  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23314  if test "x$test_shortpath" = x; then
23315    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23316$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23317    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23318  fi
23319
23320  # Call helper function which possibly converts this using DOS-style short mode.
23321  # If so, the updated path is stored in $new_path.
23322
23323  input_path="$new_path"
23324  # Check if we need to convert this using DOS-style short mode. If the path
23325  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23326  # take no chances and rewrite it.
23327  # Note: m4 eats our [], so we need to use [ and ] instead.
23328  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23329  if test "x$has_forbidden_chars" != x; then
23330    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23331    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23332    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23333    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23334      # Going to short mode and back again did indeed matter. Since short mode is
23335      # case insensitive, let's make it lowercase to improve readability.
23336      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23337      # Now convert it back to Unix-stile (cygpath)
23338      input_path=`$CYGPATH -u "$shortmode_path"`
23339      new_path="$input_path"
23340    fi
23341  fi
23342
23343  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23344  if test "x$test_cygdrive_prefix" = x; then
23345    # As a simple fix, exclude /usr/bin since it's not a real path.
23346    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23347      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23348      # a path prefixed by /cygdrive for fixpath to work.
23349      new_path="$CYGWIN_ROOT_PATH$input_path"
23350    fi
23351  fi
23352
23353
23354  if test "x$path" != "x$new_path"; then
23355    BOOT_JDK="$new_path"
23356    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23357$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23358  fi
23359
23360  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23361
23362  path="$BOOT_JDK"
23363  has_colon=`$ECHO $path | $GREP ^.:`
23364  new_path="$path"
23365  if test "x$has_colon" = x; then
23366    # Not in mixed or Windows style, start by that.
23367    new_path=`cmd //c echo $path`
23368  fi
23369
23370
23371  input_path="$new_path"
23372  # Check if we need to convert this using DOS-style short mode. If the path
23373  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23374  # take no chances and rewrite it.
23375  # Note: m4 eats our [], so we need to use [ and ] instead.
23376  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23377  if test "x$has_forbidden_chars" != x; then
23378    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23379    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23380  fi
23381
23382
23383  windows_path="$new_path"
23384  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23385    unix_path=`$CYGPATH -u "$windows_path"`
23386    new_path="$unix_path"
23387  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23388    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23389    new_path="$unix_path"
23390  fi
23391
23392  if test "x$path" != "x$new_path"; then
23393    BOOT_JDK="$new_path"
23394    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23395$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23396  fi
23397
23398  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23399  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23400
23401  else
23402    # We're on a posix platform. Hooray! :)
23403    path="$BOOT_JDK"
23404    has_space=`$ECHO "$path" | $GREP " "`
23405    if test "x$has_space" != 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 $? "Spaces are not allowed in this path." "$LINENO" 5
23409    fi
23410
23411    # Use eval to expand a potential ~
23412    eval path="$path"
23413    if test ! -f "$path" && test ! -d "$path"; then
23414      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23415    fi
23416
23417    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23418  fi
23419
23420              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23421$as_echo_n "checking for Boot JDK... " >&6; }
23422              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23423$as_echo "$BOOT_JDK" >&6; }
23424              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23425$as_echo_n "checking Boot JDK version... " >&6; }
23426              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23427              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23428$as_echo "$BOOT_JDK_VERSION" >&6; }
23429            fi # end check jdk version
23430          fi # end check rt.jar
23431        fi # end check javac
23432      fi # end check java
23433    fi # end check boot jdk found
23434  fi
23435
23436
23437  if test "x$BOOT_JDK_FOUND" = xno; then
23438    # Now execute the test
23439
23440  if test "x$ProgramFiles" != x; then
23441    VIRTUAL_DIR="$ProgramFiles/Java"
23442
23443  windows_path="$VIRTUAL_DIR"
23444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23445    unix_path=`$CYGPATH -u "$windows_path"`
23446    VIRTUAL_DIR="$unix_path"
23447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23448    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23449    VIRTUAL_DIR="$unix_path"
23450  fi
23451
23452
23453  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23454  BOOT_JDK_SUFFIX=""
23455  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23456  if test "x$ALL_JDKS_FOUND" != x; then
23457    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23458
23459  if test "x$BOOT_JDK_FOUND" = xno; then
23460    # Now execute the test
23461
23462        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23463        if test -d "$BOOT_JDK"; then
23464          BOOT_JDK_FOUND=maybe
23465          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23466$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23467        fi
23468
23469
23470    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23471    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23472      # Do we have a bin/java?
23473      if test ! -x "$BOOT_JDK/bin/java"; then
23474        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23475$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23476        BOOT_JDK_FOUND=no
23477      else
23478        # Do we have a bin/javac?
23479        if test ! -x "$BOOT_JDK/bin/javac"; then
23480          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23481$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23482          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23483$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23484          BOOT_JDK_FOUND=no
23485        else
23486          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23487          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23488            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23489$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23490            BOOT_JDK_FOUND=no
23491          else
23492            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23493            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23494
23495            # Extra M4 quote needed to protect [] in grep expression.
23496            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23497            if test "x$FOUND_CORRECT_VERSION" = x; then
23498              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23499$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23500              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23501$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23502              BOOT_JDK_FOUND=no
23503            else
23504              # We're done! :-)
23505              BOOT_JDK_FOUND=yes
23506
23507  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23508
23509  # Input might be given as Windows format, start by converting to
23510  # unix format.
23511  path="$BOOT_JDK"
23512  new_path=`$CYGPATH -u "$path"`
23513
23514  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23515  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23516  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23517  # "foo.exe" is OK but "foo" is an error.
23518  #
23519  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23520  # It is also a way to make sure we got the proper file name for the real test later on.
23521  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23522  if test "x$test_shortpath" = x; then
23523    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23524$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23525    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23526  fi
23527
23528  # Call helper function which possibly converts this using DOS-style short mode.
23529  # If so, the updated path is stored in $new_path.
23530
23531  input_path="$new_path"
23532  # Check if we need to convert this using DOS-style short mode. If the path
23533  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23534  # take no chances and rewrite it.
23535  # Note: m4 eats our [], so we need to use [ and ] instead.
23536  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23537  if test "x$has_forbidden_chars" != x; then
23538    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23539    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23540    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23541    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23542      # Going to short mode and back again did indeed matter. Since short mode is
23543      # case insensitive, let's make it lowercase to improve readability.
23544      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23545      # Now convert it back to Unix-stile (cygpath)
23546      input_path=`$CYGPATH -u "$shortmode_path"`
23547      new_path="$input_path"
23548    fi
23549  fi
23550
23551  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23552  if test "x$test_cygdrive_prefix" = x; then
23553    # As a simple fix, exclude /usr/bin since it's not a real path.
23554    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23555      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23556      # a path prefixed by /cygdrive for fixpath to work.
23557      new_path="$CYGWIN_ROOT_PATH$input_path"
23558    fi
23559  fi
23560
23561
23562  if test "x$path" != "x$new_path"; then
23563    BOOT_JDK="$new_path"
23564    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23565$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23566  fi
23567
23568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23569
23570  path="$BOOT_JDK"
23571  has_colon=`$ECHO $path | $GREP ^.:`
23572  new_path="$path"
23573  if test "x$has_colon" = x; then
23574    # Not in mixed or Windows style, start by that.
23575    new_path=`cmd //c echo $path`
23576  fi
23577
23578
23579  input_path="$new_path"
23580  # Check if we need to convert this using DOS-style short mode. If the path
23581  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23582  # take no chances and rewrite it.
23583  # Note: m4 eats our [], so we need to use [ and ] instead.
23584  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23585  if test "x$has_forbidden_chars" != x; then
23586    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23587    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23588  fi
23589
23590
23591  windows_path="$new_path"
23592  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23593    unix_path=`$CYGPATH -u "$windows_path"`
23594    new_path="$unix_path"
23595  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23596    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23597    new_path="$unix_path"
23598  fi
23599
23600  if test "x$path" != "x$new_path"; then
23601    BOOT_JDK="$new_path"
23602    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23603$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23604  fi
23605
23606  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23607  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23608
23609  else
23610    # We're on a posix platform. Hooray! :)
23611    path="$BOOT_JDK"
23612    has_space=`$ECHO "$path" | $GREP " "`
23613    if test "x$has_space" != x; then
23614      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23615$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23616      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23617    fi
23618
23619    # Use eval to expand a potential ~
23620    eval path="$path"
23621    if test ! -f "$path" && test ! -d "$path"; then
23622      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23623    fi
23624
23625    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23626  fi
23627
23628              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23629$as_echo_n "checking for Boot JDK... " >&6; }
23630              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23631$as_echo "$BOOT_JDK" >&6; }
23632              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23633$as_echo_n "checking Boot JDK version... " >&6; }
23634              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23635              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23636$as_echo "$BOOT_JDK_VERSION" >&6; }
23637            fi # end check jdk version
23638          fi # end check rt.jar
23639        fi # end check javac
23640      fi # end check java
23641    fi # end check boot jdk found
23642  fi
23643
23644    done
23645  fi
23646
23647  fi
23648
23649
23650    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23651    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23652      # Do we have a bin/java?
23653      if test ! -x "$BOOT_JDK/bin/java"; then
23654        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23655$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23656        BOOT_JDK_FOUND=no
23657      else
23658        # Do we have a bin/javac?
23659        if test ! -x "$BOOT_JDK/bin/javac"; then
23660          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23661$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23662          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23663$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23664          BOOT_JDK_FOUND=no
23665        else
23666          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23667          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23668            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23669$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23670            BOOT_JDK_FOUND=no
23671          else
23672            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23673            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23674
23675            # Extra M4 quote needed to protect [] in grep expression.
23676            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23677            if test "x$FOUND_CORRECT_VERSION" = x; then
23678              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23679$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23680              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23681$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23682              BOOT_JDK_FOUND=no
23683            else
23684              # We're done! :-)
23685              BOOT_JDK_FOUND=yes
23686
23687  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23688
23689  # Input might be given as Windows format, start by converting to
23690  # unix format.
23691  path="$BOOT_JDK"
23692  new_path=`$CYGPATH -u "$path"`
23693
23694  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23695  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23696  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23697  # "foo.exe" is OK but "foo" is an error.
23698  #
23699  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23700  # It is also a way to make sure we got the proper file name for the real test later on.
23701  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23702  if test "x$test_shortpath" = x; then
23703    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23704$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23705    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23706  fi
23707
23708  # Call helper function which possibly converts this using DOS-style short mode.
23709  # If so, the updated path is stored in $new_path.
23710
23711  input_path="$new_path"
23712  # Check if we need to convert this using DOS-style short mode. If the path
23713  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23714  # take no chances and rewrite it.
23715  # Note: m4 eats our [], so we need to use [ and ] instead.
23716  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23717  if test "x$has_forbidden_chars" != x; then
23718    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23719    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23720    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23721    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23722      # Going to short mode and back again did indeed matter. Since short mode is
23723      # case insensitive, let's make it lowercase to improve readability.
23724      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23725      # Now convert it back to Unix-stile (cygpath)
23726      input_path=`$CYGPATH -u "$shortmode_path"`
23727      new_path="$input_path"
23728    fi
23729  fi
23730
23731  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23732  if test "x$test_cygdrive_prefix" = x; then
23733    # As a simple fix, exclude /usr/bin since it's not a real path.
23734    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23735      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23736      # a path prefixed by /cygdrive for fixpath to work.
23737      new_path="$CYGWIN_ROOT_PATH$input_path"
23738    fi
23739  fi
23740
23741
23742  if test "x$path" != "x$new_path"; then
23743    BOOT_JDK="$new_path"
23744    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23745$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23746  fi
23747
23748  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23749
23750  path="$BOOT_JDK"
23751  has_colon=`$ECHO $path | $GREP ^.:`
23752  new_path="$path"
23753  if test "x$has_colon" = x; then
23754    # Not in mixed or Windows style, start by that.
23755    new_path=`cmd //c echo $path`
23756  fi
23757
23758
23759  input_path="$new_path"
23760  # Check if we need to convert this using DOS-style short mode. If the path
23761  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23762  # take no chances and rewrite it.
23763  # Note: m4 eats our [], so we need to use [ and ] instead.
23764  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23765  if test "x$has_forbidden_chars" != x; then
23766    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23767    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23768  fi
23769
23770
23771  windows_path="$new_path"
23772  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23773    unix_path=`$CYGPATH -u "$windows_path"`
23774    new_path="$unix_path"
23775  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23776    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23777    new_path="$unix_path"
23778  fi
23779
23780  if test "x$path" != "x$new_path"; then
23781    BOOT_JDK="$new_path"
23782    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23783$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23784  fi
23785
23786  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23787  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23788
23789  else
23790    # We're on a posix platform. Hooray! :)
23791    path="$BOOT_JDK"
23792    has_space=`$ECHO "$path" | $GREP " "`
23793    if test "x$has_space" != x; then
23794      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23795$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23796      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23797    fi
23798
23799    # Use eval to expand a potential ~
23800    eval path="$path"
23801    if test ! -f "$path" && test ! -d "$path"; then
23802      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23803    fi
23804
23805    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23806  fi
23807
23808              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23809$as_echo_n "checking for Boot JDK... " >&6; }
23810              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23811$as_echo "$BOOT_JDK" >&6; }
23812              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23813$as_echo_n "checking Boot JDK version... " >&6; }
23814              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23815              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23816$as_echo "$BOOT_JDK_VERSION" >&6; }
23817            fi # end check jdk version
23818          fi # end check rt.jar
23819        fi # end check javac
23820      fi # end check java
23821    fi # end check boot jdk found
23822  fi
23823
23824
23825  if test "x$BOOT_JDK_FOUND" = xno; then
23826    # Now execute the test
23827
23828  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
23829  BOOT_JDK_SUFFIX=""
23830  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23831  if test "x$ALL_JDKS_FOUND" != x; then
23832    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23833
23834  if test "x$BOOT_JDK_FOUND" = xno; then
23835    # Now execute the test
23836
23837        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23838        if test -d "$BOOT_JDK"; then
23839          BOOT_JDK_FOUND=maybe
23840          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23841$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23842        fi
23843
23844
23845    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23846    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23847      # Do we have a bin/java?
23848      if test ! -x "$BOOT_JDK/bin/java"; then
23849        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23850$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23851        BOOT_JDK_FOUND=no
23852      else
23853        # Do we have a bin/javac?
23854        if test ! -x "$BOOT_JDK/bin/javac"; then
23855          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23856$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23857          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23858$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23859          BOOT_JDK_FOUND=no
23860        else
23861          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23862          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23863            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23864$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23865            BOOT_JDK_FOUND=no
23866          else
23867            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23868            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23869
23870            # Extra M4 quote needed to protect [] in grep expression.
23871            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23872            if test "x$FOUND_CORRECT_VERSION" = x; then
23873              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23874$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23875              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23876$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23877              BOOT_JDK_FOUND=no
23878            else
23879              # We're done! :-)
23880              BOOT_JDK_FOUND=yes
23881
23882  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23883
23884  # Input might be given as Windows format, start by converting to
23885  # unix format.
23886  path="$BOOT_JDK"
23887  new_path=`$CYGPATH -u "$path"`
23888
23889  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23890  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23891  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23892  # "foo.exe" is OK but "foo" is an error.
23893  #
23894  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23895  # It is also a way to make sure we got the proper file name for the real test later on.
23896  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23897  if test "x$test_shortpath" = x; then
23898    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23899$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23900    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23901  fi
23902
23903  # Call helper function which possibly converts this using DOS-style short mode.
23904  # If so, the updated path is stored in $new_path.
23905
23906  input_path="$new_path"
23907  # Check if we need to convert this using DOS-style short mode. If the path
23908  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23909  # take no chances and rewrite it.
23910  # Note: m4 eats our [], so we need to use [ and ] instead.
23911  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23912  if test "x$has_forbidden_chars" != x; then
23913    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23914    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23915    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23916    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23917      # Going to short mode and back again did indeed matter. Since short mode is
23918      # case insensitive, let's make it lowercase to improve readability.
23919      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23920      # Now convert it back to Unix-stile (cygpath)
23921      input_path=`$CYGPATH -u "$shortmode_path"`
23922      new_path="$input_path"
23923    fi
23924  fi
23925
23926  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23927  if test "x$test_cygdrive_prefix" = x; then
23928    # As a simple fix, exclude /usr/bin since it's not a real path.
23929    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23930      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23931      # a path prefixed by /cygdrive for fixpath to work.
23932      new_path="$CYGWIN_ROOT_PATH$input_path"
23933    fi
23934  fi
23935
23936
23937  if test "x$path" != "x$new_path"; then
23938    BOOT_JDK="$new_path"
23939    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23940$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23941  fi
23942
23943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23944
23945  path="$BOOT_JDK"
23946  has_colon=`$ECHO $path | $GREP ^.:`
23947  new_path="$path"
23948  if test "x$has_colon" = x; then
23949    # Not in mixed or Windows style, start by that.
23950    new_path=`cmd //c echo $path`
23951  fi
23952
23953
23954  input_path="$new_path"
23955  # Check if we need to convert this using DOS-style short mode. If the path
23956  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23957  # take no chances and rewrite it.
23958  # Note: m4 eats our [], so we need to use [ and ] instead.
23959  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23960  if test "x$has_forbidden_chars" != x; then
23961    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23962    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23963  fi
23964
23965
23966  windows_path="$new_path"
23967  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23968    unix_path=`$CYGPATH -u "$windows_path"`
23969    new_path="$unix_path"
23970  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23971    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23972    new_path="$unix_path"
23973  fi
23974
23975  if test "x$path" != "x$new_path"; then
23976    BOOT_JDK="$new_path"
23977    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23978$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23979  fi
23980
23981  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23982  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23983
23984  else
23985    # We're on a posix platform. Hooray! :)
23986    path="$BOOT_JDK"
23987    has_space=`$ECHO "$path" | $GREP " "`
23988    if test "x$has_space" != x; then
23989      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23990$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23991      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23992    fi
23993
23994    # Use eval to expand a potential ~
23995    eval path="$path"
23996    if test ! -f "$path" && test ! -d "$path"; then
23997      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23998    fi
23999
24000    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24001  fi
24002
24003              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24004$as_echo_n "checking for Boot JDK... " >&6; }
24005              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24006$as_echo "$BOOT_JDK" >&6; }
24007              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24008$as_echo_n "checking Boot JDK version... " >&6; }
24009              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24010              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24011$as_echo "$BOOT_JDK_VERSION" >&6; }
24012            fi # end check jdk version
24013          fi # end check rt.jar
24014        fi # end check javac
24015      fi # end check java
24016    fi # end check boot jdk found
24017  fi
24018
24019    done
24020  fi
24021
24022
24023    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24024    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24025      # Do we have a bin/java?
24026      if test ! -x "$BOOT_JDK/bin/java"; then
24027        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24028$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24029        BOOT_JDK_FOUND=no
24030      else
24031        # Do we have a bin/javac?
24032        if test ! -x "$BOOT_JDK/bin/javac"; then
24033          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24034$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24035          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24036$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24037          BOOT_JDK_FOUND=no
24038        else
24039          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24040          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24041            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24042$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24043            BOOT_JDK_FOUND=no
24044          else
24045            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24046            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24047
24048            # Extra M4 quote needed to protect [] in grep expression.
24049            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24050            if test "x$FOUND_CORRECT_VERSION" = x; then
24051              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24052$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24053              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24054$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24055              BOOT_JDK_FOUND=no
24056            else
24057              # We're done! :-)
24058              BOOT_JDK_FOUND=yes
24059
24060  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24061
24062  # Input might be given as Windows format, start by converting to
24063  # unix format.
24064  path="$BOOT_JDK"
24065  new_path=`$CYGPATH -u "$path"`
24066
24067  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24068  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24069  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24070  # "foo.exe" is OK but "foo" is an error.
24071  #
24072  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24073  # It is also a way to make sure we got the proper file name for the real test later on.
24074  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24075  if test "x$test_shortpath" = x; then
24076    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24077$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24078    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24079  fi
24080
24081  # Call helper function which possibly converts this using DOS-style short mode.
24082  # If so, the updated path is stored in $new_path.
24083
24084  input_path="$new_path"
24085  # Check if we need to convert this using DOS-style short mode. If the path
24086  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24087  # take no chances and rewrite it.
24088  # Note: m4 eats our [], so we need to use [ and ] instead.
24089  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24090  if test "x$has_forbidden_chars" != x; then
24091    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24092    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24093    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24094    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24095      # Going to short mode and back again did indeed matter. Since short mode is
24096      # case insensitive, let's make it lowercase to improve readability.
24097      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24098      # Now convert it back to Unix-stile (cygpath)
24099      input_path=`$CYGPATH -u "$shortmode_path"`
24100      new_path="$input_path"
24101    fi
24102  fi
24103
24104  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24105  if test "x$test_cygdrive_prefix" = x; then
24106    # As a simple fix, exclude /usr/bin since it's not a real path.
24107    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24108      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24109      # a path prefixed by /cygdrive for fixpath to work.
24110      new_path="$CYGWIN_ROOT_PATH$input_path"
24111    fi
24112  fi
24113
24114
24115  if test "x$path" != "x$new_path"; then
24116    BOOT_JDK="$new_path"
24117    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24118$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24119  fi
24120
24121  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24122
24123  path="$BOOT_JDK"
24124  has_colon=`$ECHO $path | $GREP ^.:`
24125  new_path="$path"
24126  if test "x$has_colon" = x; then
24127    # Not in mixed or Windows style, start by that.
24128    new_path=`cmd //c echo $path`
24129  fi
24130
24131
24132  input_path="$new_path"
24133  # Check if we need to convert this using DOS-style short mode. If the path
24134  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24135  # take no chances and rewrite it.
24136  # Note: m4 eats our [], so we need to use [ and ] instead.
24137  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24138  if test "x$has_forbidden_chars" != x; then
24139    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24140    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24141  fi
24142
24143
24144  windows_path="$new_path"
24145  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24146    unix_path=`$CYGPATH -u "$windows_path"`
24147    new_path="$unix_path"
24148  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24149    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24150    new_path="$unix_path"
24151  fi
24152
24153  if test "x$path" != "x$new_path"; then
24154    BOOT_JDK="$new_path"
24155    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24156$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24157  fi
24158
24159  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24160  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24161
24162  else
24163    # We're on a posix platform. Hooray! :)
24164    path="$BOOT_JDK"
24165    has_space=`$ECHO "$path" | $GREP " "`
24166    if test "x$has_space" != x; then
24167      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24168$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24169      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24170    fi
24171
24172    # Use eval to expand a potential ~
24173    eval path="$path"
24174    if test ! -f "$path" && test ! -d "$path"; then
24175      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24176    fi
24177
24178    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24179  fi
24180
24181              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24182$as_echo_n "checking for Boot JDK... " >&6; }
24183              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24184$as_echo "$BOOT_JDK" >&6; }
24185              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24186$as_echo_n "checking Boot JDK version... " >&6; }
24187              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24188              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24189$as_echo "$BOOT_JDK_VERSION" >&6; }
24190            fi # end check jdk version
24191          fi # end check rt.jar
24192        fi # end check javac
24193      fi # end check java
24194    fi # end check boot jdk found
24195  fi
24196
24197  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
24198
24199  if test "x$BOOT_JDK_FOUND" = xno; then
24200    # Now execute the test
24201
24202  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
24203  BOOT_JDK_SUFFIX="/Contents/Home"
24204  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24205  if test "x$ALL_JDKS_FOUND" != x; then
24206    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24207
24208  if test "x$BOOT_JDK_FOUND" = xno; then
24209    # Now execute the test
24210
24211        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24212        if test -d "$BOOT_JDK"; then
24213          BOOT_JDK_FOUND=maybe
24214          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24215$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24216        fi
24217
24218
24219    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24220    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24221      # Do we have a bin/java?
24222      if test ! -x "$BOOT_JDK/bin/java"; then
24223        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24224$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24225        BOOT_JDK_FOUND=no
24226      else
24227        # Do we have a bin/javac?
24228        if test ! -x "$BOOT_JDK/bin/javac"; then
24229          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24230$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24231          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24232$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24233          BOOT_JDK_FOUND=no
24234        else
24235          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24236          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24237            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24238$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24239            BOOT_JDK_FOUND=no
24240          else
24241            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24242            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24243
24244            # Extra M4 quote needed to protect [] in grep expression.
24245            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24246            if test "x$FOUND_CORRECT_VERSION" = x; then
24247              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24248$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24249              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24250$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24251              BOOT_JDK_FOUND=no
24252            else
24253              # We're done! :-)
24254              BOOT_JDK_FOUND=yes
24255
24256  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24257
24258  # Input might be given as Windows format, start by converting to
24259  # unix format.
24260  path="$BOOT_JDK"
24261  new_path=`$CYGPATH -u "$path"`
24262
24263  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24264  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24265  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24266  # "foo.exe" is OK but "foo" is an error.
24267  #
24268  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24269  # It is also a way to make sure we got the proper file name for the real test later on.
24270  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24271  if test "x$test_shortpath" = x; then
24272    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24273$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24274    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24275  fi
24276
24277  # Call helper function which possibly converts this using DOS-style short mode.
24278  # If so, the updated path is stored in $new_path.
24279
24280  input_path="$new_path"
24281  # Check if we need to convert this using DOS-style short mode. If the path
24282  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24283  # take no chances and rewrite it.
24284  # Note: m4 eats our [], so we need to use [ and ] instead.
24285  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24286  if test "x$has_forbidden_chars" != x; then
24287    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24288    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24289    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24290    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24291      # Going to short mode and back again did indeed matter. Since short mode is
24292      # case insensitive, let's make it lowercase to improve readability.
24293      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24294      # Now convert it back to Unix-stile (cygpath)
24295      input_path=`$CYGPATH -u "$shortmode_path"`
24296      new_path="$input_path"
24297    fi
24298  fi
24299
24300  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24301  if test "x$test_cygdrive_prefix" = x; then
24302    # As a simple fix, exclude /usr/bin since it's not a real path.
24303    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24304      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24305      # a path prefixed by /cygdrive for fixpath to work.
24306      new_path="$CYGWIN_ROOT_PATH$input_path"
24307    fi
24308  fi
24309
24310
24311  if test "x$path" != "x$new_path"; then
24312    BOOT_JDK="$new_path"
24313    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24314$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24315  fi
24316
24317  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24318
24319  path="$BOOT_JDK"
24320  has_colon=`$ECHO $path | $GREP ^.:`
24321  new_path="$path"
24322  if test "x$has_colon" = x; then
24323    # Not in mixed or Windows style, start by that.
24324    new_path=`cmd //c echo $path`
24325  fi
24326
24327
24328  input_path="$new_path"
24329  # Check if we need to convert this using DOS-style short mode. If the path
24330  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24331  # take no chances and rewrite it.
24332  # Note: m4 eats our [], so we need to use [ and ] instead.
24333  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24334  if test "x$has_forbidden_chars" != x; then
24335    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24336    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24337  fi
24338
24339
24340  windows_path="$new_path"
24341  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24342    unix_path=`$CYGPATH -u "$windows_path"`
24343    new_path="$unix_path"
24344  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24345    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24346    new_path="$unix_path"
24347  fi
24348
24349  if test "x$path" != "x$new_path"; then
24350    BOOT_JDK="$new_path"
24351    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24352$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24353  fi
24354
24355  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24356  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24357
24358  else
24359    # We're on a posix platform. Hooray! :)
24360    path="$BOOT_JDK"
24361    has_space=`$ECHO "$path" | $GREP " "`
24362    if test "x$has_space" != x; then
24363      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24364$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24365      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24366    fi
24367
24368    # Use eval to expand a potential ~
24369    eval path="$path"
24370    if test ! -f "$path" && test ! -d "$path"; then
24371      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24372    fi
24373
24374    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24375  fi
24376
24377              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24378$as_echo_n "checking for Boot JDK... " >&6; }
24379              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24380$as_echo "$BOOT_JDK" >&6; }
24381              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24382$as_echo_n "checking Boot JDK version... " >&6; }
24383              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24384              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24385$as_echo "$BOOT_JDK_VERSION" >&6; }
24386            fi # end check jdk version
24387          fi # end check rt.jar
24388        fi # end check javac
24389      fi # end check java
24390    fi # end check boot jdk found
24391  fi
24392
24393    done
24394  fi
24395
24396
24397    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24398    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24399      # Do we have a bin/java?
24400      if test ! -x "$BOOT_JDK/bin/java"; then
24401        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24402$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24403        BOOT_JDK_FOUND=no
24404      else
24405        # Do we have a bin/javac?
24406        if test ! -x "$BOOT_JDK/bin/javac"; then
24407          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24408$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24409          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24410$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24411          BOOT_JDK_FOUND=no
24412        else
24413          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24414          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24415            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24416$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24417            BOOT_JDK_FOUND=no
24418          else
24419            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24420            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24421
24422            # Extra M4 quote needed to protect [] in grep expression.
24423            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24424            if test "x$FOUND_CORRECT_VERSION" = x; then
24425              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24426$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24427              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24428$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24429              BOOT_JDK_FOUND=no
24430            else
24431              # We're done! :-)
24432              BOOT_JDK_FOUND=yes
24433
24434  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24435
24436  # Input might be given as Windows format, start by converting to
24437  # unix format.
24438  path="$BOOT_JDK"
24439  new_path=`$CYGPATH -u "$path"`
24440
24441  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24442  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24443  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24444  # "foo.exe" is OK but "foo" is an error.
24445  #
24446  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24447  # It is also a way to make sure we got the proper file name for the real test later on.
24448  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24449  if test "x$test_shortpath" = x; then
24450    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24451$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24452    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24453  fi
24454
24455  # Call helper function which possibly converts this using DOS-style short mode.
24456  # If so, the updated path is stored in $new_path.
24457
24458  input_path="$new_path"
24459  # Check if we need to convert this using DOS-style short mode. If the path
24460  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24461  # take no chances and rewrite it.
24462  # Note: m4 eats our [], so we need to use [ and ] instead.
24463  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24464  if test "x$has_forbidden_chars" != x; then
24465    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24466    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24467    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24468    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24469      # Going to short mode and back again did indeed matter. Since short mode is
24470      # case insensitive, let's make it lowercase to improve readability.
24471      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24472      # Now convert it back to Unix-stile (cygpath)
24473      input_path=`$CYGPATH -u "$shortmode_path"`
24474      new_path="$input_path"
24475    fi
24476  fi
24477
24478  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24479  if test "x$test_cygdrive_prefix" = x; then
24480    # As a simple fix, exclude /usr/bin since it's not a real path.
24481    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24482      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24483      # a path prefixed by /cygdrive for fixpath to work.
24484      new_path="$CYGWIN_ROOT_PATH$input_path"
24485    fi
24486  fi
24487
24488
24489  if test "x$path" != "x$new_path"; then
24490    BOOT_JDK="$new_path"
24491    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24492$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24493  fi
24494
24495  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24496
24497  path="$BOOT_JDK"
24498  has_colon=`$ECHO $path | $GREP ^.:`
24499  new_path="$path"
24500  if test "x$has_colon" = x; then
24501    # Not in mixed or Windows style, start by that.
24502    new_path=`cmd //c echo $path`
24503  fi
24504
24505
24506  input_path="$new_path"
24507  # Check if we need to convert this using DOS-style short mode. If the path
24508  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24509  # take no chances and rewrite it.
24510  # Note: m4 eats our [], so we need to use [ and ] instead.
24511  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24512  if test "x$has_forbidden_chars" != x; then
24513    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24514    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24515  fi
24516
24517
24518  windows_path="$new_path"
24519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24520    unix_path=`$CYGPATH -u "$windows_path"`
24521    new_path="$unix_path"
24522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24523    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24524    new_path="$unix_path"
24525  fi
24526
24527  if test "x$path" != "x$new_path"; then
24528    BOOT_JDK="$new_path"
24529    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24530$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24531  fi
24532
24533  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24534  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24535
24536  else
24537    # We're on a posix platform. Hooray! :)
24538    path="$BOOT_JDK"
24539    has_space=`$ECHO "$path" | $GREP " "`
24540    if test "x$has_space" != x; then
24541      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24542$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24543      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24544    fi
24545
24546    # Use eval to expand a potential ~
24547    eval path="$path"
24548    if test ! -f "$path" && test ! -d "$path"; then
24549      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24550    fi
24551
24552    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24553  fi
24554
24555              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24556$as_echo_n "checking for Boot JDK... " >&6; }
24557              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24558$as_echo "$BOOT_JDK" >&6; }
24559              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24560$as_echo_n "checking Boot JDK version... " >&6; }
24561              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24562              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24563$as_echo "$BOOT_JDK_VERSION" >&6; }
24564            fi # end check jdk version
24565          fi # end check rt.jar
24566        fi # end check javac
24567      fi # end check java
24568    fi # end check boot jdk found
24569  fi
24570
24571
24572  if test "x$BOOT_JDK_FOUND" = xno; then
24573    # Now execute the test
24574
24575  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
24576  BOOT_JDK_SUFFIX="/Contents/Home"
24577  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24578  if test "x$ALL_JDKS_FOUND" != x; then
24579    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24580
24581  if test "x$BOOT_JDK_FOUND" = xno; then
24582    # Now execute the test
24583
24584        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24585        if test -d "$BOOT_JDK"; then
24586          BOOT_JDK_FOUND=maybe
24587          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24588$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24589        fi
24590
24591
24592    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24593    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24594      # Do we have a bin/java?
24595      if test ! -x "$BOOT_JDK/bin/java"; then
24596        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24597$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24598        BOOT_JDK_FOUND=no
24599      else
24600        # Do we have a bin/javac?
24601        if test ! -x "$BOOT_JDK/bin/javac"; then
24602          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24603$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24604          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24605$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24606          BOOT_JDK_FOUND=no
24607        else
24608          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24609          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24610            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24611$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24612            BOOT_JDK_FOUND=no
24613          else
24614            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24615            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24616
24617            # Extra M4 quote needed to protect [] in grep expression.
24618            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24619            if test "x$FOUND_CORRECT_VERSION" = x; then
24620              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24621$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24622              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24623$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24624              BOOT_JDK_FOUND=no
24625            else
24626              # We're done! :-)
24627              BOOT_JDK_FOUND=yes
24628
24629  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24630
24631  # Input might be given as Windows format, start by converting to
24632  # unix format.
24633  path="$BOOT_JDK"
24634  new_path=`$CYGPATH -u "$path"`
24635
24636  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24637  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24638  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24639  # "foo.exe" is OK but "foo" is an error.
24640  #
24641  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24642  # It is also a way to make sure we got the proper file name for the real test later on.
24643  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24644  if test "x$test_shortpath" = x; then
24645    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24646$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24647    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24648  fi
24649
24650  # Call helper function which possibly converts this using DOS-style short mode.
24651  # If so, the updated path is stored in $new_path.
24652
24653  input_path="$new_path"
24654  # Check if we need to convert this using DOS-style short mode. If the path
24655  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24656  # take no chances and rewrite it.
24657  # Note: m4 eats our [], so we need to use [ and ] instead.
24658  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24659  if test "x$has_forbidden_chars" != x; then
24660    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24661    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24662    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24663    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24664      # Going to short mode and back again did indeed matter. Since short mode is
24665      # case insensitive, let's make it lowercase to improve readability.
24666      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24667      # Now convert it back to Unix-stile (cygpath)
24668      input_path=`$CYGPATH -u "$shortmode_path"`
24669      new_path="$input_path"
24670    fi
24671  fi
24672
24673  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24674  if test "x$test_cygdrive_prefix" = x; then
24675    # As a simple fix, exclude /usr/bin since it's not a real path.
24676    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24677      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24678      # a path prefixed by /cygdrive for fixpath to work.
24679      new_path="$CYGWIN_ROOT_PATH$input_path"
24680    fi
24681  fi
24682
24683
24684  if test "x$path" != "x$new_path"; then
24685    BOOT_JDK="$new_path"
24686    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24687$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24688  fi
24689
24690  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24691
24692  path="$BOOT_JDK"
24693  has_colon=`$ECHO $path | $GREP ^.:`
24694  new_path="$path"
24695  if test "x$has_colon" = x; then
24696    # Not in mixed or Windows style, start by that.
24697    new_path=`cmd //c echo $path`
24698  fi
24699
24700
24701  input_path="$new_path"
24702  # Check if we need to convert this using DOS-style short mode. If the path
24703  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24704  # take no chances and rewrite it.
24705  # Note: m4 eats our [], so we need to use [ and ] instead.
24706  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24707  if test "x$has_forbidden_chars" != x; then
24708    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24709    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24710  fi
24711
24712
24713  windows_path="$new_path"
24714  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24715    unix_path=`$CYGPATH -u "$windows_path"`
24716    new_path="$unix_path"
24717  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24718    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24719    new_path="$unix_path"
24720  fi
24721
24722  if test "x$path" != "x$new_path"; then
24723    BOOT_JDK="$new_path"
24724    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24725$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24726  fi
24727
24728  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24729  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24730
24731  else
24732    # We're on a posix platform. Hooray! :)
24733    path="$BOOT_JDK"
24734    has_space=`$ECHO "$path" | $GREP " "`
24735    if test "x$has_space" != x; then
24736      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24737$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24738      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24739    fi
24740
24741    # Use eval to expand a potential ~
24742    eval path="$path"
24743    if test ! -f "$path" && test ! -d "$path"; then
24744      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24745    fi
24746
24747    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24748  fi
24749
24750              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24751$as_echo_n "checking for Boot JDK... " >&6; }
24752              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24753$as_echo "$BOOT_JDK" >&6; }
24754              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24755$as_echo_n "checking Boot JDK version... " >&6; }
24756              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24757              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24758$as_echo "$BOOT_JDK_VERSION" >&6; }
24759            fi # end check jdk version
24760          fi # end check rt.jar
24761        fi # end check javac
24762      fi # end check java
24763    fi # end check boot jdk found
24764  fi
24765
24766    done
24767  fi
24768
24769
24770    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24771    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24772      # Do we have a bin/java?
24773      if test ! -x "$BOOT_JDK/bin/java"; then
24774        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24775$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24776        BOOT_JDK_FOUND=no
24777      else
24778        # Do we have a bin/javac?
24779        if test ! -x "$BOOT_JDK/bin/javac"; then
24780          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24781$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24782          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24783$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24784          BOOT_JDK_FOUND=no
24785        else
24786          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24787          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24788            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24789$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24790            BOOT_JDK_FOUND=no
24791          else
24792            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24793            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24794
24795            # Extra M4 quote needed to protect [] in grep expression.
24796            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24797            if test "x$FOUND_CORRECT_VERSION" = x; then
24798              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24799$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24800              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24801$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24802              BOOT_JDK_FOUND=no
24803            else
24804              # We're done! :-)
24805              BOOT_JDK_FOUND=yes
24806
24807  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24808
24809  # Input might be given as Windows format, start by converting to
24810  # unix format.
24811  path="$BOOT_JDK"
24812  new_path=`$CYGPATH -u "$path"`
24813
24814  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24815  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24816  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24817  # "foo.exe" is OK but "foo" is an error.
24818  #
24819  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24820  # It is also a way to make sure we got the proper file name for the real test later on.
24821  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24822  if test "x$test_shortpath" = x; then
24823    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24824$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24825    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24826  fi
24827
24828  # Call helper function which possibly converts this using DOS-style short mode.
24829  # If so, the updated path is stored in $new_path.
24830
24831  input_path="$new_path"
24832  # Check if we need to convert this using DOS-style short mode. If the path
24833  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24834  # take no chances and rewrite it.
24835  # Note: m4 eats our [], so we need to use [ and ] instead.
24836  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24837  if test "x$has_forbidden_chars" != x; then
24838    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24839    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24840    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24841    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24842      # Going to short mode and back again did indeed matter. Since short mode is
24843      # case insensitive, let's make it lowercase to improve readability.
24844      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24845      # Now convert it back to Unix-stile (cygpath)
24846      input_path=`$CYGPATH -u "$shortmode_path"`
24847      new_path="$input_path"
24848    fi
24849  fi
24850
24851  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24852  if test "x$test_cygdrive_prefix" = x; then
24853    # As a simple fix, exclude /usr/bin since it's not a real path.
24854    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24855      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24856      # a path prefixed by /cygdrive for fixpath to work.
24857      new_path="$CYGWIN_ROOT_PATH$input_path"
24858    fi
24859  fi
24860
24861
24862  if test "x$path" != "x$new_path"; then
24863    BOOT_JDK="$new_path"
24864    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24865$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24866  fi
24867
24868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24869
24870  path="$BOOT_JDK"
24871  has_colon=`$ECHO $path | $GREP ^.:`
24872  new_path="$path"
24873  if test "x$has_colon" = x; then
24874    # Not in mixed or Windows style, start by that.
24875    new_path=`cmd //c echo $path`
24876  fi
24877
24878
24879  input_path="$new_path"
24880  # Check if we need to convert this using DOS-style short mode. If the path
24881  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24882  # take no chances and rewrite it.
24883  # Note: m4 eats our [], so we need to use [ and ] instead.
24884  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24885  if test "x$has_forbidden_chars" != x; then
24886    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24887    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24888  fi
24889
24890
24891  windows_path="$new_path"
24892  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24893    unix_path=`$CYGPATH -u "$windows_path"`
24894    new_path="$unix_path"
24895  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24896    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24897    new_path="$unix_path"
24898  fi
24899
24900  if test "x$path" != "x$new_path"; then
24901    BOOT_JDK="$new_path"
24902    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24903$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24904  fi
24905
24906  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24907  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24908
24909  else
24910    # We're on a posix platform. Hooray! :)
24911    path="$BOOT_JDK"
24912    has_space=`$ECHO "$path" | $GREP " "`
24913    if test "x$has_space" != x; then
24914      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24915$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24916      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24917    fi
24918
24919    # Use eval to expand a potential ~
24920    eval path="$path"
24921    if test ! -f "$path" && test ! -d "$path"; then
24922      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24923    fi
24924
24925    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24926  fi
24927
24928              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24929$as_echo_n "checking for Boot JDK... " >&6; }
24930              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24931$as_echo "$BOOT_JDK" >&6; }
24932              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24933$as_echo_n "checking Boot JDK version... " >&6; }
24934              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24935              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24936$as_echo "$BOOT_JDK_VERSION" >&6; }
24937            fi # end check jdk version
24938          fi # end check rt.jar
24939        fi # end check javac
24940      fi # end check java
24941    fi # end check boot jdk found
24942  fi
24943
24944  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
24945
24946  if test "x$BOOT_JDK_FOUND" = xno; then
24947    # Now execute the test
24948
24949  BOOT_JDK_PREFIX="/usr/lib/jvm"
24950  BOOT_JDK_SUFFIX=""
24951  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24952  if test "x$ALL_JDKS_FOUND" != x; then
24953    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24954
24955  if test "x$BOOT_JDK_FOUND" = xno; then
24956    # Now execute the test
24957
24958        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24959        if test -d "$BOOT_JDK"; then
24960          BOOT_JDK_FOUND=maybe
24961          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24962$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24963        fi
24964
24965
24966    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24967    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24968      # Do we have a bin/java?
24969      if test ! -x "$BOOT_JDK/bin/java"; then
24970        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24971$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24972        BOOT_JDK_FOUND=no
24973      else
24974        # Do we have a bin/javac?
24975        if test ! -x "$BOOT_JDK/bin/javac"; then
24976          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24977$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24978          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24979$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24980          BOOT_JDK_FOUND=no
24981        else
24982          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24983          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24984            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24985$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24986            BOOT_JDK_FOUND=no
24987          else
24988            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24989            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24990
24991            # Extra M4 quote needed to protect [] in grep expression.
24992            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24993            if test "x$FOUND_CORRECT_VERSION" = x; then
24994              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24995$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24996              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24997$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24998              BOOT_JDK_FOUND=no
24999            else
25000              # We're done! :-)
25001              BOOT_JDK_FOUND=yes
25002
25003  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25004
25005  # Input might be given as Windows format, start by converting to
25006  # unix format.
25007  path="$BOOT_JDK"
25008  new_path=`$CYGPATH -u "$path"`
25009
25010  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25011  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25012  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25013  # "foo.exe" is OK but "foo" is an error.
25014  #
25015  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25016  # It is also a way to make sure we got the proper file name for the real test later on.
25017  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25018  if test "x$test_shortpath" = x; then
25019    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25020$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25021    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25022  fi
25023
25024  # Call helper function which possibly converts this using DOS-style short mode.
25025  # If so, the updated path is stored in $new_path.
25026
25027  input_path="$new_path"
25028  # Check if we need to convert this using DOS-style short mode. If the path
25029  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25030  # take no chances and rewrite it.
25031  # Note: m4 eats our [], so we need to use [ and ] instead.
25032  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25033  if test "x$has_forbidden_chars" != x; then
25034    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25035    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25036    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25037    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25038      # Going to short mode and back again did indeed matter. Since short mode is
25039      # case insensitive, let's make it lowercase to improve readability.
25040      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25041      # Now convert it back to Unix-stile (cygpath)
25042      input_path=`$CYGPATH -u "$shortmode_path"`
25043      new_path="$input_path"
25044    fi
25045  fi
25046
25047  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25048  if test "x$test_cygdrive_prefix" = x; then
25049    # As a simple fix, exclude /usr/bin since it's not a real path.
25050    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25051      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25052      # a path prefixed by /cygdrive for fixpath to work.
25053      new_path="$CYGWIN_ROOT_PATH$input_path"
25054    fi
25055  fi
25056
25057
25058  if test "x$path" != "x$new_path"; then
25059    BOOT_JDK="$new_path"
25060    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25061$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25062  fi
25063
25064  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25065
25066  path="$BOOT_JDK"
25067  has_colon=`$ECHO $path | $GREP ^.:`
25068  new_path="$path"
25069  if test "x$has_colon" = x; then
25070    # Not in mixed or Windows style, start by that.
25071    new_path=`cmd //c echo $path`
25072  fi
25073
25074
25075  input_path="$new_path"
25076  # Check if we need to convert this using DOS-style short mode. If the path
25077  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25078  # take no chances and rewrite it.
25079  # Note: m4 eats our [], so we need to use [ and ] instead.
25080  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25081  if test "x$has_forbidden_chars" != x; then
25082    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25083    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25084  fi
25085
25086
25087  windows_path="$new_path"
25088  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25089    unix_path=`$CYGPATH -u "$windows_path"`
25090    new_path="$unix_path"
25091  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25092    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25093    new_path="$unix_path"
25094  fi
25095
25096  if test "x$path" != "x$new_path"; then
25097    BOOT_JDK="$new_path"
25098    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25099$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25100  fi
25101
25102  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25103  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25104
25105  else
25106    # We're on a posix platform. Hooray! :)
25107    path="$BOOT_JDK"
25108    has_space=`$ECHO "$path" | $GREP " "`
25109    if test "x$has_space" != x; then
25110      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25111$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25112      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25113    fi
25114
25115    # Use eval to expand a potential ~
25116    eval path="$path"
25117    if test ! -f "$path" && test ! -d "$path"; then
25118      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25119    fi
25120
25121    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25122  fi
25123
25124              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25125$as_echo_n "checking for Boot JDK... " >&6; }
25126              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25127$as_echo "$BOOT_JDK" >&6; }
25128              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25129$as_echo_n "checking Boot JDK version... " >&6; }
25130              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25131              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25132$as_echo "$BOOT_JDK_VERSION" >&6; }
25133            fi # end check jdk version
25134          fi # end check rt.jar
25135        fi # end check javac
25136      fi # end check java
25137    fi # end check boot jdk found
25138  fi
25139
25140    done
25141  fi
25142
25143
25144    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25145    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25146      # Do we have a bin/java?
25147      if test ! -x "$BOOT_JDK/bin/java"; then
25148        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25149$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25150        BOOT_JDK_FOUND=no
25151      else
25152        # Do we have a bin/javac?
25153        if test ! -x "$BOOT_JDK/bin/javac"; then
25154          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25155$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25156          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25157$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25158          BOOT_JDK_FOUND=no
25159        else
25160          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
25161          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
25162            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
25163$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
25164            BOOT_JDK_FOUND=no
25165          else
25166            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25167            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25168
25169            # Extra M4 quote needed to protect [] in grep expression.
25170            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25171            if test "x$FOUND_CORRECT_VERSION" = x; then
25172              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25173$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25174              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25175$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25176              BOOT_JDK_FOUND=no
25177            else
25178              # We're done! :-)
25179              BOOT_JDK_FOUND=yes
25180
25181  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25182
25183  # Input might be given as Windows format, start by converting to
25184  # unix format.
25185  path="$BOOT_JDK"
25186  new_path=`$CYGPATH -u "$path"`
25187
25188  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25189  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25190  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25191  # "foo.exe" is OK but "foo" is an error.
25192  #
25193  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25194  # It is also a way to make sure we got the proper file name for the real test later on.
25195  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25196  if test "x$test_shortpath" = x; then
25197    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25198$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25199    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25200  fi
25201
25202  # Call helper function which possibly converts this using DOS-style short mode.
25203  # If so, the updated path is stored in $new_path.
25204
25205  input_path="$new_path"
25206  # Check if we need to convert this using DOS-style short mode. If the path
25207  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25208  # take no chances and rewrite it.
25209  # Note: m4 eats our [], so we need to use [ and ] instead.
25210  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25211  if test "x$has_forbidden_chars" != x; then
25212    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25213    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25214    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25215    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25216      # Going to short mode and back again did indeed matter. Since short mode is
25217      # case insensitive, let's make it lowercase to improve readability.
25218      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25219      # Now convert it back to Unix-stile (cygpath)
25220      input_path=`$CYGPATH -u "$shortmode_path"`
25221      new_path="$input_path"
25222    fi
25223  fi
25224
25225  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25226  if test "x$test_cygdrive_prefix" = x; then
25227    # As a simple fix, exclude /usr/bin since it's not a real path.
25228    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25229      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25230      # a path prefixed by /cygdrive for fixpath to work.
25231      new_path="$CYGWIN_ROOT_PATH$input_path"
25232    fi
25233  fi
25234
25235
25236  if test "x$path" != "x$new_path"; then
25237    BOOT_JDK="$new_path"
25238    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25239$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25240  fi
25241
25242  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25243
25244  path="$BOOT_JDK"
25245  has_colon=`$ECHO $path | $GREP ^.:`
25246  new_path="$path"
25247  if test "x$has_colon" = x; then
25248    # Not in mixed or Windows style, start by that.
25249    new_path=`cmd //c echo $path`
25250  fi
25251
25252
25253  input_path="$new_path"
25254  # Check if we need to convert this using DOS-style short mode. If the path
25255  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25256  # take no chances and rewrite it.
25257  # Note: m4 eats our [], so we need to use [ and ] instead.
25258  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25259  if test "x$has_forbidden_chars" != x; then
25260    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25261    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25262  fi
25263
25264
25265  windows_path="$new_path"
25266  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25267    unix_path=`$CYGPATH -u "$windows_path"`
25268    new_path="$unix_path"
25269  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25270    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25271    new_path="$unix_path"
25272  fi
25273
25274  if test "x$path" != "x$new_path"; then
25275    BOOT_JDK="$new_path"
25276    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25277$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25278  fi
25279
25280  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25281  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25282
25283  else
25284    # We're on a posix platform. Hooray! :)
25285    path="$BOOT_JDK"
25286    has_space=`$ECHO "$path" | $GREP " "`
25287    if test "x$has_space" != x; then
25288      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25289$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25290      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25291    fi
25292
25293    # Use eval to expand a potential ~
25294    eval path="$path"
25295    if test ! -f "$path" && test ! -d "$path"; then
25296      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25297    fi
25298
25299    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25300  fi
25301
25302              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25303$as_echo_n "checking for Boot JDK... " >&6; }
25304              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25305$as_echo "$BOOT_JDK" >&6; }
25306              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25307$as_echo_n "checking Boot JDK version... " >&6; }
25308              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25309              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25310$as_echo "$BOOT_JDK_VERSION" >&6; }
25311            fi # end check jdk version
25312          fi # end check rt.jar
25313        fi # end check javac
25314      fi # end check java
25315    fi # end check boot jdk found
25316  fi
25317
25318  fi
25319
25320
25321    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25322    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25323      # Do we have a bin/java?
25324      if test ! -x "$BOOT_JDK/bin/java"; then
25325        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25326$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25327        BOOT_JDK_FOUND=no
25328      else
25329        # Do we have a bin/javac?
25330        if test ! -x "$BOOT_JDK/bin/javac"; then
25331          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25332$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25333          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25334$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25335          BOOT_JDK_FOUND=no
25336        else
25337          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
25338          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
25339            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
25340$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
25341            BOOT_JDK_FOUND=no
25342          else
25343            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25344            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25345
25346            # Extra M4 quote needed to protect [] in grep expression.
25347            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25348            if test "x$FOUND_CORRECT_VERSION" = x; then
25349              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25350$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25351              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25352$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25353              BOOT_JDK_FOUND=no
25354            else
25355              # We're done! :-)
25356              BOOT_JDK_FOUND=yes
25357
25358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25359
25360  # Input might be given as Windows format, start by converting to
25361  # unix format.
25362  path="$BOOT_JDK"
25363  new_path=`$CYGPATH -u "$path"`
25364
25365  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25366  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25367  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25368  # "foo.exe" is OK but "foo" is an error.
25369  #
25370  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25371  # It is also a way to make sure we got the proper file name for the real test later on.
25372  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25373  if test "x$test_shortpath" = x; then
25374    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25375$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25376    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25377  fi
25378
25379  # Call helper function which possibly converts this using DOS-style short mode.
25380  # If so, the updated path is stored in $new_path.
25381
25382  input_path="$new_path"
25383  # Check if we need to convert this using DOS-style short mode. If the path
25384  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25385  # take no chances and rewrite it.
25386  # Note: m4 eats our [], so we need to use [ and ] instead.
25387  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25388  if test "x$has_forbidden_chars" != x; then
25389    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25390    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25391    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25392    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25393      # Going to short mode and back again did indeed matter. Since short mode is
25394      # case insensitive, let's make it lowercase to improve readability.
25395      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25396      # Now convert it back to Unix-stile (cygpath)
25397      input_path=`$CYGPATH -u "$shortmode_path"`
25398      new_path="$input_path"
25399    fi
25400  fi
25401
25402  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25403  if test "x$test_cygdrive_prefix" = x; then
25404    # As a simple fix, exclude /usr/bin since it's not a real path.
25405    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25406      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25407      # a path prefixed by /cygdrive for fixpath to work.
25408      new_path="$CYGWIN_ROOT_PATH$input_path"
25409    fi
25410  fi
25411
25412
25413  if test "x$path" != "x$new_path"; then
25414    BOOT_JDK="$new_path"
25415    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25416$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25417  fi
25418
25419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25420
25421  path="$BOOT_JDK"
25422  has_colon=`$ECHO $path | $GREP ^.:`
25423  new_path="$path"
25424  if test "x$has_colon" = x; then
25425    # Not in mixed or Windows style, start by that.
25426    new_path=`cmd //c echo $path`
25427  fi
25428
25429
25430  input_path="$new_path"
25431  # Check if we need to convert this using DOS-style short mode. If the path
25432  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25433  # take no chances and rewrite it.
25434  # Note: m4 eats our [], so we need to use [ and ] instead.
25435  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25436  if test "x$has_forbidden_chars" != x; then
25437    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25438    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25439  fi
25440
25441
25442  windows_path="$new_path"
25443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25444    unix_path=`$CYGPATH -u "$windows_path"`
25445    new_path="$unix_path"
25446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25447    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25448    new_path="$unix_path"
25449  fi
25450
25451  if test "x$path" != "x$new_path"; then
25452    BOOT_JDK="$new_path"
25453    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25454$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25455  fi
25456
25457  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25458  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25459
25460  else
25461    # We're on a posix platform. Hooray! :)
25462    path="$BOOT_JDK"
25463    has_space=`$ECHO "$path" | $GREP " "`
25464    if test "x$has_space" != x; then
25465      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25466$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25467      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25468    fi
25469
25470    # Use eval to expand a potential ~
25471    eval path="$path"
25472    if test ! -f "$path" && test ! -d "$path"; then
25473      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25474    fi
25475
25476    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25477  fi
25478
25479              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25480$as_echo_n "checking for Boot JDK... " >&6; }
25481              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25482$as_echo "$BOOT_JDK" >&6; }
25483              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25484$as_echo_n "checking Boot JDK version... " >&6; }
25485              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25486              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25487$as_echo "$BOOT_JDK_VERSION" >&6; }
25488            fi # end check jdk version
25489          fi # end check rt.jar
25490        fi # end check javac
25491      fi # end check java
25492    fi # end check boot jdk found
25493  fi
25494
25495
25496  # If we haven't found anything yet, we've truly lost. Give up.
25497  if test "x$BOOT_JDK_FOUND" = xno; then
25498
25499  # Print a helpful message on how to acquire the necessary build dependency.
25500  # openjdk is the help tag: freetype, cups, pulse, alsa etc
25501  MISSING_DEPENDENCY=openjdk
25502
25503  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25504    cygwin_help $MISSING_DEPENDENCY
25505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25506    msys_help $MISSING_DEPENDENCY
25507  else
25508    PKGHANDLER_COMMAND=
25509
25510    case $PKGHANDLER in
25511      apt-get)
25512        apt_help     $MISSING_DEPENDENCY ;;
25513      yum)
25514        yum_help     $MISSING_DEPENDENCY ;;
25515      port)
25516        port_help    $MISSING_DEPENDENCY ;;
25517      pkgutil)
25518        pkgutil_help $MISSING_DEPENDENCY ;;
25519      pkgadd)
25520        pkgadd_help  $MISSING_DEPENDENCY ;;
25521    esac
25522
25523    if test "x$PKGHANDLER_COMMAND" != x; then
25524      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25525    fi
25526  fi
25527
25528    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
25529$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
25530    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
25531$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25532    as_fn_error $? "Cannot continue" "$LINENO" 5
25533  fi
25534
25535  # Setup proper paths for what we found
25536  BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
25537  if test ! -f "$BOOT_RTJAR"; then
25538    # On MacOSX it is called classes.jar
25539    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
25540    if test -f "$BOOT_RTJAR"; then
25541      # Remove the ..
25542      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
25543    fi
25544  fi
25545  BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
25546  BOOT_JDK="$BOOT_JDK"
25547
25548
25549
25550
25551  # Setup tools from the Boot JDK.
25552
25553  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25554
25555  # Publish this variable in the help.
25556
25557
25558  if test "x$JAVA" = x; then
25559    # The variable is not set by user, try to locate tool using the code snippet
25560
25561      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25562$as_echo_n "checking for java in Boot JDK... " >&6; }
25563      JAVA=$BOOT_JDK/bin/java
25564      if test ! -x $JAVA; then
25565        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25566$as_echo "not found" >&6; }
25567        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25568$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25569        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25570      fi
25571      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25572$as_echo "ok" >&6; }
25573
25574
25575  else
25576    # The variable is set, but is it from the command line or the environment?
25577
25578    # Try to remove the string !JAVA! from our list.
25579    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
25580    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25581      # If it failed, the variable was not from the command line. Ignore it,
25582      # but warn the user (except for BASH, which is always set by the calling BASH).
25583      if test "xJAVA" != xBASH; then
25584        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
25585$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
25586      fi
25587      # Try to locate tool using the code snippet
25588
25589      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25590$as_echo_n "checking for java in Boot JDK... " >&6; }
25591      JAVA=$BOOT_JDK/bin/java
25592      if test ! -x $JAVA; then
25593        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25594$as_echo "not found" >&6; }
25595        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25596$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25597        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25598      fi
25599      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25600$as_echo "ok" >&6; }
25601
25602
25603    else
25604      # If it succeeded, then it was overridden by the user. We will use it
25605      # for the tool.
25606
25607      # First remove it from the list of overridden variables, so we can test
25608      # for unknown variables in the end.
25609      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25610
25611      # Check if the provided tool contains a complete path.
25612      tool_specified="$JAVA"
25613      tool_basename="${tool_specified##*/}"
25614      if test "x$tool_basename" = "x$tool_specified"; then
25615        # A command without a complete path is provided, search $PATH.
25616        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
25617$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
25618        # Extract the first word of "$tool_basename", so it can be a program name with args.
25619set dummy $tool_basename; ac_word=$2
25620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25621$as_echo_n "checking for $ac_word... " >&6; }
25622if ${ac_cv_path_JAVA+:} false; then :
25623  $as_echo_n "(cached) " >&6
25624else
25625  case $JAVA in
25626  [\\/]* | ?:[\\/]*)
25627  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
25628  ;;
25629  *)
25630  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25631for as_dir in $PATH
25632do
25633  IFS=$as_save_IFS
25634  test -z "$as_dir" && as_dir=.
25635    for ac_exec_ext in '' $ac_executable_extensions; do
25636  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25637    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
25638    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25639    break 2
25640  fi
25641done
25642  done
25643IFS=$as_save_IFS
25644
25645  ;;
25646esac
25647fi
25648JAVA=$ac_cv_path_JAVA
25649if test -n "$JAVA"; then
25650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
25651$as_echo "$JAVA" >&6; }
25652else
25653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25654$as_echo "no" >&6; }
25655fi
25656
25657
25658        if test "x$JAVA" = x; then
25659          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25660        fi
25661      else
25662        # Otherwise we believe it is a complete path. Use it as it is.
25663        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
25664$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
25665        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
25666$as_echo_n "checking for JAVA... " >&6; }
25667        if test ! -x "$tool_specified"; then
25668          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25669$as_echo "not found" >&6; }
25670          as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
25671        fi
25672        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25673$as_echo "$tool_specified" >&6; }
25674      fi
25675    fi
25676  fi
25677
25678
25679
25680  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25681
25682  # Publish this variable in the help.
25683
25684
25685  if test "x$JAVAC" = x; then
25686    # The variable is not set by user, try to locate tool using the code snippet
25687
25688      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25689$as_echo_n "checking for javac in Boot JDK... " >&6; }
25690      JAVAC=$BOOT_JDK/bin/javac
25691      if test ! -x $JAVAC; then
25692        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25693$as_echo "not found" >&6; }
25694        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25695$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25696        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25697      fi
25698      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25699$as_echo "ok" >&6; }
25700
25701
25702  else
25703    # The variable is set, but is it from the command line or the environment?
25704
25705    # Try to remove the string !JAVAC! from our list.
25706    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
25707    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25708      # If it failed, the variable was not from the command line. Ignore it,
25709      # but warn the user (except for BASH, which is always set by the calling BASH).
25710      if test "xJAVAC" != xBASH; then
25711        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
25712$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
25713      fi
25714      # Try to locate tool using the code snippet
25715
25716      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25717$as_echo_n "checking for javac in Boot JDK... " >&6; }
25718      JAVAC=$BOOT_JDK/bin/javac
25719      if test ! -x $JAVAC; then
25720        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25721$as_echo "not found" >&6; }
25722        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25723$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25724        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25725      fi
25726      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25727$as_echo "ok" >&6; }
25728
25729
25730    else
25731      # If it succeeded, then it was overridden by the user. We will use it
25732      # for the tool.
25733
25734      # First remove it from the list of overridden variables, so we can test
25735      # for unknown variables in the end.
25736      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25737
25738      # Check if the provided tool contains a complete path.
25739      tool_specified="$JAVAC"
25740      tool_basename="${tool_specified##*/}"
25741      if test "x$tool_basename" = "x$tool_specified"; then
25742        # A command without a complete path is provided, search $PATH.
25743        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
25744$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
25745        # Extract the first word of "$tool_basename", so it can be a program name with args.
25746set dummy $tool_basename; ac_word=$2
25747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25748$as_echo_n "checking for $ac_word... " >&6; }
25749if ${ac_cv_path_JAVAC+:} false; then :
25750  $as_echo_n "(cached) " >&6
25751else
25752  case $JAVAC in
25753  [\\/]* | ?:[\\/]*)
25754  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
25755  ;;
25756  *)
25757  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25758for as_dir in $PATH
25759do
25760  IFS=$as_save_IFS
25761  test -z "$as_dir" && as_dir=.
25762    for ac_exec_ext in '' $ac_executable_extensions; do
25763  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25764    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
25765    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25766    break 2
25767  fi
25768done
25769  done
25770IFS=$as_save_IFS
25771
25772  ;;
25773esac
25774fi
25775JAVAC=$ac_cv_path_JAVAC
25776if test -n "$JAVAC"; then
25777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
25778$as_echo "$JAVAC" >&6; }
25779else
25780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25781$as_echo "no" >&6; }
25782fi
25783
25784
25785        if test "x$JAVAC" = x; then
25786          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25787        fi
25788      else
25789        # Otherwise we believe it is a complete path. Use it as it is.
25790        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
25791$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
25792        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
25793$as_echo_n "checking for JAVAC... " >&6; }
25794        if test ! -x "$tool_specified"; then
25795          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25796$as_echo "not found" >&6; }
25797          as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
25798        fi
25799        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25800$as_echo "$tool_specified" >&6; }
25801      fi
25802    fi
25803  fi
25804
25805
25806
25807  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25808
25809  # Publish this variable in the help.
25810
25811
25812  if test "x$JAVAH" = x; then
25813    # The variable is not set by user, try to locate tool using the code snippet
25814
25815      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25816$as_echo_n "checking for javah in Boot JDK... " >&6; }
25817      JAVAH=$BOOT_JDK/bin/javah
25818      if test ! -x $JAVAH; then
25819        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25820$as_echo "not found" >&6; }
25821        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25822$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25823        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25824      fi
25825      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25826$as_echo "ok" >&6; }
25827
25828
25829  else
25830    # The variable is set, but is it from the command line or the environment?
25831
25832    # Try to remove the string !JAVAH! from our list.
25833    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
25834    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25835      # If it failed, the variable was not from the command line. Ignore it,
25836      # but warn the user (except for BASH, which is always set by the calling BASH).
25837      if test "xJAVAH" != xBASH; then
25838        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
25839$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
25840      fi
25841      # Try to locate tool using the code snippet
25842
25843      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25844$as_echo_n "checking for javah in Boot JDK... " >&6; }
25845      JAVAH=$BOOT_JDK/bin/javah
25846      if test ! -x $JAVAH; then
25847        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25848$as_echo "not found" >&6; }
25849        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25850$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25851        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25852      fi
25853      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25854$as_echo "ok" >&6; }
25855
25856
25857    else
25858      # If it succeeded, then it was overridden by the user. We will use it
25859      # for the tool.
25860
25861      # First remove it from the list of overridden variables, so we can test
25862      # for unknown variables in the end.
25863      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25864
25865      # Check if the provided tool contains a complete path.
25866      tool_specified="$JAVAH"
25867      tool_basename="${tool_specified##*/}"
25868      if test "x$tool_basename" = "x$tool_specified"; then
25869        # A command without a complete path is provided, search $PATH.
25870        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
25871$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
25872        # Extract the first word of "$tool_basename", so it can be a program name with args.
25873set dummy $tool_basename; ac_word=$2
25874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25875$as_echo_n "checking for $ac_word... " >&6; }
25876if ${ac_cv_path_JAVAH+:} false; then :
25877  $as_echo_n "(cached) " >&6
25878else
25879  case $JAVAH in
25880  [\\/]* | ?:[\\/]*)
25881  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
25882  ;;
25883  *)
25884  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25885for as_dir in $PATH
25886do
25887  IFS=$as_save_IFS
25888  test -z "$as_dir" && as_dir=.
25889    for ac_exec_ext in '' $ac_executable_extensions; do
25890  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25891    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
25892    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25893    break 2
25894  fi
25895done
25896  done
25897IFS=$as_save_IFS
25898
25899  ;;
25900esac
25901fi
25902JAVAH=$ac_cv_path_JAVAH
25903if test -n "$JAVAH"; then
25904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
25905$as_echo "$JAVAH" >&6; }
25906else
25907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25908$as_echo "no" >&6; }
25909fi
25910
25911
25912        if test "x$JAVAH" = x; then
25913          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25914        fi
25915      else
25916        # Otherwise we believe it is a complete path. Use it as it is.
25917        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
25918$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
25919        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
25920$as_echo_n "checking for JAVAH... " >&6; }
25921        if test ! -x "$tool_specified"; then
25922          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25923$as_echo "not found" >&6; }
25924          as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
25925        fi
25926        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25927$as_echo "$tool_specified" >&6; }
25928      fi
25929    fi
25930  fi
25931
25932
25933
25934  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25935
25936  # Publish this variable in the help.
25937
25938
25939  if test "x$JAR" = x; then
25940    # The variable is not set by user, try to locate tool using the code snippet
25941
25942      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25943$as_echo_n "checking for jar in Boot JDK... " >&6; }
25944      JAR=$BOOT_JDK/bin/jar
25945      if test ! -x $JAR; then
25946        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25947$as_echo "not found" >&6; }
25948        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25949$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25950        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25951      fi
25952      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25953$as_echo "ok" >&6; }
25954
25955
25956  else
25957    # The variable is set, but is it from the command line or the environment?
25958
25959    # Try to remove the string !JAR! from our list.
25960    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
25961    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25962      # If it failed, the variable was not from the command line. Ignore it,
25963      # but warn the user (except for BASH, which is always set by the calling BASH).
25964      if test "xJAR" != xBASH; then
25965        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
25966$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
25967      fi
25968      # Try to locate tool using the code snippet
25969
25970      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25971$as_echo_n "checking for jar in Boot JDK... " >&6; }
25972      JAR=$BOOT_JDK/bin/jar
25973      if test ! -x $JAR; then
25974        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25975$as_echo "not found" >&6; }
25976        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25977$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25978        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25979      fi
25980      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25981$as_echo "ok" >&6; }
25982
25983
25984    else
25985      # If it succeeded, then it was overridden by the user. We will use it
25986      # for the tool.
25987
25988      # First remove it from the list of overridden variables, so we can test
25989      # for unknown variables in the end.
25990      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25991
25992      # Check if the provided tool contains a complete path.
25993      tool_specified="$JAR"
25994      tool_basename="${tool_specified##*/}"
25995      if test "x$tool_basename" = "x$tool_specified"; then
25996        # A command without a complete path is provided, search $PATH.
25997        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
25998$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
25999        # Extract the first word of "$tool_basename", so it can be a program name with args.
26000set dummy $tool_basename; ac_word=$2
26001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26002$as_echo_n "checking for $ac_word... " >&6; }
26003if ${ac_cv_path_JAR+:} false; then :
26004  $as_echo_n "(cached) " >&6
26005else
26006  case $JAR in
26007  [\\/]* | ?:[\\/]*)
26008  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
26009  ;;
26010  *)
26011  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26012for as_dir in $PATH
26013do
26014  IFS=$as_save_IFS
26015  test -z "$as_dir" && as_dir=.
26016    for ac_exec_ext in '' $ac_executable_extensions; do
26017  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26018    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
26019    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26020    break 2
26021  fi
26022done
26023  done
26024IFS=$as_save_IFS
26025
26026  ;;
26027esac
26028fi
26029JAR=$ac_cv_path_JAR
26030if test -n "$JAR"; then
26031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
26032$as_echo "$JAR" >&6; }
26033else
26034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26035$as_echo "no" >&6; }
26036fi
26037
26038
26039        if test "x$JAR" = x; then
26040          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26041        fi
26042      else
26043        # Otherwise we believe it is a complete path. Use it as it is.
26044        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
26045$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
26046        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
26047$as_echo_n "checking for JAR... " >&6; }
26048        if test ! -x "$tool_specified"; then
26049          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26050$as_echo "not found" >&6; }
26051          as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
26052        fi
26053        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26054$as_echo "$tool_specified" >&6; }
26055      fi
26056    fi
26057  fi
26058
26059
26060
26061  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26062
26063  # Publish this variable in the help.
26064
26065
26066  if test "x$NATIVE2ASCII" = x; then
26067    # The variable is not set by user, try to locate tool using the code snippet
26068
26069      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
26070$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
26071      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
26072      if test ! -x $NATIVE2ASCII; then
26073        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26074$as_echo "not found" >&6; }
26075        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26076$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26077        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
26078      fi
26079      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26080$as_echo "ok" >&6; }
26081
26082
26083  else
26084    # The variable is set, but is it from the command line or the environment?
26085
26086    # Try to remove the string !NATIVE2ASCII! from our list.
26087    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NATIVE2ASCII!/}
26088    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26089      # If it failed, the variable was not from the command line. Ignore it,
26090      # but warn the user (except for BASH, which is always set by the calling BASH).
26091      if test "xNATIVE2ASCII" != xBASH; then
26092        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&5
26093$as_echo "$as_me: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&2;}
26094      fi
26095      # Try to locate tool using the code snippet
26096
26097      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
26098$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
26099      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
26100      if test ! -x $NATIVE2ASCII; then
26101        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26102$as_echo "not found" >&6; }
26103        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26104$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26105        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
26106      fi
26107      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26108$as_echo "ok" >&6; }
26109
26110
26111    else
26112      # If it succeeded, then it was overridden by the user. We will use it
26113      # for the tool.
26114
26115      # First remove it from the list of overridden variables, so we can test
26116      # for unknown variables in the end.
26117      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26118
26119      # Check if the provided tool contains a complete path.
26120      tool_specified="$NATIVE2ASCII"
26121      tool_basename="${tool_specified##*/}"
26122      if test "x$tool_basename" = "x$tool_specified"; then
26123        # A command without a complete path is provided, search $PATH.
26124        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&5
26125$as_echo "$as_me: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&6;}
26126        # Extract the first word of "$tool_basename", so it can be a program name with args.
26127set dummy $tool_basename; ac_word=$2
26128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26129$as_echo_n "checking for $ac_word... " >&6; }
26130if ${ac_cv_path_NATIVE2ASCII+:} false; then :
26131  $as_echo_n "(cached) " >&6
26132else
26133  case $NATIVE2ASCII in
26134  [\\/]* | ?:[\\/]*)
26135  ac_cv_path_NATIVE2ASCII="$NATIVE2ASCII" # Let the user override the test with a path.
26136  ;;
26137  *)
26138  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26139for as_dir in $PATH
26140do
26141  IFS=$as_save_IFS
26142  test -z "$as_dir" && as_dir=.
26143    for ac_exec_ext in '' $ac_executable_extensions; do
26144  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26145    ac_cv_path_NATIVE2ASCII="$as_dir/$ac_word$ac_exec_ext"
26146    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26147    break 2
26148  fi
26149done
26150  done
26151IFS=$as_save_IFS
26152
26153  ;;
26154esac
26155fi
26156NATIVE2ASCII=$ac_cv_path_NATIVE2ASCII
26157if test -n "$NATIVE2ASCII"; then
26158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE2ASCII" >&5
26159$as_echo "$NATIVE2ASCII" >&6; }
26160else
26161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26162$as_echo "no" >&6; }
26163fi
26164
26165
26166        if test "x$NATIVE2ASCII" = x; then
26167          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26168        fi
26169      else
26170        # Otherwise we believe it is a complete path. Use it as it is.
26171        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&5
26172$as_echo "$as_me: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&6;}
26173        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NATIVE2ASCII" >&5
26174$as_echo_n "checking for NATIVE2ASCII... " >&6; }
26175        if test ! -x "$tool_specified"; then
26176          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26177$as_echo "not found" >&6; }
26178          as_fn_error $? "User supplied tool NATIVE2ASCII=$tool_specified does not exist or is not executable" "$LINENO" 5
26179        fi
26180        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26181$as_echo "$tool_specified" >&6; }
26182      fi
26183    fi
26184  fi
26185
26186
26187
26188  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26189
26190  # Publish this variable in the help.
26191
26192
26193  if test "x$JARSIGNER" = x; then
26194    # The variable is not set by user, try to locate tool using the code snippet
26195
26196      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26197$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26198      JARSIGNER=$BOOT_JDK/bin/jarsigner
26199      if test ! -x $JARSIGNER; then
26200        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26201$as_echo "not found" >&6; }
26202        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26203$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26204        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26205      fi
26206      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26207$as_echo "ok" >&6; }
26208
26209
26210  else
26211    # The variable is set, but is it from the command line or the environment?
26212
26213    # Try to remove the string !JARSIGNER! from our list.
26214    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
26215    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26216      # If it failed, the variable was not from the command line. Ignore it,
26217      # but warn the user (except for BASH, which is always set by the calling BASH).
26218      if test "xJARSIGNER" != xBASH; then
26219        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
26220$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
26221      fi
26222      # Try to locate tool using the code snippet
26223
26224      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26225$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26226      JARSIGNER=$BOOT_JDK/bin/jarsigner
26227      if test ! -x $JARSIGNER; then
26228        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26229$as_echo "not found" >&6; }
26230        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26231$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26232        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26233      fi
26234      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26235$as_echo "ok" >&6; }
26236
26237
26238    else
26239      # If it succeeded, then it was overridden by the user. We will use it
26240      # for the tool.
26241
26242      # First remove it from the list of overridden variables, so we can test
26243      # for unknown variables in the end.
26244      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26245
26246      # Check if the provided tool contains a complete path.
26247      tool_specified="$JARSIGNER"
26248      tool_basename="${tool_specified##*/}"
26249      if test "x$tool_basename" = "x$tool_specified"; then
26250        # A command without a complete path is provided, search $PATH.
26251        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
26252$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
26253        # Extract the first word of "$tool_basename", so it can be a program name with args.
26254set dummy $tool_basename; ac_word=$2
26255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26256$as_echo_n "checking for $ac_word... " >&6; }
26257if ${ac_cv_path_JARSIGNER+:} false; then :
26258  $as_echo_n "(cached) " >&6
26259else
26260  case $JARSIGNER in
26261  [\\/]* | ?:[\\/]*)
26262  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
26263  ;;
26264  *)
26265  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26266for as_dir in $PATH
26267do
26268  IFS=$as_save_IFS
26269  test -z "$as_dir" && as_dir=.
26270    for ac_exec_ext in '' $ac_executable_extensions; do
26271  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26272    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
26273    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26274    break 2
26275  fi
26276done
26277  done
26278IFS=$as_save_IFS
26279
26280  ;;
26281esac
26282fi
26283JARSIGNER=$ac_cv_path_JARSIGNER
26284if test -n "$JARSIGNER"; then
26285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
26286$as_echo "$JARSIGNER" >&6; }
26287else
26288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26289$as_echo "no" >&6; }
26290fi
26291
26292
26293        if test "x$JARSIGNER" = x; then
26294          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26295        fi
26296      else
26297        # Otherwise we believe it is a complete path. Use it as it is.
26298        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
26299$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
26300        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
26301$as_echo_n "checking for JARSIGNER... " >&6; }
26302        if test ! -x "$tool_specified"; then
26303          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26304$as_echo "not found" >&6; }
26305          as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
26306        fi
26307        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26308$as_echo "$tool_specified" >&6; }
26309      fi
26310    fi
26311  fi
26312
26313
26314
26315  # Finally, set some other options...
26316
26317  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
26318  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
26319
26320
26321
26322
26323###############################################################################
26324#
26325# Configure the sources to use. We can add or override individual directories.
26326#
26327###############################################################################
26328
26329
26330  # Where are the sources. Any of these can be overridden
26331  # using --with-override-corba and the likes.
26332  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
26333  CORBA_TOPDIR="$SRC_ROOT/corba"
26334  JAXP_TOPDIR="$SRC_ROOT/jaxp"
26335  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
26336  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
26337  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
26338  JDK_TOPDIR="$SRC_ROOT/jdk"
26339
26340
26341
26342
26343
26344
26345
26346
26347
26348
26349  ###############################################################################
26350  #
26351  # Pickup additional source for a component from outside of the source root
26352  # or override source for a component.
26353  #
26354
26355# Check whether --with-add-source-root was given.
26356if test "${with_add_source_root+set}" = set; then :
26357  withval=$with_add_source_root;
26358fi
26359
26360
26361
26362# Check whether --with-override-source-root was given.
26363if test "${with_override_source_root+set}" = set; then :
26364  withval=$with_override_source_root;
26365fi
26366
26367
26368
26369# Check whether --with-adds-and-overrides was given.
26370if test "${with_adds_and_overrides+set}" = set; then :
26371  withval=$with_adds_and_overrides;
26372fi
26373
26374
26375  if test "x$with_adds_and_overrides" != x; then
26376    with_add_source_root="$with_adds_and_overrides/adds"
26377    with_override_source_root="$with_adds_and_overrides/overrides"
26378  fi
26379
26380  if test "x$with_add_source_root" != x; then
26381    if ! test -d $with_add_source_root; then
26382      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
26383    fi
26384    CURDIR="$PWD"
26385    cd "$with_add_source_root"
26386    ADD_SRC_ROOT="`pwd`"
26387    cd "$CURDIR"
26388    # Verify that the addon source root does not have any root makefiles.
26389    # If it does, then it is usually an error, prevent this.
26390    if test -f $with_add_source_root/langtools/make/Makefile; then
26391      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
26392    fi
26393    if test -f $with_add_source_root/corba/make/Makefile; then
26394      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
26395    fi
26396    if test -f $with_add_source_root/jaxp/make/Makefile; then
26397      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
26398    fi
26399    if test -f $with_add_source_root/jaxws/make/Makefile; then
26400      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
26401    fi
26402    if test -f $with_add_source_root/hotspot/make/Makefile; then
26403      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
26404    fi
26405    if test -f $with_add_source_root/nashorn/make/Makefile; then
26406      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
26407    fi
26408    if test -f $with_add_source_root/jdk/make/Makefile; then
26409      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
26410    fi
26411  fi
26412
26413
26414  if test "x$with_override_source_root" != x; then
26415    if ! test -d $with_override_source_root; then
26416      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
26417    fi
26418    CURDIR="$PWD"
26419    cd "$with_override_source_root"
26420    OVERRIDE_SRC_ROOT="`pwd`"
26421    cd "$CURDIR"
26422    if test -f $with_override_source_root/langtools/make/Makefile; then
26423      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
26424    fi
26425    if test -f $with_override_source_root/corba/make/Makefile; then
26426      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
26427    fi
26428    if test -f $with_override_source_root/jaxp/make/Makefile; then
26429      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
26430    fi
26431    if test -f $with_override_source_root/jaxws/make/Makefile; then
26432      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
26433    fi
26434    if test -f $with_override_source_root/hotspot/make/Makefile; then
26435      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
26436    fi
26437    if test -f $with_override_source_root/nashorn/make/Makefile; then
26438      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
26439    fi
26440    if test -f $with_override_source_root/jdk/make/Makefile; then
26441      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
26442    fi
26443  fi
26444
26445
26446  ###############################################################################
26447  #
26448  # Override a repo completely, this is used for example when you have 3 small
26449  # development sandboxes of the langtools sources and want to avoid having 3 full
26450  # OpenJDK sources checked out on disk.
26451  #
26452  # Assuming that the 3 langtools sandboxes are located here:
26453  # /home/fredrik/sandbox1/langtools
26454  # /home/fredrik/sandbox2/langtools
26455  # /home/fredrik/sandbox3/langtools
26456  #
26457  # From the source root you create build subdirs manually:
26458  #     mkdir -p build1 build2 build3
26459  # in each build directory run:
26460  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
26461  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
26462  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
26463  #
26464
26465
26466# Check whether --with-override-langtools was given.
26467if test "${with_override_langtools+set}" = set; then :
26468  withval=$with_override_langtools;
26469fi
26470
26471
26472
26473# Check whether --with-override-corba was given.
26474if test "${with_override_corba+set}" = set; then :
26475  withval=$with_override_corba;
26476fi
26477
26478
26479
26480# Check whether --with-override-jaxp was given.
26481if test "${with_override_jaxp+set}" = set; then :
26482  withval=$with_override_jaxp;
26483fi
26484
26485
26486
26487# Check whether --with-override-jaxws was given.
26488if test "${with_override_jaxws+set}" = set; then :
26489  withval=$with_override_jaxws;
26490fi
26491
26492
26493
26494# Check whether --with-override-hotspot was given.
26495if test "${with_override_hotspot+set}" = set; then :
26496  withval=$with_override_hotspot;
26497fi
26498
26499
26500
26501# Check whether --with-override-nashorn was given.
26502if test "${with_override_nashorn+set}" = set; then :
26503  withval=$with_override_nashorn;
26504fi
26505
26506
26507
26508# Check whether --with-override-jdk was given.
26509if test "${with_override_jdk+set}" = set; then :
26510  withval=$with_override_jdk;
26511fi
26512
26513
26514  if test "x$with_override_langtools" != x; then
26515    CURDIR="$PWD"
26516    cd "$with_override_langtools"
26517    LANGTOOLS_TOPDIR="`pwd`"
26518    cd "$CURDIR"
26519    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
26520      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
26521    fi
26522    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
26523$as_echo_n "checking if langtools should be overridden... " >&6; }
26524    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
26525$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
26526  fi
26527  if test "x$with_override_corba" != x; then
26528    CURDIR="$PWD"
26529    cd "$with_override_corba"
26530    CORBA_TOPDIR="`pwd`"
26531    cd "$CURDIR"
26532    if ! test -f $CORBA_TOPDIR/make/Makefile; then
26533      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26534    fi
26535    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26536$as_echo_n "checking if corba should be overridden... " >&6; }
26537    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26538$as_echo "yes with $CORBA_TOPDIR" >&6; }
26539  fi
26540  if test "x$with_override_jaxp" != x; then
26541    CURDIR="$PWD"
26542    cd "$with_override_jaxp"
26543    JAXP_TOPDIR="`pwd`"
26544    cd "$CURDIR"
26545    if ! test -f $JAXP_TOPDIR/make/Makefile; then
26546      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26547    fi
26548    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26549$as_echo_n "checking if jaxp should be overridden... " >&6; }
26550    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26551$as_echo "yes with $JAXP_TOPDIR" >&6; }
26552  fi
26553  if test "x$with_override_jaxws" != x; then
26554    CURDIR="$PWD"
26555    cd "$with_override_jaxws"
26556    JAXWS_TOPDIR="`pwd`"
26557    cd "$CURDIR"
26558    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26559      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26560    fi
26561    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26562$as_echo_n "checking if jaxws should be overridden... " >&6; }
26563    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26564$as_echo "yes with $JAXWS_TOPDIR" >&6; }
26565  fi
26566  if test "x$with_override_hotspot" != x; then
26567    CURDIR="$PWD"
26568    cd "$with_override_hotspot"
26569    HOTSPOT_TOPDIR="`pwd`"
26570    cd "$CURDIR"
26571    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26572      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26573    fi
26574    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26575$as_echo_n "checking if hotspot should be overridden... " >&6; }
26576    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26577$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26578  fi
26579  if test "x$with_override_nashorn" != x; then
26580    CURDIR="$PWD"
26581    cd "$with_override_nashorn"
26582    NASHORN_TOPDIR="`pwd`"
26583    cd "$CURDIR"
26584    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26585      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26586    fi
26587    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26588$as_echo_n "checking if nashorn should be overridden... " >&6; }
26589    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26590$as_echo "yes with $NASHORN_TOPDIR" >&6; }
26591  fi
26592  if test "x$with_override_jdk" != x; then
26593    CURDIR="$PWD"
26594    cd "$with_override_jdk"
26595    JDK_TOPDIR="`pwd`"
26596    cd "$CURDIR"
26597    if ! test -f $JDK_TOPDIR/make/Makefile; then
26598      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26599    fi
26600    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26601$as_echo_n "checking if JDK should be overridden... " >&6; }
26602    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26603$as_echo "yes with $JDK_TOPDIR" >&6; }
26604  fi
26605
26606
26607  BUILD_OUTPUT="$OUTPUT_ROOT"
26608
26609
26610  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26611  BUILD_HOTSPOT=true
26612
26613
26614
26615# Check whether --with-import-hotspot was given.
26616if test "${with_import_hotspot+set}" = set; then :
26617  withval=$with_import_hotspot;
26618fi
26619
26620  if test "x$with_import_hotspot" != x; then
26621    CURDIR="$PWD"
26622    cd "$with_import_hotspot"
26623    HOTSPOT_DIST="`pwd`"
26624    cd "$CURDIR"
26625    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26626      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26627    fi
26628    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26629$as_echo_n "checking if hotspot should be imported... " >&6; }
26630    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26631$as_echo "yes from $HOTSPOT_DIST" >&6; }
26632    BUILD_HOTSPOT=false
26633  fi
26634
26635  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26636
26637
26638###############################################################################
26639#
26640# Setup the toolchain (compilers etc), i.e. tools used to compile and process
26641# native code.
26642#
26643###############################################################################
26644
26645# First determine the toolchain type (compiler family)
26646
26647
26648# Check whether --with-toolchain-type was given.
26649if test "${with_toolchain_type+set}" = set; then :
26650  withval=$with_toolchain_type;
26651fi
26652
26653
26654  # Use indirect variable referencing
26655  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
26656  VALID_TOOLCHAINS=${!toolchain_var_name}
26657
26658  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26659    if test -n "$XCODEBUILD"; then
26660      # On Mac OS X, default toolchain to clang after Xcode 5
26661      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
26662      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
26663      if test $? -ne 0; then
26664        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
26665      fi
26666      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
26667          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
26668          $CUT -f 1 -d .`
26669      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
26670$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
26671      if test $XCODE_MAJOR_VERSION -ge 5; then
26672          DEFAULT_TOOLCHAIN="clang"
26673      else
26674          DEFAULT_TOOLCHAIN="gcc"
26675      fi
26676    else
26677      # If Xcode is not installed, but the command line tools are
26678      # then we can't run xcodebuild. On these systems we should
26679      # default to clang
26680      DEFAULT_TOOLCHAIN="clang"
26681    fi
26682  else
26683    # First toolchain type in the list is the default
26684    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
26685  fi
26686
26687  if test "x$with_toolchain_type" = xlist; then
26688    # List all toolchains
26689    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
26690$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
26691    for toolchain in $VALID_TOOLCHAINS; do
26692      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
26693      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26694      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
26695    done
26696
26697    exit 0
26698  elif test "x$with_toolchain_type" != x; then
26699    # User override; check that it is valid
26700    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
26701      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
26702$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
26703      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
26704$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
26705      as_fn_error $? "Cannot continue." "$LINENO" 5
26706    fi
26707    TOOLCHAIN_TYPE=$with_toolchain_type
26708  else
26709    # No flag given, use default
26710    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
26711  fi
26712
26713
26714  TOOLCHAIN_CC_BINARY_clang="clang"
26715  TOOLCHAIN_CC_BINARY_gcc="gcc"
26716  TOOLCHAIN_CC_BINARY_microsoft="cl"
26717  TOOLCHAIN_CC_BINARY_solstudio="cc"
26718  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
26719
26720  TOOLCHAIN_CXX_BINARY_clang="clang++"
26721  TOOLCHAIN_CXX_BINARY_gcc="g++"
26722  TOOLCHAIN_CXX_BINARY_microsoft="cl"
26723  TOOLCHAIN_CXX_BINARY_solstudio="CC"
26724  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
26725
26726  # Use indirect variable referencing
26727  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
26728  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26729  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
26730  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
26731  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
26732  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
26733
26734
26735  # Define filename patterns
26736  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26737    LIBRARY_PREFIX=
26738    SHARED_LIBRARY_SUFFIX='.dll'
26739    STATIC_LIBRARY_SUFFIX='.lib'
26740    SHARED_LIBRARY='$1.dll'
26741    STATIC_LIBRARY='$1.lib'
26742    OBJ_SUFFIX='.obj'
26743    EXE_SUFFIX='.exe'
26744  else
26745    LIBRARY_PREFIX=lib
26746    SHARED_LIBRARY_SUFFIX='.so'
26747    STATIC_LIBRARY_SUFFIX='.a'
26748    SHARED_LIBRARY='lib$1.so'
26749    STATIC_LIBRARY='lib$1.a'
26750    OBJ_SUFFIX='.o'
26751    EXE_SUFFIX=''
26752    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26753      SHARED_LIBRARY='lib$1.dylib'
26754      SHARED_LIBRARY_SUFFIX='.dylib'
26755    fi
26756  fi
26757
26758
26759
26760
26761
26762
26763
26764
26765
26766
26767  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
26768    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
26769$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
26770  else
26771    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
26772$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
26773  fi
26774
26775
26776# Then detect the actual binaries needed
26777
26778  # FIXME: Is this needed?
26779  ac_ext=cpp
26780ac_cpp='$CXXCPP $CPPFLAGS'
26781ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26782ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26783ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26784
26785
26786  # Store the CFLAGS etc passed to the configure script.
26787  ORG_CFLAGS="$CFLAGS"
26788  ORG_CXXFLAGS="$CXXFLAGS"
26789  ORG_OBJCFLAGS="$OBJCFLAGS"
26790
26791  # On Windows, we need to detect the visual studio installation first.
26792  # This will change the PATH, but we need to keep that new PATH even
26793  # after toolchain detection is done, since the compiler (on x86) uses
26794  # it for DLL resolution in runtime.
26795  if test "x$OPENJDK_BUILD_OS" = "xwindows" && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
26796
26797  # Store path to cygwin link.exe to help excluding it when searching for
26798  # VS linker. This must be done before changing the PATH when looking for VS.
26799  # Extract the first word of "link", so it can be a program name with args.
26800set dummy link; ac_word=$2
26801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26802$as_echo_n "checking for $ac_word... " >&6; }
26803if ${ac_cv_path_CYGWIN_LINK+:} false; then :
26804  $as_echo_n "(cached) " >&6
26805else
26806  case $CYGWIN_LINK in
26807  [\\/]* | ?:[\\/]*)
26808  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
26809  ;;
26810  *)
26811  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26812for as_dir in $PATH
26813do
26814  IFS=$as_save_IFS
26815  test -z "$as_dir" && as_dir=.
26816    for ac_exec_ext in '' $ac_executable_extensions; do
26817  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26818    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
26819    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26820    break 2
26821  fi
26822done
26823  done
26824IFS=$as_save_IFS
26825
26826  ;;
26827esac
26828fi
26829CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
26830if test -n "$CYGWIN_LINK"; then
26831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
26832$as_echo "$CYGWIN_LINK" >&6; }
26833else
26834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26835$as_echo "no" >&6; }
26836fi
26837
26838
26839  if test "x$CYGWIN_LINK" != x; then
26840    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
26841$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
26842    "$CYGWIN_LINK" --version > /dev/null
26843    if test $? -eq 0 ; then
26844      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26845$as_echo "yes" >&6; }
26846    else
26847      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26848$as_echo "no" >&6; }
26849      # This might be the VS linker. Don't exclude it later on.
26850      CYGWIN_LINK=""
26851    fi
26852  fi
26853
26854  # First-hand choice is to locate and run the vsvars bat file.
26855
26856  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26857    VCVARSFILE="vc/bin/vcvars32.bat"
26858  else
26859    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26860  fi
26861
26862  VS_ENV_CMD=""
26863  VS_ENV_ARGS=""
26864  if test "x$with_toolsdir" != x; then
26865
26866  if test "x$VS_ENV_CMD" = x; then
26867    VS100BASE="$with_toolsdir/../.."
26868    METHOD="--with-tools-dir"
26869
26870  windows_path="$VS100BASE"
26871  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26872    unix_path=`$CYGPATH -u "$windows_path"`
26873    VS100BASE="$unix_path"
26874  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26875    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26876    VS100BASE="$unix_path"
26877  fi
26878
26879    if test -d "$VS100BASE"; then
26880      if test -f "$VS100BASE/$VCVARSFILE"; then
26881        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26882$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26883        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26884      else
26885        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26886$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26887        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26888$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26889      fi
26890    fi
26891  fi
26892
26893  fi
26894
26895  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
26896    # Having specified an argument which is incorrect will produce an instant failure;
26897    # we should not go on looking
26898    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
26899$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
26900    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
26901$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
26902    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
26903  fi
26904
26905  if test "x$VS100COMNTOOLS" != x; then
26906
26907  if test "x$VS_ENV_CMD" = x; then
26908    VS100BASE="$VS100COMNTOOLS/../.."
26909    METHOD="VS100COMNTOOLS variable"
26910
26911  windows_path="$VS100BASE"
26912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26913    unix_path=`$CYGPATH -u "$windows_path"`
26914    VS100BASE="$unix_path"
26915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26916    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26917    VS100BASE="$unix_path"
26918  fi
26919
26920    if test -d "$VS100BASE"; then
26921      if test -f "$VS100BASE/$VCVARSFILE"; then
26922        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26923$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26924        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26925      else
26926        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26927$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26928        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26929$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26930      fi
26931    fi
26932  fi
26933
26934  fi
26935  if test "x$PROGRAMFILES" != x; then
26936
26937  if test "x$VS_ENV_CMD" = x; then
26938    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
26939    METHOD="well-known name"
26940
26941  windows_path="$VS100BASE"
26942  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26943    unix_path=`$CYGPATH -u "$windows_path"`
26944    VS100BASE="$unix_path"
26945  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26946    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26947    VS100BASE="$unix_path"
26948  fi
26949
26950    if test -d "$VS100BASE"; then
26951      if test -f "$VS100BASE/$VCVARSFILE"; then
26952        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26953$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26954        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26955      else
26956        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26957$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26958        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26959$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26960      fi
26961    fi
26962  fi
26963
26964  fi
26965
26966  if test "x$VS_ENV_CMD" = x; then
26967    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
26968    METHOD="well-known name"
26969
26970  windows_path="$VS100BASE"
26971  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26972    unix_path=`$CYGPATH -u "$windows_path"`
26973    VS100BASE="$unix_path"
26974  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26975    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26976    VS100BASE="$unix_path"
26977  fi
26978
26979    if test -d "$VS100BASE"; then
26980      if test -f "$VS100BASE/$VCVARSFILE"; then
26981        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26982$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26983        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26984      else
26985        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26986$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26987        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26988$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26989      fi
26990    fi
26991  fi
26992
26993
26994  if test "x$VS_ENV_CMD" = x; then
26995    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
26996    METHOD="well-known name"
26997
26998  windows_path="$VS100BASE"
26999  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27000    unix_path=`$CYGPATH -u "$windows_path"`
27001    VS100BASE="$unix_path"
27002  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27003    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27004    VS100BASE="$unix_path"
27005  fi
27006
27007    if test -d "$VS100BASE"; then
27008      if test -f "$VS100BASE/$VCVARSFILE"; then
27009        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27010$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27011        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
27012      else
27013        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27014$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27015        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27016$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27017      fi
27018    fi
27019  fi
27020
27021
27022  if test "x$ProgramW6432" != x; then
27023
27024  if test "x$VS_ENV_CMD" = x; then
27025    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
27026    METHOD="well-known name"
27027
27028  windows_path="$WIN_SDK_BASE"
27029  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27030    unix_path=`$CYGPATH -u "$windows_path"`
27031    WIN_SDK_BASE="$unix_path"
27032  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27033    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27034    WIN_SDK_BASE="$unix_path"
27035  fi
27036
27037    if test -d "$WIN_SDK_BASE"; then
27038      # There have been cases of partial or broken SDK installations. A missing
27039      # lib dir is not going to work.
27040      if test ! -d "$WIN_SDK_BASE/../lib"; then
27041        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27042$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27043        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27044$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27045      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27046        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27047$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27048        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27049        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27050          VS_ENV_ARGS="/x86"
27051        else
27052          VS_ENV_ARGS="/x64"
27053        fi
27054      else
27055        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27056$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27057        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27058$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27059      fi
27060    fi
27061  fi
27062
27063  fi
27064  if test "x$PROGRAMW6432" != x; then
27065
27066  if test "x$VS_ENV_CMD" = x; then
27067    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
27068    METHOD="well-known name"
27069
27070  windows_path="$WIN_SDK_BASE"
27071  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27072    unix_path=`$CYGPATH -u "$windows_path"`
27073    WIN_SDK_BASE="$unix_path"
27074  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27075    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27076    WIN_SDK_BASE="$unix_path"
27077  fi
27078
27079    if test -d "$WIN_SDK_BASE"; then
27080      # There have been cases of partial or broken SDK installations. A missing
27081      # lib dir is not going to work.
27082      if test ! -d "$WIN_SDK_BASE/../lib"; then
27083        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27084$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27085        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27086$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27087      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27088        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27089$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27090        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27091        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27092          VS_ENV_ARGS="/x86"
27093        else
27094          VS_ENV_ARGS="/x64"
27095        fi
27096      else
27097        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27098$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27099        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27100$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27101      fi
27102    fi
27103  fi
27104
27105  fi
27106  if test "x$PROGRAMFILES" != x; then
27107
27108  if test "x$VS_ENV_CMD" = x; then
27109    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
27110    METHOD="well-known name"
27111
27112  windows_path="$WIN_SDK_BASE"
27113  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27114    unix_path=`$CYGPATH -u "$windows_path"`
27115    WIN_SDK_BASE="$unix_path"
27116  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27117    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27118    WIN_SDK_BASE="$unix_path"
27119  fi
27120
27121    if test -d "$WIN_SDK_BASE"; then
27122      # There have been cases of partial or broken SDK installations. A missing
27123      # lib dir is not going to work.
27124      if test ! -d "$WIN_SDK_BASE/../lib"; then
27125        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27126$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27127        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27128$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27129      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27130        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27131$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27132        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27133        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27134          VS_ENV_ARGS="/x86"
27135        else
27136          VS_ENV_ARGS="/x64"
27137        fi
27138      else
27139        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27140$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27141        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27142$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27143      fi
27144    fi
27145  fi
27146
27147  fi
27148
27149  if test "x$VS_ENV_CMD" = x; then
27150    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
27151    METHOD="well-known name"
27152
27153  windows_path="$WIN_SDK_BASE"
27154  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27155    unix_path=`$CYGPATH -u "$windows_path"`
27156    WIN_SDK_BASE="$unix_path"
27157  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27158    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27159    WIN_SDK_BASE="$unix_path"
27160  fi
27161
27162    if test -d "$WIN_SDK_BASE"; then
27163      # There have been cases of partial or broken SDK installations. A missing
27164      # lib dir is not going to work.
27165      if test ! -d "$WIN_SDK_BASE/../lib"; then
27166        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27167$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27168        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27169$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27170      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27171        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27172$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27173        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27174        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27175          VS_ENV_ARGS="/x86"
27176        else
27177          VS_ENV_ARGS="/x64"
27178        fi
27179      else
27180        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27181$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27182        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27183$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27184      fi
27185    fi
27186  fi
27187
27188
27189  if test "x$VS_ENV_CMD" = x; then
27190    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
27191    METHOD="well-known name"
27192
27193  windows_path="$WIN_SDK_BASE"
27194  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27195    unix_path=`$CYGPATH -u "$windows_path"`
27196    WIN_SDK_BASE="$unix_path"
27197  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27198    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27199    WIN_SDK_BASE="$unix_path"
27200  fi
27201
27202    if test -d "$WIN_SDK_BASE"; then
27203      # There have been cases of partial or broken SDK installations. A missing
27204      # lib dir is not going to work.
27205      if test ! -d "$WIN_SDK_BASE/../lib"; then
27206        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27207$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27208        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27209$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27210      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27211        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27212$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27213        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27214        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27215          VS_ENV_ARGS="/x86"
27216        else
27217          VS_ENV_ARGS="/x64"
27218        fi
27219      else
27220        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27221$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27222        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27223$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27224      fi
27225    fi
27226  fi
27227
27228
27229  if test "x$VS_ENV_CMD" != x; then
27230    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
27231
27232  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27233
27234  # First separate the path from the arguments. This will split at the first
27235  # space.
27236  complete="$VS_ENV_CMD"
27237  path="${complete%% *}"
27238  tmp="$complete EOL"
27239  arguments="${tmp#* }"
27240
27241  # Input might be given as Windows format, start by converting to
27242  # unix format.
27243  new_path=`$CYGPATH -u "$path"`
27244
27245  # Now try to locate executable using which
27246  new_path=`$WHICH "$new_path" 2> /dev/null`
27247  # bat and cmd files are not always considered executable in cygwin causing which
27248  # to not find them
27249  if test "x$new_path" = x \
27250      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27251      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27252    new_path=`$CYGPATH -u "$path"`
27253  fi
27254  if test "x$new_path" = x; then
27255    # Oops. Which didn't find the executable.
27256    # The splitting of arguments from the executable at a space might have been incorrect,
27257    # since paths with space are more likely in Windows. Give it another try with the whole
27258    # argument.
27259    path="$complete"
27260    arguments="EOL"
27261    new_path=`$CYGPATH -u "$path"`
27262    new_path=`$WHICH "$new_path" 2> /dev/null`
27263    # bat and cmd files are not always considered executable in cygwin causing which
27264    # to not find them
27265    if test "x$new_path" = x \
27266        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27267        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27268      new_path=`$CYGPATH -u "$path"`
27269    fi
27270    if test "x$new_path" = x; then
27271      # It's still not found. Now this is an unrecoverable error.
27272      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27273$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27274      has_space=`$ECHO "$complete" | $GREP " "`
27275      if test "x$has_space" != x; then
27276        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27277$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27278      fi
27279      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27280    fi
27281  fi
27282
27283  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27284  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27285  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27286  # "foo.exe" is OK but "foo" is an error.
27287  #
27288  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27289  # It is also a way to make sure we got the proper file name for the real test later on.
27290  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27291  if test "x$test_shortpath" = x; then
27292    # Short path failed, file does not exist as specified.
27293    # Try adding .exe or .cmd
27294    if test -f "${new_path}.exe"; then
27295      input_to_shortpath="${new_path}.exe"
27296    elif test -f "${new_path}.cmd"; then
27297      input_to_shortpath="${new_path}.cmd"
27298    else
27299      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
27300$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
27301      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27302$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27303      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27304    fi
27305  else
27306    input_to_shortpath="$new_path"
27307  fi
27308
27309  # Call helper function which possibly converts this using DOS-style short mode.
27310  # If so, the updated path is stored in $new_path.
27311  new_path="$input_to_shortpath"
27312
27313  input_path="$input_to_shortpath"
27314  # Check if we need to convert this using DOS-style short mode. If the path
27315  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27316  # take no chances and rewrite it.
27317  # Note: m4 eats our [], so we need to use [ and ] instead.
27318  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27319  if test "x$has_forbidden_chars" != x; then
27320    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27321    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27322    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27323    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27324      # Going to short mode and back again did indeed matter. Since short mode is
27325      # case insensitive, let's make it lowercase to improve readability.
27326      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27327      # Now convert it back to Unix-stile (cygpath)
27328      input_path=`$CYGPATH -u "$shortmode_path"`
27329      new_path="$input_path"
27330    fi
27331  fi
27332
27333  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27334  if test "x$test_cygdrive_prefix" = x; then
27335    # As a simple fix, exclude /usr/bin since it's not a real path.
27336    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27337      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27338      # a path prefixed by /cygdrive for fixpath to work.
27339      new_path="$CYGWIN_ROOT_PATH$input_path"
27340    fi
27341  fi
27342
27343  # remove trailing .exe if any
27344  new_path="${new_path/%.exe/}"
27345
27346  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27347
27348  # First separate the path from the arguments. This will split at the first
27349  # space.
27350  complete="$VS_ENV_CMD"
27351  path="${complete%% *}"
27352  tmp="$complete EOL"
27353  arguments="${tmp#* }"
27354
27355  # Input might be given as Windows format, start by converting to
27356  # unix format.
27357  new_path="$path"
27358
27359  windows_path="$new_path"
27360  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27361    unix_path=`$CYGPATH -u "$windows_path"`
27362    new_path="$unix_path"
27363  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27364    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27365    new_path="$unix_path"
27366  fi
27367
27368
27369  # Now try to locate executable using which
27370  new_path=`$WHICH "$new_path" 2> /dev/null`
27371
27372  if test "x$new_path" = x; then
27373    # Oops. Which didn't find the executable.
27374    # The splitting of arguments from the executable at a space might have been incorrect,
27375    # since paths with space are more likely in Windows. Give it another try with the whole
27376    # argument.
27377    path="$complete"
27378    arguments="EOL"
27379    new_path="$path"
27380
27381  windows_path="$new_path"
27382  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27383    unix_path=`$CYGPATH -u "$windows_path"`
27384    new_path="$unix_path"
27385  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27386    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27387    new_path="$unix_path"
27388  fi
27389
27390
27391    new_path=`$WHICH "$new_path" 2> /dev/null`
27392    # bat and cmd files are not always considered executable in MSYS causing which
27393    # to not find them
27394    if test "x$new_path" = x \
27395        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27396        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27397      new_path="$path"
27398
27399  windows_path="$new_path"
27400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27401    unix_path=`$CYGPATH -u "$windows_path"`
27402    new_path="$unix_path"
27403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27404    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27405    new_path="$unix_path"
27406  fi
27407
27408    fi
27409
27410    if test "x$new_path" = x; then
27411      # It's still not found. Now this is an unrecoverable error.
27412      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27413$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27414      has_space=`$ECHO "$complete" | $GREP " "`
27415      if test "x$has_space" != x; then
27416        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27417$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27418      fi
27419      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27420    fi
27421  fi
27422
27423  # Now new_path has a complete unix path to the binary
27424  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27425    # Keep paths in /bin as-is, but remove trailing .exe if any
27426    new_path="${new_path/%.exe/}"
27427    # Do not save /bin paths to all_fixpath_prefixes!
27428  else
27429    # Not in mixed or Windows style, start by that.
27430    new_path=`cmd //c echo $new_path`
27431
27432  input_path="$new_path"
27433  # Check if we need to convert this using DOS-style short mode. If the path
27434  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27435  # take no chances and rewrite it.
27436  # Note: m4 eats our [], so we need to use [ and ] instead.
27437  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27438  if test "x$has_forbidden_chars" != x; then
27439    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27440    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27441  fi
27442
27443    # Output is in $new_path
27444
27445  windows_path="$new_path"
27446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27447    unix_path=`$CYGPATH -u "$windows_path"`
27448    new_path="$unix_path"
27449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27450    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27451    new_path="$unix_path"
27452  fi
27453
27454    # remove trailing .exe if any
27455    new_path="${new_path/%.exe/}"
27456
27457    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27458    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27459  fi
27460
27461  else
27462    # We're on a posix platform. Hooray! :)
27463    # First separate the path from the arguments. This will split at the first
27464    # space.
27465    complete="$VS_ENV_CMD"
27466    path="${complete%% *}"
27467    tmp="$complete EOL"
27468    arguments="${tmp#* }"
27469
27470    # Cannot rely on the command "which" here since it doesn't always work.
27471    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27472    if test -z "$is_absolute_path"; then
27473      # Path to executable is not absolute. Find it.
27474      IFS_save="$IFS"
27475      IFS=:
27476      for p in $PATH; do
27477        if test -f "$p/$path" && test -x "$p/$path"; then
27478          new_path="$p/$path"
27479          break
27480        fi
27481      done
27482      IFS="$IFS_save"
27483    else
27484      # This is an absolute path, we can use it without further modifications.
27485      new_path="$path"
27486    fi
27487
27488    if test "x$new_path" = x; then
27489      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27490$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27491      has_space=`$ECHO "$complete" | $GREP " "`
27492      if test "x$has_space" != x; then
27493        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27494$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27495      fi
27496      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27497    fi
27498  fi
27499
27500  # Now join together the path and the arguments once again
27501  if test "x$arguments" != xEOL; then
27502    new_complete="$new_path ${arguments% *}"
27503  else
27504    new_complete="$new_path"
27505  fi
27506
27507  if test "x$complete" != "x$new_complete"; then
27508    VS_ENV_CMD="$new_complete"
27509    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
27510$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
27511  fi
27512
27513
27514    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
27515    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
27516$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
27517
27518    # We need to create a couple of temporary files.
27519    VS_ENV_TMP_DIR="$OUTPUT_ROOT/vs-env"
27520    $MKDIR -p $VS_ENV_TMP_DIR
27521
27522    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
27523    # Instead create a shell script which will set the relevant variables when run.
27524    WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
27525
27526  unix_path="$WINPATH_VS_ENV_CMD"
27527  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27528    windows_path=`$CYGPATH -m "$unix_path"`
27529    WINPATH_VS_ENV_CMD="$windows_path"
27530  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27531    windows_path=`cmd //c echo $unix_path`
27532    WINPATH_VS_ENV_CMD="$windows_path"
27533  fi
27534
27535    WINPATH_BASH="$BASH"
27536
27537  unix_path="$WINPATH_BASH"
27538  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27539    windows_path=`$CYGPATH -m "$unix_path"`
27540    WINPATH_BASH="$windows_path"
27541  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27542    windows_path=`cmd //c echo $unix_path`
27543    WINPATH_BASH="$windows_path"
27544  fi
27545
27546
27547    # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
27548    # script (executable by bash) that will setup the important variables.
27549    EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
27550    $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
27551    # This will end up something like:
27552    # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
27553    $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
27554    # These will end up something like:
27555    # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
27556    # The trailing space for everyone except PATH is no typo, but is needed due
27557    # to trailing \ in the Windows paths. These will be stripped later.
27558    $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27559    $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27560    $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27561    $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27562    $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27563    $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27564
27565    # Now execute the newly created bat file.
27566    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
27567    # Change directory so we don't need to mess with Windows paths in redirects.
27568    cd $VS_ENV_TMP_DIR
27569    cmd /c extract-vs-env.bat | $CAT
27570    cd $CURDIR
27571
27572    if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
27573      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
27574$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
27575      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27576$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27577      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27578$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27579      as_fn_error $? "Cannot continue" "$LINENO" 5
27580    fi
27581
27582    # Now set all paths and other env variables. This will allow the rest of
27583    # the configure script to find and run the compiler in the proper way.
27584    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
27585$as_echo "$as_me: Setting extracted environment variables" >&6;}
27586    . $VS_ENV_TMP_DIR/set-vs-env.sh
27587    # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
27588    # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
27589  else
27590    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
27591    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
27592$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
27593  fi
27594
27595  # At this point, we should have correct variables in the environment, or we can't continue.
27596  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
27597$as_echo_n "checking for Visual Studio variables... " >&6; }
27598
27599  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
27600    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
27601      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
27602$as_echo "present but broken" >&6; }
27603      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
27604    else
27605      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27606$as_echo "ok" >&6; }
27607      # Remove any trailing "\" and " " from the variables.
27608      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED 's/\\\\* *$//'`
27609      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\* *$//'`
27610      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
27611      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
27612      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
27613      # Remove any paths containing # (typically F#) as that messes up make. This
27614      # is needed if visual studio was installed with F# support.
27615      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
27616
27617
27618
27619
27620    fi
27621  else
27622    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
27623$as_echo "not found" >&6; }
27624
27625    if test "x$VS_ENV_CMD" = x; then
27626      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
27627$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
27628      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
27629$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
27630    else
27631      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
27632$as_echo "$as_me: Running the extraction script failed." >&6;}
27633    fi
27634    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27635$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27636    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27637$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27638    as_fn_error $? "Cannot continue" "$LINENO" 5
27639  fi
27640
27641    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
27642    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
27643    PATH="$VS_PATH"
27644    # The microsoft toolchain also requires INCLUDE and LIB to be set.
27645    export INCLUDE="$VS_INCLUDE"
27646    export LIB="$VS_LIB"
27647  fi
27648
27649  # autoconf magic only relies on PATH, so update it if tools dir is specified
27650  OLD_PATH="$PATH"
27651
27652  # For solaris we really need solaris tools, and not the GNU equivalent.
27653  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
27654  # so add that to path before starting to probe.
27655  # FIXME: This was originally only done for AS,NM,GNM,STRIP,MCS,OBJCOPY,OBJDUMP.
27656  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
27657    PATH="/usr/ccs/bin:$PATH"
27658  fi
27659
27660  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
27661  # override all other locations.
27662  if test "x$TOOLCHAIN_PATH" != x; then
27663    PATH=$TOOLCHAIN_PATH:$PATH
27664  fi
27665
27666
27667  #
27668  # Setup the compilers (CC and CXX)
27669  #
27670
27671  COMPILER_NAME=C
27672  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
27673
27674  if test "x$CC" != x; then
27675    # User has supplied compiler name already, always let that override.
27676    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
27677$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
27678    if test "x`basename $CC`" = "x$CC"; then
27679      # A command without a complete path is provided, search $PATH.
27680
27681      for ac_prog in $CC
27682do
27683  # Extract the first word of "$ac_prog", so it can be a program name with args.
27684set dummy $ac_prog; ac_word=$2
27685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27686$as_echo_n "checking for $ac_word... " >&6; }
27687if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27688  $as_echo_n "(cached) " >&6
27689else
27690  case $POTENTIAL_CC in
27691  [\\/]* | ?:[\\/]*)
27692  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27693  ;;
27694  *)
27695  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27696for as_dir in $PATH
27697do
27698  IFS=$as_save_IFS
27699  test -z "$as_dir" && as_dir=.
27700    for ac_exec_ext in '' $ac_executable_extensions; do
27701  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27702    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27703    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27704    break 2
27705  fi
27706done
27707  done
27708IFS=$as_save_IFS
27709
27710  ;;
27711esac
27712fi
27713POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27714if test -n "$POTENTIAL_CC"; then
27715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27716$as_echo "$POTENTIAL_CC" >&6; }
27717else
27718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27719$as_echo "no" >&6; }
27720fi
27721
27722
27723  test -n "$POTENTIAL_CC" && break
27724done
27725
27726      if test "x$POTENTIAL_CC" != x; then
27727        CC=$POTENTIAL_CC
27728      else
27729        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
27730      fi
27731    else
27732      # Otherwise it might already be a complete path
27733      if test ! -x "$CC"; then
27734        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
27735      fi
27736    fi
27737  else
27738    # No user supplied value. Locate compiler ourselves.
27739
27740    # If we are cross compiling, assume cross compilation tools follows the
27741    # cross compilation standard where they are prefixed with the autoconf
27742    # standard name for the target. For example the binary
27743    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
27744    # If we are not cross compiling, then the default compiler name will be
27745    # used.
27746
27747    CC=
27748    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
27749    # before checking the rest of the PATH.
27750    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
27751    # step, this should not be necessary.
27752    if test -n "$TOOLCHAIN_PATH"; then
27753      PATH_save="$PATH"
27754      PATH="$TOOLCHAIN_PATH"
27755      for ac_prog in $SEARCH_LIST
27756do
27757  # Extract the first word of "$ac_prog", so it can be a program name with args.
27758set dummy $ac_prog; ac_word=$2
27759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27760$as_echo_n "checking for $ac_word... " >&6; }
27761if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
27762  $as_echo_n "(cached) " >&6
27763else
27764  case $TOOLCHAIN_PATH_CC in
27765  [\\/]* | ?:[\\/]*)
27766  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
27767  ;;
27768  *)
27769  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27770for as_dir in $PATH
27771do
27772  IFS=$as_save_IFS
27773  test -z "$as_dir" && as_dir=.
27774    for ac_exec_ext in '' $ac_executable_extensions; do
27775  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27776    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
27777    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27778    break 2
27779  fi
27780done
27781  done
27782IFS=$as_save_IFS
27783
27784  ;;
27785esac
27786fi
27787TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
27788if test -n "$TOOLCHAIN_PATH_CC"; then
27789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
27790$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
27791else
27792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27793$as_echo "no" >&6; }
27794fi
27795
27796
27797  test -n "$TOOLCHAIN_PATH_CC" && break
27798done
27799
27800      CC=$TOOLCHAIN_PATH_CC
27801      PATH="$PATH_save"
27802    fi
27803
27804    # AC_PATH_PROGS can't be run multiple times with the same variable,
27805    # so create a new name for this run.
27806    if test "x$CC" = x; then
27807      for ac_prog in $SEARCH_LIST
27808do
27809  # Extract the first word of "$ac_prog", so it can be a program name with args.
27810set dummy $ac_prog; ac_word=$2
27811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27812$as_echo_n "checking for $ac_word... " >&6; }
27813if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27814  $as_echo_n "(cached) " >&6
27815else
27816  case $POTENTIAL_CC in
27817  [\\/]* | ?:[\\/]*)
27818  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27819  ;;
27820  *)
27821  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27822for as_dir in $PATH
27823do
27824  IFS=$as_save_IFS
27825  test -z "$as_dir" && as_dir=.
27826    for ac_exec_ext in '' $ac_executable_extensions; do
27827  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27828    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27829    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27830    break 2
27831  fi
27832done
27833  done
27834IFS=$as_save_IFS
27835
27836  ;;
27837esac
27838fi
27839POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27840if test -n "$POTENTIAL_CC"; then
27841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27842$as_echo "$POTENTIAL_CC" >&6; }
27843else
27844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27845$as_echo "no" >&6; }
27846fi
27847
27848
27849  test -n "$POTENTIAL_CC" && break
27850done
27851
27852      CC=$POTENTIAL_CC
27853    fi
27854
27855    if test "x$CC" = x; then
27856
27857  # Print a helpful message on how to acquire the necessary build dependency.
27858  # devkit is the help tag: freetype, cups, pulse, alsa etc
27859  MISSING_DEPENDENCY=devkit
27860
27861  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27862    cygwin_help $MISSING_DEPENDENCY
27863  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27864    msys_help $MISSING_DEPENDENCY
27865  else
27866    PKGHANDLER_COMMAND=
27867
27868    case $PKGHANDLER in
27869      apt-get)
27870        apt_help     $MISSING_DEPENDENCY ;;
27871      yum)
27872        yum_help     $MISSING_DEPENDENCY ;;
27873      port)
27874        port_help    $MISSING_DEPENDENCY ;;
27875      pkgutil)
27876        pkgutil_help $MISSING_DEPENDENCY ;;
27877      pkgadd)
27878        pkgadd_help  $MISSING_DEPENDENCY ;;
27879    esac
27880
27881    if test "x$PKGHANDLER_COMMAND" != x; then
27882      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
27883    fi
27884  fi
27885
27886      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
27887    fi
27888  fi
27889
27890  # Now we have a compiler binary in CC. Make sure it's okay.
27891
27892  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27893
27894  # First separate the path from the arguments. This will split at the first
27895  # space.
27896  complete="$CC"
27897  path="${complete%% *}"
27898  tmp="$complete EOL"
27899  arguments="${tmp#* }"
27900
27901  # Input might be given as Windows format, start by converting to
27902  # unix format.
27903  new_path=`$CYGPATH -u "$path"`
27904
27905  # Now try to locate executable using which
27906  new_path=`$WHICH "$new_path" 2> /dev/null`
27907  # bat and cmd files are not always considered executable in cygwin causing which
27908  # to not find them
27909  if test "x$new_path" = x \
27910      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27911      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27912    new_path=`$CYGPATH -u "$path"`
27913  fi
27914  if test "x$new_path" = x; then
27915    # Oops. Which didn't find the executable.
27916    # The splitting of arguments from the executable at a space might have been incorrect,
27917    # since paths with space are more likely in Windows. Give it another try with the whole
27918    # argument.
27919    path="$complete"
27920    arguments="EOL"
27921    new_path=`$CYGPATH -u "$path"`
27922    new_path=`$WHICH "$new_path" 2> /dev/null`
27923    # bat and cmd files are not always considered executable in cygwin causing which
27924    # to not find them
27925    if test "x$new_path" = x \
27926        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27927        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27928      new_path=`$CYGPATH -u "$path"`
27929    fi
27930    if test "x$new_path" = x; then
27931      # It's still not found. Now this is an unrecoverable error.
27932      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27933$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27934      has_space=`$ECHO "$complete" | $GREP " "`
27935      if test "x$has_space" != x; then
27936        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27937$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27938      fi
27939      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27940    fi
27941  fi
27942
27943  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27944  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27945  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27946  # "foo.exe" is OK but "foo" is an error.
27947  #
27948  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27949  # It is also a way to make sure we got the proper file name for the real test later on.
27950  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27951  if test "x$test_shortpath" = x; then
27952    # Short path failed, file does not exist as specified.
27953    # Try adding .exe or .cmd
27954    if test -f "${new_path}.exe"; then
27955      input_to_shortpath="${new_path}.exe"
27956    elif test -f "${new_path}.cmd"; then
27957      input_to_shortpath="${new_path}.cmd"
27958    else
27959      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
27960$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
27961      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27962$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27963      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27964    fi
27965  else
27966    input_to_shortpath="$new_path"
27967  fi
27968
27969  # Call helper function which possibly converts this using DOS-style short mode.
27970  # If so, the updated path is stored in $new_path.
27971  new_path="$input_to_shortpath"
27972
27973  input_path="$input_to_shortpath"
27974  # Check if we need to convert this using DOS-style short mode. If the path
27975  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27976  # take no chances and rewrite it.
27977  # Note: m4 eats our [], so we need to use [ and ] instead.
27978  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27979  if test "x$has_forbidden_chars" != x; then
27980    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27981    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27982    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27983    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27984      # Going to short mode and back again did indeed matter. Since short mode is
27985      # case insensitive, let's make it lowercase to improve readability.
27986      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27987      # Now convert it back to Unix-stile (cygpath)
27988      input_path=`$CYGPATH -u "$shortmode_path"`
27989      new_path="$input_path"
27990    fi
27991  fi
27992
27993  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27994  if test "x$test_cygdrive_prefix" = x; then
27995    # As a simple fix, exclude /usr/bin since it's not a real path.
27996    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27997      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27998      # a path prefixed by /cygdrive for fixpath to work.
27999      new_path="$CYGWIN_ROOT_PATH$input_path"
28000    fi
28001  fi
28002
28003  # remove trailing .exe if any
28004  new_path="${new_path/%.exe/}"
28005
28006  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28007
28008  # First separate the path from the arguments. This will split at the first
28009  # space.
28010  complete="$CC"
28011  path="${complete%% *}"
28012  tmp="$complete EOL"
28013  arguments="${tmp#* }"
28014
28015  # Input might be given as Windows format, start by converting to
28016  # unix format.
28017  new_path="$path"
28018
28019  windows_path="$new_path"
28020  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28021    unix_path=`$CYGPATH -u "$windows_path"`
28022    new_path="$unix_path"
28023  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28024    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28025    new_path="$unix_path"
28026  fi
28027
28028
28029  # Now try to locate executable using which
28030  new_path=`$WHICH "$new_path" 2> /dev/null`
28031
28032  if test "x$new_path" = x; then
28033    # Oops. Which didn't find the executable.
28034    # The splitting of arguments from the executable at a space might have been incorrect,
28035    # since paths with space are more likely in Windows. Give it another try with the whole
28036    # argument.
28037    path="$complete"
28038    arguments="EOL"
28039    new_path="$path"
28040
28041  windows_path="$new_path"
28042  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28043    unix_path=`$CYGPATH -u "$windows_path"`
28044    new_path="$unix_path"
28045  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28046    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28047    new_path="$unix_path"
28048  fi
28049
28050
28051    new_path=`$WHICH "$new_path" 2> /dev/null`
28052    # bat and cmd files are not always considered executable in MSYS causing which
28053    # to not find them
28054    if test "x$new_path" = x \
28055        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28056        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28057      new_path="$path"
28058
28059  windows_path="$new_path"
28060  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28061    unix_path=`$CYGPATH -u "$windows_path"`
28062    new_path="$unix_path"
28063  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28064    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28065    new_path="$unix_path"
28066  fi
28067
28068    fi
28069
28070    if test "x$new_path" = x; then
28071      # It's still not found. Now this is an unrecoverable error.
28072      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28073$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28074      has_space=`$ECHO "$complete" | $GREP " "`
28075      if test "x$has_space" != x; then
28076        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28077$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28078      fi
28079      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28080    fi
28081  fi
28082
28083  # Now new_path has a complete unix path to the binary
28084  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28085    # Keep paths in /bin as-is, but remove trailing .exe if any
28086    new_path="${new_path/%.exe/}"
28087    # Do not save /bin paths to all_fixpath_prefixes!
28088  else
28089    # Not in mixed or Windows style, start by that.
28090    new_path=`cmd //c echo $new_path`
28091
28092  input_path="$new_path"
28093  # Check if we need to convert this using DOS-style short mode. If the path
28094  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28095  # take no chances and rewrite it.
28096  # Note: m4 eats our [], so we need to use [ and ] instead.
28097  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28098  if test "x$has_forbidden_chars" != x; then
28099    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28100    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28101  fi
28102
28103    # Output is in $new_path
28104
28105  windows_path="$new_path"
28106  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28107    unix_path=`$CYGPATH -u "$windows_path"`
28108    new_path="$unix_path"
28109  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28110    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28111    new_path="$unix_path"
28112  fi
28113
28114    # remove trailing .exe if any
28115    new_path="${new_path/%.exe/}"
28116
28117    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28118    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28119  fi
28120
28121  else
28122    # We're on a posix platform. Hooray! :)
28123    # First separate the path from the arguments. This will split at the first
28124    # space.
28125    complete="$CC"
28126    path="${complete%% *}"
28127    tmp="$complete EOL"
28128    arguments="${tmp#* }"
28129
28130    # Cannot rely on the command "which" here since it doesn't always work.
28131    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28132    if test -z "$is_absolute_path"; then
28133      # Path to executable is not absolute. Find it.
28134      IFS_save="$IFS"
28135      IFS=:
28136      for p in $PATH; do
28137        if test -f "$p/$path" && test -x "$p/$path"; then
28138          new_path="$p/$path"
28139          break
28140        fi
28141      done
28142      IFS="$IFS_save"
28143    else
28144      # This is an absolute path, we can use it without further modifications.
28145      new_path="$path"
28146    fi
28147
28148    if test "x$new_path" = x; then
28149      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28150$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28151      has_space=`$ECHO "$complete" | $GREP " "`
28152      if test "x$has_space" != x; then
28153        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28154$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28155      fi
28156      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28157    fi
28158  fi
28159
28160  # Now join together the path and the arguments once again
28161  if test "x$arguments" != xEOL; then
28162    new_complete="$new_path ${arguments% *}"
28163  else
28164    new_complete="$new_path"
28165  fi
28166
28167  if test "x$complete" != "x$new_complete"; then
28168    CC="$new_complete"
28169    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
28170$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
28171  fi
28172
28173  TEST_COMPILER="$CC"
28174  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
28175  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
28176  if test "x$OPENJDK_BUILD_OS" != xaix; then
28177    # FIXME: This test should not be needed anymore; we don't do that for any platform.
28178    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
28179$as_echo_n "checking resolved symbolic links for CC... " >&6; }
28180
28181  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28182    # Follow a chain of symbolic links. Use readlink
28183    # where it exists, else fall back to horribly
28184    # complicated shell code.
28185    if test "x$READLINK_TESTED" != yes; then
28186      # On MacOSX there is a readlink tool with a different
28187      # purpose than the GNU readlink tool. Check the found readlink.
28188      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28189      if test "x$ISGNU" = x; then
28190        # A readlink that we do not know how to use.
28191        # Are there other non-GNU readlinks out there?
28192        READLINK_TESTED=yes
28193        READLINK=
28194      fi
28195    fi
28196
28197    if test "x$READLINK" != x; then
28198      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
28199    else
28200      # Save the current directory for restoring afterwards
28201      STARTDIR=$PWD
28202      COUNTER=0
28203      sym_link_dir=`$DIRNAME $TEST_COMPILER`
28204      sym_link_file=`$BASENAME $TEST_COMPILER`
28205      cd $sym_link_dir
28206      # Use -P flag to resolve symlinks in directories.
28207      cd `$THEPWDCMD -P`
28208      sym_link_dir=`$THEPWDCMD -P`
28209      # Resolve file symlinks
28210      while test $COUNTER -lt 20; do
28211        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28212        if test "x$ISLINK" == x; then
28213          # This is not a symbolic link! We are done!
28214          break
28215        fi
28216        # Again resolve directory symlinks since the target of the just found
28217        # link could be in a different directory
28218        cd `$DIRNAME $ISLINK`
28219        sym_link_dir=`$THEPWDCMD -P`
28220        sym_link_file=`$BASENAME $ISLINK`
28221        let COUNTER=COUNTER+1
28222      done
28223      cd $STARTDIR
28224      TEST_COMPILER=$sym_link_dir/$sym_link_file
28225    fi
28226  fi
28227
28228    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
28229$as_echo "$TEST_COMPILER" >&6; }
28230  fi
28231  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
28232$as_echo_n "checking if CC is disguised ccache... " >&6; }
28233
28234  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
28235  if test "x$COMPILER_BASENAME" = "xccache"; then
28236    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
28237$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
28238    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
28239    # We want to control ccache invocation ourselves, so ignore this cc and try
28240    # searching again.
28241
28242    # Remove the path to the fake ccache cc from the PATH
28243    RETRY_COMPILER_SAVED_PATH="$PATH"
28244    COMPILER_DIRNAME=`$DIRNAME $CC`
28245    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
28246
28247    # Try again looking for our compiler
28248    if test -n "$ac_tool_prefix"; then
28249  for ac_prog in $TOOLCHAIN_CC_BINARY
28250  do
28251    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28252set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28254$as_echo_n "checking for $ac_word... " >&6; }
28255if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
28256  $as_echo_n "(cached) " >&6
28257else
28258  if test -n "$PROPER_COMPILER_CC"; then
28259  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
28260else
28261as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28262for as_dir in $PATH
28263do
28264  IFS=$as_save_IFS
28265  test -z "$as_dir" && as_dir=.
28266    for ac_exec_ext in '' $ac_executable_extensions; do
28267  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28268    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
28269    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28270    break 2
28271  fi
28272done
28273  done
28274IFS=$as_save_IFS
28275
28276fi
28277fi
28278PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
28279if test -n "$PROPER_COMPILER_CC"; then
28280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28281$as_echo "$PROPER_COMPILER_CC" >&6; }
28282else
28283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28284$as_echo "no" >&6; }
28285fi
28286
28287
28288    test -n "$PROPER_COMPILER_CC" && break
28289  done
28290fi
28291if test -z "$PROPER_COMPILER_CC"; then
28292  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
28293  for ac_prog in $TOOLCHAIN_CC_BINARY
28294do
28295  # Extract the first word of "$ac_prog", so it can be a program name with args.
28296set dummy $ac_prog; ac_word=$2
28297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28298$as_echo_n "checking for $ac_word... " >&6; }
28299if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
28300  $as_echo_n "(cached) " >&6
28301else
28302  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28303  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
28304else
28305as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28306for as_dir in $PATH
28307do
28308  IFS=$as_save_IFS
28309  test -z "$as_dir" && as_dir=.
28310    for ac_exec_ext in '' $ac_executable_extensions; do
28311  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28312    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
28313    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28314    break 2
28315  fi
28316done
28317  done
28318IFS=$as_save_IFS
28319
28320fi
28321fi
28322ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
28323if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
28325$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
28326else
28327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28328$as_echo "no" >&6; }
28329fi
28330
28331
28332  test -n "$ac_ct_PROPER_COMPILER_CC" && break
28333done
28334
28335  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
28336    PROPER_COMPILER_CC=""
28337  else
28338    case $cross_compiling:$ac_tool_warned in
28339yes:)
28340{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28341$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28342ac_tool_warned=yes ;;
28343esac
28344    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
28345  fi
28346fi
28347
28348
28349  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28350
28351  # First separate the path from the arguments. This will split at the first
28352  # space.
28353  complete="$PROPER_COMPILER_CC"
28354  path="${complete%% *}"
28355  tmp="$complete EOL"
28356  arguments="${tmp#* }"
28357
28358  # Input might be given as Windows format, start by converting to
28359  # unix format.
28360  new_path=`$CYGPATH -u "$path"`
28361
28362  # Now try to locate executable using which
28363  new_path=`$WHICH "$new_path" 2> /dev/null`
28364  # bat and cmd files are not always considered executable in cygwin causing which
28365  # to not find them
28366  if test "x$new_path" = x \
28367      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28368      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28369    new_path=`$CYGPATH -u "$path"`
28370  fi
28371  if test "x$new_path" = x; then
28372    # Oops. Which didn't find the executable.
28373    # The splitting of arguments from the executable at a space might have been incorrect,
28374    # since paths with space are more likely in Windows. Give it another try with the whole
28375    # argument.
28376    path="$complete"
28377    arguments="EOL"
28378    new_path=`$CYGPATH -u "$path"`
28379    new_path=`$WHICH "$new_path" 2> /dev/null`
28380    # bat and cmd files are not always considered executable in cygwin causing which
28381    # to not find them
28382    if test "x$new_path" = x \
28383        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28384        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28385      new_path=`$CYGPATH -u "$path"`
28386    fi
28387    if test "x$new_path" = x; then
28388      # It's still not found. Now this is an unrecoverable error.
28389      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28390$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28391      has_space=`$ECHO "$complete" | $GREP " "`
28392      if test "x$has_space" != x; then
28393        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28394$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28395      fi
28396      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28397    fi
28398  fi
28399
28400  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28401  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28402  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28403  # "foo.exe" is OK but "foo" is an error.
28404  #
28405  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28406  # It is also a way to make sure we got the proper file name for the real test later on.
28407  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28408  if test "x$test_shortpath" = x; then
28409    # Short path failed, file does not exist as specified.
28410    # Try adding .exe or .cmd
28411    if test -f "${new_path}.exe"; then
28412      input_to_shortpath="${new_path}.exe"
28413    elif test -f "${new_path}.cmd"; then
28414      input_to_shortpath="${new_path}.cmd"
28415    else
28416      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
28417$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
28418      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28419$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28420      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28421    fi
28422  else
28423    input_to_shortpath="$new_path"
28424  fi
28425
28426  # Call helper function which possibly converts this using DOS-style short mode.
28427  # If so, the updated path is stored in $new_path.
28428  new_path="$input_to_shortpath"
28429
28430  input_path="$input_to_shortpath"
28431  # Check if we need to convert this using DOS-style short mode. If the path
28432  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28433  # take no chances and rewrite it.
28434  # Note: m4 eats our [], so we need to use [ and ] instead.
28435  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28436  if test "x$has_forbidden_chars" != x; then
28437    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28438    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28439    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28440    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28441      # Going to short mode and back again did indeed matter. Since short mode is
28442      # case insensitive, let's make it lowercase to improve readability.
28443      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28444      # Now convert it back to Unix-stile (cygpath)
28445      input_path=`$CYGPATH -u "$shortmode_path"`
28446      new_path="$input_path"
28447    fi
28448  fi
28449
28450  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28451  if test "x$test_cygdrive_prefix" = x; then
28452    # As a simple fix, exclude /usr/bin since it's not a real path.
28453    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28454      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28455      # a path prefixed by /cygdrive for fixpath to work.
28456      new_path="$CYGWIN_ROOT_PATH$input_path"
28457    fi
28458  fi
28459
28460  # remove trailing .exe if any
28461  new_path="${new_path/%.exe/}"
28462
28463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28464
28465  # First separate the path from the arguments. This will split at the first
28466  # space.
28467  complete="$PROPER_COMPILER_CC"
28468  path="${complete%% *}"
28469  tmp="$complete EOL"
28470  arguments="${tmp#* }"
28471
28472  # Input might be given as Windows format, start by converting to
28473  # unix format.
28474  new_path="$path"
28475
28476  windows_path="$new_path"
28477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28478    unix_path=`$CYGPATH -u "$windows_path"`
28479    new_path="$unix_path"
28480  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28481    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28482    new_path="$unix_path"
28483  fi
28484
28485
28486  # Now try to locate executable using which
28487  new_path=`$WHICH "$new_path" 2> /dev/null`
28488
28489  if test "x$new_path" = x; then
28490    # Oops. Which didn't find the executable.
28491    # The splitting of arguments from the executable at a space might have been incorrect,
28492    # since paths with space are more likely in Windows. Give it another try with the whole
28493    # argument.
28494    path="$complete"
28495    arguments="EOL"
28496    new_path="$path"
28497
28498  windows_path="$new_path"
28499  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28500    unix_path=`$CYGPATH -u "$windows_path"`
28501    new_path="$unix_path"
28502  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28503    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28504    new_path="$unix_path"
28505  fi
28506
28507
28508    new_path=`$WHICH "$new_path" 2> /dev/null`
28509    # bat and cmd files are not always considered executable in MSYS causing which
28510    # to not find them
28511    if test "x$new_path" = x \
28512        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28513        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28514      new_path="$path"
28515
28516  windows_path="$new_path"
28517  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28518    unix_path=`$CYGPATH -u "$windows_path"`
28519    new_path="$unix_path"
28520  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28521    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28522    new_path="$unix_path"
28523  fi
28524
28525    fi
28526
28527    if test "x$new_path" = x; then
28528      # It's still not found. Now this is an unrecoverable error.
28529      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28530$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28531      has_space=`$ECHO "$complete" | $GREP " "`
28532      if test "x$has_space" != x; then
28533        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28534$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28535      fi
28536      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28537    fi
28538  fi
28539
28540  # Now new_path has a complete unix path to the binary
28541  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28542    # Keep paths in /bin as-is, but remove trailing .exe if any
28543    new_path="${new_path/%.exe/}"
28544    # Do not save /bin paths to all_fixpath_prefixes!
28545  else
28546    # Not in mixed or Windows style, start by that.
28547    new_path=`cmd //c echo $new_path`
28548
28549  input_path="$new_path"
28550  # Check if we need to convert this using DOS-style short mode. If the path
28551  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28552  # take no chances and rewrite it.
28553  # Note: m4 eats our [], so we need to use [ and ] instead.
28554  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28555  if test "x$has_forbidden_chars" != x; then
28556    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28557    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28558  fi
28559
28560    # Output is in $new_path
28561
28562  windows_path="$new_path"
28563  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28564    unix_path=`$CYGPATH -u "$windows_path"`
28565    new_path="$unix_path"
28566  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28567    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28568    new_path="$unix_path"
28569  fi
28570
28571    # remove trailing .exe if any
28572    new_path="${new_path/%.exe/}"
28573
28574    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28575    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28576  fi
28577
28578  else
28579    # We're on a posix platform. Hooray! :)
28580    # First separate the path from the arguments. This will split at the first
28581    # space.
28582    complete="$PROPER_COMPILER_CC"
28583    path="${complete%% *}"
28584    tmp="$complete EOL"
28585    arguments="${tmp#* }"
28586
28587    # Cannot rely on the command "which" here since it doesn't always work.
28588    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28589    if test -z "$is_absolute_path"; then
28590      # Path to executable is not absolute. Find it.
28591      IFS_save="$IFS"
28592      IFS=:
28593      for p in $PATH; do
28594        if test -f "$p/$path" && test -x "$p/$path"; then
28595          new_path="$p/$path"
28596          break
28597        fi
28598      done
28599      IFS="$IFS_save"
28600    else
28601      # This is an absolute path, we can use it without further modifications.
28602      new_path="$path"
28603    fi
28604
28605    if test "x$new_path" = x; then
28606      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28607$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28608      has_space=`$ECHO "$complete" | $GREP " "`
28609      if test "x$has_space" != x; then
28610        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28611$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28612      fi
28613      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28614    fi
28615  fi
28616
28617  # Now join together the path and the arguments once again
28618  if test "x$arguments" != xEOL; then
28619    new_complete="$new_path ${arguments% *}"
28620  else
28621    new_complete="$new_path"
28622  fi
28623
28624  if test "x$complete" != "x$new_complete"; then
28625    PROPER_COMPILER_CC="$new_complete"
28626    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
28627$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
28628  fi
28629
28630    PATH="$RETRY_COMPILER_SAVED_PATH"
28631
28632    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
28633$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
28634
28635  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28636    # Follow a chain of symbolic links. Use readlink
28637    # where it exists, else fall back to horribly
28638    # complicated shell code.
28639    if test "x$READLINK_TESTED" != yes; then
28640      # On MacOSX there is a readlink tool with a different
28641      # purpose than the GNU readlink tool. Check the found readlink.
28642      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28643      if test "x$ISGNU" = x; then
28644        # A readlink that we do not know how to use.
28645        # Are there other non-GNU readlinks out there?
28646        READLINK_TESTED=yes
28647        READLINK=
28648      fi
28649    fi
28650
28651    if test "x$READLINK" != x; then
28652      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
28653    else
28654      # Save the current directory for restoring afterwards
28655      STARTDIR=$PWD
28656      COUNTER=0
28657      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
28658      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
28659      cd $sym_link_dir
28660      # Use -P flag to resolve symlinks in directories.
28661      cd `$THEPWDCMD -P`
28662      sym_link_dir=`$THEPWDCMD -P`
28663      # Resolve file symlinks
28664      while test $COUNTER -lt 20; do
28665        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28666        if test "x$ISLINK" == x; then
28667          # This is not a symbolic link! We are done!
28668          break
28669        fi
28670        # Again resolve directory symlinks since the target of the just found
28671        # link could be in a different directory
28672        cd `$DIRNAME $ISLINK`
28673        sym_link_dir=`$THEPWDCMD -P`
28674        sym_link_file=`$BASENAME $ISLINK`
28675        let COUNTER=COUNTER+1
28676      done
28677      cd $STARTDIR
28678      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
28679    fi
28680  fi
28681
28682    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28683$as_echo "$PROPER_COMPILER_CC" >&6; }
28684    CC="$PROPER_COMPILER_CC"
28685  else
28686    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
28687$as_echo "no, keeping CC" >&6; }
28688  fi
28689
28690
28691  COMPILER=$CC
28692  COMPILER_NAME=$COMPILER_NAME
28693
28694  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
28695    # cc -V output typically looks like
28696    #     cc: Sun C 5.12 Linux_i386 2011/11/16
28697    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
28698    # Check that this is likely to be the Solaris Studio cc.
28699    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
28700    if test $? -ne 0; then
28701      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28702      { $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
28703$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28704      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28705$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28706      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28707$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28708      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28709    fi
28710    # Remove usage instructions (if present), and
28711    # collapse compiler output into a single line
28712    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28713        $SED -e 's/ *[Uu]sage:.*//'`
28714    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28715        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
28716  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
28717    # xlc -qversion output typically looks like
28718    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
28719    #     Version: 11.01.0000.0015
28720    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
28721    # Check that this is likely to be the IBM XL C compiler.
28722    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
28723    if test $? -ne 0; then
28724      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28725      { $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
28726$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28727      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28728$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28729      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28730$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28731      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28732    fi
28733    # Collapse compiler output into a single line
28734    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28735    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28736        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
28737  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
28738    # There is no specific version flag, but all output starts with a version string.
28739    # First line typically looks something like:
28740    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
28741    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
28742    # Check that this is likely to be Microsoft CL.EXE.
28743    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
28744    if test $? -ne 0; then
28745      { $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
28746$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28747      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28748$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28749      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28750    fi
28751    # Collapse compiler output into a single line
28752    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28753    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28754        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
28755  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
28756    # gcc --version output typically looks like
28757    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
28758    #     Copyright (C) 2013 Free Software Foundation, Inc.
28759    #     This is free software; see the source for copying conditions.  There is NO
28760    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
28761    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28762    # Check that this is likely to be GCC.
28763    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
28764    if test $? -ne 0; then
28765      { $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
28766$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28767      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
28768$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
28769      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28770    fi
28771    # Remove Copyright and legalese from version string, and
28772    # collapse into a single line
28773    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28774        $SED -e 's/ *Copyright .*//'`
28775    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28776        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
28777  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
28778    # clang --version output typically looks like
28779    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
28780    #    clang version 3.3 (tags/RELEASE_33/final)
28781    # or
28782    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
28783    #    Target: x86_64-pc-linux-gnu
28784    #    Thread model: posix
28785    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28786    # Check that this is likely to be clang
28787    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
28788    if test $? -ne 0; then
28789      { $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
28790$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28791      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28792$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28793      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28794    fi
28795    # Collapse compiler output into a single line
28796    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28797    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28798        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
28799  else
28800      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
28801  fi
28802  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
28803  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
28804  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
28805  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
28806
28807  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
28808$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
28809
28810
28811  # Now that we have resolved CC ourself, let autoconf have its go at it
28812  ac_ext=c
28813ac_cpp='$CPP $CPPFLAGS'
28814ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28815ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28816ac_compiler_gnu=$ac_cv_c_compiler_gnu
28817if test -n "$ac_tool_prefix"; then
28818  for ac_prog in $CC
28819  do
28820    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28821set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28823$as_echo_n "checking for $ac_word... " >&6; }
28824if ${ac_cv_prog_CC+:} false; then :
28825  $as_echo_n "(cached) " >&6
28826else
28827  if test -n "$CC"; then
28828  ac_cv_prog_CC="$CC" # Let the user override the test.
28829else
28830as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28831for as_dir in $PATH
28832do
28833  IFS=$as_save_IFS
28834  test -z "$as_dir" && as_dir=.
28835    for ac_exec_ext in '' $ac_executable_extensions; do
28836  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28837    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
28838    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28839    break 2
28840  fi
28841done
28842  done
28843IFS=$as_save_IFS
28844
28845fi
28846fi
28847CC=$ac_cv_prog_CC
28848if test -n "$CC"; then
28849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
28850$as_echo "$CC" >&6; }
28851else
28852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28853$as_echo "no" >&6; }
28854fi
28855
28856
28857    test -n "$CC" && break
28858  done
28859fi
28860if test -z "$CC"; then
28861  ac_ct_CC=$CC
28862  for ac_prog in $CC
28863do
28864  # Extract the first word of "$ac_prog", so it can be a program name with args.
28865set dummy $ac_prog; ac_word=$2
28866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28867$as_echo_n "checking for $ac_word... " >&6; }
28868if ${ac_cv_prog_ac_ct_CC+:} false; then :
28869  $as_echo_n "(cached) " >&6
28870else
28871  if test -n "$ac_ct_CC"; then
28872  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
28873else
28874as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28875for as_dir in $PATH
28876do
28877  IFS=$as_save_IFS
28878  test -z "$as_dir" && as_dir=.
28879    for ac_exec_ext in '' $ac_executable_extensions; do
28880  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28881    ac_cv_prog_ac_ct_CC="$ac_prog"
28882    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28883    break 2
28884  fi
28885done
28886  done
28887IFS=$as_save_IFS
28888
28889fi
28890fi
28891ac_ct_CC=$ac_cv_prog_ac_ct_CC
28892if test -n "$ac_ct_CC"; then
28893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
28894$as_echo "$ac_ct_CC" >&6; }
28895else
28896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28897$as_echo "no" >&6; }
28898fi
28899
28900
28901  test -n "$ac_ct_CC" && break
28902done
28903
28904  if test "x$ac_ct_CC" = x; then
28905    CC=""
28906  else
28907    case $cross_compiling:$ac_tool_warned in
28908yes:)
28909{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28910$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28911ac_tool_warned=yes ;;
28912esac
28913    CC=$ac_ct_CC
28914  fi
28915fi
28916
28917
28918test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28919$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28920as_fn_error $? "no acceptable C compiler found in \$PATH
28921See \`config.log' for more details" "$LINENO" 5; }
28922
28923# Provide some information about the compiler.
28924$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
28925set X $ac_compile
28926ac_compiler=$2
28927for ac_option in --version -v -V -qversion; do
28928  { { ac_try="$ac_compiler $ac_option >&5"
28929case "(($ac_try" in
28930  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28931  *) ac_try_echo=$ac_try;;
28932esac
28933eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28934$as_echo "$ac_try_echo"; } >&5
28935  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
28936  ac_status=$?
28937  if test -s conftest.err; then
28938    sed '10a\
28939... rest of stderr output deleted ...
28940         10q' conftest.err >conftest.er1
28941    cat conftest.er1 >&5
28942  fi
28943  rm -f conftest.er1 conftest.err
28944  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28945  test $ac_status = 0; }
28946done
28947
28948cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28949/* end confdefs.h.  */
28950
28951int
28952main ()
28953{
28954
28955  ;
28956  return 0;
28957}
28958_ACEOF
28959ac_clean_files_save=$ac_clean_files
28960ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
28961# Try to create an executable without -o first, disregard a.out.
28962# It will help us diagnose broken compilers, and finding out an intuition
28963# of exeext.
28964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
28965$as_echo_n "checking whether the C compiler works... " >&6; }
28966ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
28967
28968# The possible output files:
28969ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
28970
28971ac_rmfiles=
28972for ac_file in $ac_files
28973do
28974  case $ac_file in
28975    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
28976    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
28977  esac
28978done
28979rm -f $ac_rmfiles
28980
28981if { { ac_try="$ac_link_default"
28982case "(($ac_try" in
28983  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28984  *) ac_try_echo=$ac_try;;
28985esac
28986eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28987$as_echo "$ac_try_echo"; } >&5
28988  (eval "$ac_link_default") 2>&5
28989  ac_status=$?
28990  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28991  test $ac_status = 0; }; then :
28992  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
28993# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
28994# in a Makefile.  We should not override ac_cv_exeext if it was cached,
28995# so that the user can short-circuit this test for compilers unknown to
28996# Autoconf.
28997for ac_file in $ac_files ''
28998do
28999  test -f "$ac_file" || continue
29000  case $ac_file in
29001    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
29002	;;
29003    [ab].out )
29004	# We found the default executable, but exeext='' is most
29005	# certainly right.
29006	break;;
29007    *.* )
29008	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
29009	then :; else
29010	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29011	fi
29012	# We set ac_cv_exeext here because the later test for it is not
29013	# safe: cross compilers may not add the suffix if given an `-o'
29014	# argument, so we may need to know it at that point already.
29015	# Even if this section looks crufty: it has the advantage of
29016	# actually working.
29017	break;;
29018    * )
29019	break;;
29020  esac
29021done
29022test "$ac_cv_exeext" = no && ac_cv_exeext=
29023
29024else
29025  ac_file=''
29026fi
29027if test -z "$ac_file"; then :
29028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29029$as_echo "no" >&6; }
29030$as_echo "$as_me: failed program was:" >&5
29031sed 's/^/| /' conftest.$ac_ext >&5
29032
29033{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29034$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29035as_fn_error 77 "C compiler cannot create executables
29036See \`config.log' for more details" "$LINENO" 5; }
29037else
29038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29039$as_echo "yes" >&6; }
29040fi
29041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
29042$as_echo_n "checking for C compiler default output file name... " >&6; }
29043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
29044$as_echo "$ac_file" >&6; }
29045ac_exeext=$ac_cv_exeext
29046
29047rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
29048ac_clean_files=$ac_clean_files_save
29049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
29050$as_echo_n "checking for suffix of executables... " >&6; }
29051if { { ac_try="$ac_link"
29052case "(($ac_try" in
29053  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29054  *) ac_try_echo=$ac_try;;
29055esac
29056eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29057$as_echo "$ac_try_echo"; } >&5
29058  (eval "$ac_link") 2>&5
29059  ac_status=$?
29060  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29061  test $ac_status = 0; }; then :
29062  # If both `conftest.exe' and `conftest' are `present' (well, observable)
29063# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
29064# work properly (i.e., refer to `conftest.exe'), while it won't with
29065# `rm'.
29066for ac_file in conftest.exe conftest conftest.*; do
29067  test -f "$ac_file" || continue
29068  case $ac_file in
29069    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29070    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29071	  break;;
29072    * ) break;;
29073  esac
29074done
29075else
29076  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29077$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29078as_fn_error $? "cannot compute suffix of executables: cannot compile and link
29079See \`config.log' for more details" "$LINENO" 5; }
29080fi
29081rm -f conftest conftest$ac_cv_exeext
29082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
29083$as_echo "$ac_cv_exeext" >&6; }
29084
29085rm -f conftest.$ac_ext
29086EXEEXT=$ac_cv_exeext
29087ac_exeext=$EXEEXT
29088cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29089/* end confdefs.h.  */
29090#include <stdio.h>
29091int
29092main ()
29093{
29094FILE *f = fopen ("conftest.out", "w");
29095 return ferror (f) || fclose (f) != 0;
29096
29097  ;
29098  return 0;
29099}
29100_ACEOF
29101ac_clean_files="$ac_clean_files conftest.out"
29102# Check that the compiler produces executables we can run.  If not, either
29103# the compiler is broken, or we cross compile.
29104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
29105$as_echo_n "checking whether we are cross compiling... " >&6; }
29106if test "$cross_compiling" != yes; then
29107  { { ac_try="$ac_link"
29108case "(($ac_try" in
29109  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29110  *) ac_try_echo=$ac_try;;
29111esac
29112eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29113$as_echo "$ac_try_echo"; } >&5
29114  (eval "$ac_link") 2>&5
29115  ac_status=$?
29116  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29117  test $ac_status = 0; }
29118  if { ac_try='./conftest$ac_cv_exeext'
29119  { { case "(($ac_try" in
29120  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29121  *) ac_try_echo=$ac_try;;
29122esac
29123eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29124$as_echo "$ac_try_echo"; } >&5
29125  (eval "$ac_try") 2>&5
29126  ac_status=$?
29127  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29128  test $ac_status = 0; }; }; then
29129    cross_compiling=no
29130  else
29131    if test "$cross_compiling" = maybe; then
29132	cross_compiling=yes
29133    else
29134	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29135$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29136as_fn_error $? "cannot run C compiled programs.
29137If you meant to cross compile, use \`--host'.
29138See \`config.log' for more details" "$LINENO" 5; }
29139    fi
29140  fi
29141fi
29142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
29143$as_echo "$cross_compiling" >&6; }
29144
29145rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
29146ac_clean_files=$ac_clean_files_save
29147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
29148$as_echo_n "checking for suffix of object files... " >&6; }
29149if ${ac_cv_objext+:} false; then :
29150  $as_echo_n "(cached) " >&6
29151else
29152  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29153/* end confdefs.h.  */
29154
29155int
29156main ()
29157{
29158
29159  ;
29160  return 0;
29161}
29162_ACEOF
29163rm -f conftest.o conftest.obj
29164if { { ac_try="$ac_compile"
29165case "(($ac_try" in
29166  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29167  *) ac_try_echo=$ac_try;;
29168esac
29169eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29170$as_echo "$ac_try_echo"; } >&5
29171  (eval "$ac_compile") 2>&5
29172  ac_status=$?
29173  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29174  test $ac_status = 0; }; then :
29175  for ac_file in conftest.o conftest.obj conftest.*; do
29176  test -f "$ac_file" || continue;
29177  case $ac_file in
29178    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
29179    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
29180       break;;
29181  esac
29182done
29183else
29184  $as_echo "$as_me: failed program was:" >&5
29185sed 's/^/| /' conftest.$ac_ext >&5
29186
29187{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29188$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29189as_fn_error $? "cannot compute suffix of object files: cannot compile
29190See \`config.log' for more details" "$LINENO" 5; }
29191fi
29192rm -f conftest.$ac_cv_objext conftest.$ac_ext
29193fi
29194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
29195$as_echo "$ac_cv_objext" >&6; }
29196OBJEXT=$ac_cv_objext
29197ac_objext=$OBJEXT
29198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
29199$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
29200if ${ac_cv_c_compiler_gnu+:} false; then :
29201  $as_echo_n "(cached) " >&6
29202else
29203  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29204/* end confdefs.h.  */
29205
29206int
29207main ()
29208{
29209#ifndef __GNUC__
29210       choke me
29211#endif
29212
29213  ;
29214  return 0;
29215}
29216_ACEOF
29217if ac_fn_c_try_compile "$LINENO"; then :
29218  ac_compiler_gnu=yes
29219else
29220  ac_compiler_gnu=no
29221fi
29222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29223ac_cv_c_compiler_gnu=$ac_compiler_gnu
29224
29225fi
29226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
29227$as_echo "$ac_cv_c_compiler_gnu" >&6; }
29228if test $ac_compiler_gnu = yes; then
29229  GCC=yes
29230else
29231  GCC=
29232fi
29233ac_test_CFLAGS=${CFLAGS+set}
29234ac_save_CFLAGS=$CFLAGS
29235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
29236$as_echo_n "checking whether $CC accepts -g... " >&6; }
29237if ${ac_cv_prog_cc_g+:} false; then :
29238  $as_echo_n "(cached) " >&6
29239else
29240  ac_save_c_werror_flag=$ac_c_werror_flag
29241   ac_c_werror_flag=yes
29242   ac_cv_prog_cc_g=no
29243   CFLAGS="-g"
29244   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29245/* end confdefs.h.  */
29246
29247int
29248main ()
29249{
29250
29251  ;
29252  return 0;
29253}
29254_ACEOF
29255if ac_fn_c_try_compile "$LINENO"; then :
29256  ac_cv_prog_cc_g=yes
29257else
29258  CFLAGS=""
29259      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29260/* end confdefs.h.  */
29261
29262int
29263main ()
29264{
29265
29266  ;
29267  return 0;
29268}
29269_ACEOF
29270if ac_fn_c_try_compile "$LINENO"; then :
29271
29272else
29273  ac_c_werror_flag=$ac_save_c_werror_flag
29274	 CFLAGS="-g"
29275	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29276/* end confdefs.h.  */
29277
29278int
29279main ()
29280{
29281
29282  ;
29283  return 0;
29284}
29285_ACEOF
29286if ac_fn_c_try_compile "$LINENO"; then :
29287  ac_cv_prog_cc_g=yes
29288fi
29289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29290fi
29291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29292fi
29293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29294   ac_c_werror_flag=$ac_save_c_werror_flag
29295fi
29296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
29297$as_echo "$ac_cv_prog_cc_g" >&6; }
29298if test "$ac_test_CFLAGS" = set; then
29299  CFLAGS=$ac_save_CFLAGS
29300elif test $ac_cv_prog_cc_g = yes; then
29301  if test "$GCC" = yes; then
29302    CFLAGS="-g -O2"
29303  else
29304    CFLAGS="-g"
29305  fi
29306else
29307  if test "$GCC" = yes; then
29308    CFLAGS="-O2"
29309  else
29310    CFLAGS=
29311  fi
29312fi
29313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
29314$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
29315if ${ac_cv_prog_cc_c89+:} false; then :
29316  $as_echo_n "(cached) " >&6
29317else
29318  ac_cv_prog_cc_c89=no
29319ac_save_CC=$CC
29320cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29321/* end confdefs.h.  */
29322#include <stdarg.h>
29323#include <stdio.h>
29324struct stat;
29325/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
29326struct buf { int x; };
29327FILE * (*rcsopen) (struct buf *, struct stat *, int);
29328static char *e (p, i)
29329     char **p;
29330     int i;
29331{
29332  return p[i];
29333}
29334static char *f (char * (*g) (char **, int), char **p, ...)
29335{
29336  char *s;
29337  va_list v;
29338  va_start (v,p);
29339  s = g (p, va_arg (v,int));
29340  va_end (v);
29341  return s;
29342}
29343
29344/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
29345   function prototypes and stuff, but not '\xHH' hex character constants.
29346   These don't provoke an error unfortunately, instead are silently treated
29347   as 'x'.  The following induces an error, until -std is added to get
29348   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
29349   array size at least.  It's necessary to write '\x00'==0 to get something
29350   that's true only with -std.  */
29351int osf4_cc_array ['\x00' == 0 ? 1 : -1];
29352
29353/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
29354   inside strings and character constants.  */
29355#define FOO(x) 'x'
29356int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
29357
29358int test (int i, double x);
29359struct s1 {int (*f) (int a);};
29360struct s2 {int (*f) (double a);};
29361int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
29362int argc;
29363char **argv;
29364int
29365main ()
29366{
29367return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
29368  ;
29369  return 0;
29370}
29371_ACEOF
29372for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
29373	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
29374do
29375  CC="$ac_save_CC $ac_arg"
29376  if ac_fn_c_try_compile "$LINENO"; then :
29377  ac_cv_prog_cc_c89=$ac_arg
29378fi
29379rm -f core conftest.err conftest.$ac_objext
29380  test "x$ac_cv_prog_cc_c89" != "xno" && break
29381done
29382rm -f conftest.$ac_ext
29383CC=$ac_save_CC
29384
29385fi
29386# AC_CACHE_VAL
29387case "x$ac_cv_prog_cc_c89" in
29388  x)
29389    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
29390$as_echo "none needed" >&6; } ;;
29391  xno)
29392    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
29393$as_echo "unsupported" >&6; } ;;
29394  *)
29395    CC="$CC $ac_cv_prog_cc_c89"
29396    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
29397$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
29398esac
29399if test "x$ac_cv_prog_cc_c89" != xno; then :
29400
29401fi
29402
29403ac_ext=cpp
29404ac_cpp='$CXXCPP $CPPFLAGS'
29405ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29406ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29407ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29408
29409
29410
29411  COMPILER_NAME=C++
29412  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
29413
29414  if test "x$CXX" != x; then
29415    # User has supplied compiler name already, always let that override.
29416    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
29417$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
29418    if test "x`basename $CXX`" = "x$CXX"; then
29419      # A command without a complete path is provided, search $PATH.
29420
29421      for ac_prog in $CXX
29422do
29423  # Extract the first word of "$ac_prog", so it can be a program name with args.
29424set dummy $ac_prog; ac_word=$2
29425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29426$as_echo_n "checking for $ac_word... " >&6; }
29427if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29428  $as_echo_n "(cached) " >&6
29429else
29430  case $POTENTIAL_CXX in
29431  [\\/]* | ?:[\\/]*)
29432  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29433  ;;
29434  *)
29435  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29436for as_dir in $PATH
29437do
29438  IFS=$as_save_IFS
29439  test -z "$as_dir" && as_dir=.
29440    for ac_exec_ext in '' $ac_executable_extensions; do
29441  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29442    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29443    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29444    break 2
29445  fi
29446done
29447  done
29448IFS=$as_save_IFS
29449
29450  ;;
29451esac
29452fi
29453POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29454if test -n "$POTENTIAL_CXX"; then
29455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29456$as_echo "$POTENTIAL_CXX" >&6; }
29457else
29458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29459$as_echo "no" >&6; }
29460fi
29461
29462
29463  test -n "$POTENTIAL_CXX" && break
29464done
29465
29466      if test "x$POTENTIAL_CXX" != x; then
29467        CXX=$POTENTIAL_CXX
29468      else
29469        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
29470      fi
29471    else
29472      # Otherwise it might already be a complete path
29473      if test ! -x "$CXX"; then
29474        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
29475      fi
29476    fi
29477  else
29478    # No user supplied value. Locate compiler ourselves.
29479
29480    # If we are cross compiling, assume cross compilation tools follows the
29481    # cross compilation standard where they are prefixed with the autoconf
29482    # standard name for the target. For example the binary
29483    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
29484    # If we are not cross compiling, then the default compiler name will be
29485    # used.
29486
29487    CXX=
29488    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
29489    # before checking the rest of the PATH.
29490    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
29491    # step, this should not be necessary.
29492    if test -n "$TOOLCHAIN_PATH"; then
29493      PATH_save="$PATH"
29494      PATH="$TOOLCHAIN_PATH"
29495      for ac_prog in $SEARCH_LIST
29496do
29497  # Extract the first word of "$ac_prog", so it can be a program name with args.
29498set dummy $ac_prog; ac_word=$2
29499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29500$as_echo_n "checking for $ac_word... " >&6; }
29501if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
29502  $as_echo_n "(cached) " >&6
29503else
29504  case $TOOLCHAIN_PATH_CXX in
29505  [\\/]* | ?:[\\/]*)
29506  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
29507  ;;
29508  *)
29509  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29510for as_dir in $PATH
29511do
29512  IFS=$as_save_IFS
29513  test -z "$as_dir" && as_dir=.
29514    for ac_exec_ext in '' $ac_executable_extensions; do
29515  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29516    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
29517    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29518    break 2
29519  fi
29520done
29521  done
29522IFS=$as_save_IFS
29523
29524  ;;
29525esac
29526fi
29527TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
29528if test -n "$TOOLCHAIN_PATH_CXX"; then
29529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
29530$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
29531else
29532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29533$as_echo "no" >&6; }
29534fi
29535
29536
29537  test -n "$TOOLCHAIN_PATH_CXX" && break
29538done
29539
29540      CXX=$TOOLCHAIN_PATH_CXX
29541      PATH="$PATH_save"
29542    fi
29543
29544    # AC_PATH_PROGS can't be run multiple times with the same variable,
29545    # so create a new name for this run.
29546    if test "x$CXX" = x; then
29547      for ac_prog in $SEARCH_LIST
29548do
29549  # Extract the first word of "$ac_prog", so it can be a program name with args.
29550set dummy $ac_prog; ac_word=$2
29551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29552$as_echo_n "checking for $ac_word... " >&6; }
29553if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29554  $as_echo_n "(cached) " >&6
29555else
29556  case $POTENTIAL_CXX in
29557  [\\/]* | ?:[\\/]*)
29558  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29559  ;;
29560  *)
29561  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29562for as_dir in $PATH
29563do
29564  IFS=$as_save_IFS
29565  test -z "$as_dir" && as_dir=.
29566    for ac_exec_ext in '' $ac_executable_extensions; do
29567  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29568    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29569    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29570    break 2
29571  fi
29572done
29573  done
29574IFS=$as_save_IFS
29575
29576  ;;
29577esac
29578fi
29579POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29580if test -n "$POTENTIAL_CXX"; then
29581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29582$as_echo "$POTENTIAL_CXX" >&6; }
29583else
29584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29585$as_echo "no" >&6; }
29586fi
29587
29588
29589  test -n "$POTENTIAL_CXX" && break
29590done
29591
29592      CXX=$POTENTIAL_CXX
29593    fi
29594
29595    if test "x$CXX" = x; then
29596
29597  # Print a helpful message on how to acquire the necessary build dependency.
29598  # devkit is the help tag: freetype, cups, pulse, alsa etc
29599  MISSING_DEPENDENCY=devkit
29600
29601  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29602    cygwin_help $MISSING_DEPENDENCY
29603  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29604    msys_help $MISSING_DEPENDENCY
29605  else
29606    PKGHANDLER_COMMAND=
29607
29608    case $PKGHANDLER in
29609      apt-get)
29610        apt_help     $MISSING_DEPENDENCY ;;
29611      yum)
29612        yum_help     $MISSING_DEPENDENCY ;;
29613      port)
29614        port_help    $MISSING_DEPENDENCY ;;
29615      pkgutil)
29616        pkgutil_help $MISSING_DEPENDENCY ;;
29617      pkgadd)
29618        pkgadd_help  $MISSING_DEPENDENCY ;;
29619    esac
29620
29621    if test "x$PKGHANDLER_COMMAND" != x; then
29622      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29623    fi
29624  fi
29625
29626      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
29627    fi
29628  fi
29629
29630  # Now we have a compiler binary in CXX. Make sure it's okay.
29631
29632  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29633
29634  # First separate the path from the arguments. This will split at the first
29635  # space.
29636  complete="$CXX"
29637  path="${complete%% *}"
29638  tmp="$complete EOL"
29639  arguments="${tmp#* }"
29640
29641  # Input might be given as Windows format, start by converting to
29642  # unix format.
29643  new_path=`$CYGPATH -u "$path"`
29644
29645  # Now try to locate executable using which
29646  new_path=`$WHICH "$new_path" 2> /dev/null`
29647  # bat and cmd files are not always considered executable in cygwin causing which
29648  # to not find them
29649  if test "x$new_path" = x \
29650      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29651      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29652    new_path=`$CYGPATH -u "$path"`
29653  fi
29654  if test "x$new_path" = x; then
29655    # Oops. Which didn't find the executable.
29656    # The splitting of arguments from the executable at a space might have been incorrect,
29657    # since paths with space are more likely in Windows. Give it another try with the whole
29658    # argument.
29659    path="$complete"
29660    arguments="EOL"
29661    new_path=`$CYGPATH -u "$path"`
29662    new_path=`$WHICH "$new_path" 2> /dev/null`
29663    # bat and cmd files are not always considered executable in cygwin causing which
29664    # to not find them
29665    if test "x$new_path" = x \
29666        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29667        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29668      new_path=`$CYGPATH -u "$path"`
29669    fi
29670    if test "x$new_path" = x; then
29671      # It's still not found. Now this is an unrecoverable error.
29672      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29673$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29674      has_space=`$ECHO "$complete" | $GREP " "`
29675      if test "x$has_space" != x; then
29676        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29677$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29678      fi
29679      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29680    fi
29681  fi
29682
29683  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29684  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29685  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29686  # "foo.exe" is OK but "foo" is an error.
29687  #
29688  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29689  # It is also a way to make sure we got the proper file name for the real test later on.
29690  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29691  if test "x$test_shortpath" = x; then
29692    # Short path failed, file does not exist as specified.
29693    # Try adding .exe or .cmd
29694    if test -f "${new_path}.exe"; then
29695      input_to_shortpath="${new_path}.exe"
29696    elif test -f "${new_path}.cmd"; then
29697      input_to_shortpath="${new_path}.cmd"
29698    else
29699      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
29700$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
29701      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29702$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29703      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29704    fi
29705  else
29706    input_to_shortpath="$new_path"
29707  fi
29708
29709  # Call helper function which possibly converts this using DOS-style short mode.
29710  # If so, the updated path is stored in $new_path.
29711  new_path="$input_to_shortpath"
29712
29713  input_path="$input_to_shortpath"
29714  # Check if we need to convert this using DOS-style short mode. If the path
29715  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29716  # take no chances and rewrite it.
29717  # Note: m4 eats our [], so we need to use [ and ] instead.
29718  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29719  if test "x$has_forbidden_chars" != x; then
29720    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29721    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29722    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29723    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29724      # Going to short mode and back again did indeed matter. Since short mode is
29725      # case insensitive, let's make it lowercase to improve readability.
29726      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29727      # Now convert it back to Unix-stile (cygpath)
29728      input_path=`$CYGPATH -u "$shortmode_path"`
29729      new_path="$input_path"
29730    fi
29731  fi
29732
29733  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29734  if test "x$test_cygdrive_prefix" = x; then
29735    # As a simple fix, exclude /usr/bin since it's not a real path.
29736    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29737      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29738      # a path prefixed by /cygdrive for fixpath to work.
29739      new_path="$CYGWIN_ROOT_PATH$input_path"
29740    fi
29741  fi
29742
29743  # remove trailing .exe if any
29744  new_path="${new_path/%.exe/}"
29745
29746  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29747
29748  # First separate the path from the arguments. This will split at the first
29749  # space.
29750  complete="$CXX"
29751  path="${complete%% *}"
29752  tmp="$complete EOL"
29753  arguments="${tmp#* }"
29754
29755  # Input might be given as Windows format, start by converting to
29756  # unix format.
29757  new_path="$path"
29758
29759  windows_path="$new_path"
29760  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29761    unix_path=`$CYGPATH -u "$windows_path"`
29762    new_path="$unix_path"
29763  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29764    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29765    new_path="$unix_path"
29766  fi
29767
29768
29769  # Now try to locate executable using which
29770  new_path=`$WHICH "$new_path" 2> /dev/null`
29771
29772  if test "x$new_path" = x; then
29773    # Oops. Which didn't find the executable.
29774    # The splitting of arguments from the executable at a space might have been incorrect,
29775    # since paths with space are more likely in Windows. Give it another try with the whole
29776    # argument.
29777    path="$complete"
29778    arguments="EOL"
29779    new_path="$path"
29780
29781  windows_path="$new_path"
29782  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29783    unix_path=`$CYGPATH -u "$windows_path"`
29784    new_path="$unix_path"
29785  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29786    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29787    new_path="$unix_path"
29788  fi
29789
29790
29791    new_path=`$WHICH "$new_path" 2> /dev/null`
29792    # bat and cmd files are not always considered executable in MSYS causing which
29793    # to not find them
29794    if test "x$new_path" = x \
29795        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29796        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29797      new_path="$path"
29798
29799  windows_path="$new_path"
29800  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29801    unix_path=`$CYGPATH -u "$windows_path"`
29802    new_path="$unix_path"
29803  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29804    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29805    new_path="$unix_path"
29806  fi
29807
29808    fi
29809
29810    if test "x$new_path" = x; then
29811      # It's still not found. Now this is an unrecoverable error.
29812      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29813$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29814      has_space=`$ECHO "$complete" | $GREP " "`
29815      if test "x$has_space" != x; then
29816        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29817$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29818      fi
29819      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29820    fi
29821  fi
29822
29823  # Now new_path has a complete unix path to the binary
29824  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29825    # Keep paths in /bin as-is, but remove trailing .exe if any
29826    new_path="${new_path/%.exe/}"
29827    # Do not save /bin paths to all_fixpath_prefixes!
29828  else
29829    # Not in mixed or Windows style, start by that.
29830    new_path=`cmd //c echo $new_path`
29831
29832  input_path="$new_path"
29833  # Check if we need to convert this using DOS-style short mode. If the path
29834  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29835  # take no chances and rewrite it.
29836  # Note: m4 eats our [], so we need to use [ and ] instead.
29837  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29838  if test "x$has_forbidden_chars" != x; then
29839    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29840    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29841  fi
29842
29843    # Output is in $new_path
29844
29845  windows_path="$new_path"
29846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29847    unix_path=`$CYGPATH -u "$windows_path"`
29848    new_path="$unix_path"
29849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29850    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29851    new_path="$unix_path"
29852  fi
29853
29854    # remove trailing .exe if any
29855    new_path="${new_path/%.exe/}"
29856
29857    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29858    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29859  fi
29860
29861  else
29862    # We're on a posix platform. Hooray! :)
29863    # First separate the path from the arguments. This will split at the first
29864    # space.
29865    complete="$CXX"
29866    path="${complete%% *}"
29867    tmp="$complete EOL"
29868    arguments="${tmp#* }"
29869
29870    # Cannot rely on the command "which" here since it doesn't always work.
29871    is_absolute_path=`$ECHO "$path" | $GREP ^/`
29872    if test -z "$is_absolute_path"; then
29873      # Path to executable is not absolute. Find it.
29874      IFS_save="$IFS"
29875      IFS=:
29876      for p in $PATH; do
29877        if test -f "$p/$path" && test -x "$p/$path"; then
29878          new_path="$p/$path"
29879          break
29880        fi
29881      done
29882      IFS="$IFS_save"
29883    else
29884      # This is an absolute path, we can use it without further modifications.
29885      new_path="$path"
29886    fi
29887
29888    if test "x$new_path" = x; then
29889      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29890$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29891      has_space=`$ECHO "$complete" | $GREP " "`
29892      if test "x$has_space" != x; then
29893        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29894$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29895      fi
29896      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29897    fi
29898  fi
29899
29900  # Now join together the path and the arguments once again
29901  if test "x$arguments" != xEOL; then
29902    new_complete="$new_path ${arguments% *}"
29903  else
29904    new_complete="$new_path"
29905  fi
29906
29907  if test "x$complete" != "x$new_complete"; then
29908    CXX="$new_complete"
29909    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
29910$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
29911  fi
29912
29913  TEST_COMPILER="$CXX"
29914  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
29915  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
29916  if test "x$OPENJDK_BUILD_OS" != xaix; then
29917    # FIXME: This test should not be needed anymore; we don't do that for any platform.
29918    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
29919$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
29920
29921  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29922    # Follow a chain of symbolic links. Use readlink
29923    # where it exists, else fall back to horribly
29924    # complicated shell code.
29925    if test "x$READLINK_TESTED" != yes; then
29926      # On MacOSX there is a readlink tool with a different
29927      # purpose than the GNU readlink tool. Check the found readlink.
29928      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29929      if test "x$ISGNU" = x; then
29930        # A readlink that we do not know how to use.
29931        # Are there other non-GNU readlinks out there?
29932        READLINK_TESTED=yes
29933        READLINK=
29934      fi
29935    fi
29936
29937    if test "x$READLINK" != x; then
29938      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
29939    else
29940      # Save the current directory for restoring afterwards
29941      STARTDIR=$PWD
29942      COUNTER=0
29943      sym_link_dir=`$DIRNAME $TEST_COMPILER`
29944      sym_link_file=`$BASENAME $TEST_COMPILER`
29945      cd $sym_link_dir
29946      # Use -P flag to resolve symlinks in directories.
29947      cd `$THEPWDCMD -P`
29948      sym_link_dir=`$THEPWDCMD -P`
29949      # Resolve file symlinks
29950      while test $COUNTER -lt 20; do
29951        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29952        if test "x$ISLINK" == x; then
29953          # This is not a symbolic link! We are done!
29954          break
29955        fi
29956        # Again resolve directory symlinks since the target of the just found
29957        # link could be in a different directory
29958        cd `$DIRNAME $ISLINK`
29959        sym_link_dir=`$THEPWDCMD -P`
29960        sym_link_file=`$BASENAME $ISLINK`
29961        let COUNTER=COUNTER+1
29962      done
29963      cd $STARTDIR
29964      TEST_COMPILER=$sym_link_dir/$sym_link_file
29965    fi
29966  fi
29967
29968    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
29969$as_echo "$TEST_COMPILER" >&6; }
29970  fi
29971  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
29972$as_echo_n "checking if CXX is disguised ccache... " >&6; }
29973
29974  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
29975  if test "x$COMPILER_BASENAME" = "xccache"; then
29976    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
29977$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
29978    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
29979    # We want to control ccache invocation ourselves, so ignore this cc and try
29980    # searching again.
29981
29982    # Remove the path to the fake ccache cc from the PATH
29983    RETRY_COMPILER_SAVED_PATH="$PATH"
29984    COMPILER_DIRNAME=`$DIRNAME $CXX`
29985    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
29986
29987    # Try again looking for our compiler
29988    if test -n "$ac_tool_prefix"; then
29989  for ac_prog in $TOOLCHAIN_CXX_BINARY
29990  do
29991    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29992set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29994$as_echo_n "checking for $ac_word... " >&6; }
29995if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
29996  $as_echo_n "(cached) " >&6
29997else
29998  if test -n "$PROPER_COMPILER_CXX"; then
29999  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
30000else
30001as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30002for as_dir in $PATH
30003do
30004  IFS=$as_save_IFS
30005  test -z "$as_dir" && as_dir=.
30006    for ac_exec_ext in '' $ac_executable_extensions; do
30007  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30008    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
30009    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30010    break 2
30011  fi
30012done
30013  done
30014IFS=$as_save_IFS
30015
30016fi
30017fi
30018PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
30019if test -n "$PROPER_COMPILER_CXX"; then
30020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30021$as_echo "$PROPER_COMPILER_CXX" >&6; }
30022else
30023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30024$as_echo "no" >&6; }
30025fi
30026
30027
30028    test -n "$PROPER_COMPILER_CXX" && break
30029  done
30030fi
30031if test -z "$PROPER_COMPILER_CXX"; then
30032  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
30033  for ac_prog in $TOOLCHAIN_CXX_BINARY
30034do
30035  # Extract the first word of "$ac_prog", so it can be a program name with args.
30036set dummy $ac_prog; ac_word=$2
30037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30038$as_echo_n "checking for $ac_word... " >&6; }
30039if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
30040  $as_echo_n "(cached) " >&6
30041else
30042  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30043  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
30044else
30045as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30046for as_dir in $PATH
30047do
30048  IFS=$as_save_IFS
30049  test -z "$as_dir" && as_dir=.
30050    for ac_exec_ext in '' $ac_executable_extensions; do
30051  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30052    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
30053    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30054    break 2
30055  fi
30056done
30057  done
30058IFS=$as_save_IFS
30059
30060fi
30061fi
30062ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
30063if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
30065$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
30066else
30067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30068$as_echo "no" >&6; }
30069fi
30070
30071
30072  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
30073done
30074
30075  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
30076    PROPER_COMPILER_CXX=""
30077  else
30078    case $cross_compiling:$ac_tool_warned in
30079yes:)
30080{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30081$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30082ac_tool_warned=yes ;;
30083esac
30084    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
30085  fi
30086fi
30087
30088
30089  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30090
30091  # First separate the path from the arguments. This will split at the first
30092  # space.
30093  complete="$PROPER_COMPILER_CXX"
30094  path="${complete%% *}"
30095  tmp="$complete EOL"
30096  arguments="${tmp#* }"
30097
30098  # Input might be given as Windows format, start by converting to
30099  # unix format.
30100  new_path=`$CYGPATH -u "$path"`
30101
30102  # Now try to locate executable using which
30103  new_path=`$WHICH "$new_path" 2> /dev/null`
30104  # bat and cmd files are not always considered executable in cygwin causing which
30105  # to not find them
30106  if test "x$new_path" = x \
30107      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30108      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30109    new_path=`$CYGPATH -u "$path"`
30110  fi
30111  if test "x$new_path" = x; then
30112    # Oops. Which didn't find the executable.
30113    # The splitting of arguments from the executable at a space might have been incorrect,
30114    # since paths with space are more likely in Windows. Give it another try with the whole
30115    # argument.
30116    path="$complete"
30117    arguments="EOL"
30118    new_path=`$CYGPATH -u "$path"`
30119    new_path=`$WHICH "$new_path" 2> /dev/null`
30120    # bat and cmd files are not always considered executable in cygwin causing which
30121    # to not find them
30122    if test "x$new_path" = x \
30123        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30124        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30125      new_path=`$CYGPATH -u "$path"`
30126    fi
30127    if test "x$new_path" = x; then
30128      # It's still not found. Now this is an unrecoverable error.
30129      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30130$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30131      has_space=`$ECHO "$complete" | $GREP " "`
30132      if test "x$has_space" != x; then
30133        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30134$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30135      fi
30136      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30137    fi
30138  fi
30139
30140  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30141  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30142  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30143  # "foo.exe" is OK but "foo" is an error.
30144  #
30145  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30146  # It is also a way to make sure we got the proper file name for the real test later on.
30147  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30148  if test "x$test_shortpath" = x; then
30149    # Short path failed, file does not exist as specified.
30150    # Try adding .exe or .cmd
30151    if test -f "${new_path}.exe"; then
30152      input_to_shortpath="${new_path}.exe"
30153    elif test -f "${new_path}.cmd"; then
30154      input_to_shortpath="${new_path}.cmd"
30155    else
30156      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
30157$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
30158      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30159$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30160      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30161    fi
30162  else
30163    input_to_shortpath="$new_path"
30164  fi
30165
30166  # Call helper function which possibly converts this using DOS-style short mode.
30167  # If so, the updated path is stored in $new_path.
30168  new_path="$input_to_shortpath"
30169
30170  input_path="$input_to_shortpath"
30171  # Check if we need to convert this using DOS-style short mode. If the path
30172  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30173  # take no chances and rewrite it.
30174  # Note: m4 eats our [], so we need to use [ and ] instead.
30175  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30176  if test "x$has_forbidden_chars" != x; then
30177    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30178    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30179    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30180    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30181      # Going to short mode and back again did indeed matter. Since short mode is
30182      # case insensitive, let's make it lowercase to improve readability.
30183      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30184      # Now convert it back to Unix-stile (cygpath)
30185      input_path=`$CYGPATH -u "$shortmode_path"`
30186      new_path="$input_path"
30187    fi
30188  fi
30189
30190  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30191  if test "x$test_cygdrive_prefix" = x; then
30192    # As a simple fix, exclude /usr/bin since it's not a real path.
30193    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30194      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30195      # a path prefixed by /cygdrive for fixpath to work.
30196      new_path="$CYGWIN_ROOT_PATH$input_path"
30197    fi
30198  fi
30199
30200  # remove trailing .exe if any
30201  new_path="${new_path/%.exe/}"
30202
30203  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30204
30205  # First separate the path from the arguments. This will split at the first
30206  # space.
30207  complete="$PROPER_COMPILER_CXX"
30208  path="${complete%% *}"
30209  tmp="$complete EOL"
30210  arguments="${tmp#* }"
30211
30212  # Input might be given as Windows format, start by converting to
30213  # unix format.
30214  new_path="$path"
30215
30216  windows_path="$new_path"
30217  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30218    unix_path=`$CYGPATH -u "$windows_path"`
30219    new_path="$unix_path"
30220  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30221    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30222    new_path="$unix_path"
30223  fi
30224
30225
30226  # Now try to locate executable using which
30227  new_path=`$WHICH "$new_path" 2> /dev/null`
30228
30229  if test "x$new_path" = x; then
30230    # Oops. Which didn't find the executable.
30231    # The splitting of arguments from the executable at a space might have been incorrect,
30232    # since paths with space are more likely in Windows. Give it another try with the whole
30233    # argument.
30234    path="$complete"
30235    arguments="EOL"
30236    new_path="$path"
30237
30238  windows_path="$new_path"
30239  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30240    unix_path=`$CYGPATH -u "$windows_path"`
30241    new_path="$unix_path"
30242  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30243    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30244    new_path="$unix_path"
30245  fi
30246
30247
30248    new_path=`$WHICH "$new_path" 2> /dev/null`
30249    # bat and cmd files are not always considered executable in MSYS causing which
30250    # to not find them
30251    if test "x$new_path" = x \
30252        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30253        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30254      new_path="$path"
30255
30256  windows_path="$new_path"
30257  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30258    unix_path=`$CYGPATH -u "$windows_path"`
30259    new_path="$unix_path"
30260  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30261    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30262    new_path="$unix_path"
30263  fi
30264
30265    fi
30266
30267    if test "x$new_path" = x; then
30268      # It's still not found. Now this is an unrecoverable error.
30269      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30270$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30271      has_space=`$ECHO "$complete" | $GREP " "`
30272      if test "x$has_space" != x; then
30273        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30274$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30275      fi
30276      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30277    fi
30278  fi
30279
30280  # Now new_path has a complete unix path to the binary
30281  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30282    # Keep paths in /bin as-is, but remove trailing .exe if any
30283    new_path="${new_path/%.exe/}"
30284    # Do not save /bin paths to all_fixpath_prefixes!
30285  else
30286    # Not in mixed or Windows style, start by that.
30287    new_path=`cmd //c echo $new_path`
30288
30289  input_path="$new_path"
30290  # Check if we need to convert this using DOS-style short mode. If the path
30291  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30292  # take no chances and rewrite it.
30293  # Note: m4 eats our [], so we need to use [ and ] instead.
30294  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30295  if test "x$has_forbidden_chars" != x; then
30296    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30297    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30298  fi
30299
30300    # Output is in $new_path
30301
30302  windows_path="$new_path"
30303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30304    unix_path=`$CYGPATH -u "$windows_path"`
30305    new_path="$unix_path"
30306  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30307    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30308    new_path="$unix_path"
30309  fi
30310
30311    # remove trailing .exe if any
30312    new_path="${new_path/%.exe/}"
30313
30314    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30315    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30316  fi
30317
30318  else
30319    # We're on a posix platform. Hooray! :)
30320    # First separate the path from the arguments. This will split at the first
30321    # space.
30322    complete="$PROPER_COMPILER_CXX"
30323    path="${complete%% *}"
30324    tmp="$complete EOL"
30325    arguments="${tmp#* }"
30326
30327    # Cannot rely on the command "which" here since it doesn't always work.
30328    is_absolute_path=`$ECHO "$path" | $GREP ^/`
30329    if test -z "$is_absolute_path"; then
30330      # Path to executable is not absolute. Find it.
30331      IFS_save="$IFS"
30332      IFS=:
30333      for p in $PATH; do
30334        if test -f "$p/$path" && test -x "$p/$path"; then
30335          new_path="$p/$path"
30336          break
30337        fi
30338      done
30339      IFS="$IFS_save"
30340    else
30341      # This is an absolute path, we can use it without further modifications.
30342      new_path="$path"
30343    fi
30344
30345    if test "x$new_path" = x; then
30346      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30347$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30348      has_space=`$ECHO "$complete" | $GREP " "`
30349      if test "x$has_space" != x; then
30350        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30351$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30352      fi
30353      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30354    fi
30355  fi
30356
30357  # Now join together the path and the arguments once again
30358  if test "x$arguments" != xEOL; then
30359    new_complete="$new_path ${arguments% *}"
30360  else
30361    new_complete="$new_path"
30362  fi
30363
30364  if test "x$complete" != "x$new_complete"; then
30365    PROPER_COMPILER_CXX="$new_complete"
30366    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
30367$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
30368  fi
30369
30370    PATH="$RETRY_COMPILER_SAVED_PATH"
30371
30372    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
30373$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
30374
30375  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30376    # Follow a chain of symbolic links. Use readlink
30377    # where it exists, else fall back to horribly
30378    # complicated shell code.
30379    if test "x$READLINK_TESTED" != yes; then
30380      # On MacOSX there is a readlink tool with a different
30381      # purpose than the GNU readlink tool. Check the found readlink.
30382      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30383      if test "x$ISGNU" = x; then
30384        # A readlink that we do not know how to use.
30385        # Are there other non-GNU readlinks out there?
30386        READLINK_TESTED=yes
30387        READLINK=
30388      fi
30389    fi
30390
30391    if test "x$READLINK" != x; then
30392      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
30393    else
30394      # Save the current directory for restoring afterwards
30395      STARTDIR=$PWD
30396      COUNTER=0
30397      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
30398      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
30399      cd $sym_link_dir
30400      # Use -P flag to resolve symlinks in directories.
30401      cd `$THEPWDCMD -P`
30402      sym_link_dir=`$THEPWDCMD -P`
30403      # Resolve file symlinks
30404      while test $COUNTER -lt 20; do
30405        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30406        if test "x$ISLINK" == x; then
30407          # This is not a symbolic link! We are done!
30408          break
30409        fi
30410        # Again resolve directory symlinks since the target of the just found
30411        # link could be in a different directory
30412        cd `$DIRNAME $ISLINK`
30413        sym_link_dir=`$THEPWDCMD -P`
30414        sym_link_file=`$BASENAME $ISLINK`
30415        let COUNTER=COUNTER+1
30416      done
30417      cd $STARTDIR
30418      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
30419    fi
30420  fi
30421
30422    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30423$as_echo "$PROPER_COMPILER_CXX" >&6; }
30424    CXX="$PROPER_COMPILER_CXX"
30425  else
30426    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
30427$as_echo "no, keeping CXX" >&6; }
30428  fi
30429
30430
30431  COMPILER=$CXX
30432  COMPILER_NAME=$COMPILER_NAME
30433
30434  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30435    # cc -V output typically looks like
30436    #     cc: Sun C 5.12 Linux_i386 2011/11/16
30437    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
30438    # Check that this is likely to be the Solaris Studio cc.
30439    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
30440    if test $? -ne 0; then
30441      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30442      { $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
30443$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30444      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30445$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30446      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30447$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30448      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30449    fi
30450    # Remove usage instructions (if present), and
30451    # collapse compiler output into a single line
30452    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30453        $SED -e 's/ *[Uu]sage:.*//'`
30454    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30455        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
30456  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
30457    # xlc -qversion output typically looks like
30458    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
30459    #     Version: 11.01.0000.0015
30460    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
30461    # Check that this is likely to be the IBM XL C compiler.
30462    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
30463    if test $? -ne 0; then
30464      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30465      { $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
30466$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30467      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30468$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30469      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30470$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30471      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30472    fi
30473    # Collapse compiler output into a single line
30474    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30475    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30476        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
30477  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
30478    # There is no specific version flag, but all output starts with a version string.
30479    # First line typically looks something like:
30480    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
30481    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
30482    # Check that this is likely to be Microsoft CL.EXE.
30483    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
30484    if test $? -ne 0; then
30485      { $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
30486$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30487      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30488$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30489      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30490    fi
30491    # Collapse compiler output into a single line
30492    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30493    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30494        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
30495  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
30496    # gcc --version output typically looks like
30497    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
30498    #     Copyright (C) 2013 Free Software Foundation, Inc.
30499    #     This is free software; see the source for copying conditions.  There is NO
30500    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
30501    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30502    # Check that this is likely to be GCC.
30503    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
30504    if test $? -ne 0; then
30505      { $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
30506$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30507      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
30508$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
30509      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30510    fi
30511    # Remove Copyright and legalese from version string, and
30512    # collapse into a single line
30513    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30514        $SED -e 's/ *Copyright .*//'`
30515    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30516        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
30517  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
30518    # clang --version output typically looks like
30519    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
30520    #    clang version 3.3 (tags/RELEASE_33/final)
30521    # or
30522    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
30523    #    Target: x86_64-pc-linux-gnu
30524    #    Thread model: posix
30525    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30526    # Check that this is likely to be clang
30527    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
30528    if test $? -ne 0; then
30529      { $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
30530$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30531      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30532$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30533      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30534    fi
30535    # Collapse compiler output into a single line
30536    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30537    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30538        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
30539  else
30540      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
30541  fi
30542  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
30543  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
30544  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
30545  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
30546
30547  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
30548$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
30549
30550
30551  # Now that we have resolved CXX ourself, let autoconf have its go at it
30552  ac_ext=cpp
30553ac_cpp='$CXXCPP $CPPFLAGS'
30554ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30555ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30556ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30557if test -z "$CXX"; then
30558  if test -n "$CCC"; then
30559    CXX=$CCC
30560  else
30561    if test -n "$ac_tool_prefix"; then
30562  for ac_prog in $CXX
30563  do
30564    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30565set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30567$as_echo_n "checking for $ac_word... " >&6; }
30568if ${ac_cv_prog_CXX+:} false; then :
30569  $as_echo_n "(cached) " >&6
30570else
30571  if test -n "$CXX"; then
30572  ac_cv_prog_CXX="$CXX" # Let the user override the test.
30573else
30574as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30575for as_dir in $PATH
30576do
30577  IFS=$as_save_IFS
30578  test -z "$as_dir" && as_dir=.
30579    for ac_exec_ext in '' $ac_executable_extensions; do
30580  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30581    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
30582    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30583    break 2
30584  fi
30585done
30586  done
30587IFS=$as_save_IFS
30588
30589fi
30590fi
30591CXX=$ac_cv_prog_CXX
30592if test -n "$CXX"; then
30593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
30594$as_echo "$CXX" >&6; }
30595else
30596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30597$as_echo "no" >&6; }
30598fi
30599
30600
30601    test -n "$CXX" && break
30602  done
30603fi
30604if test -z "$CXX"; then
30605  ac_ct_CXX=$CXX
30606  for ac_prog in $CXX
30607do
30608  # Extract the first word of "$ac_prog", so it can be a program name with args.
30609set dummy $ac_prog; ac_word=$2
30610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30611$as_echo_n "checking for $ac_word... " >&6; }
30612if ${ac_cv_prog_ac_ct_CXX+:} false; then :
30613  $as_echo_n "(cached) " >&6
30614else
30615  if test -n "$ac_ct_CXX"; then
30616  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
30617else
30618as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30619for as_dir in $PATH
30620do
30621  IFS=$as_save_IFS
30622  test -z "$as_dir" && as_dir=.
30623    for ac_exec_ext in '' $ac_executable_extensions; do
30624  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30625    ac_cv_prog_ac_ct_CXX="$ac_prog"
30626    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30627    break 2
30628  fi
30629done
30630  done
30631IFS=$as_save_IFS
30632
30633fi
30634fi
30635ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
30636if test -n "$ac_ct_CXX"; then
30637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
30638$as_echo "$ac_ct_CXX" >&6; }
30639else
30640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30641$as_echo "no" >&6; }
30642fi
30643
30644
30645  test -n "$ac_ct_CXX" && break
30646done
30647
30648  if test "x$ac_ct_CXX" = x; then
30649    CXX="g++"
30650  else
30651    case $cross_compiling:$ac_tool_warned in
30652yes:)
30653{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30654$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30655ac_tool_warned=yes ;;
30656esac
30657    CXX=$ac_ct_CXX
30658  fi
30659fi
30660
30661  fi
30662fi
30663# Provide some information about the compiler.
30664$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
30665set X $ac_compile
30666ac_compiler=$2
30667for ac_option in --version -v -V -qversion; do
30668  { { ac_try="$ac_compiler $ac_option >&5"
30669case "(($ac_try" in
30670  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30671  *) ac_try_echo=$ac_try;;
30672esac
30673eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30674$as_echo "$ac_try_echo"; } >&5
30675  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
30676  ac_status=$?
30677  if test -s conftest.err; then
30678    sed '10a\
30679... rest of stderr output deleted ...
30680         10q' conftest.err >conftest.er1
30681    cat conftest.er1 >&5
30682  fi
30683  rm -f conftest.er1 conftest.err
30684  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30685  test $ac_status = 0; }
30686done
30687
30688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
30689$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
30690if ${ac_cv_cxx_compiler_gnu+:} false; then :
30691  $as_echo_n "(cached) " >&6
30692else
30693  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30694/* end confdefs.h.  */
30695
30696int
30697main ()
30698{
30699#ifndef __GNUC__
30700       choke me
30701#endif
30702
30703  ;
30704  return 0;
30705}
30706_ACEOF
30707if ac_fn_cxx_try_compile "$LINENO"; then :
30708  ac_compiler_gnu=yes
30709else
30710  ac_compiler_gnu=no
30711fi
30712rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30713ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
30714
30715fi
30716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
30717$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
30718if test $ac_compiler_gnu = yes; then
30719  GXX=yes
30720else
30721  GXX=
30722fi
30723ac_test_CXXFLAGS=${CXXFLAGS+set}
30724ac_save_CXXFLAGS=$CXXFLAGS
30725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
30726$as_echo_n "checking whether $CXX accepts -g... " >&6; }
30727if ${ac_cv_prog_cxx_g+:} false; then :
30728  $as_echo_n "(cached) " >&6
30729else
30730  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
30731   ac_cxx_werror_flag=yes
30732   ac_cv_prog_cxx_g=no
30733   CXXFLAGS="-g"
30734   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30735/* end confdefs.h.  */
30736
30737int
30738main ()
30739{
30740
30741  ;
30742  return 0;
30743}
30744_ACEOF
30745if ac_fn_cxx_try_compile "$LINENO"; then :
30746  ac_cv_prog_cxx_g=yes
30747else
30748  CXXFLAGS=""
30749      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30750/* end confdefs.h.  */
30751
30752int
30753main ()
30754{
30755
30756  ;
30757  return 0;
30758}
30759_ACEOF
30760if ac_fn_cxx_try_compile "$LINENO"; then :
30761
30762else
30763  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30764	 CXXFLAGS="-g"
30765	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30766/* end confdefs.h.  */
30767
30768int
30769main ()
30770{
30771
30772  ;
30773  return 0;
30774}
30775_ACEOF
30776if ac_fn_cxx_try_compile "$LINENO"; then :
30777  ac_cv_prog_cxx_g=yes
30778fi
30779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30780fi
30781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30782fi
30783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30784   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30785fi
30786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
30787$as_echo "$ac_cv_prog_cxx_g" >&6; }
30788if test "$ac_test_CXXFLAGS" = set; then
30789  CXXFLAGS=$ac_save_CXXFLAGS
30790elif test $ac_cv_prog_cxx_g = yes; then
30791  if test "$GXX" = yes; then
30792    CXXFLAGS="-g -O2"
30793  else
30794    CXXFLAGS="-g"
30795  fi
30796else
30797  if test "$GXX" = yes; then
30798    CXXFLAGS="-O2"
30799  else
30800    CXXFLAGS=
30801  fi
30802fi
30803ac_ext=cpp
30804ac_cpp='$CXXCPP $CPPFLAGS'
30805ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30806ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30807ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30808
30809
30810  #
30811  # Setup the preprocessor (CPP and CXXCPP)
30812  #
30813  ac_ext=c
30814ac_cpp='$CPP $CPPFLAGS'
30815ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30816ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30817ac_compiler_gnu=$ac_cv_c_compiler_gnu
30818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
30819$as_echo_n "checking how to run the C preprocessor... " >&6; }
30820# On Suns, sometimes $CPP names a directory.
30821if test -n "$CPP" && test -d "$CPP"; then
30822  CPP=
30823fi
30824if test -z "$CPP"; then
30825  if ${ac_cv_prog_CPP+:} false; then :
30826  $as_echo_n "(cached) " >&6
30827else
30828      # Double quotes because CPP needs to be expanded
30829    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
30830    do
30831      ac_preproc_ok=false
30832for ac_c_preproc_warn_flag in '' yes
30833do
30834  # Use a header file that comes with gcc, so configuring glibc
30835  # with a fresh cross-compiler works.
30836  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30837  # <limits.h> exists even on freestanding compilers.
30838  # On the NeXT, cc -E runs the code through the compiler's parser,
30839  # not just through cpp. "Syntax error" is here to catch this case.
30840  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30841/* end confdefs.h.  */
30842#ifdef __STDC__
30843# include <limits.h>
30844#else
30845# include <assert.h>
30846#endif
30847		     Syntax error
30848_ACEOF
30849if ac_fn_c_try_cpp "$LINENO"; then :
30850
30851else
30852  # Broken: fails on valid input.
30853continue
30854fi
30855rm -f conftest.err conftest.i conftest.$ac_ext
30856
30857  # OK, works on sane cases.  Now check whether nonexistent headers
30858  # can be detected and how.
30859  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30860/* end confdefs.h.  */
30861#include <ac_nonexistent.h>
30862_ACEOF
30863if ac_fn_c_try_cpp "$LINENO"; then :
30864  # Broken: success on invalid input.
30865continue
30866else
30867  # Passes both tests.
30868ac_preproc_ok=:
30869break
30870fi
30871rm -f conftest.err conftest.i conftest.$ac_ext
30872
30873done
30874# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30875rm -f conftest.i conftest.err conftest.$ac_ext
30876if $ac_preproc_ok; then :
30877  break
30878fi
30879
30880    done
30881    ac_cv_prog_CPP=$CPP
30882
30883fi
30884  CPP=$ac_cv_prog_CPP
30885else
30886  ac_cv_prog_CPP=$CPP
30887fi
30888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
30889$as_echo "$CPP" >&6; }
30890ac_preproc_ok=false
30891for ac_c_preproc_warn_flag in '' yes
30892do
30893  # Use a header file that comes with gcc, so configuring glibc
30894  # with a fresh cross-compiler works.
30895  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30896  # <limits.h> exists even on freestanding compilers.
30897  # On the NeXT, cc -E runs the code through the compiler's parser,
30898  # not just through cpp. "Syntax error" is here to catch this case.
30899  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30900/* end confdefs.h.  */
30901#ifdef __STDC__
30902# include <limits.h>
30903#else
30904# include <assert.h>
30905#endif
30906		     Syntax error
30907_ACEOF
30908if ac_fn_c_try_cpp "$LINENO"; then :
30909
30910else
30911  # Broken: fails on valid input.
30912continue
30913fi
30914rm -f conftest.err conftest.i conftest.$ac_ext
30915
30916  # OK, works on sane cases.  Now check whether nonexistent headers
30917  # can be detected and how.
30918  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30919/* end confdefs.h.  */
30920#include <ac_nonexistent.h>
30921_ACEOF
30922if ac_fn_c_try_cpp "$LINENO"; then :
30923  # Broken: success on invalid input.
30924continue
30925else
30926  # Passes both tests.
30927ac_preproc_ok=:
30928break
30929fi
30930rm -f conftest.err conftest.i conftest.$ac_ext
30931
30932done
30933# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30934rm -f conftest.i conftest.err conftest.$ac_ext
30935if $ac_preproc_ok; then :
30936
30937else
30938  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30939$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30940as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
30941See \`config.log' for more details" "$LINENO" 5; }
30942fi
30943
30944ac_ext=cpp
30945ac_cpp='$CXXCPP $CPPFLAGS'
30946ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30947ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30948ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30949
30950
30951  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30952
30953  # First separate the path from the arguments. This will split at the first
30954  # space.
30955  complete="$CPP"
30956  path="${complete%% *}"
30957  tmp="$complete EOL"
30958  arguments="${tmp#* }"
30959
30960  # Input might be given as Windows format, start by converting to
30961  # unix format.
30962  new_path=`$CYGPATH -u "$path"`
30963
30964  # Now try to locate executable using which
30965  new_path=`$WHICH "$new_path" 2> /dev/null`
30966  # bat and cmd files are not always considered executable in cygwin causing which
30967  # to not find them
30968  if test "x$new_path" = x \
30969      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30970      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30971    new_path=`$CYGPATH -u "$path"`
30972  fi
30973  if test "x$new_path" = x; then
30974    # Oops. Which didn't find the executable.
30975    # The splitting of arguments from the executable at a space might have been incorrect,
30976    # since paths with space are more likely in Windows. Give it another try with the whole
30977    # argument.
30978    path="$complete"
30979    arguments="EOL"
30980    new_path=`$CYGPATH -u "$path"`
30981    new_path=`$WHICH "$new_path" 2> /dev/null`
30982    # bat and cmd files are not always considered executable in cygwin causing which
30983    # to not find them
30984    if test "x$new_path" = x \
30985        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30986        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30987      new_path=`$CYGPATH -u "$path"`
30988    fi
30989    if test "x$new_path" = x; then
30990      # It's still not found. Now this is an unrecoverable error.
30991      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30992$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30993      has_space=`$ECHO "$complete" | $GREP " "`
30994      if test "x$has_space" != x; then
30995        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30996$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30997      fi
30998      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30999    fi
31000  fi
31001
31002  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31003  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31004  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31005  # "foo.exe" is OK but "foo" is an error.
31006  #
31007  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31008  # It is also a way to make sure we got the proper file name for the real test later on.
31009  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31010  if test "x$test_shortpath" = x; then
31011    # Short path failed, file does not exist as specified.
31012    # Try adding .exe or .cmd
31013    if test -f "${new_path}.exe"; then
31014      input_to_shortpath="${new_path}.exe"
31015    elif test -f "${new_path}.cmd"; then
31016      input_to_shortpath="${new_path}.cmd"
31017    else
31018      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
31019$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
31020      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31021$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31022      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31023    fi
31024  else
31025    input_to_shortpath="$new_path"
31026  fi
31027
31028  # Call helper function which possibly converts this using DOS-style short mode.
31029  # If so, the updated path is stored in $new_path.
31030  new_path="$input_to_shortpath"
31031
31032  input_path="$input_to_shortpath"
31033  # Check if we need to convert this using DOS-style short mode. If the path
31034  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31035  # take no chances and rewrite it.
31036  # Note: m4 eats our [], so we need to use [ and ] instead.
31037  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31038  if test "x$has_forbidden_chars" != x; then
31039    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31040    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31041    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31042    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31043      # Going to short mode and back again did indeed matter. Since short mode is
31044      # case insensitive, let's make it lowercase to improve readability.
31045      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31046      # Now convert it back to Unix-stile (cygpath)
31047      input_path=`$CYGPATH -u "$shortmode_path"`
31048      new_path="$input_path"
31049    fi
31050  fi
31051
31052  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31053  if test "x$test_cygdrive_prefix" = x; then
31054    # As a simple fix, exclude /usr/bin since it's not a real path.
31055    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31056      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31057      # a path prefixed by /cygdrive for fixpath to work.
31058      new_path="$CYGWIN_ROOT_PATH$input_path"
31059    fi
31060  fi
31061
31062  # remove trailing .exe if any
31063  new_path="${new_path/%.exe/}"
31064
31065  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31066
31067  # First separate the path from the arguments. This will split at the first
31068  # space.
31069  complete="$CPP"
31070  path="${complete%% *}"
31071  tmp="$complete EOL"
31072  arguments="${tmp#* }"
31073
31074  # Input might be given as Windows format, start by converting to
31075  # unix format.
31076  new_path="$path"
31077
31078  windows_path="$new_path"
31079  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31080    unix_path=`$CYGPATH -u "$windows_path"`
31081    new_path="$unix_path"
31082  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31083    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31084    new_path="$unix_path"
31085  fi
31086
31087
31088  # Now try to locate executable using which
31089  new_path=`$WHICH "$new_path" 2> /dev/null`
31090
31091  if test "x$new_path" = x; then
31092    # Oops. Which didn't find the executable.
31093    # The splitting of arguments from the executable at a space might have been incorrect,
31094    # since paths with space are more likely in Windows. Give it another try with the whole
31095    # argument.
31096    path="$complete"
31097    arguments="EOL"
31098    new_path="$path"
31099
31100  windows_path="$new_path"
31101  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31102    unix_path=`$CYGPATH -u "$windows_path"`
31103    new_path="$unix_path"
31104  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31105    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31106    new_path="$unix_path"
31107  fi
31108
31109
31110    new_path=`$WHICH "$new_path" 2> /dev/null`
31111    # bat and cmd files are not always considered executable in MSYS causing which
31112    # to not find them
31113    if test "x$new_path" = x \
31114        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31115        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31116      new_path="$path"
31117
31118  windows_path="$new_path"
31119  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31120    unix_path=`$CYGPATH -u "$windows_path"`
31121    new_path="$unix_path"
31122  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31123    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31124    new_path="$unix_path"
31125  fi
31126
31127    fi
31128
31129    if test "x$new_path" = x; then
31130      # It's still not found. Now this is an unrecoverable error.
31131      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31132$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31133      has_space=`$ECHO "$complete" | $GREP " "`
31134      if test "x$has_space" != x; then
31135        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31136$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31137      fi
31138      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31139    fi
31140  fi
31141
31142  # Now new_path has a complete unix path to the binary
31143  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31144    # Keep paths in /bin as-is, but remove trailing .exe if any
31145    new_path="${new_path/%.exe/}"
31146    # Do not save /bin paths to all_fixpath_prefixes!
31147  else
31148    # Not in mixed or Windows style, start by that.
31149    new_path=`cmd //c echo $new_path`
31150
31151  input_path="$new_path"
31152  # Check if we need to convert this using DOS-style short mode. If the path
31153  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31154  # take no chances and rewrite it.
31155  # Note: m4 eats our [], so we need to use [ and ] instead.
31156  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31157  if test "x$has_forbidden_chars" != x; then
31158    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31159    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31160  fi
31161
31162    # Output is in $new_path
31163
31164  windows_path="$new_path"
31165  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31166    unix_path=`$CYGPATH -u "$windows_path"`
31167    new_path="$unix_path"
31168  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31169    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31170    new_path="$unix_path"
31171  fi
31172
31173    # remove trailing .exe if any
31174    new_path="${new_path/%.exe/}"
31175
31176    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31177    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31178  fi
31179
31180  else
31181    # We're on a posix platform. Hooray! :)
31182    # First separate the path from the arguments. This will split at the first
31183    # space.
31184    complete="$CPP"
31185    path="${complete%% *}"
31186    tmp="$complete EOL"
31187    arguments="${tmp#* }"
31188
31189    # Cannot rely on the command "which" here since it doesn't always work.
31190    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31191    if test -z "$is_absolute_path"; then
31192      # Path to executable is not absolute. Find it.
31193      IFS_save="$IFS"
31194      IFS=:
31195      for p in $PATH; do
31196        if test -f "$p/$path" && test -x "$p/$path"; then
31197          new_path="$p/$path"
31198          break
31199        fi
31200      done
31201      IFS="$IFS_save"
31202    else
31203      # This is an absolute path, we can use it without further modifications.
31204      new_path="$path"
31205    fi
31206
31207    if test "x$new_path" = x; then
31208      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31209$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31210      has_space=`$ECHO "$complete" | $GREP " "`
31211      if test "x$has_space" != x; then
31212        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31213$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31214      fi
31215      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31216    fi
31217  fi
31218
31219  # Now join together the path and the arguments once again
31220  if test "x$arguments" != xEOL; then
31221    new_complete="$new_path ${arguments% *}"
31222  else
31223    new_complete="$new_path"
31224  fi
31225
31226  if test "x$complete" != "x$new_complete"; then
31227    CPP="$new_complete"
31228    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
31229$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
31230  fi
31231
31232  ac_ext=cpp
31233ac_cpp='$CXXCPP $CPPFLAGS'
31234ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31235ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31236ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
31238$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
31239if test -z "$CXXCPP"; then
31240  if ${ac_cv_prog_CXXCPP+:} false; then :
31241  $as_echo_n "(cached) " >&6
31242else
31243      # Double quotes because CXXCPP needs to be expanded
31244    for CXXCPP in "$CXX -E" "/lib/cpp"
31245    do
31246      ac_preproc_ok=false
31247for ac_cxx_preproc_warn_flag in '' yes
31248do
31249  # Use a header file that comes with gcc, so configuring glibc
31250  # with a fresh cross-compiler works.
31251  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31252  # <limits.h> exists even on freestanding compilers.
31253  # On the NeXT, cc -E runs the code through the compiler's parser,
31254  # not just through cpp. "Syntax error" is here to catch this case.
31255  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31256/* end confdefs.h.  */
31257#ifdef __STDC__
31258# include <limits.h>
31259#else
31260# include <assert.h>
31261#endif
31262		     Syntax error
31263_ACEOF
31264if ac_fn_cxx_try_cpp "$LINENO"; then :
31265
31266else
31267  # Broken: fails on valid input.
31268continue
31269fi
31270rm -f conftest.err conftest.i conftest.$ac_ext
31271
31272  # OK, works on sane cases.  Now check whether nonexistent headers
31273  # can be detected and how.
31274  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31275/* end confdefs.h.  */
31276#include <ac_nonexistent.h>
31277_ACEOF
31278if ac_fn_cxx_try_cpp "$LINENO"; then :
31279  # Broken: success on invalid input.
31280continue
31281else
31282  # Passes both tests.
31283ac_preproc_ok=:
31284break
31285fi
31286rm -f conftest.err conftest.i conftest.$ac_ext
31287
31288done
31289# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31290rm -f conftest.i conftest.err conftest.$ac_ext
31291if $ac_preproc_ok; then :
31292  break
31293fi
31294
31295    done
31296    ac_cv_prog_CXXCPP=$CXXCPP
31297
31298fi
31299  CXXCPP=$ac_cv_prog_CXXCPP
31300else
31301  ac_cv_prog_CXXCPP=$CXXCPP
31302fi
31303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
31304$as_echo "$CXXCPP" >&6; }
31305ac_preproc_ok=false
31306for ac_cxx_preproc_warn_flag in '' yes
31307do
31308  # Use a header file that comes with gcc, so configuring glibc
31309  # with a fresh cross-compiler works.
31310  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31311  # <limits.h> exists even on freestanding compilers.
31312  # On the NeXT, cc -E runs the code through the compiler's parser,
31313  # not just through cpp. "Syntax error" is here to catch this case.
31314  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31315/* end confdefs.h.  */
31316#ifdef __STDC__
31317# include <limits.h>
31318#else
31319# include <assert.h>
31320#endif
31321		     Syntax error
31322_ACEOF
31323if ac_fn_cxx_try_cpp "$LINENO"; then :
31324
31325else
31326  # Broken: fails on valid input.
31327continue
31328fi
31329rm -f conftest.err conftest.i conftest.$ac_ext
31330
31331  # OK, works on sane cases.  Now check whether nonexistent headers
31332  # can be detected and how.
31333  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31334/* end confdefs.h.  */
31335#include <ac_nonexistent.h>
31336_ACEOF
31337if ac_fn_cxx_try_cpp "$LINENO"; then :
31338  # Broken: success on invalid input.
31339continue
31340else
31341  # Passes both tests.
31342ac_preproc_ok=:
31343break
31344fi
31345rm -f conftest.err conftest.i conftest.$ac_ext
31346
31347done
31348# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31349rm -f conftest.i conftest.err conftest.$ac_ext
31350if $ac_preproc_ok; then :
31351
31352else
31353  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31354$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31355as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
31356See \`config.log' for more details" "$LINENO" 5; }
31357fi
31358
31359ac_ext=cpp
31360ac_cpp='$CXXCPP $CPPFLAGS'
31361ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31362ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31363ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31364
31365
31366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31367
31368  # First separate the path from the arguments. This will split at the first
31369  # space.
31370  complete="$CXXCPP"
31371  path="${complete%% *}"
31372  tmp="$complete EOL"
31373  arguments="${tmp#* }"
31374
31375  # Input might be given as Windows format, start by converting to
31376  # unix format.
31377  new_path=`$CYGPATH -u "$path"`
31378
31379  # Now try to locate executable using which
31380  new_path=`$WHICH "$new_path" 2> /dev/null`
31381  # bat and cmd files are not always considered executable in cygwin causing which
31382  # to not find them
31383  if test "x$new_path" = x \
31384      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31385      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31386    new_path=`$CYGPATH -u "$path"`
31387  fi
31388  if test "x$new_path" = x; then
31389    # Oops. Which didn't find the executable.
31390    # The splitting of arguments from the executable at a space might have been incorrect,
31391    # since paths with space are more likely in Windows. Give it another try with the whole
31392    # argument.
31393    path="$complete"
31394    arguments="EOL"
31395    new_path=`$CYGPATH -u "$path"`
31396    new_path=`$WHICH "$new_path" 2> /dev/null`
31397    # bat and cmd files are not always considered executable in cygwin causing which
31398    # to not find them
31399    if test "x$new_path" = x \
31400        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31401        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31402      new_path=`$CYGPATH -u "$path"`
31403    fi
31404    if test "x$new_path" = x; then
31405      # It's still not found. Now this is an unrecoverable error.
31406      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31407$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31408      has_space=`$ECHO "$complete" | $GREP " "`
31409      if test "x$has_space" != x; then
31410        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31411$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31412      fi
31413      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31414    fi
31415  fi
31416
31417  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31418  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31419  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31420  # "foo.exe" is OK but "foo" is an error.
31421  #
31422  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31423  # It is also a way to make sure we got the proper file name for the real test later on.
31424  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31425  if test "x$test_shortpath" = x; then
31426    # Short path failed, file does not exist as specified.
31427    # Try adding .exe or .cmd
31428    if test -f "${new_path}.exe"; then
31429      input_to_shortpath="${new_path}.exe"
31430    elif test -f "${new_path}.cmd"; then
31431      input_to_shortpath="${new_path}.cmd"
31432    else
31433      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
31434$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
31435      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31436$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31437      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31438    fi
31439  else
31440    input_to_shortpath="$new_path"
31441  fi
31442
31443  # Call helper function which possibly converts this using DOS-style short mode.
31444  # If so, the updated path is stored in $new_path.
31445  new_path="$input_to_shortpath"
31446
31447  input_path="$input_to_shortpath"
31448  # Check if we need to convert this using DOS-style short mode. If the path
31449  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31450  # take no chances and rewrite it.
31451  # Note: m4 eats our [], so we need to use [ and ] instead.
31452  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31453  if test "x$has_forbidden_chars" != x; then
31454    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31455    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31456    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31457    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31458      # Going to short mode and back again did indeed matter. Since short mode is
31459      # case insensitive, let's make it lowercase to improve readability.
31460      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31461      # Now convert it back to Unix-stile (cygpath)
31462      input_path=`$CYGPATH -u "$shortmode_path"`
31463      new_path="$input_path"
31464    fi
31465  fi
31466
31467  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31468  if test "x$test_cygdrive_prefix" = x; then
31469    # As a simple fix, exclude /usr/bin since it's not a real path.
31470    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31471      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31472      # a path prefixed by /cygdrive for fixpath to work.
31473      new_path="$CYGWIN_ROOT_PATH$input_path"
31474    fi
31475  fi
31476
31477  # remove trailing .exe if any
31478  new_path="${new_path/%.exe/}"
31479
31480  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31481
31482  # First separate the path from the arguments. This will split at the first
31483  # space.
31484  complete="$CXXCPP"
31485  path="${complete%% *}"
31486  tmp="$complete EOL"
31487  arguments="${tmp#* }"
31488
31489  # Input might be given as Windows format, start by converting to
31490  # unix format.
31491  new_path="$path"
31492
31493  windows_path="$new_path"
31494  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31495    unix_path=`$CYGPATH -u "$windows_path"`
31496    new_path="$unix_path"
31497  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31498    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31499    new_path="$unix_path"
31500  fi
31501
31502
31503  # Now try to locate executable using which
31504  new_path=`$WHICH "$new_path" 2> /dev/null`
31505
31506  if test "x$new_path" = x; then
31507    # Oops. Which didn't find the executable.
31508    # The splitting of arguments from the executable at a space might have been incorrect,
31509    # since paths with space are more likely in Windows. Give it another try with the whole
31510    # argument.
31511    path="$complete"
31512    arguments="EOL"
31513    new_path="$path"
31514
31515  windows_path="$new_path"
31516  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31517    unix_path=`$CYGPATH -u "$windows_path"`
31518    new_path="$unix_path"
31519  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31520    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31521    new_path="$unix_path"
31522  fi
31523
31524
31525    new_path=`$WHICH "$new_path" 2> /dev/null`
31526    # bat and cmd files are not always considered executable in MSYS causing which
31527    # to not find them
31528    if test "x$new_path" = x \
31529        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31530        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31531      new_path="$path"
31532
31533  windows_path="$new_path"
31534  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31535    unix_path=`$CYGPATH -u "$windows_path"`
31536    new_path="$unix_path"
31537  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31538    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31539    new_path="$unix_path"
31540  fi
31541
31542    fi
31543
31544    if test "x$new_path" = x; then
31545      # It's still not found. Now this is an unrecoverable error.
31546      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31547$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31548      has_space=`$ECHO "$complete" | $GREP " "`
31549      if test "x$has_space" != x; then
31550        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31551$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31552      fi
31553      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31554    fi
31555  fi
31556
31557  # Now new_path has a complete unix path to the binary
31558  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31559    # Keep paths in /bin as-is, but remove trailing .exe if any
31560    new_path="${new_path/%.exe/}"
31561    # Do not save /bin paths to all_fixpath_prefixes!
31562  else
31563    # Not in mixed or Windows style, start by that.
31564    new_path=`cmd //c echo $new_path`
31565
31566  input_path="$new_path"
31567  # Check if we need to convert this using DOS-style short mode. If the path
31568  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31569  # take no chances and rewrite it.
31570  # Note: m4 eats our [], so we need to use [ and ] instead.
31571  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31572  if test "x$has_forbidden_chars" != x; then
31573    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31574    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31575  fi
31576
31577    # Output is in $new_path
31578
31579  windows_path="$new_path"
31580  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31581    unix_path=`$CYGPATH -u "$windows_path"`
31582    new_path="$unix_path"
31583  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31584    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31585    new_path="$unix_path"
31586  fi
31587
31588    # remove trailing .exe if any
31589    new_path="${new_path/%.exe/}"
31590
31591    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31592    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31593  fi
31594
31595  else
31596    # We're on a posix platform. Hooray! :)
31597    # First separate the path from the arguments. This will split at the first
31598    # space.
31599    complete="$CXXCPP"
31600    path="${complete%% *}"
31601    tmp="$complete EOL"
31602    arguments="${tmp#* }"
31603
31604    # Cannot rely on the command "which" here since it doesn't always work.
31605    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31606    if test -z "$is_absolute_path"; then
31607      # Path to executable is not absolute. Find it.
31608      IFS_save="$IFS"
31609      IFS=:
31610      for p in $PATH; do
31611        if test -f "$p/$path" && test -x "$p/$path"; then
31612          new_path="$p/$path"
31613          break
31614        fi
31615      done
31616      IFS="$IFS_save"
31617    else
31618      # This is an absolute path, we can use it without further modifications.
31619      new_path="$path"
31620    fi
31621
31622    if test "x$new_path" = x; then
31623      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31624$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31625      has_space=`$ECHO "$complete" | $GREP " "`
31626      if test "x$has_space" != x; then
31627        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31628$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31629      fi
31630      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31631    fi
31632  fi
31633
31634  # Now join together the path and the arguments once again
31635  if test "x$arguments" != xEOL; then
31636    new_complete="$new_path ${arguments% *}"
31637  else
31638    new_complete="$new_path"
31639  fi
31640
31641  if test "x$complete" != "x$new_complete"; then
31642    CXXCPP="$new_complete"
31643    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
31644$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
31645  fi
31646
31647
31648  #
31649  # Setup the linker (LD)
31650  #
31651  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31652    # In the Microsoft toolchain we have a separate LD command "link".
31653    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
31654    # a cygwin program for something completely different.
31655    # Extract the first word of "link", so it can be a program name with args.
31656set dummy link; ac_word=$2
31657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31658$as_echo_n "checking for $ac_word... " >&6; }
31659if ${ac_cv_prog_LD+:} false; then :
31660  $as_echo_n "(cached) " >&6
31661else
31662  if test -n "$LD"; then
31663  ac_cv_prog_LD="$LD" # Let the user override the test.
31664else
31665  ac_prog_rejected=no
31666as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31667for as_dir in $PATH
31668do
31669  IFS=$as_save_IFS
31670  test -z "$as_dir" && as_dir=.
31671    for ac_exec_ext in '' $ac_executable_extensions; do
31672  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31673    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
31674       ac_prog_rejected=yes
31675       continue
31676     fi
31677    ac_cv_prog_LD="link"
31678    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31679    break 2
31680  fi
31681done
31682  done
31683IFS=$as_save_IFS
31684
31685if test $ac_prog_rejected = yes; then
31686  # We found a bogon in the path, so make sure we never use it.
31687  set dummy $ac_cv_prog_LD
31688  shift
31689  if test $# != 0; then
31690    # We chose a different compiler from the bogus one.
31691    # However, it has the same basename, so the bogon will be chosen
31692    # first if we set LD to just the basename; use the full file name.
31693    shift
31694    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
31695  fi
31696fi
31697fi
31698fi
31699LD=$ac_cv_prog_LD
31700if test -n "$LD"; then
31701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
31702$as_echo "$LD" >&6; }
31703else
31704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31705$as_echo "no" >&6; }
31706fi
31707
31708
31709
31710  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31711
31712  # First separate the path from the arguments. This will split at the first
31713  # space.
31714  complete="$LD"
31715  path="${complete%% *}"
31716  tmp="$complete EOL"
31717  arguments="${tmp#* }"
31718
31719  # Input might be given as Windows format, start by converting to
31720  # unix format.
31721  new_path=`$CYGPATH -u "$path"`
31722
31723  # Now try to locate executable using which
31724  new_path=`$WHICH "$new_path" 2> /dev/null`
31725  # bat and cmd files are not always considered executable in cygwin causing which
31726  # to not find them
31727  if test "x$new_path" = x \
31728      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31729      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31730    new_path=`$CYGPATH -u "$path"`
31731  fi
31732  if test "x$new_path" = x; then
31733    # Oops. Which didn't find the executable.
31734    # The splitting of arguments from the executable at a space might have been incorrect,
31735    # since paths with space are more likely in Windows. Give it another try with the whole
31736    # argument.
31737    path="$complete"
31738    arguments="EOL"
31739    new_path=`$CYGPATH -u "$path"`
31740    new_path=`$WHICH "$new_path" 2> /dev/null`
31741    # bat and cmd files are not always considered executable in cygwin causing which
31742    # to not find them
31743    if test "x$new_path" = x \
31744        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31745        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31746      new_path=`$CYGPATH -u "$path"`
31747    fi
31748    if test "x$new_path" = x; then
31749      # It's still not found. Now this is an unrecoverable error.
31750      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31751$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31752      has_space=`$ECHO "$complete" | $GREP " "`
31753      if test "x$has_space" != x; then
31754        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31755$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31756      fi
31757      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31758    fi
31759  fi
31760
31761  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31762  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31763  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31764  # "foo.exe" is OK but "foo" is an error.
31765  #
31766  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31767  # It is also a way to make sure we got the proper file name for the real test later on.
31768  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31769  if test "x$test_shortpath" = x; then
31770    # Short path failed, file does not exist as specified.
31771    # Try adding .exe or .cmd
31772    if test -f "${new_path}.exe"; then
31773      input_to_shortpath="${new_path}.exe"
31774    elif test -f "${new_path}.cmd"; then
31775      input_to_shortpath="${new_path}.cmd"
31776    else
31777      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
31778$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
31779      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31780$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31781      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31782    fi
31783  else
31784    input_to_shortpath="$new_path"
31785  fi
31786
31787  # Call helper function which possibly converts this using DOS-style short mode.
31788  # If so, the updated path is stored in $new_path.
31789  new_path="$input_to_shortpath"
31790
31791  input_path="$input_to_shortpath"
31792  # Check if we need to convert this using DOS-style short mode. If the path
31793  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31794  # take no chances and rewrite it.
31795  # Note: m4 eats our [], so we need to use [ and ] instead.
31796  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31797  if test "x$has_forbidden_chars" != x; then
31798    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31799    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31800    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31801    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31802      # Going to short mode and back again did indeed matter. Since short mode is
31803      # case insensitive, let's make it lowercase to improve readability.
31804      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31805      # Now convert it back to Unix-stile (cygpath)
31806      input_path=`$CYGPATH -u "$shortmode_path"`
31807      new_path="$input_path"
31808    fi
31809  fi
31810
31811  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31812  if test "x$test_cygdrive_prefix" = x; then
31813    # As a simple fix, exclude /usr/bin since it's not a real path.
31814    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31815      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31816      # a path prefixed by /cygdrive for fixpath to work.
31817      new_path="$CYGWIN_ROOT_PATH$input_path"
31818    fi
31819  fi
31820
31821  # remove trailing .exe if any
31822  new_path="${new_path/%.exe/}"
31823
31824  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31825
31826  # First separate the path from the arguments. This will split at the first
31827  # space.
31828  complete="$LD"
31829  path="${complete%% *}"
31830  tmp="$complete EOL"
31831  arguments="${tmp#* }"
31832
31833  # Input might be given as Windows format, start by converting to
31834  # unix format.
31835  new_path="$path"
31836
31837  windows_path="$new_path"
31838  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31839    unix_path=`$CYGPATH -u "$windows_path"`
31840    new_path="$unix_path"
31841  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31842    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31843    new_path="$unix_path"
31844  fi
31845
31846
31847  # Now try to locate executable using which
31848  new_path=`$WHICH "$new_path" 2> /dev/null`
31849
31850  if test "x$new_path" = x; then
31851    # Oops. Which didn't find the executable.
31852    # The splitting of arguments from the executable at a space might have been incorrect,
31853    # since paths with space are more likely in Windows. Give it another try with the whole
31854    # argument.
31855    path="$complete"
31856    arguments="EOL"
31857    new_path="$path"
31858
31859  windows_path="$new_path"
31860  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31861    unix_path=`$CYGPATH -u "$windows_path"`
31862    new_path="$unix_path"
31863  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31864    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31865    new_path="$unix_path"
31866  fi
31867
31868
31869    new_path=`$WHICH "$new_path" 2> /dev/null`
31870    # bat and cmd files are not always considered executable in MSYS causing which
31871    # to not find them
31872    if test "x$new_path" = x \
31873        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31874        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31875      new_path="$path"
31876
31877  windows_path="$new_path"
31878  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31879    unix_path=`$CYGPATH -u "$windows_path"`
31880    new_path="$unix_path"
31881  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31882    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31883    new_path="$unix_path"
31884  fi
31885
31886    fi
31887
31888    if test "x$new_path" = x; then
31889      # It's still not found. Now this is an unrecoverable error.
31890      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31891$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31892      has_space=`$ECHO "$complete" | $GREP " "`
31893      if test "x$has_space" != x; then
31894        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31895$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31896      fi
31897      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31898    fi
31899  fi
31900
31901  # Now new_path has a complete unix path to the binary
31902  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31903    # Keep paths in /bin as-is, but remove trailing .exe if any
31904    new_path="${new_path/%.exe/}"
31905    # Do not save /bin paths to all_fixpath_prefixes!
31906  else
31907    # Not in mixed or Windows style, start by that.
31908    new_path=`cmd //c echo $new_path`
31909
31910  input_path="$new_path"
31911  # Check if we need to convert this using DOS-style short mode. If the path
31912  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31913  # take no chances and rewrite it.
31914  # Note: m4 eats our [], so we need to use [ and ] instead.
31915  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31916  if test "x$has_forbidden_chars" != x; then
31917    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31918    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31919  fi
31920
31921    # Output is in $new_path
31922
31923  windows_path="$new_path"
31924  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31925    unix_path=`$CYGPATH -u "$windows_path"`
31926    new_path="$unix_path"
31927  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31928    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31929    new_path="$unix_path"
31930  fi
31931
31932    # remove trailing .exe if any
31933    new_path="${new_path/%.exe/}"
31934
31935    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31936    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31937  fi
31938
31939  else
31940    # We're on a posix platform. Hooray! :)
31941    # First separate the path from the arguments. This will split at the first
31942    # space.
31943    complete="$LD"
31944    path="${complete%% *}"
31945    tmp="$complete EOL"
31946    arguments="${tmp#* }"
31947
31948    # Cannot rely on the command "which" here since it doesn't always work.
31949    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31950    if test -z "$is_absolute_path"; then
31951      # Path to executable is not absolute. Find it.
31952      IFS_save="$IFS"
31953      IFS=:
31954      for p in $PATH; do
31955        if test -f "$p/$path" && test -x "$p/$path"; then
31956          new_path="$p/$path"
31957          break
31958        fi
31959      done
31960      IFS="$IFS_save"
31961    else
31962      # This is an absolute path, we can use it without further modifications.
31963      new_path="$path"
31964    fi
31965
31966    if test "x$new_path" = x; then
31967      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31968$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31969      has_space=`$ECHO "$complete" | $GREP " "`
31970      if test "x$has_space" != x; then
31971        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31972$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31973      fi
31974      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31975    fi
31976  fi
31977
31978  # Now join together the path and the arguments once again
31979  if test "x$arguments" != xEOL; then
31980    new_complete="$new_path ${arguments% *}"
31981  else
31982    new_complete="$new_path"
31983  fi
31984
31985  if test "x$complete" != "x$new_complete"; then
31986    LD="$new_complete"
31987    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
31988$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
31989  fi
31990
31991    # Verify that we indeed succeeded with this trick.
31992    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
31993$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
31994    "$LD" --version > /dev/null
31995    if test $? -eq 0 ; then
31996      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31997$as_echo "no" >&6; }
31998      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
31999    else
32000      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32001$as_echo "yes" >&6; }
32002    fi
32003    LDCXX="$LD"
32004  else
32005    # All other toolchains use the compiler to link.
32006    LD="$CC"
32007    LDCXX="$CXX"
32008  fi
32009
32010  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
32011
32012
32013  #
32014  # Setup the assembler (AS)
32015  #
32016  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
32017    # FIXME: should this really be solaris, or solstudio?
32018
32019
32020  # Publish this variable in the help.
32021
32022
32023  if test "x$AS" = x; then
32024    # The variable is not set by user, try to locate tool using the code snippet
32025    for ac_prog in as
32026do
32027  # Extract the first word of "$ac_prog", so it can be a program name with args.
32028set dummy $ac_prog; ac_word=$2
32029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32030$as_echo_n "checking for $ac_word... " >&6; }
32031if ${ac_cv_path_AS+:} false; then :
32032  $as_echo_n "(cached) " >&6
32033else
32034  case $AS in
32035  [\\/]* | ?:[\\/]*)
32036  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32037  ;;
32038  *)
32039  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32040for as_dir in $PATH
32041do
32042  IFS=$as_save_IFS
32043  test -z "$as_dir" && as_dir=.
32044    for ac_exec_ext in '' $ac_executable_extensions; do
32045  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32046    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32047    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32048    break 2
32049  fi
32050done
32051  done
32052IFS=$as_save_IFS
32053
32054  ;;
32055esac
32056fi
32057AS=$ac_cv_path_AS
32058if test -n "$AS"; then
32059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32060$as_echo "$AS" >&6; }
32061else
32062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32063$as_echo "no" >&6; }
32064fi
32065
32066
32067  test -n "$AS" && break
32068done
32069
32070  else
32071    # The variable is set, but is it from the command line or the environment?
32072
32073    # Try to remove the string !AS! from our list.
32074    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
32075    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32076      # If it failed, the variable was not from the command line. Ignore it,
32077      # but warn the user (except for BASH, which is always set by the calling BASH).
32078      if test "xAS" != xBASH; then
32079        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
32080$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
32081      fi
32082      # Try to locate tool using the code snippet
32083      for ac_prog in as
32084do
32085  # Extract the first word of "$ac_prog", so it can be a program name with args.
32086set dummy $ac_prog; ac_word=$2
32087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32088$as_echo_n "checking for $ac_word... " >&6; }
32089if ${ac_cv_path_AS+:} false; then :
32090  $as_echo_n "(cached) " >&6
32091else
32092  case $AS in
32093  [\\/]* | ?:[\\/]*)
32094  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32095  ;;
32096  *)
32097  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32098for as_dir in $PATH
32099do
32100  IFS=$as_save_IFS
32101  test -z "$as_dir" && as_dir=.
32102    for ac_exec_ext in '' $ac_executable_extensions; do
32103  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32104    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32105    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32106    break 2
32107  fi
32108done
32109  done
32110IFS=$as_save_IFS
32111
32112  ;;
32113esac
32114fi
32115AS=$ac_cv_path_AS
32116if test -n "$AS"; then
32117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32118$as_echo "$AS" >&6; }
32119else
32120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32121$as_echo "no" >&6; }
32122fi
32123
32124
32125  test -n "$AS" && break
32126done
32127
32128    else
32129      # If it succeeded, then it was overridden by the user. We will use it
32130      # for the tool.
32131
32132      # First remove it from the list of overridden variables, so we can test
32133      # for unknown variables in the end.
32134      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32135
32136      # Check if the provided tool contains a complete path.
32137      tool_specified="$AS"
32138      tool_basename="${tool_specified##*/}"
32139      if test "x$tool_basename" = "x$tool_specified"; then
32140        # A command without a complete path is provided, search $PATH.
32141        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
32142$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
32143        # Extract the first word of "$tool_basename", so it can be a program name with args.
32144set dummy $tool_basename; ac_word=$2
32145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32146$as_echo_n "checking for $ac_word... " >&6; }
32147if ${ac_cv_path_AS+:} false; then :
32148  $as_echo_n "(cached) " >&6
32149else
32150  case $AS in
32151  [\\/]* | ?:[\\/]*)
32152  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32153  ;;
32154  *)
32155  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32156for as_dir in $PATH
32157do
32158  IFS=$as_save_IFS
32159  test -z "$as_dir" && as_dir=.
32160    for ac_exec_ext in '' $ac_executable_extensions; do
32161  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32162    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32163    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32164    break 2
32165  fi
32166done
32167  done
32168IFS=$as_save_IFS
32169
32170  ;;
32171esac
32172fi
32173AS=$ac_cv_path_AS
32174if test -n "$AS"; then
32175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32176$as_echo "$AS" >&6; }
32177else
32178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32179$as_echo "no" >&6; }
32180fi
32181
32182
32183        if test "x$AS" = x; then
32184          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32185        fi
32186      else
32187        # Otherwise we believe it is a complete path. Use it as it is.
32188        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
32189$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
32190        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
32191$as_echo_n "checking for AS... " >&6; }
32192        if test ! -x "$tool_specified"; then
32193          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32194$as_echo "not found" >&6; }
32195          as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
32196        fi
32197        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32198$as_echo "$tool_specified" >&6; }
32199      fi
32200    fi
32201  fi
32202
32203
32204
32205  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32206
32207  # First separate the path from the arguments. This will split at the first
32208  # space.
32209  complete="$AS"
32210  path="${complete%% *}"
32211  tmp="$complete EOL"
32212  arguments="${tmp#* }"
32213
32214  # Input might be given as Windows format, start by converting to
32215  # unix format.
32216  new_path=`$CYGPATH -u "$path"`
32217
32218  # Now try to locate executable using which
32219  new_path=`$WHICH "$new_path" 2> /dev/null`
32220  # bat and cmd files are not always considered executable in cygwin causing which
32221  # to not find them
32222  if test "x$new_path" = x \
32223      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32224      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32225    new_path=`$CYGPATH -u "$path"`
32226  fi
32227  if test "x$new_path" = x; then
32228    # Oops. Which didn't find the executable.
32229    # The splitting of arguments from the executable at a space might have been incorrect,
32230    # since paths with space are more likely in Windows. Give it another try with the whole
32231    # argument.
32232    path="$complete"
32233    arguments="EOL"
32234    new_path=`$CYGPATH -u "$path"`
32235    new_path=`$WHICH "$new_path" 2> /dev/null`
32236    # bat and cmd files are not always considered executable in cygwin causing which
32237    # to not find them
32238    if test "x$new_path" = x \
32239        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32240        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32241      new_path=`$CYGPATH -u "$path"`
32242    fi
32243    if test "x$new_path" = x; then
32244      # It's still not found. Now this is an unrecoverable error.
32245      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32246$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32247      has_space=`$ECHO "$complete" | $GREP " "`
32248      if test "x$has_space" != x; then
32249        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32250$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32251      fi
32252      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32253    fi
32254  fi
32255
32256  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32257  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32258  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32259  # "foo.exe" is OK but "foo" is an error.
32260  #
32261  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32262  # It is also a way to make sure we got the proper file name for the real test later on.
32263  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32264  if test "x$test_shortpath" = x; then
32265    # Short path failed, file does not exist as specified.
32266    # Try adding .exe or .cmd
32267    if test -f "${new_path}.exe"; then
32268      input_to_shortpath="${new_path}.exe"
32269    elif test -f "${new_path}.cmd"; then
32270      input_to_shortpath="${new_path}.cmd"
32271    else
32272      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
32273$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
32274      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32275$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32276      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32277    fi
32278  else
32279    input_to_shortpath="$new_path"
32280  fi
32281
32282  # Call helper function which possibly converts this using DOS-style short mode.
32283  # If so, the updated path is stored in $new_path.
32284  new_path="$input_to_shortpath"
32285
32286  input_path="$input_to_shortpath"
32287  # Check if we need to convert this using DOS-style short mode. If the path
32288  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32289  # take no chances and rewrite it.
32290  # Note: m4 eats our [], so we need to use [ and ] instead.
32291  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32292  if test "x$has_forbidden_chars" != x; then
32293    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32294    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32295    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32296    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32297      # Going to short mode and back again did indeed matter. Since short mode is
32298      # case insensitive, let's make it lowercase to improve readability.
32299      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32300      # Now convert it back to Unix-stile (cygpath)
32301      input_path=`$CYGPATH -u "$shortmode_path"`
32302      new_path="$input_path"
32303    fi
32304  fi
32305
32306  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32307  if test "x$test_cygdrive_prefix" = x; then
32308    # As a simple fix, exclude /usr/bin since it's not a real path.
32309    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32310      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32311      # a path prefixed by /cygdrive for fixpath to work.
32312      new_path="$CYGWIN_ROOT_PATH$input_path"
32313    fi
32314  fi
32315
32316  # remove trailing .exe if any
32317  new_path="${new_path/%.exe/}"
32318
32319  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32320
32321  # First separate the path from the arguments. This will split at the first
32322  # space.
32323  complete="$AS"
32324  path="${complete%% *}"
32325  tmp="$complete EOL"
32326  arguments="${tmp#* }"
32327
32328  # Input might be given as Windows format, start by converting to
32329  # unix format.
32330  new_path="$path"
32331
32332  windows_path="$new_path"
32333  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32334    unix_path=`$CYGPATH -u "$windows_path"`
32335    new_path="$unix_path"
32336  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32337    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32338    new_path="$unix_path"
32339  fi
32340
32341
32342  # Now try to locate executable using which
32343  new_path=`$WHICH "$new_path" 2> /dev/null`
32344
32345  if test "x$new_path" = x; then
32346    # Oops. Which didn't find the executable.
32347    # The splitting of arguments from the executable at a space might have been incorrect,
32348    # since paths with space are more likely in Windows. Give it another try with the whole
32349    # argument.
32350    path="$complete"
32351    arguments="EOL"
32352    new_path="$path"
32353
32354  windows_path="$new_path"
32355  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32356    unix_path=`$CYGPATH -u "$windows_path"`
32357    new_path="$unix_path"
32358  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32359    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32360    new_path="$unix_path"
32361  fi
32362
32363
32364    new_path=`$WHICH "$new_path" 2> /dev/null`
32365    # bat and cmd files are not always considered executable in MSYS causing which
32366    # to not find them
32367    if test "x$new_path" = x \
32368        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32369        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32370      new_path="$path"
32371
32372  windows_path="$new_path"
32373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32374    unix_path=`$CYGPATH -u "$windows_path"`
32375    new_path="$unix_path"
32376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32377    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32378    new_path="$unix_path"
32379  fi
32380
32381    fi
32382
32383    if test "x$new_path" = x; then
32384      # It's still not found. Now this is an unrecoverable error.
32385      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32386$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32387      has_space=`$ECHO "$complete" | $GREP " "`
32388      if test "x$has_space" != x; then
32389        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32390$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32391      fi
32392      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32393    fi
32394  fi
32395
32396  # Now new_path has a complete unix path to the binary
32397  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32398    # Keep paths in /bin as-is, but remove trailing .exe if any
32399    new_path="${new_path/%.exe/}"
32400    # Do not save /bin paths to all_fixpath_prefixes!
32401  else
32402    # Not in mixed or Windows style, start by that.
32403    new_path=`cmd //c echo $new_path`
32404
32405  input_path="$new_path"
32406  # Check if we need to convert this using DOS-style short mode. If the path
32407  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32408  # take no chances and rewrite it.
32409  # Note: m4 eats our [], so we need to use [ and ] instead.
32410  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32411  if test "x$has_forbidden_chars" != x; then
32412    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32413    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32414  fi
32415
32416    # Output is in $new_path
32417
32418  windows_path="$new_path"
32419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32420    unix_path=`$CYGPATH -u "$windows_path"`
32421    new_path="$unix_path"
32422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32423    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32424    new_path="$unix_path"
32425  fi
32426
32427    # remove trailing .exe if any
32428    new_path="${new_path/%.exe/}"
32429
32430    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32431    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32432  fi
32433
32434  else
32435    # We're on a posix platform. Hooray! :)
32436    # First separate the path from the arguments. This will split at the first
32437    # space.
32438    complete="$AS"
32439    path="${complete%% *}"
32440    tmp="$complete EOL"
32441    arguments="${tmp#* }"
32442
32443    # Cannot rely on the command "which" here since it doesn't always work.
32444    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32445    if test -z "$is_absolute_path"; then
32446      # Path to executable is not absolute. Find it.
32447      IFS_save="$IFS"
32448      IFS=:
32449      for p in $PATH; do
32450        if test -f "$p/$path" && test -x "$p/$path"; then
32451          new_path="$p/$path"
32452          break
32453        fi
32454      done
32455      IFS="$IFS_save"
32456    else
32457      # This is an absolute path, we can use it without further modifications.
32458      new_path="$path"
32459    fi
32460
32461    if test "x$new_path" = x; then
32462      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32463$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32464      has_space=`$ECHO "$complete" | $GREP " "`
32465      if test "x$has_space" != x; then
32466        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32467$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32468      fi
32469      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32470    fi
32471  fi
32472
32473  # Now join together the path and the arguments once again
32474  if test "x$arguments" != xEOL; then
32475    new_complete="$new_path ${arguments% *}"
32476  else
32477    new_complete="$new_path"
32478  fi
32479
32480  if test "x$complete" != "x$new_complete"; then
32481    AS="$new_complete"
32482    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
32483$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
32484  fi
32485
32486  else
32487    # FIXME: is this correct for microsoft?
32488    AS="$CC -c"
32489  fi
32490
32491
32492  #
32493  # Setup the archiver (AR)
32494  #
32495  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32496    # The corresponding ar tool is lib.exe (used to create static libraries)
32497    # Extract the first word of "lib", so it can be a program name with args.
32498set dummy lib; ac_word=$2
32499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32500$as_echo_n "checking for $ac_word... " >&6; }
32501if ${ac_cv_prog_AR+:} false; then :
32502  $as_echo_n "(cached) " >&6
32503else
32504  if test -n "$AR"; then
32505  ac_cv_prog_AR="$AR" # Let the user override the test.
32506else
32507as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32508for as_dir in $PATH
32509do
32510  IFS=$as_save_IFS
32511  test -z "$as_dir" && as_dir=.
32512    for ac_exec_ext in '' $ac_executable_extensions; do
32513  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32514    ac_cv_prog_AR="lib"
32515    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32516    break 2
32517  fi
32518done
32519  done
32520IFS=$as_save_IFS
32521
32522fi
32523fi
32524AR=$ac_cv_prog_AR
32525if test -n "$AR"; then
32526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32527$as_echo "$AR" >&6; }
32528else
32529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32530$as_echo "no" >&6; }
32531fi
32532
32533
32534  else
32535
32536
32537  # Publish this variable in the help.
32538
32539
32540  if test "x$AR" = x; then
32541    # The variable is not set by user, try to locate tool using the code snippet
32542    if test -n "$ac_tool_prefix"; then
32543  for ac_prog in ar
32544  do
32545    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32546set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32548$as_echo_n "checking for $ac_word... " >&6; }
32549if ${ac_cv_prog_AR+:} false; then :
32550  $as_echo_n "(cached) " >&6
32551else
32552  if test -n "$AR"; then
32553  ac_cv_prog_AR="$AR" # Let the user override the test.
32554else
32555as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32556for as_dir in $PATH
32557do
32558  IFS=$as_save_IFS
32559  test -z "$as_dir" && as_dir=.
32560    for ac_exec_ext in '' $ac_executable_extensions; do
32561  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32562    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32563    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32564    break 2
32565  fi
32566done
32567  done
32568IFS=$as_save_IFS
32569
32570fi
32571fi
32572AR=$ac_cv_prog_AR
32573if test -n "$AR"; then
32574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32575$as_echo "$AR" >&6; }
32576else
32577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32578$as_echo "no" >&6; }
32579fi
32580
32581
32582    test -n "$AR" && break
32583  done
32584fi
32585if test -z "$AR"; then
32586  ac_ct_AR=$AR
32587  for ac_prog in ar
32588do
32589  # Extract the first word of "$ac_prog", so it can be a program name with args.
32590set dummy $ac_prog; ac_word=$2
32591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32592$as_echo_n "checking for $ac_word... " >&6; }
32593if ${ac_cv_prog_ac_ct_AR+:} false; then :
32594  $as_echo_n "(cached) " >&6
32595else
32596  if test -n "$ac_ct_AR"; then
32597  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32598else
32599as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32600for as_dir in $PATH
32601do
32602  IFS=$as_save_IFS
32603  test -z "$as_dir" && as_dir=.
32604    for ac_exec_ext in '' $ac_executable_extensions; do
32605  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32606    ac_cv_prog_ac_ct_AR="$ac_prog"
32607    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32608    break 2
32609  fi
32610done
32611  done
32612IFS=$as_save_IFS
32613
32614fi
32615fi
32616ac_ct_AR=$ac_cv_prog_ac_ct_AR
32617if test -n "$ac_ct_AR"; then
32618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32619$as_echo "$ac_ct_AR" >&6; }
32620else
32621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32622$as_echo "no" >&6; }
32623fi
32624
32625
32626  test -n "$ac_ct_AR" && break
32627done
32628
32629  if test "x$ac_ct_AR" = x; then
32630    AR=""
32631  else
32632    case $cross_compiling:$ac_tool_warned in
32633yes:)
32634{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32635$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32636ac_tool_warned=yes ;;
32637esac
32638    AR=$ac_ct_AR
32639  fi
32640fi
32641
32642  else
32643    # The variable is set, but is it from the command line or the environment?
32644
32645    # Try to remove the string !AR! from our list.
32646    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
32647    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32648      # If it failed, the variable was not from the command line. Ignore it,
32649      # but warn the user (except for BASH, which is always set by the calling BASH).
32650      if test "xAR" != xBASH; then
32651        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
32652$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
32653      fi
32654      # Try to locate tool using the code snippet
32655      if test -n "$ac_tool_prefix"; then
32656  for ac_prog in ar
32657  do
32658    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32659set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32661$as_echo_n "checking for $ac_word... " >&6; }
32662if ${ac_cv_prog_AR+:} false; then :
32663  $as_echo_n "(cached) " >&6
32664else
32665  if test -n "$AR"; then
32666  ac_cv_prog_AR="$AR" # Let the user override the test.
32667else
32668as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32669for as_dir in $PATH
32670do
32671  IFS=$as_save_IFS
32672  test -z "$as_dir" && as_dir=.
32673    for ac_exec_ext in '' $ac_executable_extensions; do
32674  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32675    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32676    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32677    break 2
32678  fi
32679done
32680  done
32681IFS=$as_save_IFS
32682
32683fi
32684fi
32685AR=$ac_cv_prog_AR
32686if test -n "$AR"; then
32687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32688$as_echo "$AR" >&6; }
32689else
32690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32691$as_echo "no" >&6; }
32692fi
32693
32694
32695    test -n "$AR" && break
32696  done
32697fi
32698if test -z "$AR"; then
32699  ac_ct_AR=$AR
32700  for ac_prog in ar
32701do
32702  # Extract the first word of "$ac_prog", so it can be a program name with args.
32703set dummy $ac_prog; ac_word=$2
32704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32705$as_echo_n "checking for $ac_word... " >&6; }
32706if ${ac_cv_prog_ac_ct_AR+:} false; then :
32707  $as_echo_n "(cached) " >&6
32708else
32709  if test -n "$ac_ct_AR"; then
32710  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32711else
32712as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32713for as_dir in $PATH
32714do
32715  IFS=$as_save_IFS
32716  test -z "$as_dir" && as_dir=.
32717    for ac_exec_ext in '' $ac_executable_extensions; do
32718  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32719    ac_cv_prog_ac_ct_AR="$ac_prog"
32720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32721    break 2
32722  fi
32723done
32724  done
32725IFS=$as_save_IFS
32726
32727fi
32728fi
32729ac_ct_AR=$ac_cv_prog_ac_ct_AR
32730if test -n "$ac_ct_AR"; then
32731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32732$as_echo "$ac_ct_AR" >&6; }
32733else
32734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32735$as_echo "no" >&6; }
32736fi
32737
32738
32739  test -n "$ac_ct_AR" && break
32740done
32741
32742  if test "x$ac_ct_AR" = x; then
32743    AR=""
32744  else
32745    case $cross_compiling:$ac_tool_warned in
32746yes:)
32747{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32748$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32749ac_tool_warned=yes ;;
32750esac
32751    AR=$ac_ct_AR
32752  fi
32753fi
32754
32755    else
32756      # If it succeeded, then it was overridden by the user. We will use it
32757      # for the tool.
32758
32759      # First remove it from the list of overridden variables, so we can test
32760      # for unknown variables in the end.
32761      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32762
32763      # Check if the provided tool contains a complete path.
32764      tool_specified="$AR"
32765      tool_basename="${tool_specified##*/}"
32766      if test "x$tool_basename" = "x$tool_specified"; then
32767        # A command without a complete path is provided, search $PATH.
32768        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
32769$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
32770        # Extract the first word of "$tool_basename", so it can be a program name with args.
32771set dummy $tool_basename; ac_word=$2
32772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32773$as_echo_n "checking for $ac_word... " >&6; }
32774if ${ac_cv_path_AR+:} false; then :
32775  $as_echo_n "(cached) " >&6
32776else
32777  case $AR in
32778  [\\/]* | ?:[\\/]*)
32779  ac_cv_path_AR="$AR" # Let the user override the test with a path.
32780  ;;
32781  *)
32782  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32783for as_dir in $PATH
32784do
32785  IFS=$as_save_IFS
32786  test -z "$as_dir" && as_dir=.
32787    for ac_exec_ext in '' $ac_executable_extensions; do
32788  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32789    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
32790    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32791    break 2
32792  fi
32793done
32794  done
32795IFS=$as_save_IFS
32796
32797  ;;
32798esac
32799fi
32800AR=$ac_cv_path_AR
32801if test -n "$AR"; then
32802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32803$as_echo "$AR" >&6; }
32804else
32805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32806$as_echo "no" >&6; }
32807fi
32808
32809
32810        if test "x$AR" = x; then
32811          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32812        fi
32813      else
32814        # Otherwise we believe it is a complete path. Use it as it is.
32815        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
32816$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
32817        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
32818$as_echo_n "checking for AR... " >&6; }
32819        if test ! -x "$tool_specified"; then
32820          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32821$as_echo "not found" >&6; }
32822          as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
32823        fi
32824        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32825$as_echo "$tool_specified" >&6; }
32826      fi
32827    fi
32828  fi
32829
32830
32831  fi
32832
32833  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32834
32835  # First separate the path from the arguments. This will split at the first
32836  # space.
32837  complete="$AR"
32838  path="${complete%% *}"
32839  tmp="$complete EOL"
32840  arguments="${tmp#* }"
32841
32842  # Input might be given as Windows format, start by converting to
32843  # unix format.
32844  new_path=`$CYGPATH -u "$path"`
32845
32846  # Now try to locate executable using which
32847  new_path=`$WHICH "$new_path" 2> /dev/null`
32848  # bat and cmd files are not always considered executable in cygwin causing which
32849  # to not find them
32850  if test "x$new_path" = x \
32851      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32852      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32853    new_path=`$CYGPATH -u "$path"`
32854  fi
32855  if test "x$new_path" = x; then
32856    # Oops. Which didn't find the executable.
32857    # The splitting of arguments from the executable at a space might have been incorrect,
32858    # since paths with space are more likely in Windows. Give it another try with the whole
32859    # argument.
32860    path="$complete"
32861    arguments="EOL"
32862    new_path=`$CYGPATH -u "$path"`
32863    new_path=`$WHICH "$new_path" 2> /dev/null`
32864    # bat and cmd files are not always considered executable in cygwin causing which
32865    # to not find them
32866    if test "x$new_path" = x \
32867        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32868        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32869      new_path=`$CYGPATH -u "$path"`
32870    fi
32871    if test "x$new_path" = x; then
32872      # It's still not found. Now this is an unrecoverable error.
32873      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32874$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32875      has_space=`$ECHO "$complete" | $GREP " "`
32876      if test "x$has_space" != x; then
32877        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32878$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32879      fi
32880      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32881    fi
32882  fi
32883
32884  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32885  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32886  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32887  # "foo.exe" is OK but "foo" is an error.
32888  #
32889  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32890  # It is also a way to make sure we got the proper file name for the real test later on.
32891  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32892  if test "x$test_shortpath" = x; then
32893    # Short path failed, file does not exist as specified.
32894    # Try adding .exe or .cmd
32895    if test -f "${new_path}.exe"; then
32896      input_to_shortpath="${new_path}.exe"
32897    elif test -f "${new_path}.cmd"; then
32898      input_to_shortpath="${new_path}.cmd"
32899    else
32900      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
32901$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
32902      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32903$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32904      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32905    fi
32906  else
32907    input_to_shortpath="$new_path"
32908  fi
32909
32910  # Call helper function which possibly converts this using DOS-style short mode.
32911  # If so, the updated path is stored in $new_path.
32912  new_path="$input_to_shortpath"
32913
32914  input_path="$input_to_shortpath"
32915  # Check if we need to convert this using DOS-style short mode. If the path
32916  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32917  # take no chances and rewrite it.
32918  # Note: m4 eats our [], so we need to use [ and ] instead.
32919  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32920  if test "x$has_forbidden_chars" != x; then
32921    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32922    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32923    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32924    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32925      # Going to short mode and back again did indeed matter. Since short mode is
32926      # case insensitive, let's make it lowercase to improve readability.
32927      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32928      # Now convert it back to Unix-stile (cygpath)
32929      input_path=`$CYGPATH -u "$shortmode_path"`
32930      new_path="$input_path"
32931    fi
32932  fi
32933
32934  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32935  if test "x$test_cygdrive_prefix" = x; then
32936    # As a simple fix, exclude /usr/bin since it's not a real path.
32937    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32938      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32939      # a path prefixed by /cygdrive for fixpath to work.
32940      new_path="$CYGWIN_ROOT_PATH$input_path"
32941    fi
32942  fi
32943
32944  # remove trailing .exe if any
32945  new_path="${new_path/%.exe/}"
32946
32947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32948
32949  # First separate the path from the arguments. This will split at the first
32950  # space.
32951  complete="$AR"
32952  path="${complete%% *}"
32953  tmp="$complete EOL"
32954  arguments="${tmp#* }"
32955
32956  # Input might be given as Windows format, start by converting to
32957  # unix format.
32958  new_path="$path"
32959
32960  windows_path="$new_path"
32961  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32962    unix_path=`$CYGPATH -u "$windows_path"`
32963    new_path="$unix_path"
32964  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32965    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32966    new_path="$unix_path"
32967  fi
32968
32969
32970  # Now try to locate executable using which
32971  new_path=`$WHICH "$new_path" 2> /dev/null`
32972
32973  if test "x$new_path" = x; then
32974    # Oops. Which didn't find the executable.
32975    # The splitting of arguments from the executable at a space might have been incorrect,
32976    # since paths with space are more likely in Windows. Give it another try with the whole
32977    # argument.
32978    path="$complete"
32979    arguments="EOL"
32980    new_path="$path"
32981
32982  windows_path="$new_path"
32983  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32984    unix_path=`$CYGPATH -u "$windows_path"`
32985    new_path="$unix_path"
32986  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32987    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32988    new_path="$unix_path"
32989  fi
32990
32991
32992    new_path=`$WHICH "$new_path" 2> /dev/null`
32993    # bat and cmd files are not always considered executable in MSYS causing which
32994    # to not find them
32995    if test "x$new_path" = x \
32996        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32997        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32998      new_path="$path"
32999
33000  windows_path="$new_path"
33001  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33002    unix_path=`$CYGPATH -u "$windows_path"`
33003    new_path="$unix_path"
33004  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33005    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33006    new_path="$unix_path"
33007  fi
33008
33009    fi
33010
33011    if test "x$new_path" = x; then
33012      # It's still not found. Now this is an unrecoverable error.
33013      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33014$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33015      has_space=`$ECHO "$complete" | $GREP " "`
33016      if test "x$has_space" != x; then
33017        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33018$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33019      fi
33020      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33021    fi
33022  fi
33023
33024  # Now new_path has a complete unix path to the binary
33025  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33026    # Keep paths in /bin as-is, but remove trailing .exe if any
33027    new_path="${new_path/%.exe/}"
33028    # Do not save /bin paths to all_fixpath_prefixes!
33029  else
33030    # Not in mixed or Windows style, start by that.
33031    new_path=`cmd //c echo $new_path`
33032
33033  input_path="$new_path"
33034  # Check if we need to convert this using DOS-style short mode. If the path
33035  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33036  # take no chances and rewrite it.
33037  # Note: m4 eats our [], so we need to use [ and ] instead.
33038  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33039  if test "x$has_forbidden_chars" != x; then
33040    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33041    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33042  fi
33043
33044    # Output is in $new_path
33045
33046  windows_path="$new_path"
33047  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33048    unix_path=`$CYGPATH -u "$windows_path"`
33049    new_path="$unix_path"
33050  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33051    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33052    new_path="$unix_path"
33053  fi
33054
33055    # remove trailing .exe if any
33056    new_path="${new_path/%.exe/}"
33057
33058    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33059    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33060  fi
33061
33062  else
33063    # We're on a posix platform. Hooray! :)
33064    # First separate the path from the arguments. This will split at the first
33065    # space.
33066    complete="$AR"
33067    path="${complete%% *}"
33068    tmp="$complete EOL"
33069    arguments="${tmp#* }"
33070
33071    # Cannot rely on the command "which" here since it doesn't always work.
33072    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33073    if test -z "$is_absolute_path"; then
33074      # Path to executable is not absolute. Find it.
33075      IFS_save="$IFS"
33076      IFS=:
33077      for p in $PATH; do
33078        if test -f "$p/$path" && test -x "$p/$path"; then
33079          new_path="$p/$path"
33080          break
33081        fi
33082      done
33083      IFS="$IFS_save"
33084    else
33085      # This is an absolute path, we can use it without further modifications.
33086      new_path="$path"
33087    fi
33088
33089    if test "x$new_path" = x; then
33090      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33091$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33092      has_space=`$ECHO "$complete" | $GREP " "`
33093      if test "x$has_space" != x; then
33094        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33095$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33096      fi
33097      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33098    fi
33099  fi
33100
33101  # Now join together the path and the arguments once again
33102  if test "x$arguments" != xEOL; then
33103    new_complete="$new_path ${arguments% *}"
33104  else
33105    new_complete="$new_path"
33106  fi
33107
33108  if test "x$complete" != "x$new_complete"; then
33109    AR="$new_complete"
33110    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
33111$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
33112  fi
33113
33114
33115
33116  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
33117    ac_ext=m
33118ac_cpp='$OBJCPP $CPPFLAGS'
33119ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33120ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33121ac_compiler_gnu=$ac_cv_objc_compiler_gnu
33122if test -n "$ac_tool_prefix"; then
33123  for ac_prog in gcc objcc objc cc CC
33124  do
33125    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33126set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33128$as_echo_n "checking for $ac_word... " >&6; }
33129if ${ac_cv_prog_OBJC+:} false; then :
33130  $as_echo_n "(cached) " >&6
33131else
33132  if test -n "$OBJC"; then
33133  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
33134else
33135as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33136for as_dir in $PATH
33137do
33138  IFS=$as_save_IFS
33139  test -z "$as_dir" && as_dir=.
33140    for ac_exec_ext in '' $ac_executable_extensions; do
33141  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33142    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
33143    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33144    break 2
33145  fi
33146done
33147  done
33148IFS=$as_save_IFS
33149
33150fi
33151fi
33152OBJC=$ac_cv_prog_OBJC
33153if test -n "$OBJC"; then
33154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
33155$as_echo "$OBJC" >&6; }
33156else
33157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33158$as_echo "no" >&6; }
33159fi
33160
33161
33162    test -n "$OBJC" && break
33163  done
33164fi
33165if test -z "$OBJC"; then
33166  ac_ct_OBJC=$OBJC
33167  for ac_prog in gcc objcc objc cc CC
33168do
33169  # Extract the first word of "$ac_prog", so it can be a program name with args.
33170set dummy $ac_prog; ac_word=$2
33171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33172$as_echo_n "checking for $ac_word... " >&6; }
33173if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
33174  $as_echo_n "(cached) " >&6
33175else
33176  if test -n "$ac_ct_OBJC"; then
33177  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
33178else
33179as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33180for as_dir in $PATH
33181do
33182  IFS=$as_save_IFS
33183  test -z "$as_dir" && as_dir=.
33184    for ac_exec_ext in '' $ac_executable_extensions; do
33185  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33186    ac_cv_prog_ac_ct_OBJC="$ac_prog"
33187    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33188    break 2
33189  fi
33190done
33191  done
33192IFS=$as_save_IFS
33193
33194fi
33195fi
33196ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
33197if test -n "$ac_ct_OBJC"; then
33198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
33199$as_echo "$ac_ct_OBJC" >&6; }
33200else
33201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33202$as_echo "no" >&6; }
33203fi
33204
33205
33206  test -n "$ac_ct_OBJC" && break
33207done
33208
33209  if test "x$ac_ct_OBJC" = x; then
33210    OBJC="gcc"
33211  else
33212    case $cross_compiling:$ac_tool_warned in
33213yes:)
33214{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33215$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33216ac_tool_warned=yes ;;
33217esac
33218    OBJC=$ac_ct_OBJC
33219  fi
33220fi
33221
33222# Provide some information about the compiler.
33223$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
33224set X $ac_compile
33225ac_compiler=$2
33226for ac_option in --version -v -V -qversion; do
33227  { { ac_try="$ac_compiler $ac_option >&5"
33228case "(($ac_try" in
33229  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33230  *) ac_try_echo=$ac_try;;
33231esac
33232eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33233$as_echo "$ac_try_echo"; } >&5
33234  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33235  ac_status=$?
33236  if test -s conftest.err; then
33237    sed '10a\
33238... rest of stderr output deleted ...
33239         10q' conftest.err >conftest.er1
33240    cat conftest.er1 >&5
33241  fi
33242  rm -f conftest.er1 conftest.err
33243  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33244  test $ac_status = 0; }
33245done
33246
33247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
33248$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
33249if ${ac_cv_objc_compiler_gnu+:} false; then :
33250  $as_echo_n "(cached) " >&6
33251else
33252  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33253/* end confdefs.h.  */
33254
33255int
33256main ()
33257{
33258#ifndef __GNUC__
33259       choke me
33260#endif
33261
33262  ;
33263  return 0;
33264}
33265_ACEOF
33266if ac_fn_objc_try_compile "$LINENO"; then :
33267  ac_compiler_gnu=yes
33268else
33269  ac_compiler_gnu=no
33270fi
33271rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33272ac_cv_objc_compiler_gnu=$ac_compiler_gnu
33273
33274fi
33275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
33276$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
33277if test $ac_compiler_gnu = yes; then
33278  GOBJC=yes
33279else
33280  GOBJC=
33281fi
33282ac_test_OBJCFLAGS=${OBJCFLAGS+set}
33283ac_save_OBJCFLAGS=$OBJCFLAGS
33284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
33285$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
33286if ${ac_cv_prog_objc_g+:} false; then :
33287  $as_echo_n "(cached) " >&6
33288else
33289  ac_save_objc_werror_flag=$ac_objc_werror_flag
33290   ac_objc_werror_flag=yes
33291   ac_cv_prog_objc_g=no
33292   OBJCFLAGS="-g"
33293   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33294/* end confdefs.h.  */
33295
33296int
33297main ()
33298{
33299
33300  ;
33301  return 0;
33302}
33303_ACEOF
33304if ac_fn_objc_try_compile "$LINENO"; then :
33305  ac_cv_prog_objc_g=yes
33306else
33307  OBJCFLAGS=""
33308      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33309/* end confdefs.h.  */
33310
33311int
33312main ()
33313{
33314
33315  ;
33316  return 0;
33317}
33318_ACEOF
33319if ac_fn_objc_try_compile "$LINENO"; then :
33320
33321else
33322  ac_objc_werror_flag=$ac_save_objc_werror_flag
33323	 OBJCFLAGS="-g"
33324	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33325/* end confdefs.h.  */
33326
33327int
33328main ()
33329{
33330
33331  ;
33332  return 0;
33333}
33334_ACEOF
33335if ac_fn_objc_try_compile "$LINENO"; then :
33336  ac_cv_prog_objc_g=yes
33337fi
33338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33339fi
33340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33341fi
33342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33343   ac_objc_werror_flag=$ac_save_objc_werror_flag
33344fi
33345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
33346$as_echo "$ac_cv_prog_objc_g" >&6; }
33347if test "$ac_test_OBJCFLAGS" = set; then
33348  OBJCFLAGS=$ac_save_OBJCFLAGS
33349elif test $ac_cv_prog_objc_g = yes; then
33350  if test "$GOBJC" = yes; then
33351    OBJCFLAGS="-g -O2"
33352  else
33353    OBJCFLAGS="-g"
33354  fi
33355else
33356  if test "$GOBJC" = yes; then
33357    OBJCFLAGS="-O2"
33358  else
33359    OBJCFLAGS=
33360  fi
33361fi
33362ac_ext=cpp
33363ac_cpp='$CXXCPP $CPPFLAGS'
33364ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33365ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33366ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33367
33368
33369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33370
33371  # First separate the path from the arguments. This will split at the first
33372  # space.
33373  complete="$OBJC"
33374  path="${complete%% *}"
33375  tmp="$complete EOL"
33376  arguments="${tmp#* }"
33377
33378  # Input might be given as Windows format, start by converting to
33379  # unix format.
33380  new_path=`$CYGPATH -u "$path"`
33381
33382  # Now try to locate executable using which
33383  new_path=`$WHICH "$new_path" 2> /dev/null`
33384  # bat and cmd files are not always considered executable in cygwin causing which
33385  # to not find them
33386  if test "x$new_path" = x \
33387      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33388      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33389    new_path=`$CYGPATH -u "$path"`
33390  fi
33391  if test "x$new_path" = x; then
33392    # Oops. Which didn't find the executable.
33393    # The splitting of arguments from the executable at a space might have been incorrect,
33394    # since paths with space are more likely in Windows. Give it another try with the whole
33395    # argument.
33396    path="$complete"
33397    arguments="EOL"
33398    new_path=`$CYGPATH -u "$path"`
33399    new_path=`$WHICH "$new_path" 2> /dev/null`
33400    # bat and cmd files are not always considered executable in cygwin causing which
33401    # to not find them
33402    if test "x$new_path" = x \
33403        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33404        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33405      new_path=`$CYGPATH -u "$path"`
33406    fi
33407    if test "x$new_path" = x; then
33408      # It's still not found. Now this is an unrecoverable error.
33409      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33410$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33411      has_space=`$ECHO "$complete" | $GREP " "`
33412      if test "x$has_space" != x; then
33413        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33414$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33415      fi
33416      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33417    fi
33418  fi
33419
33420  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33421  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33422  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33423  # "foo.exe" is OK but "foo" is an error.
33424  #
33425  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33426  # It is also a way to make sure we got the proper file name for the real test later on.
33427  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33428  if test "x$test_shortpath" = x; then
33429    # Short path failed, file does not exist as specified.
33430    # Try adding .exe or .cmd
33431    if test -f "${new_path}.exe"; then
33432      input_to_shortpath="${new_path}.exe"
33433    elif test -f "${new_path}.cmd"; then
33434      input_to_shortpath="${new_path}.cmd"
33435    else
33436      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
33437$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
33438      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33439$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33440      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33441    fi
33442  else
33443    input_to_shortpath="$new_path"
33444  fi
33445
33446  # Call helper function which possibly converts this using DOS-style short mode.
33447  # If so, the updated path is stored in $new_path.
33448  new_path="$input_to_shortpath"
33449
33450  input_path="$input_to_shortpath"
33451  # Check if we need to convert this using DOS-style short mode. If the path
33452  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33453  # take no chances and rewrite it.
33454  # Note: m4 eats our [], so we need to use [ and ] instead.
33455  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33456  if test "x$has_forbidden_chars" != x; then
33457    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33458    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33459    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33460    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33461      # Going to short mode and back again did indeed matter. Since short mode is
33462      # case insensitive, let's make it lowercase to improve readability.
33463      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33464      # Now convert it back to Unix-stile (cygpath)
33465      input_path=`$CYGPATH -u "$shortmode_path"`
33466      new_path="$input_path"
33467    fi
33468  fi
33469
33470  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33471  if test "x$test_cygdrive_prefix" = x; then
33472    # As a simple fix, exclude /usr/bin since it's not a real path.
33473    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33474      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33475      # a path prefixed by /cygdrive for fixpath to work.
33476      new_path="$CYGWIN_ROOT_PATH$input_path"
33477    fi
33478  fi
33479
33480  # remove trailing .exe if any
33481  new_path="${new_path/%.exe/}"
33482
33483  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33484
33485  # First separate the path from the arguments. This will split at the first
33486  # space.
33487  complete="$OBJC"
33488  path="${complete%% *}"
33489  tmp="$complete EOL"
33490  arguments="${tmp#* }"
33491
33492  # Input might be given as Windows format, start by converting to
33493  # unix format.
33494  new_path="$path"
33495
33496  windows_path="$new_path"
33497  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33498    unix_path=`$CYGPATH -u "$windows_path"`
33499    new_path="$unix_path"
33500  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33501    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33502    new_path="$unix_path"
33503  fi
33504
33505
33506  # Now try to locate executable using which
33507  new_path=`$WHICH "$new_path" 2> /dev/null`
33508
33509  if test "x$new_path" = x; then
33510    # Oops. Which didn't find the executable.
33511    # The splitting of arguments from the executable at a space might have been incorrect,
33512    # since paths with space are more likely in Windows. Give it another try with the whole
33513    # argument.
33514    path="$complete"
33515    arguments="EOL"
33516    new_path="$path"
33517
33518  windows_path="$new_path"
33519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33520    unix_path=`$CYGPATH -u "$windows_path"`
33521    new_path="$unix_path"
33522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33523    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33524    new_path="$unix_path"
33525  fi
33526
33527
33528    new_path=`$WHICH "$new_path" 2> /dev/null`
33529    # bat and cmd files are not always considered executable in MSYS causing which
33530    # to not find them
33531    if test "x$new_path" = x \
33532        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33533        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33534      new_path="$path"
33535
33536  windows_path="$new_path"
33537  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33538    unix_path=`$CYGPATH -u "$windows_path"`
33539    new_path="$unix_path"
33540  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33541    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33542    new_path="$unix_path"
33543  fi
33544
33545    fi
33546
33547    if test "x$new_path" = x; then
33548      # It's still not found. Now this is an unrecoverable error.
33549      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33550$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33551      has_space=`$ECHO "$complete" | $GREP " "`
33552      if test "x$has_space" != x; then
33553        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33554$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33555      fi
33556      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33557    fi
33558  fi
33559
33560  # Now new_path has a complete unix path to the binary
33561  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33562    # Keep paths in /bin as-is, but remove trailing .exe if any
33563    new_path="${new_path/%.exe/}"
33564    # Do not save /bin paths to all_fixpath_prefixes!
33565  else
33566    # Not in mixed or Windows style, start by that.
33567    new_path=`cmd //c echo $new_path`
33568
33569  input_path="$new_path"
33570  # Check if we need to convert this using DOS-style short mode. If the path
33571  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33572  # take no chances and rewrite it.
33573  # Note: m4 eats our [], so we need to use [ and ] instead.
33574  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33575  if test "x$has_forbidden_chars" != x; then
33576    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33577    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33578  fi
33579
33580    # Output is in $new_path
33581
33582  windows_path="$new_path"
33583  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33584    unix_path=`$CYGPATH -u "$windows_path"`
33585    new_path="$unix_path"
33586  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33587    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33588    new_path="$unix_path"
33589  fi
33590
33591    # remove trailing .exe if any
33592    new_path="${new_path/%.exe/}"
33593
33594    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33595    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33596  fi
33597
33598  else
33599    # We're on a posix platform. Hooray! :)
33600    # First separate the path from the arguments. This will split at the first
33601    # space.
33602    complete="$OBJC"
33603    path="${complete%% *}"
33604    tmp="$complete EOL"
33605    arguments="${tmp#* }"
33606
33607    # Cannot rely on the command "which" here since it doesn't always work.
33608    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33609    if test -z "$is_absolute_path"; then
33610      # Path to executable is not absolute. Find it.
33611      IFS_save="$IFS"
33612      IFS=:
33613      for p in $PATH; do
33614        if test -f "$p/$path" && test -x "$p/$path"; then
33615          new_path="$p/$path"
33616          break
33617        fi
33618      done
33619      IFS="$IFS_save"
33620    else
33621      # This is an absolute path, we can use it without further modifications.
33622      new_path="$path"
33623    fi
33624
33625    if test "x$new_path" = x; then
33626      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33627$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33628      has_space=`$ECHO "$complete" | $GREP " "`
33629      if test "x$has_space" != x; then
33630        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33631$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33632      fi
33633      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33634    fi
33635  fi
33636
33637  # Now join together the path and the arguments once again
33638  if test "x$arguments" != xEOL; then
33639    new_complete="$new_path ${arguments% *}"
33640  else
33641    new_complete="$new_path"
33642  fi
33643
33644  if test "x$complete" != "x$new_complete"; then
33645    OBJC="$new_complete"
33646    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
33647$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
33648  fi
33649
33650
33651
33652  # Publish this variable in the help.
33653
33654
33655  if test "x$LIPO" = x; then
33656    # The variable is not set by user, try to locate tool using the code snippet
33657    for ac_prog in lipo
33658do
33659  # Extract the first word of "$ac_prog", so it can be a program name with args.
33660set dummy $ac_prog; ac_word=$2
33661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33662$as_echo_n "checking for $ac_word... " >&6; }
33663if ${ac_cv_path_LIPO+:} false; then :
33664  $as_echo_n "(cached) " >&6
33665else
33666  case $LIPO in
33667  [\\/]* | ?:[\\/]*)
33668  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33669  ;;
33670  *)
33671  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33672for as_dir in $PATH
33673do
33674  IFS=$as_save_IFS
33675  test -z "$as_dir" && as_dir=.
33676    for ac_exec_ext in '' $ac_executable_extensions; do
33677  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33678    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33679    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33680    break 2
33681  fi
33682done
33683  done
33684IFS=$as_save_IFS
33685
33686  ;;
33687esac
33688fi
33689LIPO=$ac_cv_path_LIPO
33690if test -n "$LIPO"; then
33691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33692$as_echo "$LIPO" >&6; }
33693else
33694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33695$as_echo "no" >&6; }
33696fi
33697
33698
33699  test -n "$LIPO" && break
33700done
33701
33702  else
33703    # The variable is set, but is it from the command line or the environment?
33704
33705    # Try to remove the string !LIPO! from our list.
33706    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
33707    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33708      # If it failed, the variable was not from the command line. Ignore it,
33709      # but warn the user (except for BASH, which is always set by the calling BASH).
33710      if test "xLIPO" != xBASH; then
33711        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
33712$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
33713      fi
33714      # Try to locate tool using the code snippet
33715      for ac_prog in lipo
33716do
33717  # Extract the first word of "$ac_prog", so it can be a program name with args.
33718set dummy $ac_prog; ac_word=$2
33719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33720$as_echo_n "checking for $ac_word... " >&6; }
33721if ${ac_cv_path_LIPO+:} false; then :
33722  $as_echo_n "(cached) " >&6
33723else
33724  case $LIPO in
33725  [\\/]* | ?:[\\/]*)
33726  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33727  ;;
33728  *)
33729  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33730for as_dir in $PATH
33731do
33732  IFS=$as_save_IFS
33733  test -z "$as_dir" && as_dir=.
33734    for ac_exec_ext in '' $ac_executable_extensions; do
33735  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33736    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33737    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33738    break 2
33739  fi
33740done
33741  done
33742IFS=$as_save_IFS
33743
33744  ;;
33745esac
33746fi
33747LIPO=$ac_cv_path_LIPO
33748if test -n "$LIPO"; then
33749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33750$as_echo "$LIPO" >&6; }
33751else
33752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33753$as_echo "no" >&6; }
33754fi
33755
33756
33757  test -n "$LIPO" && break
33758done
33759
33760    else
33761      # If it succeeded, then it was overridden by the user. We will use it
33762      # for the tool.
33763
33764      # First remove it from the list of overridden variables, so we can test
33765      # for unknown variables in the end.
33766      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33767
33768      # Check if the provided tool contains a complete path.
33769      tool_specified="$LIPO"
33770      tool_basename="${tool_specified##*/}"
33771      if test "x$tool_basename" = "x$tool_specified"; then
33772        # A command without a complete path is provided, search $PATH.
33773        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
33774$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
33775        # Extract the first word of "$tool_basename", so it can be a program name with args.
33776set dummy $tool_basename; ac_word=$2
33777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33778$as_echo_n "checking for $ac_word... " >&6; }
33779if ${ac_cv_path_LIPO+:} false; then :
33780  $as_echo_n "(cached) " >&6
33781else
33782  case $LIPO in
33783  [\\/]* | ?:[\\/]*)
33784  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33785  ;;
33786  *)
33787  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33788for as_dir in $PATH
33789do
33790  IFS=$as_save_IFS
33791  test -z "$as_dir" && as_dir=.
33792    for ac_exec_ext in '' $ac_executable_extensions; do
33793  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33794    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33795    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33796    break 2
33797  fi
33798done
33799  done
33800IFS=$as_save_IFS
33801
33802  ;;
33803esac
33804fi
33805LIPO=$ac_cv_path_LIPO
33806if test -n "$LIPO"; then
33807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33808$as_echo "$LIPO" >&6; }
33809else
33810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33811$as_echo "no" >&6; }
33812fi
33813
33814
33815        if test "x$LIPO" = x; then
33816          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33817        fi
33818      else
33819        # Otherwise we believe it is a complete path. Use it as it is.
33820        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
33821$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
33822        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
33823$as_echo_n "checking for LIPO... " >&6; }
33824        if test ! -x "$tool_specified"; then
33825          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33826$as_echo "not found" >&6; }
33827          as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
33828        fi
33829        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33830$as_echo "$tool_specified" >&6; }
33831      fi
33832    fi
33833  fi
33834
33835
33836
33837  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33838
33839  # First separate the path from the arguments. This will split at the first
33840  # space.
33841  complete="$LIPO"
33842  path="${complete%% *}"
33843  tmp="$complete EOL"
33844  arguments="${tmp#* }"
33845
33846  # Input might be given as Windows format, start by converting to
33847  # unix format.
33848  new_path=`$CYGPATH -u "$path"`
33849
33850  # Now try to locate executable using which
33851  new_path=`$WHICH "$new_path" 2> /dev/null`
33852  # bat and cmd files are not always considered executable in cygwin causing which
33853  # to not find them
33854  if test "x$new_path" = x \
33855      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33856      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33857    new_path=`$CYGPATH -u "$path"`
33858  fi
33859  if test "x$new_path" = x; then
33860    # Oops. Which didn't find the executable.
33861    # The splitting of arguments from the executable at a space might have been incorrect,
33862    # since paths with space are more likely in Windows. Give it another try with the whole
33863    # argument.
33864    path="$complete"
33865    arguments="EOL"
33866    new_path=`$CYGPATH -u "$path"`
33867    new_path=`$WHICH "$new_path" 2> /dev/null`
33868    # bat and cmd files are not always considered executable in cygwin causing which
33869    # to not find them
33870    if test "x$new_path" = x \
33871        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33872        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33873      new_path=`$CYGPATH -u "$path"`
33874    fi
33875    if test "x$new_path" = x; then
33876      # It's still not found. Now this is an unrecoverable error.
33877      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33878$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33879      has_space=`$ECHO "$complete" | $GREP " "`
33880      if test "x$has_space" != x; then
33881        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33882$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33883      fi
33884      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33885    fi
33886  fi
33887
33888  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33889  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33890  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33891  # "foo.exe" is OK but "foo" is an error.
33892  #
33893  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33894  # It is also a way to make sure we got the proper file name for the real test later on.
33895  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33896  if test "x$test_shortpath" = x; then
33897    # Short path failed, file does not exist as specified.
33898    # Try adding .exe or .cmd
33899    if test -f "${new_path}.exe"; then
33900      input_to_shortpath="${new_path}.exe"
33901    elif test -f "${new_path}.cmd"; then
33902      input_to_shortpath="${new_path}.cmd"
33903    else
33904      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
33905$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
33906      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33907$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33908      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33909    fi
33910  else
33911    input_to_shortpath="$new_path"
33912  fi
33913
33914  # Call helper function which possibly converts this using DOS-style short mode.
33915  # If so, the updated path is stored in $new_path.
33916  new_path="$input_to_shortpath"
33917
33918  input_path="$input_to_shortpath"
33919  # Check if we need to convert this using DOS-style short mode. If the path
33920  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33921  # take no chances and rewrite it.
33922  # Note: m4 eats our [], so we need to use [ and ] instead.
33923  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33924  if test "x$has_forbidden_chars" != x; then
33925    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33926    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33927    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33928    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33929      # Going to short mode and back again did indeed matter. Since short mode is
33930      # case insensitive, let's make it lowercase to improve readability.
33931      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33932      # Now convert it back to Unix-stile (cygpath)
33933      input_path=`$CYGPATH -u "$shortmode_path"`
33934      new_path="$input_path"
33935    fi
33936  fi
33937
33938  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33939  if test "x$test_cygdrive_prefix" = x; then
33940    # As a simple fix, exclude /usr/bin since it's not a real path.
33941    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33942      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33943      # a path prefixed by /cygdrive for fixpath to work.
33944      new_path="$CYGWIN_ROOT_PATH$input_path"
33945    fi
33946  fi
33947
33948  # remove trailing .exe if any
33949  new_path="${new_path/%.exe/}"
33950
33951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33952
33953  # First separate the path from the arguments. This will split at the first
33954  # space.
33955  complete="$LIPO"
33956  path="${complete%% *}"
33957  tmp="$complete EOL"
33958  arguments="${tmp#* }"
33959
33960  # Input might be given as Windows format, start by converting to
33961  # unix format.
33962  new_path="$path"
33963
33964  windows_path="$new_path"
33965  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33966    unix_path=`$CYGPATH -u "$windows_path"`
33967    new_path="$unix_path"
33968  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33969    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33970    new_path="$unix_path"
33971  fi
33972
33973
33974  # Now try to locate executable using which
33975  new_path=`$WHICH "$new_path" 2> /dev/null`
33976
33977  if test "x$new_path" = x; then
33978    # Oops. Which didn't find the executable.
33979    # The splitting of arguments from the executable at a space might have been incorrect,
33980    # since paths with space are more likely in Windows. Give it another try with the whole
33981    # argument.
33982    path="$complete"
33983    arguments="EOL"
33984    new_path="$path"
33985
33986  windows_path="$new_path"
33987  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33988    unix_path=`$CYGPATH -u "$windows_path"`
33989    new_path="$unix_path"
33990  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33991    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33992    new_path="$unix_path"
33993  fi
33994
33995
33996    new_path=`$WHICH "$new_path" 2> /dev/null`
33997    # bat and cmd files are not always considered executable in MSYS causing which
33998    # to not find them
33999    if test "x$new_path" = x \
34000        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34001        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
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    fi
34014
34015    if test "x$new_path" = x; then
34016      # It's still not found. Now this is an unrecoverable error.
34017      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34018$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34019      has_space=`$ECHO "$complete" | $GREP " "`
34020      if test "x$has_space" != x; then
34021        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34022$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34023      fi
34024      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34025    fi
34026  fi
34027
34028  # Now new_path has a complete unix path to the binary
34029  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34030    # Keep paths in /bin as-is, but remove trailing .exe if any
34031    new_path="${new_path/%.exe/}"
34032    # Do not save /bin paths to all_fixpath_prefixes!
34033  else
34034    # Not in mixed or Windows style, start by that.
34035    new_path=`cmd //c echo $new_path`
34036
34037  input_path="$new_path"
34038  # Check if we need to convert this using DOS-style short mode. If the path
34039  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34040  # take no chances and rewrite it.
34041  # Note: m4 eats our [], so we need to use [ and ] instead.
34042  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34043  if test "x$has_forbidden_chars" != x; then
34044    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34045    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34046  fi
34047
34048    # Output is in $new_path
34049
34050  windows_path="$new_path"
34051  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34052    unix_path=`$CYGPATH -u "$windows_path"`
34053    new_path="$unix_path"
34054  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34055    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34056    new_path="$unix_path"
34057  fi
34058
34059    # remove trailing .exe if any
34060    new_path="${new_path/%.exe/}"
34061
34062    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34063    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34064  fi
34065
34066  else
34067    # We're on a posix platform. Hooray! :)
34068    # First separate the path from the arguments. This will split at the first
34069    # space.
34070    complete="$LIPO"
34071    path="${complete%% *}"
34072    tmp="$complete EOL"
34073    arguments="${tmp#* }"
34074
34075    # Cannot rely on the command "which" here since it doesn't always work.
34076    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34077    if test -z "$is_absolute_path"; then
34078      # Path to executable is not absolute. Find it.
34079      IFS_save="$IFS"
34080      IFS=:
34081      for p in $PATH; do
34082        if test -f "$p/$path" && test -x "$p/$path"; then
34083          new_path="$p/$path"
34084          break
34085        fi
34086      done
34087      IFS="$IFS_save"
34088    else
34089      # This is an absolute path, we can use it without further modifications.
34090      new_path="$path"
34091    fi
34092
34093    if test "x$new_path" = x; then
34094      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34095$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34096      has_space=`$ECHO "$complete" | $GREP " "`
34097      if test "x$has_space" != x; then
34098        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34099$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34100      fi
34101      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34102    fi
34103  fi
34104
34105  # Now join together the path and the arguments once again
34106  if test "x$arguments" != xEOL; then
34107    new_complete="$new_path ${arguments% *}"
34108  else
34109    new_complete="$new_path"
34110  fi
34111
34112  if test "x$complete" != "x$new_complete"; then
34113    LIPO="$new_complete"
34114    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
34115$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
34116  fi
34117
34118  else
34119    OBJC=
34120  fi
34121
34122  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34123    # Extract the first word of "mt", so it can be a program name with args.
34124set dummy mt; ac_word=$2
34125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34126$as_echo_n "checking for $ac_word... " >&6; }
34127if ${ac_cv_prog_MT+:} false; then :
34128  $as_echo_n "(cached) " >&6
34129else
34130  if test -n "$MT"; then
34131  ac_cv_prog_MT="$MT" # Let the user override the test.
34132else
34133  ac_prog_rejected=no
34134as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34135for as_dir in $PATH
34136do
34137  IFS=$as_save_IFS
34138  test -z "$as_dir" && as_dir=.
34139    for ac_exec_ext in '' $ac_executable_extensions; do
34140  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34141    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
34142       ac_prog_rejected=yes
34143       continue
34144     fi
34145    ac_cv_prog_MT="mt"
34146    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34147    break 2
34148  fi
34149done
34150  done
34151IFS=$as_save_IFS
34152
34153if test $ac_prog_rejected = yes; then
34154  # We found a bogon in the path, so make sure we never use it.
34155  set dummy $ac_cv_prog_MT
34156  shift
34157  if test $# != 0; then
34158    # We chose a different compiler from the bogus one.
34159    # However, it has the same basename, so the bogon will be chosen
34160    # first if we set MT to just the basename; use the full file name.
34161    shift
34162    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
34163  fi
34164fi
34165fi
34166fi
34167MT=$ac_cv_prog_MT
34168if test -n "$MT"; then
34169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
34170$as_echo "$MT" >&6; }
34171else
34172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34173$as_echo "no" >&6; }
34174fi
34175
34176
34177
34178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34179
34180  # First separate the path from the arguments. This will split at the first
34181  # space.
34182  complete="$MT"
34183  path="${complete%% *}"
34184  tmp="$complete EOL"
34185  arguments="${tmp#* }"
34186
34187  # Input might be given as Windows format, start by converting to
34188  # unix format.
34189  new_path=`$CYGPATH -u "$path"`
34190
34191  # Now try to locate executable using which
34192  new_path=`$WHICH "$new_path" 2> /dev/null`
34193  # bat and cmd files are not always considered executable in cygwin causing which
34194  # to not find them
34195  if test "x$new_path" = x \
34196      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34197      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34198    new_path=`$CYGPATH -u "$path"`
34199  fi
34200  if test "x$new_path" = x; then
34201    # Oops. Which didn't find the executable.
34202    # The splitting of arguments from the executable at a space might have been incorrect,
34203    # since paths with space are more likely in Windows. Give it another try with the whole
34204    # argument.
34205    path="$complete"
34206    arguments="EOL"
34207    new_path=`$CYGPATH -u "$path"`
34208    new_path=`$WHICH "$new_path" 2> /dev/null`
34209    # bat and cmd files are not always considered executable in cygwin causing which
34210    # to not find them
34211    if test "x$new_path" = x \
34212        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34213        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34214      new_path=`$CYGPATH -u "$path"`
34215    fi
34216    if test "x$new_path" = x; then
34217      # It's still not found. Now this is an unrecoverable error.
34218      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34219$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34220      has_space=`$ECHO "$complete" | $GREP " "`
34221      if test "x$has_space" != x; then
34222        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34223$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34224      fi
34225      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34226    fi
34227  fi
34228
34229  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34230  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34231  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34232  # "foo.exe" is OK but "foo" is an error.
34233  #
34234  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34235  # It is also a way to make sure we got the proper file name for the real test later on.
34236  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34237  if test "x$test_shortpath" = x; then
34238    # Short path failed, file does not exist as specified.
34239    # Try adding .exe or .cmd
34240    if test -f "${new_path}.exe"; then
34241      input_to_shortpath="${new_path}.exe"
34242    elif test -f "${new_path}.cmd"; then
34243      input_to_shortpath="${new_path}.cmd"
34244    else
34245      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
34246$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
34247      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34248$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34249      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34250    fi
34251  else
34252    input_to_shortpath="$new_path"
34253  fi
34254
34255  # Call helper function which possibly converts this using DOS-style short mode.
34256  # If so, the updated path is stored in $new_path.
34257  new_path="$input_to_shortpath"
34258
34259  input_path="$input_to_shortpath"
34260  # Check if we need to convert this using DOS-style short mode. If the path
34261  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34262  # take no chances and rewrite it.
34263  # Note: m4 eats our [], so we need to use [ and ] instead.
34264  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34265  if test "x$has_forbidden_chars" != x; then
34266    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34267    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34268    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34269    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34270      # Going to short mode and back again did indeed matter. Since short mode is
34271      # case insensitive, let's make it lowercase to improve readability.
34272      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34273      # Now convert it back to Unix-stile (cygpath)
34274      input_path=`$CYGPATH -u "$shortmode_path"`
34275      new_path="$input_path"
34276    fi
34277  fi
34278
34279  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34280  if test "x$test_cygdrive_prefix" = x; then
34281    # As a simple fix, exclude /usr/bin since it's not a real path.
34282    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34283      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34284      # a path prefixed by /cygdrive for fixpath to work.
34285      new_path="$CYGWIN_ROOT_PATH$input_path"
34286    fi
34287  fi
34288
34289  # remove trailing .exe if any
34290  new_path="${new_path/%.exe/}"
34291
34292  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34293
34294  # First separate the path from the arguments. This will split at the first
34295  # space.
34296  complete="$MT"
34297  path="${complete%% *}"
34298  tmp="$complete EOL"
34299  arguments="${tmp#* }"
34300
34301  # Input might be given as Windows format, start by converting to
34302  # unix format.
34303  new_path="$path"
34304
34305  windows_path="$new_path"
34306  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34307    unix_path=`$CYGPATH -u "$windows_path"`
34308    new_path="$unix_path"
34309  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34310    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34311    new_path="$unix_path"
34312  fi
34313
34314
34315  # Now try to locate executable using which
34316  new_path=`$WHICH "$new_path" 2> /dev/null`
34317
34318  if test "x$new_path" = x; then
34319    # Oops. Which didn't find the executable.
34320    # The splitting of arguments from the executable at a space might have been incorrect,
34321    # since paths with space are more likely in Windows. Give it another try with the whole
34322    # argument.
34323    path="$complete"
34324    arguments="EOL"
34325    new_path="$path"
34326
34327  windows_path="$new_path"
34328  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34329    unix_path=`$CYGPATH -u "$windows_path"`
34330    new_path="$unix_path"
34331  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34332    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34333    new_path="$unix_path"
34334  fi
34335
34336
34337    new_path=`$WHICH "$new_path" 2> /dev/null`
34338    # bat and cmd files are not always considered executable in MSYS causing which
34339    # to not find them
34340    if test "x$new_path" = x \
34341        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34342        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34343      new_path="$path"
34344
34345  windows_path="$new_path"
34346  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34347    unix_path=`$CYGPATH -u "$windows_path"`
34348    new_path="$unix_path"
34349  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34350    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34351    new_path="$unix_path"
34352  fi
34353
34354    fi
34355
34356    if test "x$new_path" = x; then
34357      # It's still not found. Now this is an unrecoverable error.
34358      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34359$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34360      has_space=`$ECHO "$complete" | $GREP " "`
34361      if test "x$has_space" != x; then
34362        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34363$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34364      fi
34365      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34366    fi
34367  fi
34368
34369  # Now new_path has a complete unix path to the binary
34370  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34371    # Keep paths in /bin as-is, but remove trailing .exe if any
34372    new_path="${new_path/%.exe/}"
34373    # Do not save /bin paths to all_fixpath_prefixes!
34374  else
34375    # Not in mixed or Windows style, start by that.
34376    new_path=`cmd //c echo $new_path`
34377
34378  input_path="$new_path"
34379  # Check if we need to convert this using DOS-style short mode. If the path
34380  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34381  # take no chances and rewrite it.
34382  # Note: m4 eats our [], so we need to use [ and ] instead.
34383  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34384  if test "x$has_forbidden_chars" != x; then
34385    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34386    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34387  fi
34388
34389    # Output is in $new_path
34390
34391  windows_path="$new_path"
34392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34393    unix_path=`$CYGPATH -u "$windows_path"`
34394    new_path="$unix_path"
34395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34396    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34397    new_path="$unix_path"
34398  fi
34399
34400    # remove trailing .exe if any
34401    new_path="${new_path/%.exe/}"
34402
34403    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34404    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34405  fi
34406
34407  else
34408    # We're on a posix platform. Hooray! :)
34409    # First separate the path from the arguments. This will split at the first
34410    # space.
34411    complete="$MT"
34412    path="${complete%% *}"
34413    tmp="$complete EOL"
34414    arguments="${tmp#* }"
34415
34416    # Cannot rely on the command "which" here since it doesn't always work.
34417    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34418    if test -z "$is_absolute_path"; then
34419      # Path to executable is not absolute. Find it.
34420      IFS_save="$IFS"
34421      IFS=:
34422      for p in $PATH; do
34423        if test -f "$p/$path" && test -x "$p/$path"; then
34424          new_path="$p/$path"
34425          break
34426        fi
34427      done
34428      IFS="$IFS_save"
34429    else
34430      # This is an absolute path, we can use it without further modifications.
34431      new_path="$path"
34432    fi
34433
34434    if test "x$new_path" = x; then
34435      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34436$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34437      has_space=`$ECHO "$complete" | $GREP " "`
34438      if test "x$has_space" != x; then
34439        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34440$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34441      fi
34442      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34443    fi
34444  fi
34445
34446  # Now join together the path and the arguments once again
34447  if test "x$arguments" != xEOL; then
34448    new_complete="$new_path ${arguments% *}"
34449  else
34450    new_complete="$new_path"
34451  fi
34452
34453  if test "x$complete" != "x$new_complete"; then
34454    MT="$new_complete"
34455    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
34456$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
34457  fi
34458
34459    # Setup the resource compiler (RC)
34460    # Extract the first word of "rc", so it can be a program name with args.
34461set dummy rc; ac_word=$2
34462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34463$as_echo_n "checking for $ac_word... " >&6; }
34464if ${ac_cv_prog_RC+:} false; then :
34465  $as_echo_n "(cached) " >&6
34466else
34467  if test -n "$RC"; then
34468  ac_cv_prog_RC="$RC" # Let the user override the test.
34469else
34470  ac_prog_rejected=no
34471as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34472for as_dir in $PATH
34473do
34474  IFS=$as_save_IFS
34475  test -z "$as_dir" && as_dir=.
34476    for ac_exec_ext in '' $ac_executable_extensions; do
34477  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34478    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
34479       ac_prog_rejected=yes
34480       continue
34481     fi
34482    ac_cv_prog_RC="rc"
34483    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34484    break 2
34485  fi
34486done
34487  done
34488IFS=$as_save_IFS
34489
34490if test $ac_prog_rejected = yes; then
34491  # We found a bogon in the path, so make sure we never use it.
34492  set dummy $ac_cv_prog_RC
34493  shift
34494  if test $# != 0; then
34495    # We chose a different compiler from the bogus one.
34496    # However, it has the same basename, so the bogon will be chosen
34497    # first if we set RC to just the basename; use the full file name.
34498    shift
34499    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
34500  fi
34501fi
34502fi
34503fi
34504RC=$ac_cv_prog_RC
34505if test -n "$RC"; then
34506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34507$as_echo "$RC" >&6; }
34508else
34509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34510$as_echo "no" >&6; }
34511fi
34512
34513
34514
34515  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34516
34517  # First separate the path from the arguments. This will split at the first
34518  # space.
34519  complete="$RC"
34520  path="${complete%% *}"
34521  tmp="$complete EOL"
34522  arguments="${tmp#* }"
34523
34524  # Input might be given as Windows format, start by converting to
34525  # unix format.
34526  new_path=`$CYGPATH -u "$path"`
34527
34528  # Now try to locate executable using which
34529  new_path=`$WHICH "$new_path" 2> /dev/null`
34530  # bat and cmd files are not always considered executable in cygwin causing which
34531  # to not find them
34532  if test "x$new_path" = x \
34533      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34534      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34535    new_path=`$CYGPATH -u "$path"`
34536  fi
34537  if test "x$new_path" = x; then
34538    # Oops. Which didn't find the executable.
34539    # The splitting of arguments from the executable at a space might have been incorrect,
34540    # since paths with space are more likely in Windows. Give it another try with the whole
34541    # argument.
34542    path="$complete"
34543    arguments="EOL"
34544    new_path=`$CYGPATH -u "$path"`
34545    new_path=`$WHICH "$new_path" 2> /dev/null`
34546    # bat and cmd files are not always considered executable in cygwin causing which
34547    # to not find them
34548    if test "x$new_path" = x \
34549        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34550        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34551      new_path=`$CYGPATH -u "$path"`
34552    fi
34553    if test "x$new_path" = x; then
34554      # It's still not found. Now this is an unrecoverable error.
34555      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34556$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34557      has_space=`$ECHO "$complete" | $GREP " "`
34558      if test "x$has_space" != x; then
34559        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34560$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34561      fi
34562      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34563    fi
34564  fi
34565
34566  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34567  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34568  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34569  # "foo.exe" is OK but "foo" is an error.
34570  #
34571  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34572  # It is also a way to make sure we got the proper file name for the real test later on.
34573  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34574  if test "x$test_shortpath" = x; then
34575    # Short path failed, file does not exist as specified.
34576    # Try adding .exe or .cmd
34577    if test -f "${new_path}.exe"; then
34578      input_to_shortpath="${new_path}.exe"
34579    elif test -f "${new_path}.cmd"; then
34580      input_to_shortpath="${new_path}.cmd"
34581    else
34582      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
34583$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
34584      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34585$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34586      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34587    fi
34588  else
34589    input_to_shortpath="$new_path"
34590  fi
34591
34592  # Call helper function which possibly converts this using DOS-style short mode.
34593  # If so, the updated path is stored in $new_path.
34594  new_path="$input_to_shortpath"
34595
34596  input_path="$input_to_shortpath"
34597  # Check if we need to convert this using DOS-style short mode. If the path
34598  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34599  # take no chances and rewrite it.
34600  # Note: m4 eats our [], so we need to use [ and ] instead.
34601  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34602  if test "x$has_forbidden_chars" != x; then
34603    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34604    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34605    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34606    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34607      # Going to short mode and back again did indeed matter. Since short mode is
34608      # case insensitive, let's make it lowercase to improve readability.
34609      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34610      # Now convert it back to Unix-stile (cygpath)
34611      input_path=`$CYGPATH -u "$shortmode_path"`
34612      new_path="$input_path"
34613    fi
34614  fi
34615
34616  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34617  if test "x$test_cygdrive_prefix" = x; then
34618    # As a simple fix, exclude /usr/bin since it's not a real path.
34619    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34620      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34621      # a path prefixed by /cygdrive for fixpath to work.
34622      new_path="$CYGWIN_ROOT_PATH$input_path"
34623    fi
34624  fi
34625
34626  # remove trailing .exe if any
34627  new_path="${new_path/%.exe/}"
34628
34629  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34630
34631  # First separate the path from the arguments. This will split at the first
34632  # space.
34633  complete="$RC"
34634  path="${complete%% *}"
34635  tmp="$complete EOL"
34636  arguments="${tmp#* }"
34637
34638  # Input might be given as Windows format, start by converting to
34639  # unix format.
34640  new_path="$path"
34641
34642  windows_path="$new_path"
34643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34644    unix_path=`$CYGPATH -u "$windows_path"`
34645    new_path="$unix_path"
34646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34647    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34648    new_path="$unix_path"
34649  fi
34650
34651
34652  # Now try to locate executable using which
34653  new_path=`$WHICH "$new_path" 2> /dev/null`
34654
34655  if test "x$new_path" = x; then
34656    # Oops. Which didn't find the executable.
34657    # The splitting of arguments from the executable at a space might have been incorrect,
34658    # since paths with space are more likely in Windows. Give it another try with the whole
34659    # argument.
34660    path="$complete"
34661    arguments="EOL"
34662    new_path="$path"
34663
34664  windows_path="$new_path"
34665  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34666    unix_path=`$CYGPATH -u "$windows_path"`
34667    new_path="$unix_path"
34668  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34669    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34670    new_path="$unix_path"
34671  fi
34672
34673
34674    new_path=`$WHICH "$new_path" 2> /dev/null`
34675    # bat and cmd files are not always considered executable in MSYS causing which
34676    # to not find them
34677    if test "x$new_path" = x \
34678        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34679        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34680      new_path="$path"
34681
34682  windows_path="$new_path"
34683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34684    unix_path=`$CYGPATH -u "$windows_path"`
34685    new_path="$unix_path"
34686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34687    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34688    new_path="$unix_path"
34689  fi
34690
34691    fi
34692
34693    if test "x$new_path" = x; then
34694      # It's still not found. Now this is an unrecoverable error.
34695      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34696$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34697      has_space=`$ECHO "$complete" | $GREP " "`
34698      if test "x$has_space" != x; then
34699        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34700$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34701      fi
34702      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34703    fi
34704  fi
34705
34706  # Now new_path has a complete unix path to the binary
34707  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34708    # Keep paths in /bin as-is, but remove trailing .exe if any
34709    new_path="${new_path/%.exe/}"
34710    # Do not save /bin paths to all_fixpath_prefixes!
34711  else
34712    # Not in mixed or Windows style, start by that.
34713    new_path=`cmd //c echo $new_path`
34714
34715  input_path="$new_path"
34716  # Check if we need to convert this using DOS-style short mode. If the path
34717  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34718  # take no chances and rewrite it.
34719  # Note: m4 eats our [], so we need to use [ and ] instead.
34720  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34721  if test "x$has_forbidden_chars" != x; then
34722    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34723    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34724  fi
34725
34726    # Output is in $new_path
34727
34728  windows_path="$new_path"
34729  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34730    unix_path=`$CYGPATH -u "$windows_path"`
34731    new_path="$unix_path"
34732  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34733    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34734    new_path="$unix_path"
34735  fi
34736
34737    # remove trailing .exe if any
34738    new_path="${new_path/%.exe/}"
34739
34740    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34741    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34742  fi
34743
34744  else
34745    # We're on a posix platform. Hooray! :)
34746    # First separate the path from the arguments. This will split at the first
34747    # space.
34748    complete="$RC"
34749    path="${complete%% *}"
34750    tmp="$complete EOL"
34751    arguments="${tmp#* }"
34752
34753    # Cannot rely on the command "which" here since it doesn't always work.
34754    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34755    if test -z "$is_absolute_path"; then
34756      # Path to executable is not absolute. Find it.
34757      IFS_save="$IFS"
34758      IFS=:
34759      for p in $PATH; do
34760        if test -f "$p/$path" && test -x "$p/$path"; then
34761          new_path="$p/$path"
34762          break
34763        fi
34764      done
34765      IFS="$IFS_save"
34766    else
34767      # This is an absolute path, we can use it without further modifications.
34768      new_path="$path"
34769    fi
34770
34771    if test "x$new_path" = x; then
34772      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34773$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34774      has_space=`$ECHO "$complete" | $GREP " "`
34775      if test "x$has_space" != x; then
34776        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34777$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34778      fi
34779      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34780    fi
34781  fi
34782
34783  # Now join together the path and the arguments once again
34784  if test "x$arguments" != xEOL; then
34785    new_complete="$new_path ${arguments% *}"
34786  else
34787    new_complete="$new_path"
34788  fi
34789
34790  if test "x$complete" != "x$new_complete"; then
34791    RC="$new_complete"
34792    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
34793$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
34794  fi
34795
34796    # Extract the first word of "dumpbin", so it can be a program name with args.
34797set dummy dumpbin; ac_word=$2
34798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34799$as_echo_n "checking for $ac_word... " >&6; }
34800if ${ac_cv_prog_DUMPBIN+:} false; then :
34801  $as_echo_n "(cached) " >&6
34802else
34803  if test -n "$DUMPBIN"; then
34804  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
34805else
34806as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34807for as_dir in $PATH
34808do
34809  IFS=$as_save_IFS
34810  test -z "$as_dir" && as_dir=.
34811    for ac_exec_ext in '' $ac_executable_extensions; do
34812  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34813    ac_cv_prog_DUMPBIN="dumpbin"
34814    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34815    break 2
34816  fi
34817done
34818  done
34819IFS=$as_save_IFS
34820
34821fi
34822fi
34823DUMPBIN=$ac_cv_prog_DUMPBIN
34824if test -n "$DUMPBIN"; then
34825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
34826$as_echo "$DUMPBIN" >&6; }
34827else
34828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34829$as_echo "no" >&6; }
34830fi
34831
34832
34833
34834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34835
34836  # First separate the path from the arguments. This will split at the first
34837  # space.
34838  complete="$DUMPBIN"
34839  path="${complete%% *}"
34840  tmp="$complete EOL"
34841  arguments="${tmp#* }"
34842
34843  # Input might be given as Windows format, start by converting to
34844  # unix format.
34845  new_path=`$CYGPATH -u "$path"`
34846
34847  # Now try to locate executable using which
34848  new_path=`$WHICH "$new_path" 2> /dev/null`
34849  # bat and cmd files are not always considered executable in cygwin causing which
34850  # to not find them
34851  if test "x$new_path" = x \
34852      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34853      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34854    new_path=`$CYGPATH -u "$path"`
34855  fi
34856  if test "x$new_path" = x; then
34857    # Oops. Which didn't find the executable.
34858    # The splitting of arguments from the executable at a space might have been incorrect,
34859    # since paths with space are more likely in Windows. Give it another try with the whole
34860    # argument.
34861    path="$complete"
34862    arguments="EOL"
34863    new_path=`$CYGPATH -u "$path"`
34864    new_path=`$WHICH "$new_path" 2> /dev/null`
34865    # bat and cmd files are not always considered executable in cygwin causing which
34866    # to not find them
34867    if test "x$new_path" = x \
34868        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34869        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34870      new_path=`$CYGPATH -u "$path"`
34871    fi
34872    if test "x$new_path" = x; then
34873      # It's still not found. Now this is an unrecoverable error.
34874      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34875$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34876      has_space=`$ECHO "$complete" | $GREP " "`
34877      if test "x$has_space" != x; then
34878        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34879$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34880      fi
34881      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34882    fi
34883  fi
34884
34885  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34886  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34887  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34888  # "foo.exe" is OK but "foo" is an error.
34889  #
34890  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34891  # It is also a way to make sure we got the proper file name for the real test later on.
34892  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34893  if test "x$test_shortpath" = x; then
34894    # Short path failed, file does not exist as specified.
34895    # Try adding .exe or .cmd
34896    if test -f "${new_path}.exe"; then
34897      input_to_shortpath="${new_path}.exe"
34898    elif test -f "${new_path}.cmd"; then
34899      input_to_shortpath="${new_path}.cmd"
34900    else
34901      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
34902$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
34903      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34904$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34905      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34906    fi
34907  else
34908    input_to_shortpath="$new_path"
34909  fi
34910
34911  # Call helper function which possibly converts this using DOS-style short mode.
34912  # If so, the updated path is stored in $new_path.
34913  new_path="$input_to_shortpath"
34914
34915  input_path="$input_to_shortpath"
34916  # Check if we need to convert this using DOS-style short mode. If the path
34917  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34918  # take no chances and rewrite it.
34919  # Note: m4 eats our [], so we need to use [ and ] instead.
34920  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34921  if test "x$has_forbidden_chars" != x; then
34922    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34923    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34924    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34925    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34926      # Going to short mode and back again did indeed matter. Since short mode is
34927      # case insensitive, let's make it lowercase to improve readability.
34928      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34929      # Now convert it back to Unix-stile (cygpath)
34930      input_path=`$CYGPATH -u "$shortmode_path"`
34931      new_path="$input_path"
34932    fi
34933  fi
34934
34935  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34936  if test "x$test_cygdrive_prefix" = x; then
34937    # As a simple fix, exclude /usr/bin since it's not a real path.
34938    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34939      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34940      # a path prefixed by /cygdrive for fixpath to work.
34941      new_path="$CYGWIN_ROOT_PATH$input_path"
34942    fi
34943  fi
34944
34945  # remove trailing .exe if any
34946  new_path="${new_path/%.exe/}"
34947
34948  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34949
34950  # First separate the path from the arguments. This will split at the first
34951  # space.
34952  complete="$DUMPBIN"
34953  path="${complete%% *}"
34954  tmp="$complete EOL"
34955  arguments="${tmp#* }"
34956
34957  # Input might be given as Windows format, start by converting to
34958  # unix format.
34959  new_path="$path"
34960
34961  windows_path="$new_path"
34962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34963    unix_path=`$CYGPATH -u "$windows_path"`
34964    new_path="$unix_path"
34965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34966    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34967    new_path="$unix_path"
34968  fi
34969
34970
34971  # Now try to locate executable using which
34972  new_path=`$WHICH "$new_path" 2> /dev/null`
34973
34974  if test "x$new_path" = x; then
34975    # Oops. Which didn't find the executable.
34976    # The splitting of arguments from the executable at a space might have been incorrect,
34977    # since paths with space are more likely in Windows. Give it another try with the whole
34978    # argument.
34979    path="$complete"
34980    arguments="EOL"
34981    new_path="$path"
34982
34983  windows_path="$new_path"
34984  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34985    unix_path=`$CYGPATH -u "$windows_path"`
34986    new_path="$unix_path"
34987  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34988    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34989    new_path="$unix_path"
34990  fi
34991
34992
34993    new_path=`$WHICH "$new_path" 2> /dev/null`
34994    # bat and cmd files are not always considered executable in MSYS causing which
34995    # to not find them
34996    if test "x$new_path" = x \
34997        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34998        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34999      new_path="$path"
35000
35001  windows_path="$new_path"
35002  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35003    unix_path=`$CYGPATH -u "$windows_path"`
35004    new_path="$unix_path"
35005  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35006    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35007    new_path="$unix_path"
35008  fi
35009
35010    fi
35011
35012    if test "x$new_path" = x; then
35013      # It's still not found. Now this is an unrecoverable error.
35014      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35015$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35016      has_space=`$ECHO "$complete" | $GREP " "`
35017      if test "x$has_space" != x; then
35018        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35019$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35020      fi
35021      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35022    fi
35023  fi
35024
35025  # Now new_path has a complete unix path to the binary
35026  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35027    # Keep paths in /bin as-is, but remove trailing .exe if any
35028    new_path="${new_path/%.exe/}"
35029    # Do not save /bin paths to all_fixpath_prefixes!
35030  else
35031    # Not in mixed or Windows style, start by that.
35032    new_path=`cmd //c echo $new_path`
35033
35034  input_path="$new_path"
35035  # Check if we need to convert this using DOS-style short mode. If the path
35036  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35037  # take no chances and rewrite it.
35038  # Note: m4 eats our [], so we need to use [ and ] instead.
35039  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35040  if test "x$has_forbidden_chars" != x; then
35041    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35042    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35043  fi
35044
35045    # Output is in $new_path
35046
35047  windows_path="$new_path"
35048  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35049    unix_path=`$CYGPATH -u "$windows_path"`
35050    new_path="$unix_path"
35051  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35052    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35053    new_path="$unix_path"
35054  fi
35055
35056    # remove trailing .exe if any
35057    new_path="${new_path/%.exe/}"
35058
35059    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35060    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35061  fi
35062
35063  else
35064    # We're on a posix platform. Hooray! :)
35065    # First separate the path from the arguments. This will split at the first
35066    # space.
35067    complete="$DUMPBIN"
35068    path="${complete%% *}"
35069    tmp="$complete EOL"
35070    arguments="${tmp#* }"
35071
35072    # Cannot rely on the command "which" here since it doesn't always work.
35073    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35074    if test -z "$is_absolute_path"; then
35075      # Path to executable is not absolute. Find it.
35076      IFS_save="$IFS"
35077      IFS=:
35078      for p in $PATH; do
35079        if test -f "$p/$path" && test -x "$p/$path"; then
35080          new_path="$p/$path"
35081          break
35082        fi
35083      done
35084      IFS="$IFS_save"
35085    else
35086      # This is an absolute path, we can use it without further modifications.
35087      new_path="$path"
35088    fi
35089
35090    if test "x$new_path" = x; then
35091      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35092$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35093      has_space=`$ECHO "$complete" | $GREP " "`
35094      if test "x$has_space" != x; then
35095        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35096$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35097      fi
35098      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35099    fi
35100  fi
35101
35102  # Now join together the path and the arguments once again
35103  if test "x$arguments" != xEOL; then
35104    new_complete="$new_path ${arguments% *}"
35105  else
35106    new_complete="$new_path"
35107  fi
35108
35109  if test "x$complete" != "x$new_complete"; then
35110    DUMPBIN="$new_complete"
35111    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
35112$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
35113  fi
35114
35115  fi
35116
35117  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35118
35119
35120  # Publish this variable in the help.
35121
35122
35123  if test "x$STRIP" = x; then
35124    # The variable is not set by user, try to locate tool using the code snippet
35125    for ac_prog in strip
35126do
35127  # Extract the first word of "$ac_prog", so it can be a program name with args.
35128set dummy $ac_prog; ac_word=$2
35129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35130$as_echo_n "checking for $ac_word... " >&6; }
35131if ${ac_cv_path_STRIP+:} false; then :
35132  $as_echo_n "(cached) " >&6
35133else
35134  case $STRIP in
35135  [\\/]* | ?:[\\/]*)
35136  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35137  ;;
35138  *)
35139  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35140for as_dir in $PATH
35141do
35142  IFS=$as_save_IFS
35143  test -z "$as_dir" && as_dir=.
35144    for ac_exec_ext in '' $ac_executable_extensions; do
35145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35146    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35148    break 2
35149  fi
35150done
35151  done
35152IFS=$as_save_IFS
35153
35154  ;;
35155esac
35156fi
35157STRIP=$ac_cv_path_STRIP
35158if test -n "$STRIP"; then
35159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35160$as_echo "$STRIP" >&6; }
35161else
35162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35163$as_echo "no" >&6; }
35164fi
35165
35166
35167  test -n "$STRIP" && break
35168done
35169
35170  else
35171    # The variable is set, but is it from the command line or the environment?
35172
35173    # Try to remove the string !STRIP! from our list.
35174    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
35175    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35176      # If it failed, the variable was not from the command line. Ignore it,
35177      # but warn the user (except for BASH, which is always set by the calling BASH).
35178      if test "xSTRIP" != xBASH; then
35179        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
35180$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
35181      fi
35182      # Try to locate tool using the code snippet
35183      for ac_prog in strip
35184do
35185  # Extract the first word of "$ac_prog", so it can be a program name with args.
35186set dummy $ac_prog; ac_word=$2
35187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35188$as_echo_n "checking for $ac_word... " >&6; }
35189if ${ac_cv_path_STRIP+:} false; then :
35190  $as_echo_n "(cached) " >&6
35191else
35192  case $STRIP in
35193  [\\/]* | ?:[\\/]*)
35194  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35195  ;;
35196  *)
35197  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35198for as_dir in $PATH
35199do
35200  IFS=$as_save_IFS
35201  test -z "$as_dir" && as_dir=.
35202    for ac_exec_ext in '' $ac_executable_extensions; do
35203  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35204    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35205    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35206    break 2
35207  fi
35208done
35209  done
35210IFS=$as_save_IFS
35211
35212  ;;
35213esac
35214fi
35215STRIP=$ac_cv_path_STRIP
35216if test -n "$STRIP"; then
35217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35218$as_echo "$STRIP" >&6; }
35219else
35220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35221$as_echo "no" >&6; }
35222fi
35223
35224
35225  test -n "$STRIP" && break
35226done
35227
35228    else
35229      # If it succeeded, then it was overridden by the user. We will use it
35230      # for the tool.
35231
35232      # First remove it from the list of overridden variables, so we can test
35233      # for unknown variables in the end.
35234      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35235
35236      # Check if the provided tool contains a complete path.
35237      tool_specified="$STRIP"
35238      tool_basename="${tool_specified##*/}"
35239      if test "x$tool_basename" = "x$tool_specified"; then
35240        # A command without a complete path is provided, search $PATH.
35241        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
35242$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
35243        # Extract the first word of "$tool_basename", so it can be a program name with args.
35244set dummy $tool_basename; ac_word=$2
35245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35246$as_echo_n "checking for $ac_word... " >&6; }
35247if ${ac_cv_path_STRIP+:} false; then :
35248  $as_echo_n "(cached) " >&6
35249else
35250  case $STRIP in
35251  [\\/]* | ?:[\\/]*)
35252  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35253  ;;
35254  *)
35255  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35256for as_dir in $PATH
35257do
35258  IFS=$as_save_IFS
35259  test -z "$as_dir" && as_dir=.
35260    for ac_exec_ext in '' $ac_executable_extensions; do
35261  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35262    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35263    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35264    break 2
35265  fi
35266done
35267  done
35268IFS=$as_save_IFS
35269
35270  ;;
35271esac
35272fi
35273STRIP=$ac_cv_path_STRIP
35274if test -n "$STRIP"; then
35275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35276$as_echo "$STRIP" >&6; }
35277else
35278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35279$as_echo "no" >&6; }
35280fi
35281
35282
35283        if test "x$STRIP" = x; then
35284          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35285        fi
35286      else
35287        # Otherwise we believe it is a complete path. Use it as it is.
35288        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
35289$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
35290        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
35291$as_echo_n "checking for STRIP... " >&6; }
35292        if test ! -x "$tool_specified"; then
35293          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35294$as_echo "not found" >&6; }
35295          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
35296        fi
35297        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35298$as_echo "$tool_specified" >&6; }
35299      fi
35300    fi
35301  fi
35302
35303
35304
35305  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35306
35307  # First separate the path from the arguments. This will split at the first
35308  # space.
35309  complete="$STRIP"
35310  path="${complete%% *}"
35311  tmp="$complete EOL"
35312  arguments="${tmp#* }"
35313
35314  # Input might be given as Windows format, start by converting to
35315  # unix format.
35316  new_path=`$CYGPATH -u "$path"`
35317
35318  # Now try to locate executable using which
35319  new_path=`$WHICH "$new_path" 2> /dev/null`
35320  # bat and cmd files are not always considered executable in cygwin causing which
35321  # to not find them
35322  if test "x$new_path" = x \
35323      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35324      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35325    new_path=`$CYGPATH -u "$path"`
35326  fi
35327  if test "x$new_path" = x; then
35328    # Oops. Which didn't find the executable.
35329    # The splitting of arguments from the executable at a space might have been incorrect,
35330    # since paths with space are more likely in Windows. Give it another try with the whole
35331    # argument.
35332    path="$complete"
35333    arguments="EOL"
35334    new_path=`$CYGPATH -u "$path"`
35335    new_path=`$WHICH "$new_path" 2> /dev/null`
35336    # bat and cmd files are not always considered executable in cygwin causing which
35337    # to not find them
35338    if test "x$new_path" = x \
35339        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35340        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35341      new_path=`$CYGPATH -u "$path"`
35342    fi
35343    if test "x$new_path" = x; then
35344      # It's still not found. Now this is an unrecoverable error.
35345      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35346$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35347      has_space=`$ECHO "$complete" | $GREP " "`
35348      if test "x$has_space" != x; then
35349        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35350$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35351      fi
35352      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35353    fi
35354  fi
35355
35356  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35357  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35358  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35359  # "foo.exe" is OK but "foo" is an error.
35360  #
35361  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35362  # It is also a way to make sure we got the proper file name for the real test later on.
35363  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35364  if test "x$test_shortpath" = x; then
35365    # Short path failed, file does not exist as specified.
35366    # Try adding .exe or .cmd
35367    if test -f "${new_path}.exe"; then
35368      input_to_shortpath="${new_path}.exe"
35369    elif test -f "${new_path}.cmd"; then
35370      input_to_shortpath="${new_path}.cmd"
35371    else
35372      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
35373$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
35374      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35375$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35376      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35377    fi
35378  else
35379    input_to_shortpath="$new_path"
35380  fi
35381
35382  # Call helper function which possibly converts this using DOS-style short mode.
35383  # If so, the updated path is stored in $new_path.
35384  new_path="$input_to_shortpath"
35385
35386  input_path="$input_to_shortpath"
35387  # Check if we need to convert this using DOS-style short mode. If the path
35388  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35389  # take no chances and rewrite it.
35390  # Note: m4 eats our [], so we need to use [ and ] instead.
35391  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35392  if test "x$has_forbidden_chars" != x; then
35393    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35394    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35395    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35396    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35397      # Going to short mode and back again did indeed matter. Since short mode is
35398      # case insensitive, let's make it lowercase to improve readability.
35399      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35400      # Now convert it back to Unix-stile (cygpath)
35401      input_path=`$CYGPATH -u "$shortmode_path"`
35402      new_path="$input_path"
35403    fi
35404  fi
35405
35406  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35407  if test "x$test_cygdrive_prefix" = x; then
35408    # As a simple fix, exclude /usr/bin since it's not a real path.
35409    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35410      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35411      # a path prefixed by /cygdrive for fixpath to work.
35412      new_path="$CYGWIN_ROOT_PATH$input_path"
35413    fi
35414  fi
35415
35416  # remove trailing .exe if any
35417  new_path="${new_path/%.exe/}"
35418
35419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35420
35421  # First separate the path from the arguments. This will split at the first
35422  # space.
35423  complete="$STRIP"
35424  path="${complete%% *}"
35425  tmp="$complete EOL"
35426  arguments="${tmp#* }"
35427
35428  # Input might be given as Windows format, start by converting to
35429  # unix format.
35430  new_path="$path"
35431
35432  windows_path="$new_path"
35433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35434    unix_path=`$CYGPATH -u "$windows_path"`
35435    new_path="$unix_path"
35436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35437    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35438    new_path="$unix_path"
35439  fi
35440
35441
35442  # Now try to locate executable using which
35443  new_path=`$WHICH "$new_path" 2> /dev/null`
35444
35445  if test "x$new_path" = x; then
35446    # Oops. Which didn't find the executable.
35447    # The splitting of arguments from the executable at a space might have been incorrect,
35448    # since paths with space are more likely in Windows. Give it another try with the whole
35449    # argument.
35450    path="$complete"
35451    arguments="EOL"
35452    new_path="$path"
35453
35454  windows_path="$new_path"
35455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35456    unix_path=`$CYGPATH -u "$windows_path"`
35457    new_path="$unix_path"
35458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35459    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35460    new_path="$unix_path"
35461  fi
35462
35463
35464    new_path=`$WHICH "$new_path" 2> /dev/null`
35465    # bat and cmd files are not always considered executable in MSYS causing which
35466    # to not find them
35467    if test "x$new_path" = x \
35468        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35469        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35470      new_path="$path"
35471
35472  windows_path="$new_path"
35473  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35474    unix_path=`$CYGPATH -u "$windows_path"`
35475    new_path="$unix_path"
35476  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35477    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35478    new_path="$unix_path"
35479  fi
35480
35481    fi
35482
35483    if test "x$new_path" = x; then
35484      # It's still not found. Now this is an unrecoverable error.
35485      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35486$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35487      has_space=`$ECHO "$complete" | $GREP " "`
35488      if test "x$has_space" != x; then
35489        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35490$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35491      fi
35492      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35493    fi
35494  fi
35495
35496  # Now new_path has a complete unix path to the binary
35497  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35498    # Keep paths in /bin as-is, but remove trailing .exe if any
35499    new_path="${new_path/%.exe/}"
35500    # Do not save /bin paths to all_fixpath_prefixes!
35501  else
35502    # Not in mixed or Windows style, start by that.
35503    new_path=`cmd //c echo $new_path`
35504
35505  input_path="$new_path"
35506  # Check if we need to convert this using DOS-style short mode. If the path
35507  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35508  # take no chances and rewrite it.
35509  # Note: m4 eats our [], so we need to use [ and ] instead.
35510  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35511  if test "x$has_forbidden_chars" != x; then
35512    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35513    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35514  fi
35515
35516    # Output is in $new_path
35517
35518  windows_path="$new_path"
35519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35520    unix_path=`$CYGPATH -u "$windows_path"`
35521    new_path="$unix_path"
35522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35523    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35524    new_path="$unix_path"
35525  fi
35526
35527    # remove trailing .exe if any
35528    new_path="${new_path/%.exe/}"
35529
35530    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35531    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35532  fi
35533
35534  else
35535    # We're on a posix platform. Hooray! :)
35536    # First separate the path from the arguments. This will split at the first
35537    # space.
35538    complete="$STRIP"
35539    path="${complete%% *}"
35540    tmp="$complete EOL"
35541    arguments="${tmp#* }"
35542
35543    # Cannot rely on the command "which" here since it doesn't always work.
35544    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35545    if test -z "$is_absolute_path"; then
35546      # Path to executable is not absolute. Find it.
35547      IFS_save="$IFS"
35548      IFS=:
35549      for p in $PATH; do
35550        if test -f "$p/$path" && test -x "$p/$path"; then
35551          new_path="$p/$path"
35552          break
35553        fi
35554      done
35555      IFS="$IFS_save"
35556    else
35557      # This is an absolute path, we can use it without further modifications.
35558      new_path="$path"
35559    fi
35560
35561    if test "x$new_path" = x; then
35562      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35563$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35564      has_space=`$ECHO "$complete" | $GREP " "`
35565      if test "x$has_space" != x; then
35566        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35567$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35568      fi
35569      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35570    fi
35571  fi
35572
35573  # Now join together the path and the arguments once again
35574  if test "x$arguments" != xEOL; then
35575    new_complete="$new_path ${arguments% *}"
35576  else
35577    new_complete="$new_path"
35578  fi
35579
35580  if test "x$complete" != "x$new_complete"; then
35581    STRIP="$new_complete"
35582    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
35583$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
35584  fi
35585
35586
35587
35588  # Publish this variable in the help.
35589
35590
35591  if test "x$NM" = x; then
35592    # The variable is not set by user, try to locate tool using the code snippet
35593    for ac_prog in nm
35594do
35595  # Extract the first word of "$ac_prog", so it can be a program name with args.
35596set dummy $ac_prog; ac_word=$2
35597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35598$as_echo_n "checking for $ac_word... " >&6; }
35599if ${ac_cv_path_NM+:} false; then :
35600  $as_echo_n "(cached) " >&6
35601else
35602  case $NM in
35603  [\\/]* | ?:[\\/]*)
35604  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35605  ;;
35606  *)
35607  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35608for as_dir in $PATH
35609do
35610  IFS=$as_save_IFS
35611  test -z "$as_dir" && as_dir=.
35612    for ac_exec_ext in '' $ac_executable_extensions; do
35613  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35614    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35615    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35616    break 2
35617  fi
35618done
35619  done
35620IFS=$as_save_IFS
35621
35622  ;;
35623esac
35624fi
35625NM=$ac_cv_path_NM
35626if test -n "$NM"; then
35627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35628$as_echo "$NM" >&6; }
35629else
35630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35631$as_echo "no" >&6; }
35632fi
35633
35634
35635  test -n "$NM" && break
35636done
35637
35638  else
35639    # The variable is set, but is it from the command line or the environment?
35640
35641    # Try to remove the string !NM! from our list.
35642    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
35643    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35644      # If it failed, the variable was not from the command line. Ignore it,
35645      # but warn the user (except for BASH, which is always set by the calling BASH).
35646      if test "xNM" != xBASH; then
35647        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
35648$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
35649      fi
35650      # Try to locate tool using the code snippet
35651      for ac_prog in nm
35652do
35653  # Extract the first word of "$ac_prog", so it can be a program name with args.
35654set dummy $ac_prog; ac_word=$2
35655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35656$as_echo_n "checking for $ac_word... " >&6; }
35657if ${ac_cv_path_NM+:} false; then :
35658  $as_echo_n "(cached) " >&6
35659else
35660  case $NM in
35661  [\\/]* | ?:[\\/]*)
35662  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35663  ;;
35664  *)
35665  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35666for as_dir in $PATH
35667do
35668  IFS=$as_save_IFS
35669  test -z "$as_dir" && as_dir=.
35670    for ac_exec_ext in '' $ac_executable_extensions; do
35671  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35672    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35673    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35674    break 2
35675  fi
35676done
35677  done
35678IFS=$as_save_IFS
35679
35680  ;;
35681esac
35682fi
35683NM=$ac_cv_path_NM
35684if test -n "$NM"; then
35685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35686$as_echo "$NM" >&6; }
35687else
35688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35689$as_echo "no" >&6; }
35690fi
35691
35692
35693  test -n "$NM" && break
35694done
35695
35696    else
35697      # If it succeeded, then it was overridden by the user. We will use it
35698      # for the tool.
35699
35700      # First remove it from the list of overridden variables, so we can test
35701      # for unknown variables in the end.
35702      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35703
35704      # Check if the provided tool contains a complete path.
35705      tool_specified="$NM"
35706      tool_basename="${tool_specified##*/}"
35707      if test "x$tool_basename" = "x$tool_specified"; then
35708        # A command without a complete path is provided, search $PATH.
35709        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
35710$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
35711        # Extract the first word of "$tool_basename", so it can be a program name with args.
35712set dummy $tool_basename; ac_word=$2
35713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35714$as_echo_n "checking for $ac_word... " >&6; }
35715if ${ac_cv_path_NM+:} false; then :
35716  $as_echo_n "(cached) " >&6
35717else
35718  case $NM in
35719  [\\/]* | ?:[\\/]*)
35720  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35721  ;;
35722  *)
35723  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35724for as_dir in $PATH
35725do
35726  IFS=$as_save_IFS
35727  test -z "$as_dir" && as_dir=.
35728    for ac_exec_ext in '' $ac_executable_extensions; do
35729  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35730    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35731    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35732    break 2
35733  fi
35734done
35735  done
35736IFS=$as_save_IFS
35737
35738  ;;
35739esac
35740fi
35741NM=$ac_cv_path_NM
35742if test -n "$NM"; then
35743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35744$as_echo "$NM" >&6; }
35745else
35746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35747$as_echo "no" >&6; }
35748fi
35749
35750
35751        if test "x$NM" = x; then
35752          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35753        fi
35754      else
35755        # Otherwise we believe it is a complete path. Use it as it is.
35756        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
35757$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
35758        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
35759$as_echo_n "checking for NM... " >&6; }
35760        if test ! -x "$tool_specified"; then
35761          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35762$as_echo "not found" >&6; }
35763          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
35764        fi
35765        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35766$as_echo "$tool_specified" >&6; }
35767      fi
35768    fi
35769  fi
35770
35771
35772
35773  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35774
35775  # First separate the path from the arguments. This will split at the first
35776  # space.
35777  complete="$NM"
35778  path="${complete%% *}"
35779  tmp="$complete EOL"
35780  arguments="${tmp#* }"
35781
35782  # Input might be given as Windows format, start by converting to
35783  # unix format.
35784  new_path=`$CYGPATH -u "$path"`
35785
35786  # Now try to locate executable using which
35787  new_path=`$WHICH "$new_path" 2> /dev/null`
35788  # bat and cmd files are not always considered executable in cygwin causing which
35789  # to not find them
35790  if test "x$new_path" = x \
35791      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35792      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35793    new_path=`$CYGPATH -u "$path"`
35794  fi
35795  if test "x$new_path" = x; then
35796    # Oops. Which didn't find the executable.
35797    # The splitting of arguments from the executable at a space might have been incorrect,
35798    # since paths with space are more likely in Windows. Give it another try with the whole
35799    # argument.
35800    path="$complete"
35801    arguments="EOL"
35802    new_path=`$CYGPATH -u "$path"`
35803    new_path=`$WHICH "$new_path" 2> /dev/null`
35804    # bat and cmd files are not always considered executable in cygwin causing which
35805    # to not find them
35806    if test "x$new_path" = x \
35807        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35808        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35809      new_path=`$CYGPATH -u "$path"`
35810    fi
35811    if test "x$new_path" = x; then
35812      # It's still not found. Now this is an unrecoverable error.
35813      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35814$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35815      has_space=`$ECHO "$complete" | $GREP " "`
35816      if test "x$has_space" != x; then
35817        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35818$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35819      fi
35820      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35821    fi
35822  fi
35823
35824  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35825  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35826  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35827  # "foo.exe" is OK but "foo" is an error.
35828  #
35829  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35830  # It is also a way to make sure we got the proper file name for the real test later on.
35831  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35832  if test "x$test_shortpath" = x; then
35833    # Short path failed, file does not exist as specified.
35834    # Try adding .exe or .cmd
35835    if test -f "${new_path}.exe"; then
35836      input_to_shortpath="${new_path}.exe"
35837    elif test -f "${new_path}.cmd"; then
35838      input_to_shortpath="${new_path}.cmd"
35839    else
35840      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
35841$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
35842      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35843$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35844      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35845    fi
35846  else
35847    input_to_shortpath="$new_path"
35848  fi
35849
35850  # Call helper function which possibly converts this using DOS-style short mode.
35851  # If so, the updated path is stored in $new_path.
35852  new_path="$input_to_shortpath"
35853
35854  input_path="$input_to_shortpath"
35855  # Check if we need to convert this using DOS-style short mode. If the path
35856  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35857  # take no chances and rewrite it.
35858  # Note: m4 eats our [], so we need to use [ and ] instead.
35859  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35860  if test "x$has_forbidden_chars" != x; then
35861    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35862    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35863    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35864    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35865      # Going to short mode and back again did indeed matter. Since short mode is
35866      # case insensitive, let's make it lowercase to improve readability.
35867      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35868      # Now convert it back to Unix-stile (cygpath)
35869      input_path=`$CYGPATH -u "$shortmode_path"`
35870      new_path="$input_path"
35871    fi
35872  fi
35873
35874  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35875  if test "x$test_cygdrive_prefix" = x; then
35876    # As a simple fix, exclude /usr/bin since it's not a real path.
35877    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35878      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35879      # a path prefixed by /cygdrive for fixpath to work.
35880      new_path="$CYGWIN_ROOT_PATH$input_path"
35881    fi
35882  fi
35883
35884  # remove trailing .exe if any
35885  new_path="${new_path/%.exe/}"
35886
35887  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35888
35889  # First separate the path from the arguments. This will split at the first
35890  # space.
35891  complete="$NM"
35892  path="${complete%% *}"
35893  tmp="$complete EOL"
35894  arguments="${tmp#* }"
35895
35896  # Input might be given as Windows format, start by converting to
35897  # unix format.
35898  new_path="$path"
35899
35900  windows_path="$new_path"
35901  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35902    unix_path=`$CYGPATH -u "$windows_path"`
35903    new_path="$unix_path"
35904  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35905    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35906    new_path="$unix_path"
35907  fi
35908
35909
35910  # Now try to locate executable using which
35911  new_path=`$WHICH "$new_path" 2> /dev/null`
35912
35913  if test "x$new_path" = x; then
35914    # Oops. Which didn't find the executable.
35915    # The splitting of arguments from the executable at a space might have been incorrect,
35916    # since paths with space are more likely in Windows. Give it another try with the whole
35917    # argument.
35918    path="$complete"
35919    arguments="EOL"
35920    new_path="$path"
35921
35922  windows_path="$new_path"
35923  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35924    unix_path=`$CYGPATH -u "$windows_path"`
35925    new_path="$unix_path"
35926  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35927    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35928    new_path="$unix_path"
35929  fi
35930
35931
35932    new_path=`$WHICH "$new_path" 2> /dev/null`
35933    # bat and cmd files are not always considered executable in MSYS causing which
35934    # to not find them
35935    if test "x$new_path" = x \
35936        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35937        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35938      new_path="$path"
35939
35940  windows_path="$new_path"
35941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35942    unix_path=`$CYGPATH -u "$windows_path"`
35943    new_path="$unix_path"
35944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35945    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35946    new_path="$unix_path"
35947  fi
35948
35949    fi
35950
35951    if test "x$new_path" = x; then
35952      # It's still not found. Now this is an unrecoverable error.
35953      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35954$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35955      has_space=`$ECHO "$complete" | $GREP " "`
35956      if test "x$has_space" != x; then
35957        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35958$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35959      fi
35960      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35961    fi
35962  fi
35963
35964  # Now new_path has a complete unix path to the binary
35965  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35966    # Keep paths in /bin as-is, but remove trailing .exe if any
35967    new_path="${new_path/%.exe/}"
35968    # Do not save /bin paths to all_fixpath_prefixes!
35969  else
35970    # Not in mixed or Windows style, start by that.
35971    new_path=`cmd //c echo $new_path`
35972
35973  input_path="$new_path"
35974  # Check if we need to convert this using DOS-style short mode. If the path
35975  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35976  # take no chances and rewrite it.
35977  # Note: m4 eats our [], so we need to use [ and ] instead.
35978  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35979  if test "x$has_forbidden_chars" != x; then
35980    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35981    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35982  fi
35983
35984    # Output is in $new_path
35985
35986  windows_path="$new_path"
35987  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35988    unix_path=`$CYGPATH -u "$windows_path"`
35989    new_path="$unix_path"
35990  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35991    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35992    new_path="$unix_path"
35993  fi
35994
35995    # remove trailing .exe if any
35996    new_path="${new_path/%.exe/}"
35997
35998    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35999    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36000  fi
36001
36002  else
36003    # We're on a posix platform. Hooray! :)
36004    # First separate the path from the arguments. This will split at the first
36005    # space.
36006    complete="$NM"
36007    path="${complete%% *}"
36008    tmp="$complete EOL"
36009    arguments="${tmp#* }"
36010
36011    # Cannot rely on the command "which" here since it doesn't always work.
36012    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36013    if test -z "$is_absolute_path"; then
36014      # Path to executable is not absolute. Find it.
36015      IFS_save="$IFS"
36016      IFS=:
36017      for p in $PATH; do
36018        if test -f "$p/$path" && test -x "$p/$path"; then
36019          new_path="$p/$path"
36020          break
36021        fi
36022      done
36023      IFS="$IFS_save"
36024    else
36025      # This is an absolute path, we can use it without further modifications.
36026      new_path="$path"
36027    fi
36028
36029    if test "x$new_path" = x; then
36030      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36031$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36032      has_space=`$ECHO "$complete" | $GREP " "`
36033      if test "x$has_space" != x; then
36034        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36035$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36036      fi
36037      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36038    fi
36039  fi
36040
36041  # Now join together the path and the arguments once again
36042  if test "x$arguments" != xEOL; then
36043    new_complete="$new_path ${arguments% *}"
36044  else
36045    new_complete="$new_path"
36046  fi
36047
36048  if test "x$complete" != "x$new_complete"; then
36049    NM="$new_complete"
36050    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
36051$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
36052  fi
36053
36054
36055
36056  # Publish this variable in the help.
36057
36058
36059  if test "x$GNM" = x; then
36060    # The variable is not set by user, try to locate tool using the code snippet
36061    for ac_prog in gnm
36062do
36063  # Extract the first word of "$ac_prog", so it can be a program name with args.
36064set dummy $ac_prog; ac_word=$2
36065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36066$as_echo_n "checking for $ac_word... " >&6; }
36067if ${ac_cv_path_GNM+:} false; then :
36068  $as_echo_n "(cached) " >&6
36069else
36070  case $GNM in
36071  [\\/]* | ?:[\\/]*)
36072  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36073  ;;
36074  *)
36075  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36076for as_dir in $PATH
36077do
36078  IFS=$as_save_IFS
36079  test -z "$as_dir" && as_dir=.
36080    for ac_exec_ext in '' $ac_executable_extensions; do
36081  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36082    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36083    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36084    break 2
36085  fi
36086done
36087  done
36088IFS=$as_save_IFS
36089
36090  ;;
36091esac
36092fi
36093GNM=$ac_cv_path_GNM
36094if test -n "$GNM"; then
36095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36096$as_echo "$GNM" >&6; }
36097else
36098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36099$as_echo "no" >&6; }
36100fi
36101
36102
36103  test -n "$GNM" && break
36104done
36105
36106  else
36107    # The variable is set, but is it from the command line or the environment?
36108
36109    # Try to remove the string !GNM! from our list.
36110    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
36111    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36112      # If it failed, the variable was not from the command line. Ignore it,
36113      # but warn the user (except for BASH, which is always set by the calling BASH).
36114      if test "xGNM" != xBASH; then
36115        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
36116$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
36117      fi
36118      # Try to locate tool using the code snippet
36119      for ac_prog in gnm
36120do
36121  # Extract the first word of "$ac_prog", so it can be a program name with args.
36122set dummy $ac_prog; ac_word=$2
36123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36124$as_echo_n "checking for $ac_word... " >&6; }
36125if ${ac_cv_path_GNM+:} false; then :
36126  $as_echo_n "(cached) " >&6
36127else
36128  case $GNM in
36129  [\\/]* | ?:[\\/]*)
36130  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36131  ;;
36132  *)
36133  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36134for as_dir in $PATH
36135do
36136  IFS=$as_save_IFS
36137  test -z "$as_dir" && as_dir=.
36138    for ac_exec_ext in '' $ac_executable_extensions; do
36139  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36140    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36141    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36142    break 2
36143  fi
36144done
36145  done
36146IFS=$as_save_IFS
36147
36148  ;;
36149esac
36150fi
36151GNM=$ac_cv_path_GNM
36152if test -n "$GNM"; then
36153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36154$as_echo "$GNM" >&6; }
36155else
36156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36157$as_echo "no" >&6; }
36158fi
36159
36160
36161  test -n "$GNM" && break
36162done
36163
36164    else
36165      # If it succeeded, then it was overridden by the user. We will use it
36166      # for the tool.
36167
36168      # First remove it from the list of overridden variables, so we can test
36169      # for unknown variables in the end.
36170      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36171
36172      # Check if the provided tool contains a complete path.
36173      tool_specified="$GNM"
36174      tool_basename="${tool_specified##*/}"
36175      if test "x$tool_basename" = "x$tool_specified"; then
36176        # A command without a complete path is provided, search $PATH.
36177        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
36178$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
36179        # Extract the first word of "$tool_basename", so it can be a program name with args.
36180set dummy $tool_basename; ac_word=$2
36181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36182$as_echo_n "checking for $ac_word... " >&6; }
36183if ${ac_cv_path_GNM+:} false; then :
36184  $as_echo_n "(cached) " >&6
36185else
36186  case $GNM in
36187  [\\/]* | ?:[\\/]*)
36188  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36189  ;;
36190  *)
36191  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36192for as_dir in $PATH
36193do
36194  IFS=$as_save_IFS
36195  test -z "$as_dir" && as_dir=.
36196    for ac_exec_ext in '' $ac_executable_extensions; do
36197  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36198    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36199    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36200    break 2
36201  fi
36202done
36203  done
36204IFS=$as_save_IFS
36205
36206  ;;
36207esac
36208fi
36209GNM=$ac_cv_path_GNM
36210if test -n "$GNM"; then
36211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36212$as_echo "$GNM" >&6; }
36213else
36214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36215$as_echo "no" >&6; }
36216fi
36217
36218
36219        if test "x$GNM" = x; then
36220          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36221        fi
36222      else
36223        # Otherwise we believe it is a complete path. Use it as it is.
36224        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
36225$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
36226        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
36227$as_echo_n "checking for GNM... " >&6; }
36228        if test ! -x "$tool_specified"; then
36229          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36230$as_echo "not found" >&6; }
36231          as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
36232        fi
36233        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36234$as_echo "$tool_specified" >&6; }
36235      fi
36236    fi
36237  fi
36238
36239
36240
36241  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36242
36243  # First separate the path from the arguments. This will split at the first
36244  # space.
36245  complete="$GNM"
36246  path="${complete%% *}"
36247  tmp="$complete EOL"
36248  arguments="${tmp#* }"
36249
36250  # Input might be given as Windows format, start by converting to
36251  # unix format.
36252  new_path=`$CYGPATH -u "$path"`
36253
36254  # Now try to locate executable using which
36255  new_path=`$WHICH "$new_path" 2> /dev/null`
36256  # bat and cmd files are not always considered executable in cygwin causing which
36257  # to not find them
36258  if test "x$new_path" = x \
36259      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36260      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36261    new_path=`$CYGPATH -u "$path"`
36262  fi
36263  if test "x$new_path" = x; then
36264    # Oops. Which didn't find the executable.
36265    # The splitting of arguments from the executable at a space might have been incorrect,
36266    # since paths with space are more likely in Windows. Give it another try with the whole
36267    # argument.
36268    path="$complete"
36269    arguments="EOL"
36270    new_path=`$CYGPATH -u "$path"`
36271    new_path=`$WHICH "$new_path" 2> /dev/null`
36272    # bat and cmd files are not always considered executable in cygwin causing which
36273    # to not find them
36274    if test "x$new_path" = x \
36275        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36276        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36277      new_path=`$CYGPATH -u "$path"`
36278    fi
36279    if test "x$new_path" = x; then
36280      # It's still not found. Now this is an unrecoverable error.
36281      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36282$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36283      has_space=`$ECHO "$complete" | $GREP " "`
36284      if test "x$has_space" != x; then
36285        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36286$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36287      fi
36288      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36289    fi
36290  fi
36291
36292  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36293  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36294  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36295  # "foo.exe" is OK but "foo" is an error.
36296  #
36297  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36298  # It is also a way to make sure we got the proper file name for the real test later on.
36299  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36300  if test "x$test_shortpath" = x; then
36301    # Short path failed, file does not exist as specified.
36302    # Try adding .exe or .cmd
36303    if test -f "${new_path}.exe"; then
36304      input_to_shortpath="${new_path}.exe"
36305    elif test -f "${new_path}.cmd"; then
36306      input_to_shortpath="${new_path}.cmd"
36307    else
36308      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
36309$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
36310      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36311$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36312      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36313    fi
36314  else
36315    input_to_shortpath="$new_path"
36316  fi
36317
36318  # Call helper function which possibly converts this using DOS-style short mode.
36319  # If so, the updated path is stored in $new_path.
36320  new_path="$input_to_shortpath"
36321
36322  input_path="$input_to_shortpath"
36323  # Check if we need to convert this using DOS-style short mode. If the path
36324  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36325  # take no chances and rewrite it.
36326  # Note: m4 eats our [], so we need to use [ and ] instead.
36327  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36328  if test "x$has_forbidden_chars" != x; then
36329    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36330    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36331    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36332    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36333      # Going to short mode and back again did indeed matter. Since short mode is
36334      # case insensitive, let's make it lowercase to improve readability.
36335      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36336      # Now convert it back to Unix-stile (cygpath)
36337      input_path=`$CYGPATH -u "$shortmode_path"`
36338      new_path="$input_path"
36339    fi
36340  fi
36341
36342  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36343  if test "x$test_cygdrive_prefix" = x; then
36344    # As a simple fix, exclude /usr/bin since it's not a real path.
36345    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36346      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36347      # a path prefixed by /cygdrive for fixpath to work.
36348      new_path="$CYGWIN_ROOT_PATH$input_path"
36349    fi
36350  fi
36351
36352  # remove trailing .exe if any
36353  new_path="${new_path/%.exe/}"
36354
36355  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36356
36357  # First separate the path from the arguments. This will split at the first
36358  # space.
36359  complete="$GNM"
36360  path="${complete%% *}"
36361  tmp="$complete EOL"
36362  arguments="${tmp#* }"
36363
36364  # Input might be given as Windows format, start by converting to
36365  # unix format.
36366  new_path="$path"
36367
36368  windows_path="$new_path"
36369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36370    unix_path=`$CYGPATH -u "$windows_path"`
36371    new_path="$unix_path"
36372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36373    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36374    new_path="$unix_path"
36375  fi
36376
36377
36378  # Now try to locate executable using which
36379  new_path=`$WHICH "$new_path" 2> /dev/null`
36380
36381  if test "x$new_path" = x; then
36382    # Oops. Which didn't find the executable.
36383    # The splitting of arguments from the executable at a space might have been incorrect,
36384    # since paths with space are more likely in Windows. Give it another try with the whole
36385    # argument.
36386    path="$complete"
36387    arguments="EOL"
36388    new_path="$path"
36389
36390  windows_path="$new_path"
36391  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36392    unix_path=`$CYGPATH -u "$windows_path"`
36393    new_path="$unix_path"
36394  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36395    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36396    new_path="$unix_path"
36397  fi
36398
36399
36400    new_path=`$WHICH "$new_path" 2> /dev/null`
36401    # bat and cmd files are not always considered executable in MSYS causing which
36402    # to not find them
36403    if test "x$new_path" = x \
36404        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36405        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36406      new_path="$path"
36407
36408  windows_path="$new_path"
36409  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36410    unix_path=`$CYGPATH -u "$windows_path"`
36411    new_path="$unix_path"
36412  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36413    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36414    new_path="$unix_path"
36415  fi
36416
36417    fi
36418
36419    if test "x$new_path" = x; then
36420      # It's still not found. Now this is an unrecoverable error.
36421      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36422$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36423      has_space=`$ECHO "$complete" | $GREP " "`
36424      if test "x$has_space" != x; then
36425        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36426$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36427      fi
36428      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36429    fi
36430  fi
36431
36432  # Now new_path has a complete unix path to the binary
36433  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36434    # Keep paths in /bin as-is, but remove trailing .exe if any
36435    new_path="${new_path/%.exe/}"
36436    # Do not save /bin paths to all_fixpath_prefixes!
36437  else
36438    # Not in mixed or Windows style, start by that.
36439    new_path=`cmd //c echo $new_path`
36440
36441  input_path="$new_path"
36442  # Check if we need to convert this using DOS-style short mode. If the path
36443  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36444  # take no chances and rewrite it.
36445  # Note: m4 eats our [], so we need to use [ and ] instead.
36446  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36447  if test "x$has_forbidden_chars" != x; then
36448    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36449    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36450  fi
36451
36452    # Output is in $new_path
36453
36454  windows_path="$new_path"
36455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36456    unix_path=`$CYGPATH -u "$windows_path"`
36457    new_path="$unix_path"
36458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36459    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36460    new_path="$unix_path"
36461  fi
36462
36463    # remove trailing .exe if any
36464    new_path="${new_path/%.exe/}"
36465
36466    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36467    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36468  fi
36469
36470  else
36471    # We're on a posix platform. Hooray! :)
36472    # First separate the path from the arguments. This will split at the first
36473    # space.
36474    complete="$GNM"
36475    path="${complete%% *}"
36476    tmp="$complete EOL"
36477    arguments="${tmp#* }"
36478
36479    # Cannot rely on the command "which" here since it doesn't always work.
36480    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36481    if test -z "$is_absolute_path"; then
36482      # Path to executable is not absolute. Find it.
36483      IFS_save="$IFS"
36484      IFS=:
36485      for p in $PATH; do
36486        if test -f "$p/$path" && test -x "$p/$path"; then
36487          new_path="$p/$path"
36488          break
36489        fi
36490      done
36491      IFS="$IFS_save"
36492    else
36493      # This is an absolute path, we can use it without further modifications.
36494      new_path="$path"
36495    fi
36496
36497    if test "x$new_path" = x; then
36498      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36499$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36500      has_space=`$ECHO "$complete" | $GREP " "`
36501      if test "x$has_space" != x; then
36502        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36503$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36504      fi
36505      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36506    fi
36507  fi
36508
36509  # Now join together the path and the arguments once again
36510  if test "x$arguments" != xEOL; then
36511    new_complete="$new_path ${arguments% *}"
36512  else
36513    new_complete="$new_path"
36514  fi
36515
36516  if test "x$complete" != "x$new_complete"; then
36517    GNM="$new_complete"
36518    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
36519$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
36520  fi
36521
36522
36523
36524
36525  # Publish this variable in the help.
36526
36527
36528  if test "x$MCS" = x; then
36529    # The variable is not set by user, try to locate tool using the code snippet
36530    for ac_prog in mcs
36531do
36532  # Extract the first word of "$ac_prog", so it can be a program name with args.
36533set dummy $ac_prog; ac_word=$2
36534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36535$as_echo_n "checking for $ac_word... " >&6; }
36536if ${ac_cv_path_MCS+:} false; then :
36537  $as_echo_n "(cached) " >&6
36538else
36539  case $MCS in
36540  [\\/]* | ?:[\\/]*)
36541  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36542  ;;
36543  *)
36544  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36545for as_dir in $PATH
36546do
36547  IFS=$as_save_IFS
36548  test -z "$as_dir" && as_dir=.
36549    for ac_exec_ext in '' $ac_executable_extensions; do
36550  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36551    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36552    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36553    break 2
36554  fi
36555done
36556  done
36557IFS=$as_save_IFS
36558
36559  ;;
36560esac
36561fi
36562MCS=$ac_cv_path_MCS
36563if test -n "$MCS"; then
36564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36565$as_echo "$MCS" >&6; }
36566else
36567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36568$as_echo "no" >&6; }
36569fi
36570
36571
36572  test -n "$MCS" && break
36573done
36574
36575  else
36576    # The variable is set, but is it from the command line or the environment?
36577
36578    # Try to remove the string !MCS! from our list.
36579    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MCS!/}
36580    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36581      # If it failed, the variable was not from the command line. Ignore it,
36582      # but warn the user (except for BASH, which is always set by the calling BASH).
36583      if test "xMCS" != xBASH; then
36584        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&5
36585$as_echo "$as_me: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&2;}
36586      fi
36587      # Try to locate tool using the code snippet
36588      for ac_prog in mcs
36589do
36590  # Extract the first word of "$ac_prog", so it can be a program name with args.
36591set dummy $ac_prog; ac_word=$2
36592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36593$as_echo_n "checking for $ac_word... " >&6; }
36594if ${ac_cv_path_MCS+:} false; then :
36595  $as_echo_n "(cached) " >&6
36596else
36597  case $MCS in
36598  [\\/]* | ?:[\\/]*)
36599  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36600  ;;
36601  *)
36602  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36603for as_dir in $PATH
36604do
36605  IFS=$as_save_IFS
36606  test -z "$as_dir" && as_dir=.
36607    for ac_exec_ext in '' $ac_executable_extensions; do
36608  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36609    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36610    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36611    break 2
36612  fi
36613done
36614  done
36615IFS=$as_save_IFS
36616
36617  ;;
36618esac
36619fi
36620MCS=$ac_cv_path_MCS
36621if test -n "$MCS"; then
36622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36623$as_echo "$MCS" >&6; }
36624else
36625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36626$as_echo "no" >&6; }
36627fi
36628
36629
36630  test -n "$MCS" && break
36631done
36632
36633    else
36634      # If it succeeded, then it was overridden by the user. We will use it
36635      # for the tool.
36636
36637      # First remove it from the list of overridden variables, so we can test
36638      # for unknown variables in the end.
36639      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36640
36641      # Check if the provided tool contains a complete path.
36642      tool_specified="$MCS"
36643      tool_basename="${tool_specified##*/}"
36644      if test "x$tool_basename" = "x$tool_specified"; then
36645        # A command without a complete path is provided, search $PATH.
36646        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MCS=$tool_basename" >&5
36647$as_echo "$as_me: Will search for user supplied tool MCS=$tool_basename" >&6;}
36648        # Extract the first word of "$tool_basename", so it can be a program name with args.
36649set dummy $tool_basename; ac_word=$2
36650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36651$as_echo_n "checking for $ac_word... " >&6; }
36652if ${ac_cv_path_MCS+:} false; then :
36653  $as_echo_n "(cached) " >&6
36654else
36655  case $MCS in
36656  [\\/]* | ?:[\\/]*)
36657  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36658  ;;
36659  *)
36660  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36661for as_dir in $PATH
36662do
36663  IFS=$as_save_IFS
36664  test -z "$as_dir" && as_dir=.
36665    for ac_exec_ext in '' $ac_executable_extensions; do
36666  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36667    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36668    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36669    break 2
36670  fi
36671done
36672  done
36673IFS=$as_save_IFS
36674
36675  ;;
36676esac
36677fi
36678MCS=$ac_cv_path_MCS
36679if test -n "$MCS"; then
36680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36681$as_echo "$MCS" >&6; }
36682else
36683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36684$as_echo "no" >&6; }
36685fi
36686
36687
36688        if test "x$MCS" = x; then
36689          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36690        fi
36691      else
36692        # Otherwise we believe it is a complete path. Use it as it is.
36693        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MCS=$tool_specified" >&5
36694$as_echo "$as_me: Will use user supplied tool MCS=$tool_specified" >&6;}
36695        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MCS" >&5
36696$as_echo_n "checking for MCS... " >&6; }
36697        if test ! -x "$tool_specified"; then
36698          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36699$as_echo "not found" >&6; }
36700          as_fn_error $? "User supplied tool MCS=$tool_specified does not exist or is not executable" "$LINENO" 5
36701        fi
36702        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36703$as_echo "$tool_specified" >&6; }
36704      fi
36705    fi
36706  fi
36707
36708
36709
36710  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36711
36712  # First separate the path from the arguments. This will split at the first
36713  # space.
36714  complete="$MCS"
36715  path="${complete%% *}"
36716  tmp="$complete EOL"
36717  arguments="${tmp#* }"
36718
36719  # Input might be given as Windows format, start by converting to
36720  # unix format.
36721  new_path=`$CYGPATH -u "$path"`
36722
36723  # Now try to locate executable using which
36724  new_path=`$WHICH "$new_path" 2> /dev/null`
36725  # bat and cmd files are not always considered executable in cygwin causing which
36726  # to not find them
36727  if test "x$new_path" = x \
36728      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36729      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36730    new_path=`$CYGPATH -u "$path"`
36731  fi
36732  if test "x$new_path" = x; then
36733    # Oops. Which didn't find the executable.
36734    # The splitting of arguments from the executable at a space might have been incorrect,
36735    # since paths with space are more likely in Windows. Give it another try with the whole
36736    # argument.
36737    path="$complete"
36738    arguments="EOL"
36739    new_path=`$CYGPATH -u "$path"`
36740    new_path=`$WHICH "$new_path" 2> /dev/null`
36741    # bat and cmd files are not always considered executable in cygwin causing which
36742    # to not find them
36743    if test "x$new_path" = x \
36744        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36745        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36746      new_path=`$CYGPATH -u "$path"`
36747    fi
36748    if test "x$new_path" = x; then
36749      # It's still not found. Now this is an unrecoverable error.
36750      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36751$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36752      has_space=`$ECHO "$complete" | $GREP " "`
36753      if test "x$has_space" != x; then
36754        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36755$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36756      fi
36757      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36758    fi
36759  fi
36760
36761  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36762  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36763  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36764  # "foo.exe" is OK but "foo" is an error.
36765  #
36766  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36767  # It is also a way to make sure we got the proper file name for the real test later on.
36768  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36769  if test "x$test_shortpath" = x; then
36770    # Short path failed, file does not exist as specified.
36771    # Try adding .exe or .cmd
36772    if test -f "${new_path}.exe"; then
36773      input_to_shortpath="${new_path}.exe"
36774    elif test -f "${new_path}.cmd"; then
36775      input_to_shortpath="${new_path}.cmd"
36776    else
36777      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
36778$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
36779      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36780$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36781      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36782    fi
36783  else
36784    input_to_shortpath="$new_path"
36785  fi
36786
36787  # Call helper function which possibly converts this using DOS-style short mode.
36788  # If so, the updated path is stored in $new_path.
36789  new_path="$input_to_shortpath"
36790
36791  input_path="$input_to_shortpath"
36792  # Check if we need to convert this using DOS-style short mode. If the path
36793  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36794  # take no chances and rewrite it.
36795  # Note: m4 eats our [], so we need to use [ and ] instead.
36796  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36797  if test "x$has_forbidden_chars" != x; then
36798    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36799    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36800    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36801    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36802      # Going to short mode and back again did indeed matter. Since short mode is
36803      # case insensitive, let's make it lowercase to improve readability.
36804      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36805      # Now convert it back to Unix-stile (cygpath)
36806      input_path=`$CYGPATH -u "$shortmode_path"`
36807      new_path="$input_path"
36808    fi
36809  fi
36810
36811  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36812  if test "x$test_cygdrive_prefix" = x; then
36813    # As a simple fix, exclude /usr/bin since it's not a real path.
36814    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36815      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36816      # a path prefixed by /cygdrive for fixpath to work.
36817      new_path="$CYGWIN_ROOT_PATH$input_path"
36818    fi
36819  fi
36820
36821  # remove trailing .exe if any
36822  new_path="${new_path/%.exe/}"
36823
36824  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36825
36826  # First separate the path from the arguments. This will split at the first
36827  # space.
36828  complete="$MCS"
36829  path="${complete%% *}"
36830  tmp="$complete EOL"
36831  arguments="${tmp#* }"
36832
36833  # Input might be given as Windows format, start by converting to
36834  # unix format.
36835  new_path="$path"
36836
36837  windows_path="$new_path"
36838  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36839    unix_path=`$CYGPATH -u "$windows_path"`
36840    new_path="$unix_path"
36841  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36842    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36843    new_path="$unix_path"
36844  fi
36845
36846
36847  # Now try to locate executable using which
36848  new_path=`$WHICH "$new_path" 2> /dev/null`
36849
36850  if test "x$new_path" = x; then
36851    # Oops. Which didn't find the executable.
36852    # The splitting of arguments from the executable at a space might have been incorrect,
36853    # since paths with space are more likely in Windows. Give it another try with the whole
36854    # argument.
36855    path="$complete"
36856    arguments="EOL"
36857    new_path="$path"
36858
36859  windows_path="$new_path"
36860  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36861    unix_path=`$CYGPATH -u "$windows_path"`
36862    new_path="$unix_path"
36863  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36864    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36865    new_path="$unix_path"
36866  fi
36867
36868
36869    new_path=`$WHICH "$new_path" 2> /dev/null`
36870    # bat and cmd files are not always considered executable in MSYS causing which
36871    # to not find them
36872    if test "x$new_path" = x \
36873        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36874        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36875      new_path="$path"
36876
36877  windows_path="$new_path"
36878  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36879    unix_path=`$CYGPATH -u "$windows_path"`
36880    new_path="$unix_path"
36881  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36882    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36883    new_path="$unix_path"
36884  fi
36885
36886    fi
36887
36888    if test "x$new_path" = x; then
36889      # It's still not found. Now this is an unrecoverable error.
36890      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36891$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36892      has_space=`$ECHO "$complete" | $GREP " "`
36893      if test "x$has_space" != x; then
36894        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36895$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36896      fi
36897      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36898    fi
36899  fi
36900
36901  # Now new_path has a complete unix path to the binary
36902  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36903    # Keep paths in /bin as-is, but remove trailing .exe if any
36904    new_path="${new_path/%.exe/}"
36905    # Do not save /bin paths to all_fixpath_prefixes!
36906  else
36907    # Not in mixed or Windows style, start by that.
36908    new_path=`cmd //c echo $new_path`
36909
36910  input_path="$new_path"
36911  # Check if we need to convert this using DOS-style short mode. If the path
36912  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36913  # take no chances and rewrite it.
36914  # Note: m4 eats our [], so we need to use [ and ] instead.
36915  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36916  if test "x$has_forbidden_chars" != x; then
36917    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36918    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36919  fi
36920
36921    # Output is in $new_path
36922
36923  windows_path="$new_path"
36924  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36925    unix_path=`$CYGPATH -u "$windows_path"`
36926    new_path="$unix_path"
36927  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36928    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36929    new_path="$unix_path"
36930  fi
36931
36932    # remove trailing .exe if any
36933    new_path="${new_path/%.exe/}"
36934
36935    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36936    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36937  fi
36938
36939  else
36940    # We're on a posix platform. Hooray! :)
36941    # First separate the path from the arguments. This will split at the first
36942    # space.
36943    complete="$MCS"
36944    path="${complete%% *}"
36945    tmp="$complete EOL"
36946    arguments="${tmp#* }"
36947
36948    # Cannot rely on the command "which" here since it doesn't always work.
36949    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36950    if test -z "$is_absolute_path"; then
36951      # Path to executable is not absolute. Find it.
36952      IFS_save="$IFS"
36953      IFS=:
36954      for p in $PATH; do
36955        if test -f "$p/$path" && test -x "$p/$path"; then
36956          new_path="$p/$path"
36957          break
36958        fi
36959      done
36960      IFS="$IFS_save"
36961    else
36962      # This is an absolute path, we can use it without further modifications.
36963      new_path="$path"
36964    fi
36965
36966    if test "x$new_path" = x; then
36967      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36968$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36969      has_space=`$ECHO "$complete" | $GREP " "`
36970      if test "x$has_space" != x; then
36971        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36972$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36973      fi
36974      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36975    fi
36976  fi
36977
36978  # Now join together the path and the arguments once again
36979  if test "x$arguments" != xEOL; then
36980    new_complete="$new_path ${arguments% *}"
36981  else
36982    new_complete="$new_path"
36983  fi
36984
36985  if test "x$complete" != "x$new_complete"; then
36986    MCS="$new_complete"
36987    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
36988$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
36989  fi
36990
36991  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
36992    # FIXME: we should unify this with the solaris case above.
36993
36994
36995  # Publish this variable in the help.
36996
36997
36998  if test "x$STRIP" = x; then
36999    # The variable is not set by user, try to locate tool using the code snippet
37000    if test -n "$ac_tool_prefix"; then
37001  for ac_prog in strip
37002  do
37003    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37004set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37006$as_echo_n "checking for $ac_word... " >&6; }
37007if ${ac_cv_prog_STRIP+:} false; then :
37008  $as_echo_n "(cached) " >&6
37009else
37010  if test -n "$STRIP"; then
37011  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37012else
37013as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37014for as_dir in $PATH
37015do
37016  IFS=$as_save_IFS
37017  test -z "$as_dir" && as_dir=.
37018    for ac_exec_ext in '' $ac_executable_extensions; do
37019  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37020    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37021    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37022    break 2
37023  fi
37024done
37025  done
37026IFS=$as_save_IFS
37027
37028fi
37029fi
37030STRIP=$ac_cv_prog_STRIP
37031if test -n "$STRIP"; then
37032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37033$as_echo "$STRIP" >&6; }
37034else
37035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37036$as_echo "no" >&6; }
37037fi
37038
37039
37040    test -n "$STRIP" && break
37041  done
37042fi
37043if test -z "$STRIP"; then
37044  ac_ct_STRIP=$STRIP
37045  for ac_prog in strip
37046do
37047  # Extract the first word of "$ac_prog", so it can be a program name with args.
37048set dummy $ac_prog; ac_word=$2
37049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37050$as_echo_n "checking for $ac_word... " >&6; }
37051if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37052  $as_echo_n "(cached) " >&6
37053else
37054  if test -n "$ac_ct_STRIP"; then
37055  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37056else
37057as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37058for as_dir in $PATH
37059do
37060  IFS=$as_save_IFS
37061  test -z "$as_dir" && as_dir=.
37062    for ac_exec_ext in '' $ac_executable_extensions; do
37063  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37064    ac_cv_prog_ac_ct_STRIP="$ac_prog"
37065    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37066    break 2
37067  fi
37068done
37069  done
37070IFS=$as_save_IFS
37071
37072fi
37073fi
37074ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37075if test -n "$ac_ct_STRIP"; then
37076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37077$as_echo "$ac_ct_STRIP" >&6; }
37078else
37079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37080$as_echo "no" >&6; }
37081fi
37082
37083
37084  test -n "$ac_ct_STRIP" && break
37085done
37086
37087  if test "x$ac_ct_STRIP" = x; then
37088    STRIP=""
37089  else
37090    case $cross_compiling:$ac_tool_warned in
37091yes:)
37092{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37093$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37094ac_tool_warned=yes ;;
37095esac
37096    STRIP=$ac_ct_STRIP
37097  fi
37098fi
37099
37100  else
37101    # The variable is set, but is it from the command line or the environment?
37102
37103    # Try to remove the string !STRIP! from our list.
37104    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
37105    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37106      # If it failed, the variable was not from the command line. Ignore it,
37107      # but warn the user (except for BASH, which is always set by the calling BASH).
37108      if test "xSTRIP" != xBASH; then
37109        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
37110$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
37111      fi
37112      # Try to locate tool using the code snippet
37113      if test -n "$ac_tool_prefix"; then
37114  for ac_prog in strip
37115  do
37116    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37117set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37119$as_echo_n "checking for $ac_word... " >&6; }
37120if ${ac_cv_prog_STRIP+:} false; then :
37121  $as_echo_n "(cached) " >&6
37122else
37123  if test -n "$STRIP"; then
37124  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37125else
37126as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37127for as_dir in $PATH
37128do
37129  IFS=$as_save_IFS
37130  test -z "$as_dir" && as_dir=.
37131    for ac_exec_ext in '' $ac_executable_extensions; do
37132  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37133    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37134    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37135    break 2
37136  fi
37137done
37138  done
37139IFS=$as_save_IFS
37140
37141fi
37142fi
37143STRIP=$ac_cv_prog_STRIP
37144if test -n "$STRIP"; then
37145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37146$as_echo "$STRIP" >&6; }
37147else
37148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37149$as_echo "no" >&6; }
37150fi
37151
37152
37153    test -n "$STRIP" && break
37154  done
37155fi
37156if test -z "$STRIP"; then
37157  ac_ct_STRIP=$STRIP
37158  for ac_prog in strip
37159do
37160  # Extract the first word of "$ac_prog", so it can be a program name with args.
37161set dummy $ac_prog; ac_word=$2
37162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37163$as_echo_n "checking for $ac_word... " >&6; }
37164if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37165  $as_echo_n "(cached) " >&6
37166else
37167  if test -n "$ac_ct_STRIP"; then
37168  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37169else
37170as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37171for as_dir in $PATH
37172do
37173  IFS=$as_save_IFS
37174  test -z "$as_dir" && as_dir=.
37175    for ac_exec_ext in '' $ac_executable_extensions; do
37176  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37177    ac_cv_prog_ac_ct_STRIP="$ac_prog"
37178    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37179    break 2
37180  fi
37181done
37182  done
37183IFS=$as_save_IFS
37184
37185fi
37186fi
37187ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37188if test -n "$ac_ct_STRIP"; then
37189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37190$as_echo "$ac_ct_STRIP" >&6; }
37191else
37192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37193$as_echo "no" >&6; }
37194fi
37195
37196
37197  test -n "$ac_ct_STRIP" && break
37198done
37199
37200  if test "x$ac_ct_STRIP" = x; then
37201    STRIP=""
37202  else
37203    case $cross_compiling:$ac_tool_warned in
37204yes:)
37205{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37206$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37207ac_tool_warned=yes ;;
37208esac
37209    STRIP=$ac_ct_STRIP
37210  fi
37211fi
37212
37213    else
37214      # If it succeeded, then it was overridden by the user. We will use it
37215      # for the tool.
37216
37217      # First remove it from the list of overridden variables, so we can test
37218      # for unknown variables in the end.
37219      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37220
37221      # Check if the provided tool contains a complete path.
37222      tool_specified="$STRIP"
37223      tool_basename="${tool_specified##*/}"
37224      if test "x$tool_basename" = "x$tool_specified"; then
37225        # A command without a complete path is provided, search $PATH.
37226        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
37227$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
37228        # Extract the first word of "$tool_basename", so it can be a program name with args.
37229set dummy $tool_basename; ac_word=$2
37230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37231$as_echo_n "checking for $ac_word... " >&6; }
37232if ${ac_cv_path_STRIP+:} false; then :
37233  $as_echo_n "(cached) " >&6
37234else
37235  case $STRIP in
37236  [\\/]* | ?:[\\/]*)
37237  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37238  ;;
37239  *)
37240  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37241for as_dir in $PATH
37242do
37243  IFS=$as_save_IFS
37244  test -z "$as_dir" && as_dir=.
37245    for ac_exec_ext in '' $ac_executable_extensions; do
37246  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37247    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37248    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37249    break 2
37250  fi
37251done
37252  done
37253IFS=$as_save_IFS
37254
37255  ;;
37256esac
37257fi
37258STRIP=$ac_cv_path_STRIP
37259if test -n "$STRIP"; then
37260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37261$as_echo "$STRIP" >&6; }
37262else
37263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37264$as_echo "no" >&6; }
37265fi
37266
37267
37268        if test "x$STRIP" = x; then
37269          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37270        fi
37271      else
37272        # Otherwise we believe it is a complete path. Use it as it is.
37273        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
37274$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
37275        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
37276$as_echo_n "checking for STRIP... " >&6; }
37277        if test ! -x "$tool_specified"; then
37278          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37279$as_echo "not found" >&6; }
37280          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
37281        fi
37282        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37283$as_echo "$tool_specified" >&6; }
37284      fi
37285    fi
37286  fi
37287
37288
37289
37290  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37291
37292  # First separate the path from the arguments. This will split at the first
37293  # space.
37294  complete="$STRIP"
37295  path="${complete%% *}"
37296  tmp="$complete EOL"
37297  arguments="${tmp#* }"
37298
37299  # Input might be given as Windows format, start by converting to
37300  # unix format.
37301  new_path=`$CYGPATH -u "$path"`
37302
37303  # Now try to locate executable using which
37304  new_path=`$WHICH "$new_path" 2> /dev/null`
37305  # bat and cmd files are not always considered executable in cygwin causing which
37306  # to not find them
37307  if test "x$new_path" = x \
37308      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37309      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37310    new_path=`$CYGPATH -u "$path"`
37311  fi
37312  if test "x$new_path" = x; then
37313    # Oops. Which didn't find the executable.
37314    # The splitting of arguments from the executable at a space might have been incorrect,
37315    # since paths with space are more likely in Windows. Give it another try with the whole
37316    # argument.
37317    path="$complete"
37318    arguments="EOL"
37319    new_path=`$CYGPATH -u "$path"`
37320    new_path=`$WHICH "$new_path" 2> /dev/null`
37321    # bat and cmd files are not always considered executable in cygwin causing which
37322    # to not find them
37323    if test "x$new_path" = x \
37324        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37325        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37326      new_path=`$CYGPATH -u "$path"`
37327    fi
37328    if test "x$new_path" = x; then
37329      # It's still not found. Now this is an unrecoverable error.
37330      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37331$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37332      has_space=`$ECHO "$complete" | $GREP " "`
37333      if test "x$has_space" != x; then
37334        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37335$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37336      fi
37337      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37338    fi
37339  fi
37340
37341  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37342  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37343  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37344  # "foo.exe" is OK but "foo" is an error.
37345  #
37346  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37347  # It is also a way to make sure we got the proper file name for the real test later on.
37348  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37349  if test "x$test_shortpath" = x; then
37350    # Short path failed, file does not exist as specified.
37351    # Try adding .exe or .cmd
37352    if test -f "${new_path}.exe"; then
37353      input_to_shortpath="${new_path}.exe"
37354    elif test -f "${new_path}.cmd"; then
37355      input_to_shortpath="${new_path}.cmd"
37356    else
37357      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
37358$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
37359      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37360$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37361      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37362    fi
37363  else
37364    input_to_shortpath="$new_path"
37365  fi
37366
37367  # Call helper function which possibly converts this using DOS-style short mode.
37368  # If so, the updated path is stored in $new_path.
37369  new_path="$input_to_shortpath"
37370
37371  input_path="$input_to_shortpath"
37372  # Check if we need to convert this using DOS-style short mode. If the path
37373  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37374  # take no chances and rewrite it.
37375  # Note: m4 eats our [], so we need to use [ and ] instead.
37376  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37377  if test "x$has_forbidden_chars" != x; then
37378    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37379    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37380    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37381    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37382      # Going to short mode and back again did indeed matter. Since short mode is
37383      # case insensitive, let's make it lowercase to improve readability.
37384      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37385      # Now convert it back to Unix-stile (cygpath)
37386      input_path=`$CYGPATH -u "$shortmode_path"`
37387      new_path="$input_path"
37388    fi
37389  fi
37390
37391  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37392  if test "x$test_cygdrive_prefix" = x; then
37393    # As a simple fix, exclude /usr/bin since it's not a real path.
37394    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37395      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37396      # a path prefixed by /cygdrive for fixpath to work.
37397      new_path="$CYGWIN_ROOT_PATH$input_path"
37398    fi
37399  fi
37400
37401  # remove trailing .exe if any
37402  new_path="${new_path/%.exe/}"
37403
37404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37405
37406  # First separate the path from the arguments. This will split at the first
37407  # space.
37408  complete="$STRIP"
37409  path="${complete%% *}"
37410  tmp="$complete EOL"
37411  arguments="${tmp#* }"
37412
37413  # Input might be given as Windows format, start by converting to
37414  # unix format.
37415  new_path="$path"
37416
37417  windows_path="$new_path"
37418  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37419    unix_path=`$CYGPATH -u "$windows_path"`
37420    new_path="$unix_path"
37421  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37422    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37423    new_path="$unix_path"
37424  fi
37425
37426
37427  # Now try to locate executable using which
37428  new_path=`$WHICH "$new_path" 2> /dev/null`
37429
37430  if test "x$new_path" = x; then
37431    # Oops. Which didn't find the executable.
37432    # The splitting of arguments from the executable at a space might have been incorrect,
37433    # since paths with space are more likely in Windows. Give it another try with the whole
37434    # argument.
37435    path="$complete"
37436    arguments="EOL"
37437    new_path="$path"
37438
37439  windows_path="$new_path"
37440  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37441    unix_path=`$CYGPATH -u "$windows_path"`
37442    new_path="$unix_path"
37443  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37444    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37445    new_path="$unix_path"
37446  fi
37447
37448
37449    new_path=`$WHICH "$new_path" 2> /dev/null`
37450    # bat and cmd files are not always considered executable in MSYS causing which
37451    # to not find them
37452    if test "x$new_path" = x \
37453        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37454        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37455      new_path="$path"
37456
37457  windows_path="$new_path"
37458  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37459    unix_path=`$CYGPATH -u "$windows_path"`
37460    new_path="$unix_path"
37461  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37462    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37463    new_path="$unix_path"
37464  fi
37465
37466    fi
37467
37468    if test "x$new_path" = x; then
37469      # It's still not found. Now this is an unrecoverable error.
37470      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37471$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37472      has_space=`$ECHO "$complete" | $GREP " "`
37473      if test "x$has_space" != x; then
37474        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37475$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37476      fi
37477      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37478    fi
37479  fi
37480
37481  # Now new_path has a complete unix path to the binary
37482  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37483    # Keep paths in /bin as-is, but remove trailing .exe if any
37484    new_path="${new_path/%.exe/}"
37485    # Do not save /bin paths to all_fixpath_prefixes!
37486  else
37487    # Not in mixed or Windows style, start by that.
37488    new_path=`cmd //c echo $new_path`
37489
37490  input_path="$new_path"
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    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37499  fi
37500
37501    # Output is in $new_path
37502
37503  windows_path="$new_path"
37504  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37505    unix_path=`$CYGPATH -u "$windows_path"`
37506    new_path="$unix_path"
37507  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37508    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37509    new_path="$unix_path"
37510  fi
37511
37512    # remove trailing .exe if any
37513    new_path="${new_path/%.exe/}"
37514
37515    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37516    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37517  fi
37518
37519  else
37520    # We're on a posix platform. Hooray! :)
37521    # First separate the path from the arguments. This will split at the first
37522    # space.
37523    complete="$STRIP"
37524    path="${complete%% *}"
37525    tmp="$complete EOL"
37526    arguments="${tmp#* }"
37527
37528    # Cannot rely on the command "which" here since it doesn't always work.
37529    is_absolute_path=`$ECHO "$path" | $GREP ^/`
37530    if test -z "$is_absolute_path"; then
37531      # Path to executable is not absolute. Find it.
37532      IFS_save="$IFS"
37533      IFS=:
37534      for p in $PATH; do
37535        if test -f "$p/$path" && test -x "$p/$path"; then
37536          new_path="$p/$path"
37537          break
37538        fi
37539      done
37540      IFS="$IFS_save"
37541    else
37542      # This is an absolute path, we can use it without further modifications.
37543      new_path="$path"
37544    fi
37545
37546    if test "x$new_path" = x; then
37547      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37548$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37549      has_space=`$ECHO "$complete" | $GREP " "`
37550      if test "x$has_space" != x; then
37551        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37552$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37553      fi
37554      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37555    fi
37556  fi
37557
37558  # Now join together the path and the arguments once again
37559  if test "x$arguments" != xEOL; then
37560    new_complete="$new_path ${arguments% *}"
37561  else
37562    new_complete="$new_path"
37563  fi
37564
37565  if test "x$complete" != "x$new_complete"; then
37566    STRIP="$new_complete"
37567    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
37568$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
37569  fi
37570
37571
37572
37573  # Publish this variable in the help.
37574
37575
37576  if test "x$NM" = x; then
37577    # The variable is not set by user, try to locate tool using the code snippet
37578    if test -n "$ac_tool_prefix"; then
37579  for ac_prog in nm
37580  do
37581    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37582set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37584$as_echo_n "checking for $ac_word... " >&6; }
37585if ${ac_cv_prog_NM+:} false; then :
37586  $as_echo_n "(cached) " >&6
37587else
37588  if test -n "$NM"; then
37589  ac_cv_prog_NM="$NM" # Let the user override the test.
37590else
37591as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37592for as_dir in $PATH
37593do
37594  IFS=$as_save_IFS
37595  test -z "$as_dir" && as_dir=.
37596    for ac_exec_ext in '' $ac_executable_extensions; do
37597  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37598    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37599    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37600    break 2
37601  fi
37602done
37603  done
37604IFS=$as_save_IFS
37605
37606fi
37607fi
37608NM=$ac_cv_prog_NM
37609if test -n "$NM"; then
37610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37611$as_echo "$NM" >&6; }
37612else
37613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37614$as_echo "no" >&6; }
37615fi
37616
37617
37618    test -n "$NM" && break
37619  done
37620fi
37621if test -z "$NM"; then
37622  ac_ct_NM=$NM
37623  for ac_prog in nm
37624do
37625  # Extract the first word of "$ac_prog", so it can be a program name with args.
37626set dummy $ac_prog; ac_word=$2
37627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37628$as_echo_n "checking for $ac_word... " >&6; }
37629if ${ac_cv_prog_ac_ct_NM+:} false; then :
37630  $as_echo_n "(cached) " >&6
37631else
37632  if test -n "$ac_ct_NM"; then
37633  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37634else
37635as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37636for as_dir in $PATH
37637do
37638  IFS=$as_save_IFS
37639  test -z "$as_dir" && as_dir=.
37640    for ac_exec_ext in '' $ac_executable_extensions; do
37641  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37642    ac_cv_prog_ac_ct_NM="$ac_prog"
37643    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37644    break 2
37645  fi
37646done
37647  done
37648IFS=$as_save_IFS
37649
37650fi
37651fi
37652ac_ct_NM=$ac_cv_prog_ac_ct_NM
37653if test -n "$ac_ct_NM"; then
37654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37655$as_echo "$ac_ct_NM" >&6; }
37656else
37657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37658$as_echo "no" >&6; }
37659fi
37660
37661
37662  test -n "$ac_ct_NM" && break
37663done
37664
37665  if test "x$ac_ct_NM" = x; then
37666    NM=""
37667  else
37668    case $cross_compiling:$ac_tool_warned in
37669yes:)
37670{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37671$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37672ac_tool_warned=yes ;;
37673esac
37674    NM=$ac_ct_NM
37675  fi
37676fi
37677
37678  else
37679    # The variable is set, but is it from the command line or the environment?
37680
37681    # Try to remove the string !NM! from our list.
37682    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
37683    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37684      # If it failed, the variable was not from the command line. Ignore it,
37685      # but warn the user (except for BASH, which is always set by the calling BASH).
37686      if test "xNM" != xBASH; then
37687        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
37688$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
37689      fi
37690      # Try to locate tool using the code snippet
37691      if test -n "$ac_tool_prefix"; then
37692  for ac_prog in nm
37693  do
37694    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37695set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37697$as_echo_n "checking for $ac_word... " >&6; }
37698if ${ac_cv_prog_NM+:} false; then :
37699  $as_echo_n "(cached) " >&6
37700else
37701  if test -n "$NM"; then
37702  ac_cv_prog_NM="$NM" # Let the user override the test.
37703else
37704as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37705for as_dir in $PATH
37706do
37707  IFS=$as_save_IFS
37708  test -z "$as_dir" && as_dir=.
37709    for ac_exec_ext in '' $ac_executable_extensions; do
37710  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37711    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37712    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37713    break 2
37714  fi
37715done
37716  done
37717IFS=$as_save_IFS
37718
37719fi
37720fi
37721NM=$ac_cv_prog_NM
37722if test -n "$NM"; then
37723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37724$as_echo "$NM" >&6; }
37725else
37726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37727$as_echo "no" >&6; }
37728fi
37729
37730
37731    test -n "$NM" && break
37732  done
37733fi
37734if test -z "$NM"; then
37735  ac_ct_NM=$NM
37736  for ac_prog in nm
37737do
37738  # Extract the first word of "$ac_prog", so it can be a program name with args.
37739set dummy $ac_prog; ac_word=$2
37740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37741$as_echo_n "checking for $ac_word... " >&6; }
37742if ${ac_cv_prog_ac_ct_NM+:} false; then :
37743  $as_echo_n "(cached) " >&6
37744else
37745  if test -n "$ac_ct_NM"; then
37746  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37747else
37748as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37749for as_dir in $PATH
37750do
37751  IFS=$as_save_IFS
37752  test -z "$as_dir" && as_dir=.
37753    for ac_exec_ext in '' $ac_executable_extensions; do
37754  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37755    ac_cv_prog_ac_ct_NM="$ac_prog"
37756    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37757    break 2
37758  fi
37759done
37760  done
37761IFS=$as_save_IFS
37762
37763fi
37764fi
37765ac_ct_NM=$ac_cv_prog_ac_ct_NM
37766if test -n "$ac_ct_NM"; then
37767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37768$as_echo "$ac_ct_NM" >&6; }
37769else
37770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37771$as_echo "no" >&6; }
37772fi
37773
37774
37775  test -n "$ac_ct_NM" && break
37776done
37777
37778  if test "x$ac_ct_NM" = x; then
37779    NM=""
37780  else
37781    case $cross_compiling:$ac_tool_warned in
37782yes:)
37783{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37784$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37785ac_tool_warned=yes ;;
37786esac
37787    NM=$ac_ct_NM
37788  fi
37789fi
37790
37791    else
37792      # If it succeeded, then it was overridden by the user. We will use it
37793      # for the tool.
37794
37795      # First remove it from the list of overridden variables, so we can test
37796      # for unknown variables in the end.
37797      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37798
37799      # Check if the provided tool contains a complete path.
37800      tool_specified="$NM"
37801      tool_basename="${tool_specified##*/}"
37802      if test "x$tool_basename" = "x$tool_specified"; then
37803        # A command without a complete path is provided, search $PATH.
37804        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
37805$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
37806        # Extract the first word of "$tool_basename", so it can be a program name with args.
37807set dummy $tool_basename; ac_word=$2
37808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37809$as_echo_n "checking for $ac_word... " >&6; }
37810if ${ac_cv_path_NM+:} false; then :
37811  $as_echo_n "(cached) " >&6
37812else
37813  case $NM in
37814  [\\/]* | ?:[\\/]*)
37815  ac_cv_path_NM="$NM" # Let the user override the test with a path.
37816  ;;
37817  *)
37818  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37819for as_dir in $PATH
37820do
37821  IFS=$as_save_IFS
37822  test -z "$as_dir" && as_dir=.
37823    for ac_exec_ext in '' $ac_executable_extensions; do
37824  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37825    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
37826    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37827    break 2
37828  fi
37829done
37830  done
37831IFS=$as_save_IFS
37832
37833  ;;
37834esac
37835fi
37836NM=$ac_cv_path_NM
37837if test -n "$NM"; then
37838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37839$as_echo "$NM" >&6; }
37840else
37841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37842$as_echo "no" >&6; }
37843fi
37844
37845
37846        if test "x$NM" = x; then
37847          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37848        fi
37849      else
37850        # Otherwise we believe it is a complete path. Use it as it is.
37851        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
37852$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
37853        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
37854$as_echo_n "checking for NM... " >&6; }
37855        if test ! -x "$tool_specified"; then
37856          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37857$as_echo "not found" >&6; }
37858          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
37859        fi
37860        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37861$as_echo "$tool_specified" >&6; }
37862      fi
37863    fi
37864  fi
37865
37866
37867
37868  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37869
37870  # First separate the path from the arguments. This will split at the first
37871  # space.
37872  complete="$NM"
37873  path="${complete%% *}"
37874  tmp="$complete EOL"
37875  arguments="${tmp#* }"
37876
37877  # Input might be given as Windows format, start by converting to
37878  # unix format.
37879  new_path=`$CYGPATH -u "$path"`
37880
37881  # Now try to locate executable using which
37882  new_path=`$WHICH "$new_path" 2> /dev/null`
37883  # bat and cmd files are not always considered executable in cygwin causing which
37884  # to not find them
37885  if test "x$new_path" = x \
37886      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37887      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37888    new_path=`$CYGPATH -u "$path"`
37889  fi
37890  if test "x$new_path" = x; then
37891    # Oops. Which didn't find the executable.
37892    # The splitting of arguments from the executable at a space might have been incorrect,
37893    # since paths with space are more likely in Windows. Give it another try with the whole
37894    # argument.
37895    path="$complete"
37896    arguments="EOL"
37897    new_path=`$CYGPATH -u "$path"`
37898    new_path=`$WHICH "$new_path" 2> /dev/null`
37899    # bat and cmd files are not always considered executable in cygwin causing which
37900    # to not find them
37901    if test "x$new_path" = x \
37902        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37903        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37904      new_path=`$CYGPATH -u "$path"`
37905    fi
37906    if test "x$new_path" = x; then
37907      # It's still not found. Now this is an unrecoverable error.
37908      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37909$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37910      has_space=`$ECHO "$complete" | $GREP " "`
37911      if test "x$has_space" != x; then
37912        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37913$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37914      fi
37915      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37916    fi
37917  fi
37918
37919  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37920  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37921  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37922  # "foo.exe" is OK but "foo" is an error.
37923  #
37924  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37925  # It is also a way to make sure we got the proper file name for the real test later on.
37926  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37927  if test "x$test_shortpath" = x; then
37928    # Short path failed, file does not exist as specified.
37929    # Try adding .exe or .cmd
37930    if test -f "${new_path}.exe"; then
37931      input_to_shortpath="${new_path}.exe"
37932    elif test -f "${new_path}.cmd"; then
37933      input_to_shortpath="${new_path}.cmd"
37934    else
37935      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
37936$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
37937      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37938$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37939      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37940    fi
37941  else
37942    input_to_shortpath="$new_path"
37943  fi
37944
37945  # Call helper function which possibly converts this using DOS-style short mode.
37946  # If so, the updated path is stored in $new_path.
37947  new_path="$input_to_shortpath"
37948
37949  input_path="$input_to_shortpath"
37950  # Check if we need to convert this using DOS-style short mode. If the path
37951  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37952  # take no chances and rewrite it.
37953  # Note: m4 eats our [], so we need to use [ and ] instead.
37954  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37955  if test "x$has_forbidden_chars" != x; then
37956    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37957    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37958    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37959    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37960      # Going to short mode and back again did indeed matter. Since short mode is
37961      # case insensitive, let's make it lowercase to improve readability.
37962      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37963      # Now convert it back to Unix-stile (cygpath)
37964      input_path=`$CYGPATH -u "$shortmode_path"`
37965      new_path="$input_path"
37966    fi
37967  fi
37968
37969  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37970  if test "x$test_cygdrive_prefix" = x; then
37971    # As a simple fix, exclude /usr/bin since it's not a real path.
37972    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37973      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37974      # a path prefixed by /cygdrive for fixpath to work.
37975      new_path="$CYGWIN_ROOT_PATH$input_path"
37976    fi
37977  fi
37978
37979  # remove trailing .exe if any
37980  new_path="${new_path/%.exe/}"
37981
37982  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37983
37984  # First separate the path from the arguments. This will split at the first
37985  # space.
37986  complete="$NM"
37987  path="${complete%% *}"
37988  tmp="$complete EOL"
37989  arguments="${tmp#* }"
37990
37991  # Input might be given as Windows format, start by converting to
37992  # unix format.
37993  new_path="$path"
37994
37995  windows_path="$new_path"
37996  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37997    unix_path=`$CYGPATH -u "$windows_path"`
37998    new_path="$unix_path"
37999  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38000    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38001    new_path="$unix_path"
38002  fi
38003
38004
38005  # Now try to locate executable using which
38006  new_path=`$WHICH "$new_path" 2> /dev/null`
38007
38008  if test "x$new_path" = x; then
38009    # Oops. Which didn't find the executable.
38010    # The splitting of arguments from the executable at a space might have been incorrect,
38011    # since paths with space are more likely in Windows. Give it another try with the whole
38012    # argument.
38013    path="$complete"
38014    arguments="EOL"
38015    new_path="$path"
38016
38017  windows_path="$new_path"
38018  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38019    unix_path=`$CYGPATH -u "$windows_path"`
38020    new_path="$unix_path"
38021  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38022    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38023    new_path="$unix_path"
38024  fi
38025
38026
38027    new_path=`$WHICH "$new_path" 2> /dev/null`
38028    # bat and cmd files are not always considered executable in MSYS causing which
38029    # to not find them
38030    if test "x$new_path" = x \
38031        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38032        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38033      new_path="$path"
38034
38035  windows_path="$new_path"
38036  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38037    unix_path=`$CYGPATH -u "$windows_path"`
38038    new_path="$unix_path"
38039  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38040    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38041    new_path="$unix_path"
38042  fi
38043
38044    fi
38045
38046    if test "x$new_path" = x; then
38047      # It's still not found. Now this is an unrecoverable error.
38048      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38049$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38050      has_space=`$ECHO "$complete" | $GREP " "`
38051      if test "x$has_space" != x; then
38052        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38053$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38054      fi
38055      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38056    fi
38057  fi
38058
38059  # Now new_path has a complete unix path to the binary
38060  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38061    # Keep paths in /bin as-is, but remove trailing .exe if any
38062    new_path="${new_path/%.exe/}"
38063    # Do not save /bin paths to all_fixpath_prefixes!
38064  else
38065    # Not in mixed or Windows style, start by that.
38066    new_path=`cmd //c echo $new_path`
38067
38068  input_path="$new_path"
38069  # Check if we need to convert this using DOS-style short mode. If the path
38070  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38071  # take no chances and rewrite it.
38072  # Note: m4 eats our [], so we need to use [ and ] instead.
38073  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38074  if test "x$has_forbidden_chars" != x; then
38075    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38076    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38077  fi
38078
38079    # Output is in $new_path
38080
38081  windows_path="$new_path"
38082  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38083    unix_path=`$CYGPATH -u "$windows_path"`
38084    new_path="$unix_path"
38085  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38086    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38087    new_path="$unix_path"
38088  fi
38089
38090    # remove trailing .exe if any
38091    new_path="${new_path/%.exe/}"
38092
38093    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38094    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38095  fi
38096
38097  else
38098    # We're on a posix platform. Hooray! :)
38099    # First separate the path from the arguments. This will split at the first
38100    # space.
38101    complete="$NM"
38102    path="${complete%% *}"
38103    tmp="$complete EOL"
38104    arguments="${tmp#* }"
38105
38106    # Cannot rely on the command "which" here since it doesn't always work.
38107    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38108    if test -z "$is_absolute_path"; then
38109      # Path to executable is not absolute. Find it.
38110      IFS_save="$IFS"
38111      IFS=:
38112      for p in $PATH; do
38113        if test -f "$p/$path" && test -x "$p/$path"; then
38114          new_path="$p/$path"
38115          break
38116        fi
38117      done
38118      IFS="$IFS_save"
38119    else
38120      # This is an absolute path, we can use it without further modifications.
38121      new_path="$path"
38122    fi
38123
38124    if test "x$new_path" = x; then
38125      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38126$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38127      has_space=`$ECHO "$complete" | $GREP " "`
38128      if test "x$has_space" != x; then
38129        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38130$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38131      fi
38132      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38133    fi
38134  fi
38135
38136  # Now join together the path and the arguments once again
38137  if test "x$arguments" != xEOL; then
38138    new_complete="$new_path ${arguments% *}"
38139  else
38140    new_complete="$new_path"
38141  fi
38142
38143  if test "x$complete" != "x$new_complete"; then
38144    NM="$new_complete"
38145    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
38146$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
38147  fi
38148
38149    GNM="$NM"
38150
38151  fi
38152
38153  # objcopy is used for moving debug symbols to separate files when
38154  # full debug symbols are enabled.
38155  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
38156
38157
38158  # Publish this variable in the help.
38159
38160
38161  if test "x$OBJCOPY" = x; then
38162    # The variable is not set by user, try to locate tool using the code snippet
38163    if test -n "$ac_tool_prefix"; then
38164  for ac_prog in gobjcopy objcopy
38165  do
38166    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38167set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38169$as_echo_n "checking for $ac_word... " >&6; }
38170if ${ac_cv_prog_OBJCOPY+:} false; then :
38171  $as_echo_n "(cached) " >&6
38172else
38173  if test -n "$OBJCOPY"; then
38174  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38175else
38176as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38177for as_dir in $PATH
38178do
38179  IFS=$as_save_IFS
38180  test -z "$as_dir" && as_dir=.
38181    for ac_exec_ext in '' $ac_executable_extensions; do
38182  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38183    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38184    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38185    break 2
38186  fi
38187done
38188  done
38189IFS=$as_save_IFS
38190
38191fi
38192fi
38193OBJCOPY=$ac_cv_prog_OBJCOPY
38194if test -n "$OBJCOPY"; then
38195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38196$as_echo "$OBJCOPY" >&6; }
38197else
38198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38199$as_echo "no" >&6; }
38200fi
38201
38202
38203    test -n "$OBJCOPY" && break
38204  done
38205fi
38206if test -z "$OBJCOPY"; then
38207  ac_ct_OBJCOPY=$OBJCOPY
38208  for ac_prog in gobjcopy objcopy
38209do
38210  # Extract the first word of "$ac_prog", so it can be a program name with args.
38211set dummy $ac_prog; ac_word=$2
38212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38213$as_echo_n "checking for $ac_word... " >&6; }
38214if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38215  $as_echo_n "(cached) " >&6
38216else
38217  if test -n "$ac_ct_OBJCOPY"; then
38218  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38219else
38220as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38221for as_dir in $PATH
38222do
38223  IFS=$as_save_IFS
38224  test -z "$as_dir" && as_dir=.
38225    for ac_exec_ext in '' $ac_executable_extensions; do
38226  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38227    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38228    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38229    break 2
38230  fi
38231done
38232  done
38233IFS=$as_save_IFS
38234
38235fi
38236fi
38237ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38238if test -n "$ac_ct_OBJCOPY"; then
38239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38240$as_echo "$ac_ct_OBJCOPY" >&6; }
38241else
38242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38243$as_echo "no" >&6; }
38244fi
38245
38246
38247  test -n "$ac_ct_OBJCOPY" && break
38248done
38249
38250  if test "x$ac_ct_OBJCOPY" = x; then
38251    OBJCOPY=""
38252  else
38253    case $cross_compiling:$ac_tool_warned in
38254yes:)
38255{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38256$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38257ac_tool_warned=yes ;;
38258esac
38259    OBJCOPY=$ac_ct_OBJCOPY
38260  fi
38261fi
38262
38263  else
38264    # The variable is set, but is it from the command line or the environment?
38265
38266    # Try to remove the string !OBJCOPY! from our list.
38267    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
38268    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38269      # If it failed, the variable was not from the command line. Ignore it,
38270      # but warn the user (except for BASH, which is always set by the calling BASH).
38271      if test "xOBJCOPY" != xBASH; then
38272        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
38273$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
38274      fi
38275      # Try to locate tool using the code snippet
38276      if test -n "$ac_tool_prefix"; then
38277  for ac_prog in gobjcopy objcopy
38278  do
38279    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38280set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38282$as_echo_n "checking for $ac_word... " >&6; }
38283if ${ac_cv_prog_OBJCOPY+:} false; then :
38284  $as_echo_n "(cached) " >&6
38285else
38286  if test -n "$OBJCOPY"; then
38287  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38288else
38289as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38290for as_dir in $PATH
38291do
38292  IFS=$as_save_IFS
38293  test -z "$as_dir" && as_dir=.
38294    for ac_exec_ext in '' $ac_executable_extensions; do
38295  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38296    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38297    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38298    break 2
38299  fi
38300done
38301  done
38302IFS=$as_save_IFS
38303
38304fi
38305fi
38306OBJCOPY=$ac_cv_prog_OBJCOPY
38307if test -n "$OBJCOPY"; then
38308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38309$as_echo "$OBJCOPY" >&6; }
38310else
38311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38312$as_echo "no" >&6; }
38313fi
38314
38315
38316    test -n "$OBJCOPY" && break
38317  done
38318fi
38319if test -z "$OBJCOPY"; then
38320  ac_ct_OBJCOPY=$OBJCOPY
38321  for ac_prog in gobjcopy objcopy
38322do
38323  # Extract the first word of "$ac_prog", so it can be a program name with args.
38324set dummy $ac_prog; ac_word=$2
38325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38326$as_echo_n "checking for $ac_word... " >&6; }
38327if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38328  $as_echo_n "(cached) " >&6
38329else
38330  if test -n "$ac_ct_OBJCOPY"; then
38331  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38332else
38333as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38334for as_dir in $PATH
38335do
38336  IFS=$as_save_IFS
38337  test -z "$as_dir" && as_dir=.
38338    for ac_exec_ext in '' $ac_executable_extensions; do
38339  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38340    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38341    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38342    break 2
38343  fi
38344done
38345  done
38346IFS=$as_save_IFS
38347
38348fi
38349fi
38350ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38351if test -n "$ac_ct_OBJCOPY"; then
38352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38353$as_echo "$ac_ct_OBJCOPY" >&6; }
38354else
38355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38356$as_echo "no" >&6; }
38357fi
38358
38359
38360  test -n "$ac_ct_OBJCOPY" && break
38361done
38362
38363  if test "x$ac_ct_OBJCOPY" = x; then
38364    OBJCOPY=""
38365  else
38366    case $cross_compiling:$ac_tool_warned in
38367yes:)
38368{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38369$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38370ac_tool_warned=yes ;;
38371esac
38372    OBJCOPY=$ac_ct_OBJCOPY
38373  fi
38374fi
38375
38376    else
38377      # If it succeeded, then it was overridden by the user. We will use it
38378      # for the tool.
38379
38380      # First remove it from the list of overridden variables, so we can test
38381      # for unknown variables in the end.
38382      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38383
38384      # Check if the provided tool contains a complete path.
38385      tool_specified="$OBJCOPY"
38386      tool_basename="${tool_specified##*/}"
38387      if test "x$tool_basename" = "x$tool_specified"; then
38388        # A command without a complete path is provided, search $PATH.
38389        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
38390$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
38391        # Extract the first word of "$tool_basename", so it can be a program name with args.
38392set dummy $tool_basename; ac_word=$2
38393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38394$as_echo_n "checking for $ac_word... " >&6; }
38395if ${ac_cv_path_OBJCOPY+:} false; then :
38396  $as_echo_n "(cached) " >&6
38397else
38398  case $OBJCOPY in
38399  [\\/]* | ?:[\\/]*)
38400  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
38401  ;;
38402  *)
38403  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38404for as_dir in $PATH
38405do
38406  IFS=$as_save_IFS
38407  test -z "$as_dir" && as_dir=.
38408    for ac_exec_ext in '' $ac_executable_extensions; do
38409  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38410    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
38411    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38412    break 2
38413  fi
38414done
38415  done
38416IFS=$as_save_IFS
38417
38418  ;;
38419esac
38420fi
38421OBJCOPY=$ac_cv_path_OBJCOPY
38422if test -n "$OBJCOPY"; then
38423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38424$as_echo "$OBJCOPY" >&6; }
38425else
38426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38427$as_echo "no" >&6; }
38428fi
38429
38430
38431        if test "x$OBJCOPY" = x; then
38432          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38433        fi
38434      else
38435        # Otherwise we believe it is a complete path. Use it as it is.
38436        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
38437$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
38438        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
38439$as_echo_n "checking for OBJCOPY... " >&6; }
38440        if test ! -x "$tool_specified"; then
38441          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38442$as_echo "not found" >&6; }
38443          as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
38444        fi
38445        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38446$as_echo "$tool_specified" >&6; }
38447      fi
38448    fi
38449  fi
38450
38451
38452    # Only call fixup if objcopy was found.
38453    if test -n "$OBJCOPY"; then
38454
38455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38456
38457  # First separate the path from the arguments. This will split at the first
38458  # space.
38459  complete="$OBJCOPY"
38460  path="${complete%% *}"
38461  tmp="$complete EOL"
38462  arguments="${tmp#* }"
38463
38464  # Input might be given as Windows format, start by converting to
38465  # unix format.
38466  new_path=`$CYGPATH -u "$path"`
38467
38468  # Now try to locate executable using which
38469  new_path=`$WHICH "$new_path" 2> /dev/null`
38470  # bat and cmd files are not always considered executable in cygwin causing which
38471  # to not find them
38472  if test "x$new_path" = x \
38473      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38474      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38475    new_path=`$CYGPATH -u "$path"`
38476  fi
38477  if test "x$new_path" = x; then
38478    # Oops. Which didn't find the executable.
38479    # The splitting of arguments from the executable at a space might have been incorrect,
38480    # since paths with space are more likely in Windows. Give it another try with the whole
38481    # argument.
38482    path="$complete"
38483    arguments="EOL"
38484    new_path=`$CYGPATH -u "$path"`
38485    new_path=`$WHICH "$new_path" 2> /dev/null`
38486    # bat and cmd files are not always considered executable in cygwin causing which
38487    # to not find them
38488    if test "x$new_path" = x \
38489        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38490        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38491      new_path=`$CYGPATH -u "$path"`
38492    fi
38493    if test "x$new_path" = x; then
38494      # It's still not found. Now this is an unrecoverable error.
38495      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38496$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38497      has_space=`$ECHO "$complete" | $GREP " "`
38498      if test "x$has_space" != x; then
38499        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38500$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38501      fi
38502      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38503    fi
38504  fi
38505
38506  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38507  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38508  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38509  # "foo.exe" is OK but "foo" is an error.
38510  #
38511  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38512  # It is also a way to make sure we got the proper file name for the real test later on.
38513  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38514  if test "x$test_shortpath" = x; then
38515    # Short path failed, file does not exist as specified.
38516    # Try adding .exe or .cmd
38517    if test -f "${new_path}.exe"; then
38518      input_to_shortpath="${new_path}.exe"
38519    elif test -f "${new_path}.cmd"; then
38520      input_to_shortpath="${new_path}.cmd"
38521    else
38522      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
38523$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
38524      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38525$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38526      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38527    fi
38528  else
38529    input_to_shortpath="$new_path"
38530  fi
38531
38532  # Call helper function which possibly converts this using DOS-style short mode.
38533  # If so, the updated path is stored in $new_path.
38534  new_path="$input_to_shortpath"
38535
38536  input_path="$input_to_shortpath"
38537  # Check if we need to convert this using DOS-style short mode. If the path
38538  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38539  # take no chances and rewrite it.
38540  # Note: m4 eats our [], so we need to use [ and ] instead.
38541  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38542  if test "x$has_forbidden_chars" != x; then
38543    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38544    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38545    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38546    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38547      # Going to short mode and back again did indeed matter. Since short mode is
38548      # case insensitive, let's make it lowercase to improve readability.
38549      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38550      # Now convert it back to Unix-stile (cygpath)
38551      input_path=`$CYGPATH -u "$shortmode_path"`
38552      new_path="$input_path"
38553    fi
38554  fi
38555
38556  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38557  if test "x$test_cygdrive_prefix" = x; then
38558    # As a simple fix, exclude /usr/bin since it's not a real path.
38559    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38560      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38561      # a path prefixed by /cygdrive for fixpath to work.
38562      new_path="$CYGWIN_ROOT_PATH$input_path"
38563    fi
38564  fi
38565
38566  # remove trailing .exe if any
38567  new_path="${new_path/%.exe/}"
38568
38569  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38570
38571  # First separate the path from the arguments. This will split at the first
38572  # space.
38573  complete="$OBJCOPY"
38574  path="${complete%% *}"
38575  tmp="$complete EOL"
38576  arguments="${tmp#* }"
38577
38578  # Input might be given as Windows format, start by converting to
38579  # unix format.
38580  new_path="$path"
38581
38582  windows_path="$new_path"
38583  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38584    unix_path=`$CYGPATH -u "$windows_path"`
38585    new_path="$unix_path"
38586  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38587    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38588    new_path="$unix_path"
38589  fi
38590
38591
38592  # Now try to locate executable using which
38593  new_path=`$WHICH "$new_path" 2> /dev/null`
38594
38595  if test "x$new_path" = x; then
38596    # Oops. Which didn't find the executable.
38597    # The splitting of arguments from the executable at a space might have been incorrect,
38598    # since paths with space are more likely in Windows. Give it another try with the whole
38599    # argument.
38600    path="$complete"
38601    arguments="EOL"
38602    new_path="$path"
38603
38604  windows_path="$new_path"
38605  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38606    unix_path=`$CYGPATH -u "$windows_path"`
38607    new_path="$unix_path"
38608  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38609    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38610    new_path="$unix_path"
38611  fi
38612
38613
38614    new_path=`$WHICH "$new_path" 2> /dev/null`
38615    # bat and cmd files are not always considered executable in MSYS causing which
38616    # to not find them
38617    if test "x$new_path" = x \
38618        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38619        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38620      new_path="$path"
38621
38622  windows_path="$new_path"
38623  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38624    unix_path=`$CYGPATH -u "$windows_path"`
38625    new_path="$unix_path"
38626  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38627    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38628    new_path="$unix_path"
38629  fi
38630
38631    fi
38632
38633    if test "x$new_path" = x; then
38634      # It's still not found. Now this is an unrecoverable error.
38635      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38636$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38637      has_space=`$ECHO "$complete" | $GREP " "`
38638      if test "x$has_space" != x; then
38639        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38640$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38641      fi
38642      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38643    fi
38644  fi
38645
38646  # Now new_path has a complete unix path to the binary
38647  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38648    # Keep paths in /bin as-is, but remove trailing .exe if any
38649    new_path="${new_path/%.exe/}"
38650    # Do not save /bin paths to all_fixpath_prefixes!
38651  else
38652    # Not in mixed or Windows style, start by that.
38653    new_path=`cmd //c echo $new_path`
38654
38655  input_path="$new_path"
38656  # Check if we need to convert this using DOS-style short mode. If the path
38657  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38658  # take no chances and rewrite it.
38659  # Note: m4 eats our [], so we need to use [ and ] instead.
38660  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38661  if test "x$has_forbidden_chars" != x; then
38662    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38663    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38664  fi
38665
38666    # Output is in $new_path
38667
38668  windows_path="$new_path"
38669  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38670    unix_path=`$CYGPATH -u "$windows_path"`
38671    new_path="$unix_path"
38672  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38673    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38674    new_path="$unix_path"
38675  fi
38676
38677    # remove trailing .exe if any
38678    new_path="${new_path/%.exe/}"
38679
38680    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38681    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38682  fi
38683
38684  else
38685    # We're on a posix platform. Hooray! :)
38686    # First separate the path from the arguments. This will split at the first
38687    # space.
38688    complete="$OBJCOPY"
38689    path="${complete%% *}"
38690    tmp="$complete EOL"
38691    arguments="${tmp#* }"
38692
38693    # Cannot rely on the command "which" here since it doesn't always work.
38694    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38695    if test -z "$is_absolute_path"; then
38696      # Path to executable is not absolute. Find it.
38697      IFS_save="$IFS"
38698      IFS=:
38699      for p in $PATH; do
38700        if test -f "$p/$path" && test -x "$p/$path"; then
38701          new_path="$p/$path"
38702          break
38703        fi
38704      done
38705      IFS="$IFS_save"
38706    else
38707      # This is an absolute path, we can use it without further modifications.
38708      new_path="$path"
38709    fi
38710
38711    if test "x$new_path" = x; then
38712      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38713$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38714      has_space=`$ECHO "$complete" | $GREP " "`
38715      if test "x$has_space" != x; then
38716        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38717$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38718      fi
38719      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38720    fi
38721  fi
38722
38723  # Now join together the path and the arguments once again
38724  if test "x$arguments" != xEOL; then
38725    new_complete="$new_path ${arguments% *}"
38726  else
38727    new_complete="$new_path"
38728  fi
38729
38730  if test "x$complete" != "x$new_complete"; then
38731    OBJCOPY="$new_complete"
38732    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38733$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38734  fi
38735
38736    fi
38737  fi
38738
38739
38740
38741  # Publish this variable in the help.
38742
38743
38744  if test "x$OBJDUMP" = x; then
38745    # The variable is not set by user, try to locate tool using the code snippet
38746    if test -n "$ac_tool_prefix"; then
38747  for ac_prog in gobjdump objdump
38748  do
38749    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38750set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38752$as_echo_n "checking for $ac_word... " >&6; }
38753if ${ac_cv_prog_OBJDUMP+:} false; then :
38754  $as_echo_n "(cached) " >&6
38755else
38756  if test -n "$OBJDUMP"; then
38757  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38758else
38759as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38760for as_dir in $PATH
38761do
38762  IFS=$as_save_IFS
38763  test -z "$as_dir" && as_dir=.
38764    for ac_exec_ext in '' $ac_executable_extensions; do
38765  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38766    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38767    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38768    break 2
38769  fi
38770done
38771  done
38772IFS=$as_save_IFS
38773
38774fi
38775fi
38776OBJDUMP=$ac_cv_prog_OBJDUMP
38777if test -n "$OBJDUMP"; then
38778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38779$as_echo "$OBJDUMP" >&6; }
38780else
38781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38782$as_echo "no" >&6; }
38783fi
38784
38785
38786    test -n "$OBJDUMP" && break
38787  done
38788fi
38789if test -z "$OBJDUMP"; then
38790  ac_ct_OBJDUMP=$OBJDUMP
38791  for ac_prog in gobjdump objdump
38792do
38793  # Extract the first word of "$ac_prog", so it can be a program name with args.
38794set dummy $ac_prog; ac_word=$2
38795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38796$as_echo_n "checking for $ac_word... " >&6; }
38797if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38798  $as_echo_n "(cached) " >&6
38799else
38800  if test -n "$ac_ct_OBJDUMP"; then
38801  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38802else
38803as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38804for as_dir in $PATH
38805do
38806  IFS=$as_save_IFS
38807  test -z "$as_dir" && as_dir=.
38808    for ac_exec_ext in '' $ac_executable_extensions; do
38809  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38810    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38811    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38812    break 2
38813  fi
38814done
38815  done
38816IFS=$as_save_IFS
38817
38818fi
38819fi
38820ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38821if test -n "$ac_ct_OBJDUMP"; then
38822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38823$as_echo "$ac_ct_OBJDUMP" >&6; }
38824else
38825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38826$as_echo "no" >&6; }
38827fi
38828
38829
38830  test -n "$ac_ct_OBJDUMP" && break
38831done
38832
38833  if test "x$ac_ct_OBJDUMP" = x; then
38834    OBJDUMP=""
38835  else
38836    case $cross_compiling:$ac_tool_warned in
38837yes:)
38838{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38839$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38840ac_tool_warned=yes ;;
38841esac
38842    OBJDUMP=$ac_ct_OBJDUMP
38843  fi
38844fi
38845
38846  else
38847    # The variable is set, but is it from the command line or the environment?
38848
38849    # Try to remove the string !OBJDUMP! from our list.
38850    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
38851    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38852      # If it failed, the variable was not from the command line. Ignore it,
38853      # but warn the user (except for BASH, which is always set by the calling BASH).
38854      if test "xOBJDUMP" != xBASH; then
38855        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
38856$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
38857      fi
38858      # Try to locate tool using the code snippet
38859      if test -n "$ac_tool_prefix"; then
38860  for ac_prog in gobjdump objdump
38861  do
38862    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38863set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38865$as_echo_n "checking for $ac_word... " >&6; }
38866if ${ac_cv_prog_OBJDUMP+:} false; then :
38867  $as_echo_n "(cached) " >&6
38868else
38869  if test -n "$OBJDUMP"; then
38870  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38871else
38872as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38873for as_dir in $PATH
38874do
38875  IFS=$as_save_IFS
38876  test -z "$as_dir" && as_dir=.
38877    for ac_exec_ext in '' $ac_executable_extensions; do
38878  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38879    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38880    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38881    break 2
38882  fi
38883done
38884  done
38885IFS=$as_save_IFS
38886
38887fi
38888fi
38889OBJDUMP=$ac_cv_prog_OBJDUMP
38890if test -n "$OBJDUMP"; then
38891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38892$as_echo "$OBJDUMP" >&6; }
38893else
38894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38895$as_echo "no" >&6; }
38896fi
38897
38898
38899    test -n "$OBJDUMP" && break
38900  done
38901fi
38902if test -z "$OBJDUMP"; then
38903  ac_ct_OBJDUMP=$OBJDUMP
38904  for ac_prog in gobjdump objdump
38905do
38906  # Extract the first word of "$ac_prog", so it can be a program name with args.
38907set dummy $ac_prog; ac_word=$2
38908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38909$as_echo_n "checking for $ac_word... " >&6; }
38910if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38911  $as_echo_n "(cached) " >&6
38912else
38913  if test -n "$ac_ct_OBJDUMP"; then
38914  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38915else
38916as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38917for as_dir in $PATH
38918do
38919  IFS=$as_save_IFS
38920  test -z "$as_dir" && as_dir=.
38921    for ac_exec_ext in '' $ac_executable_extensions; do
38922  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38923    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38924    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38925    break 2
38926  fi
38927done
38928  done
38929IFS=$as_save_IFS
38930
38931fi
38932fi
38933ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38934if test -n "$ac_ct_OBJDUMP"; then
38935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38936$as_echo "$ac_ct_OBJDUMP" >&6; }
38937else
38938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38939$as_echo "no" >&6; }
38940fi
38941
38942
38943  test -n "$ac_ct_OBJDUMP" && break
38944done
38945
38946  if test "x$ac_ct_OBJDUMP" = x; then
38947    OBJDUMP=""
38948  else
38949    case $cross_compiling:$ac_tool_warned in
38950yes:)
38951{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38952$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38953ac_tool_warned=yes ;;
38954esac
38955    OBJDUMP=$ac_ct_OBJDUMP
38956  fi
38957fi
38958
38959    else
38960      # If it succeeded, then it was overridden by the user. We will use it
38961      # for the tool.
38962
38963      # First remove it from the list of overridden variables, so we can test
38964      # for unknown variables in the end.
38965      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38966
38967      # Check if the provided tool contains a complete path.
38968      tool_specified="$OBJDUMP"
38969      tool_basename="${tool_specified##*/}"
38970      if test "x$tool_basename" = "x$tool_specified"; then
38971        # A command without a complete path is provided, search $PATH.
38972        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
38973$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
38974        # Extract the first word of "$tool_basename", so it can be a program name with args.
38975set dummy $tool_basename; ac_word=$2
38976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38977$as_echo_n "checking for $ac_word... " >&6; }
38978if ${ac_cv_path_OBJDUMP+:} false; then :
38979  $as_echo_n "(cached) " >&6
38980else
38981  case $OBJDUMP in
38982  [\\/]* | ?:[\\/]*)
38983  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
38984  ;;
38985  *)
38986  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38987for as_dir in $PATH
38988do
38989  IFS=$as_save_IFS
38990  test -z "$as_dir" && as_dir=.
38991    for ac_exec_ext in '' $ac_executable_extensions; do
38992  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38993    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
38994    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38995    break 2
38996  fi
38997done
38998  done
38999IFS=$as_save_IFS
39000
39001  ;;
39002esac
39003fi
39004OBJDUMP=$ac_cv_path_OBJDUMP
39005if test -n "$OBJDUMP"; then
39006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
39007$as_echo "$OBJDUMP" >&6; }
39008else
39009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39010$as_echo "no" >&6; }
39011fi
39012
39013
39014        if test "x$OBJDUMP" = x; then
39015          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39016        fi
39017      else
39018        # Otherwise we believe it is a complete path. Use it as it is.
39019        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
39020$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
39021        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
39022$as_echo_n "checking for OBJDUMP... " >&6; }
39023        if test ! -x "$tool_specified"; then
39024          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39025$as_echo "not found" >&6; }
39026          as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
39027        fi
39028        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39029$as_echo "$tool_specified" >&6; }
39030      fi
39031    fi
39032  fi
39033
39034
39035  if test "x$OBJDUMP" != x; then
39036    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
39037    # bails if argument is missing.
39038
39039  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39040
39041  # First separate the path from the arguments. This will split at the first
39042  # space.
39043  complete="$OBJDUMP"
39044  path="${complete%% *}"
39045  tmp="$complete EOL"
39046  arguments="${tmp#* }"
39047
39048  # Input might be given as Windows format, start by converting to
39049  # unix format.
39050  new_path=`$CYGPATH -u "$path"`
39051
39052  # Now try to locate executable using which
39053  new_path=`$WHICH "$new_path" 2> /dev/null`
39054  # bat and cmd files are not always considered executable in cygwin causing which
39055  # to not find them
39056  if test "x$new_path" = x \
39057      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39058      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39059    new_path=`$CYGPATH -u "$path"`
39060  fi
39061  if test "x$new_path" = x; then
39062    # Oops. Which didn't find the executable.
39063    # The splitting of arguments from the executable at a space might have been incorrect,
39064    # since paths with space are more likely in Windows. Give it another try with the whole
39065    # argument.
39066    path="$complete"
39067    arguments="EOL"
39068    new_path=`$CYGPATH -u "$path"`
39069    new_path=`$WHICH "$new_path" 2> /dev/null`
39070    # bat and cmd files are not always considered executable in cygwin causing which
39071    # to not find them
39072    if test "x$new_path" = x \
39073        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39074        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39075      new_path=`$CYGPATH -u "$path"`
39076    fi
39077    if test "x$new_path" = x; then
39078      # It's still not found. Now this is an unrecoverable error.
39079      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39080$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39081      has_space=`$ECHO "$complete" | $GREP " "`
39082      if test "x$has_space" != x; then
39083        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39084$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39085      fi
39086      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39087    fi
39088  fi
39089
39090  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39091  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39092  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39093  # "foo.exe" is OK but "foo" is an error.
39094  #
39095  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39096  # It is also a way to make sure we got the proper file name for the real test later on.
39097  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39098  if test "x$test_shortpath" = x; then
39099    # Short path failed, file does not exist as specified.
39100    # Try adding .exe or .cmd
39101    if test -f "${new_path}.exe"; then
39102      input_to_shortpath="${new_path}.exe"
39103    elif test -f "${new_path}.cmd"; then
39104      input_to_shortpath="${new_path}.cmd"
39105    else
39106      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
39107$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
39108      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39109$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39110      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39111    fi
39112  else
39113    input_to_shortpath="$new_path"
39114  fi
39115
39116  # Call helper function which possibly converts this using DOS-style short mode.
39117  # If so, the updated path is stored in $new_path.
39118  new_path="$input_to_shortpath"
39119
39120  input_path="$input_to_shortpath"
39121  # Check if we need to convert this using DOS-style short mode. If the path
39122  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39123  # take no chances and rewrite it.
39124  # Note: m4 eats our [], so we need to use [ and ] instead.
39125  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39126  if test "x$has_forbidden_chars" != x; then
39127    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39128    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39129    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39130    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39131      # Going to short mode and back again did indeed matter. Since short mode is
39132      # case insensitive, let's make it lowercase to improve readability.
39133      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39134      # Now convert it back to Unix-stile (cygpath)
39135      input_path=`$CYGPATH -u "$shortmode_path"`
39136      new_path="$input_path"
39137    fi
39138  fi
39139
39140  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39141  if test "x$test_cygdrive_prefix" = x; then
39142    # As a simple fix, exclude /usr/bin since it's not a real path.
39143    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39144      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39145      # a path prefixed by /cygdrive for fixpath to work.
39146      new_path="$CYGWIN_ROOT_PATH$input_path"
39147    fi
39148  fi
39149
39150  # remove trailing .exe if any
39151  new_path="${new_path/%.exe/}"
39152
39153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39154
39155  # First separate the path from the arguments. This will split at the first
39156  # space.
39157  complete="$OBJDUMP"
39158  path="${complete%% *}"
39159  tmp="$complete EOL"
39160  arguments="${tmp#* }"
39161
39162  # Input might be given as Windows format, start by converting to
39163  # unix format.
39164  new_path="$path"
39165
39166  windows_path="$new_path"
39167  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39168    unix_path=`$CYGPATH -u "$windows_path"`
39169    new_path="$unix_path"
39170  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39171    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39172    new_path="$unix_path"
39173  fi
39174
39175
39176  # Now try to locate executable using which
39177  new_path=`$WHICH "$new_path" 2> /dev/null`
39178
39179  if test "x$new_path" = x; then
39180    # Oops. Which didn't find the executable.
39181    # The splitting of arguments from the executable at a space might have been incorrect,
39182    # since paths with space are more likely in Windows. Give it another try with the whole
39183    # argument.
39184    path="$complete"
39185    arguments="EOL"
39186    new_path="$path"
39187
39188  windows_path="$new_path"
39189  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39190    unix_path=`$CYGPATH -u "$windows_path"`
39191    new_path="$unix_path"
39192  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39193    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39194    new_path="$unix_path"
39195  fi
39196
39197
39198    new_path=`$WHICH "$new_path" 2> /dev/null`
39199    # bat and cmd files are not always considered executable in MSYS causing which
39200    # to not find them
39201    if test "x$new_path" = x \
39202        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39203        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39204      new_path="$path"
39205
39206  windows_path="$new_path"
39207  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39208    unix_path=`$CYGPATH -u "$windows_path"`
39209    new_path="$unix_path"
39210  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39211    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39212    new_path="$unix_path"
39213  fi
39214
39215    fi
39216
39217    if test "x$new_path" = x; then
39218      # It's still not found. Now this is an unrecoverable error.
39219      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39220$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39221      has_space=`$ECHO "$complete" | $GREP " "`
39222      if test "x$has_space" != x; then
39223        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39224$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39225      fi
39226      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39227    fi
39228  fi
39229
39230  # Now new_path has a complete unix path to the binary
39231  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39232    # Keep paths in /bin as-is, but remove trailing .exe if any
39233    new_path="${new_path/%.exe/}"
39234    # Do not save /bin paths to all_fixpath_prefixes!
39235  else
39236    # Not in mixed or Windows style, start by that.
39237    new_path=`cmd //c echo $new_path`
39238
39239  input_path="$new_path"
39240  # Check if we need to convert this using DOS-style short mode. If the path
39241  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39242  # take no chances and rewrite it.
39243  # Note: m4 eats our [], so we need to use [ and ] instead.
39244  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39245  if test "x$has_forbidden_chars" != x; then
39246    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39247    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39248  fi
39249
39250    # Output is in $new_path
39251
39252  windows_path="$new_path"
39253  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39254    unix_path=`$CYGPATH -u "$windows_path"`
39255    new_path="$unix_path"
39256  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39257    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39258    new_path="$unix_path"
39259  fi
39260
39261    # remove trailing .exe if any
39262    new_path="${new_path/%.exe/}"
39263
39264    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39265    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39266  fi
39267
39268  else
39269    # We're on a posix platform. Hooray! :)
39270    # First separate the path from the arguments. This will split at the first
39271    # space.
39272    complete="$OBJDUMP"
39273    path="${complete%% *}"
39274    tmp="$complete EOL"
39275    arguments="${tmp#* }"
39276
39277    # Cannot rely on the command "which" here since it doesn't always work.
39278    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39279    if test -z "$is_absolute_path"; then
39280      # Path to executable is not absolute. Find it.
39281      IFS_save="$IFS"
39282      IFS=:
39283      for p in $PATH; do
39284        if test -f "$p/$path" && test -x "$p/$path"; then
39285          new_path="$p/$path"
39286          break
39287        fi
39288      done
39289      IFS="$IFS_save"
39290    else
39291      # This is an absolute path, we can use it without further modifications.
39292      new_path="$path"
39293    fi
39294
39295    if test "x$new_path" = x; then
39296      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39297$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39298      has_space=`$ECHO "$complete" | $GREP " "`
39299      if test "x$has_space" != x; then
39300        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39301$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39302      fi
39303      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39304    fi
39305  fi
39306
39307  # Now join together the path and the arguments once again
39308  if test "x$arguments" != xEOL; then
39309    new_complete="$new_path ${arguments% *}"
39310  else
39311    new_complete="$new_path"
39312  fi
39313
39314  if test "x$complete" != "x$new_complete"; then
39315    OBJDUMP="$new_complete"
39316    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
39317$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
39318  fi
39319
39320  fi
39321
39322
39323  # Restore old path.
39324  PATH="$OLD_PATH"
39325
39326  # Restore the flags to the user specified values.
39327  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
39328  CFLAGS="$ORG_CFLAGS"
39329  CXXFLAGS="$ORG_CXXFLAGS"
39330  OBJCFLAGS="$ORG_OBJCFLAGS"
39331
39332
39333# Finally do some processing after the detection phase
39334
39335  if test "x$COMPILE_TYPE" = "xcross"; then
39336    # Now we need to find a C/C++ compiler that can build executables for the
39337    # build platform. We can't use the AC_PROG_CC macro, since it can only be
39338    # used once. Also, we need to do this without adding a tools dir to the
39339    # path, otherwise we might pick up cross-compilers which don't use standard
39340    # naming.
39341
39342    # FIXME: we should list the discovered compilers as an exclude pattern!
39343    # If we do that, we can do this detection before POST_DETECTION, and still
39344    # find the build compilers in the tools dir, if needed.
39345
39346
39347  # Publish this variable in the help.
39348
39349
39350  if test "x$BUILD_CC" = x; then
39351    # The variable is not set by user, try to locate tool using the code snippet
39352    for ac_prog in cl cc gcc
39353do
39354  # Extract the first word of "$ac_prog", so it can be a program name with args.
39355set dummy $ac_prog; ac_word=$2
39356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39357$as_echo_n "checking for $ac_word... " >&6; }
39358if ${ac_cv_path_BUILD_CC+:} false; then :
39359  $as_echo_n "(cached) " >&6
39360else
39361  case $BUILD_CC in
39362  [\\/]* | ?:[\\/]*)
39363  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39364  ;;
39365  *)
39366  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39367for as_dir in $PATH
39368do
39369  IFS=$as_save_IFS
39370  test -z "$as_dir" && as_dir=.
39371    for ac_exec_ext in '' $ac_executable_extensions; do
39372  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39373    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39374    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39375    break 2
39376  fi
39377done
39378  done
39379IFS=$as_save_IFS
39380
39381  ;;
39382esac
39383fi
39384BUILD_CC=$ac_cv_path_BUILD_CC
39385if test -n "$BUILD_CC"; then
39386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39387$as_echo "$BUILD_CC" >&6; }
39388else
39389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39390$as_echo "no" >&6; }
39391fi
39392
39393
39394  test -n "$BUILD_CC" && break
39395done
39396
39397  else
39398    # The variable is set, but is it from the command line or the environment?
39399
39400    # Try to remove the string !BUILD_CC! from our list.
39401    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
39402    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39403      # If it failed, the variable was not from the command line. Ignore it,
39404      # but warn the user (except for BASH, which is always set by the calling BASH).
39405      if test "xBUILD_CC" != xBASH; then
39406        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
39407$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
39408      fi
39409      # Try to locate tool using the code snippet
39410      for ac_prog in cl cc gcc
39411do
39412  # Extract the first word of "$ac_prog", so it can be a program name with args.
39413set dummy $ac_prog; ac_word=$2
39414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39415$as_echo_n "checking for $ac_word... " >&6; }
39416if ${ac_cv_path_BUILD_CC+:} false; then :
39417  $as_echo_n "(cached) " >&6
39418else
39419  case $BUILD_CC in
39420  [\\/]* | ?:[\\/]*)
39421  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39422  ;;
39423  *)
39424  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39425for as_dir in $PATH
39426do
39427  IFS=$as_save_IFS
39428  test -z "$as_dir" && as_dir=.
39429    for ac_exec_ext in '' $ac_executable_extensions; do
39430  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39431    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39432    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39433    break 2
39434  fi
39435done
39436  done
39437IFS=$as_save_IFS
39438
39439  ;;
39440esac
39441fi
39442BUILD_CC=$ac_cv_path_BUILD_CC
39443if test -n "$BUILD_CC"; then
39444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39445$as_echo "$BUILD_CC" >&6; }
39446else
39447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39448$as_echo "no" >&6; }
39449fi
39450
39451
39452  test -n "$BUILD_CC" && break
39453done
39454
39455    else
39456      # If it succeeded, then it was overridden by the user. We will use it
39457      # for the tool.
39458
39459      # First remove it from the list of overridden variables, so we can test
39460      # for unknown variables in the end.
39461      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39462
39463      # Check if the provided tool contains a complete path.
39464      tool_specified="$BUILD_CC"
39465      tool_basename="${tool_specified##*/}"
39466      if test "x$tool_basename" = "x$tool_specified"; then
39467        # A command without a complete path is provided, search $PATH.
39468        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
39469$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
39470        # Extract the first word of "$tool_basename", so it can be a program name with args.
39471set dummy $tool_basename; ac_word=$2
39472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39473$as_echo_n "checking for $ac_word... " >&6; }
39474if ${ac_cv_path_BUILD_CC+:} false; then :
39475  $as_echo_n "(cached) " >&6
39476else
39477  case $BUILD_CC in
39478  [\\/]* | ?:[\\/]*)
39479  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39480  ;;
39481  *)
39482  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39483for as_dir in $PATH
39484do
39485  IFS=$as_save_IFS
39486  test -z "$as_dir" && as_dir=.
39487    for ac_exec_ext in '' $ac_executable_extensions; do
39488  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39489    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39490    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39491    break 2
39492  fi
39493done
39494  done
39495IFS=$as_save_IFS
39496
39497  ;;
39498esac
39499fi
39500BUILD_CC=$ac_cv_path_BUILD_CC
39501if test -n "$BUILD_CC"; then
39502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39503$as_echo "$BUILD_CC" >&6; }
39504else
39505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39506$as_echo "no" >&6; }
39507fi
39508
39509
39510        if test "x$BUILD_CC" = x; then
39511          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39512        fi
39513      else
39514        # Otherwise we believe it is a complete path. Use it as it is.
39515        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
39516$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
39517        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
39518$as_echo_n "checking for BUILD_CC... " >&6; }
39519        if test ! -x "$tool_specified"; then
39520          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39521$as_echo "not found" >&6; }
39522          as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
39523        fi
39524        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39525$as_echo "$tool_specified" >&6; }
39526      fi
39527    fi
39528  fi
39529
39530
39531
39532  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39533
39534  # First separate the path from the arguments. This will split at the first
39535  # space.
39536  complete="$BUILD_CC"
39537  path="${complete%% *}"
39538  tmp="$complete EOL"
39539  arguments="${tmp#* }"
39540
39541  # Input might be given as Windows format, start by converting to
39542  # unix format.
39543  new_path=`$CYGPATH -u "$path"`
39544
39545  # Now try to locate executable using which
39546  new_path=`$WHICH "$new_path" 2> /dev/null`
39547  # bat and cmd files are not always considered executable in cygwin causing which
39548  # to not find them
39549  if test "x$new_path" = x \
39550      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39551      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39552    new_path=`$CYGPATH -u "$path"`
39553  fi
39554  if test "x$new_path" = x; then
39555    # Oops. Which didn't find the executable.
39556    # The splitting of arguments from the executable at a space might have been incorrect,
39557    # since paths with space are more likely in Windows. Give it another try with the whole
39558    # argument.
39559    path="$complete"
39560    arguments="EOL"
39561    new_path=`$CYGPATH -u "$path"`
39562    new_path=`$WHICH "$new_path" 2> /dev/null`
39563    # bat and cmd files are not always considered executable in cygwin causing which
39564    # to not find them
39565    if test "x$new_path" = x \
39566        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39567        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39568      new_path=`$CYGPATH -u "$path"`
39569    fi
39570    if test "x$new_path" = x; then
39571      # It's still not found. Now this is an unrecoverable error.
39572      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39573$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39574      has_space=`$ECHO "$complete" | $GREP " "`
39575      if test "x$has_space" != x; then
39576        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39577$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39578      fi
39579      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39580    fi
39581  fi
39582
39583  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39584  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39585  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39586  # "foo.exe" is OK but "foo" is an error.
39587  #
39588  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39589  # It is also a way to make sure we got the proper file name for the real test later on.
39590  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39591  if test "x$test_shortpath" = x; then
39592    # Short path failed, file does not exist as specified.
39593    # Try adding .exe or .cmd
39594    if test -f "${new_path}.exe"; then
39595      input_to_shortpath="${new_path}.exe"
39596    elif test -f "${new_path}.cmd"; then
39597      input_to_shortpath="${new_path}.cmd"
39598    else
39599      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
39600$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
39601      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39602$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39603      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39604    fi
39605  else
39606    input_to_shortpath="$new_path"
39607  fi
39608
39609  # Call helper function which possibly converts this using DOS-style short mode.
39610  # If so, the updated path is stored in $new_path.
39611  new_path="$input_to_shortpath"
39612
39613  input_path="$input_to_shortpath"
39614  # Check if we need to convert this using DOS-style short mode. If the path
39615  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39616  # take no chances and rewrite it.
39617  # Note: m4 eats our [], so we need to use [ and ] instead.
39618  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39619  if test "x$has_forbidden_chars" != x; then
39620    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39621    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39622    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39623    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39624      # Going to short mode and back again did indeed matter. Since short mode is
39625      # case insensitive, let's make it lowercase to improve readability.
39626      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39627      # Now convert it back to Unix-stile (cygpath)
39628      input_path=`$CYGPATH -u "$shortmode_path"`
39629      new_path="$input_path"
39630    fi
39631  fi
39632
39633  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39634  if test "x$test_cygdrive_prefix" = x; then
39635    # As a simple fix, exclude /usr/bin since it's not a real path.
39636    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39637      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39638      # a path prefixed by /cygdrive for fixpath to work.
39639      new_path="$CYGWIN_ROOT_PATH$input_path"
39640    fi
39641  fi
39642
39643  # remove trailing .exe if any
39644  new_path="${new_path/%.exe/}"
39645
39646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39647
39648  # First separate the path from the arguments. This will split at the first
39649  # space.
39650  complete="$BUILD_CC"
39651  path="${complete%% *}"
39652  tmp="$complete EOL"
39653  arguments="${tmp#* }"
39654
39655  # Input might be given as Windows format, start by converting to
39656  # unix format.
39657  new_path="$path"
39658
39659  windows_path="$new_path"
39660  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39661    unix_path=`$CYGPATH -u "$windows_path"`
39662    new_path="$unix_path"
39663  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39664    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39665    new_path="$unix_path"
39666  fi
39667
39668
39669  # Now try to locate executable using which
39670  new_path=`$WHICH "$new_path" 2> /dev/null`
39671
39672  if test "x$new_path" = x; then
39673    # Oops. Which didn't find the executable.
39674    # The splitting of arguments from the executable at a space might have been incorrect,
39675    # since paths with space are more likely in Windows. Give it another try with the whole
39676    # argument.
39677    path="$complete"
39678    arguments="EOL"
39679    new_path="$path"
39680
39681  windows_path="$new_path"
39682  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39683    unix_path=`$CYGPATH -u "$windows_path"`
39684    new_path="$unix_path"
39685  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39686    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39687    new_path="$unix_path"
39688  fi
39689
39690
39691    new_path=`$WHICH "$new_path" 2> /dev/null`
39692    # bat and cmd files are not always considered executable in MSYS causing which
39693    # to not find them
39694    if test "x$new_path" = x \
39695        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39696        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39697      new_path="$path"
39698
39699  windows_path="$new_path"
39700  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39701    unix_path=`$CYGPATH -u "$windows_path"`
39702    new_path="$unix_path"
39703  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39704    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39705    new_path="$unix_path"
39706  fi
39707
39708    fi
39709
39710    if test "x$new_path" = x; then
39711      # It's still not found. Now this is an unrecoverable error.
39712      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39713$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39714      has_space=`$ECHO "$complete" | $GREP " "`
39715      if test "x$has_space" != x; then
39716        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39717$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39718      fi
39719      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39720    fi
39721  fi
39722
39723  # Now new_path has a complete unix path to the binary
39724  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39725    # Keep paths in /bin as-is, but remove trailing .exe if any
39726    new_path="${new_path/%.exe/}"
39727    # Do not save /bin paths to all_fixpath_prefixes!
39728  else
39729    # Not in mixed or Windows style, start by that.
39730    new_path=`cmd //c echo $new_path`
39731
39732  input_path="$new_path"
39733  # Check if we need to convert this using DOS-style short mode. If the path
39734  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39735  # take no chances and rewrite it.
39736  # Note: m4 eats our [], so we need to use [ and ] instead.
39737  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39738  if test "x$has_forbidden_chars" != x; then
39739    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39740    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39741  fi
39742
39743    # Output is in $new_path
39744
39745  windows_path="$new_path"
39746  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39747    unix_path=`$CYGPATH -u "$windows_path"`
39748    new_path="$unix_path"
39749  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39750    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39751    new_path="$unix_path"
39752  fi
39753
39754    # remove trailing .exe if any
39755    new_path="${new_path/%.exe/}"
39756
39757    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39758    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39759  fi
39760
39761  else
39762    # We're on a posix platform. Hooray! :)
39763    # First separate the path from the arguments. This will split at the first
39764    # space.
39765    complete="$BUILD_CC"
39766    path="${complete%% *}"
39767    tmp="$complete EOL"
39768    arguments="${tmp#* }"
39769
39770    # Cannot rely on the command "which" here since it doesn't always work.
39771    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39772    if test -z "$is_absolute_path"; then
39773      # Path to executable is not absolute. Find it.
39774      IFS_save="$IFS"
39775      IFS=:
39776      for p in $PATH; do
39777        if test -f "$p/$path" && test -x "$p/$path"; then
39778          new_path="$p/$path"
39779          break
39780        fi
39781      done
39782      IFS="$IFS_save"
39783    else
39784      # This is an absolute path, we can use it without further modifications.
39785      new_path="$path"
39786    fi
39787
39788    if test "x$new_path" = x; then
39789      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39790$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39791      has_space=`$ECHO "$complete" | $GREP " "`
39792      if test "x$has_space" != x; then
39793        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39794$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39795      fi
39796      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39797    fi
39798  fi
39799
39800  # Now join together the path and the arguments once again
39801  if test "x$arguments" != xEOL; then
39802    new_complete="$new_path ${arguments% *}"
39803  else
39804    new_complete="$new_path"
39805  fi
39806
39807  if test "x$complete" != "x$new_complete"; then
39808    BUILD_CC="$new_complete"
39809    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
39810$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
39811  fi
39812
39813
39814
39815  # Publish this variable in the help.
39816
39817
39818  if test "x$BUILD_CXX" = x; then
39819    # The variable is not set by user, try to locate tool using the code snippet
39820    for ac_prog in cl CC g++
39821do
39822  # Extract the first word of "$ac_prog", so it can be a program name with args.
39823set dummy $ac_prog; ac_word=$2
39824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39825$as_echo_n "checking for $ac_word... " >&6; }
39826if ${ac_cv_path_BUILD_CXX+:} false; then :
39827  $as_echo_n "(cached) " >&6
39828else
39829  case $BUILD_CXX in
39830  [\\/]* | ?:[\\/]*)
39831  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39832  ;;
39833  *)
39834  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39835for as_dir in $PATH
39836do
39837  IFS=$as_save_IFS
39838  test -z "$as_dir" && as_dir=.
39839    for ac_exec_ext in '' $ac_executable_extensions; do
39840  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39841    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39842    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39843    break 2
39844  fi
39845done
39846  done
39847IFS=$as_save_IFS
39848
39849  ;;
39850esac
39851fi
39852BUILD_CXX=$ac_cv_path_BUILD_CXX
39853if test -n "$BUILD_CXX"; then
39854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39855$as_echo "$BUILD_CXX" >&6; }
39856else
39857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39858$as_echo "no" >&6; }
39859fi
39860
39861
39862  test -n "$BUILD_CXX" && break
39863done
39864
39865  else
39866    # The variable is set, but is it from the command line or the environment?
39867
39868    # Try to remove the string !BUILD_CXX! from our list.
39869    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
39870    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39871      # If it failed, the variable was not from the command line. Ignore it,
39872      # but warn the user (except for BASH, which is always set by the calling BASH).
39873      if test "xBUILD_CXX" != xBASH; then
39874        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
39875$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
39876      fi
39877      # Try to locate tool using the code snippet
39878      for ac_prog in cl CC g++
39879do
39880  # Extract the first word of "$ac_prog", so it can be a program name with args.
39881set dummy $ac_prog; ac_word=$2
39882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39883$as_echo_n "checking for $ac_word... " >&6; }
39884if ${ac_cv_path_BUILD_CXX+:} false; then :
39885  $as_echo_n "(cached) " >&6
39886else
39887  case $BUILD_CXX in
39888  [\\/]* | ?:[\\/]*)
39889  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39890  ;;
39891  *)
39892  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39893for as_dir in $PATH
39894do
39895  IFS=$as_save_IFS
39896  test -z "$as_dir" && as_dir=.
39897    for ac_exec_ext in '' $ac_executable_extensions; do
39898  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39899    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39900    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39901    break 2
39902  fi
39903done
39904  done
39905IFS=$as_save_IFS
39906
39907  ;;
39908esac
39909fi
39910BUILD_CXX=$ac_cv_path_BUILD_CXX
39911if test -n "$BUILD_CXX"; then
39912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39913$as_echo "$BUILD_CXX" >&6; }
39914else
39915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39916$as_echo "no" >&6; }
39917fi
39918
39919
39920  test -n "$BUILD_CXX" && break
39921done
39922
39923    else
39924      # If it succeeded, then it was overridden by the user. We will use it
39925      # for the tool.
39926
39927      # First remove it from the list of overridden variables, so we can test
39928      # for unknown variables in the end.
39929      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39930
39931      # Check if the provided tool contains a complete path.
39932      tool_specified="$BUILD_CXX"
39933      tool_basename="${tool_specified##*/}"
39934      if test "x$tool_basename" = "x$tool_specified"; then
39935        # A command without a complete path is provided, search $PATH.
39936        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
39937$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
39938        # Extract the first word of "$tool_basename", so it can be a program name with args.
39939set dummy $tool_basename; ac_word=$2
39940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39941$as_echo_n "checking for $ac_word... " >&6; }
39942if ${ac_cv_path_BUILD_CXX+:} false; then :
39943  $as_echo_n "(cached) " >&6
39944else
39945  case $BUILD_CXX in
39946  [\\/]* | ?:[\\/]*)
39947  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39948  ;;
39949  *)
39950  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39951for as_dir in $PATH
39952do
39953  IFS=$as_save_IFS
39954  test -z "$as_dir" && as_dir=.
39955    for ac_exec_ext in '' $ac_executable_extensions; do
39956  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39957    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39958    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39959    break 2
39960  fi
39961done
39962  done
39963IFS=$as_save_IFS
39964
39965  ;;
39966esac
39967fi
39968BUILD_CXX=$ac_cv_path_BUILD_CXX
39969if test -n "$BUILD_CXX"; then
39970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39971$as_echo "$BUILD_CXX" >&6; }
39972else
39973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39974$as_echo "no" >&6; }
39975fi
39976
39977
39978        if test "x$BUILD_CXX" = x; then
39979          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39980        fi
39981      else
39982        # Otherwise we believe it is a complete path. Use it as it is.
39983        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
39984$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
39985        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
39986$as_echo_n "checking for BUILD_CXX... " >&6; }
39987        if test ! -x "$tool_specified"; then
39988          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39989$as_echo "not found" >&6; }
39990          as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
39991        fi
39992        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39993$as_echo "$tool_specified" >&6; }
39994      fi
39995    fi
39996  fi
39997
39998
39999
40000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40001
40002  # First separate the path from the arguments. This will split at the first
40003  # space.
40004  complete="$BUILD_CXX"
40005  path="${complete%% *}"
40006  tmp="$complete EOL"
40007  arguments="${tmp#* }"
40008
40009  # Input might be given as Windows format, start by converting to
40010  # unix format.
40011  new_path=`$CYGPATH -u "$path"`
40012
40013  # Now try to locate executable using which
40014  new_path=`$WHICH "$new_path" 2> /dev/null`
40015  # bat and cmd files are not always considered executable in cygwin causing which
40016  # to not find them
40017  if test "x$new_path" = x \
40018      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40019      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40020    new_path=`$CYGPATH -u "$path"`
40021  fi
40022  if test "x$new_path" = x; then
40023    # Oops. Which didn't find the executable.
40024    # The splitting of arguments from the executable at a space might have been incorrect,
40025    # since paths with space are more likely in Windows. Give it another try with the whole
40026    # argument.
40027    path="$complete"
40028    arguments="EOL"
40029    new_path=`$CYGPATH -u "$path"`
40030    new_path=`$WHICH "$new_path" 2> /dev/null`
40031    # bat and cmd files are not always considered executable in cygwin causing which
40032    # to not find them
40033    if test "x$new_path" = x \
40034        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40035        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40036      new_path=`$CYGPATH -u "$path"`
40037    fi
40038    if test "x$new_path" = x; then
40039      # It's still not found. Now this is an unrecoverable error.
40040      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40041$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40042      has_space=`$ECHO "$complete" | $GREP " "`
40043      if test "x$has_space" != x; then
40044        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40045$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40046      fi
40047      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40048    fi
40049  fi
40050
40051  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40052  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40053  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40054  # "foo.exe" is OK but "foo" is an error.
40055  #
40056  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40057  # It is also a way to make sure we got the proper file name for the real test later on.
40058  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40059  if test "x$test_shortpath" = x; then
40060    # Short path failed, file does not exist as specified.
40061    # Try adding .exe or .cmd
40062    if test -f "${new_path}.exe"; then
40063      input_to_shortpath="${new_path}.exe"
40064    elif test -f "${new_path}.cmd"; then
40065      input_to_shortpath="${new_path}.cmd"
40066    else
40067      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
40068$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
40069      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40070$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40071      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40072    fi
40073  else
40074    input_to_shortpath="$new_path"
40075  fi
40076
40077  # Call helper function which possibly converts this using DOS-style short mode.
40078  # If so, the updated path is stored in $new_path.
40079  new_path="$input_to_shortpath"
40080
40081  input_path="$input_to_shortpath"
40082  # Check if we need to convert this using DOS-style short mode. If the path
40083  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40084  # take no chances and rewrite it.
40085  # Note: m4 eats our [], so we need to use [ and ] instead.
40086  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40087  if test "x$has_forbidden_chars" != x; then
40088    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40089    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40090    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40091    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40092      # Going to short mode and back again did indeed matter. Since short mode is
40093      # case insensitive, let's make it lowercase to improve readability.
40094      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40095      # Now convert it back to Unix-stile (cygpath)
40096      input_path=`$CYGPATH -u "$shortmode_path"`
40097      new_path="$input_path"
40098    fi
40099  fi
40100
40101  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40102  if test "x$test_cygdrive_prefix" = x; then
40103    # As a simple fix, exclude /usr/bin since it's not a real path.
40104    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40105      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40106      # a path prefixed by /cygdrive for fixpath to work.
40107      new_path="$CYGWIN_ROOT_PATH$input_path"
40108    fi
40109  fi
40110
40111  # remove trailing .exe if any
40112  new_path="${new_path/%.exe/}"
40113
40114  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40115
40116  # First separate the path from the arguments. This will split at the first
40117  # space.
40118  complete="$BUILD_CXX"
40119  path="${complete%% *}"
40120  tmp="$complete EOL"
40121  arguments="${tmp#* }"
40122
40123  # Input might be given as Windows format, start by converting to
40124  # unix format.
40125  new_path="$path"
40126
40127  windows_path="$new_path"
40128  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40129    unix_path=`$CYGPATH -u "$windows_path"`
40130    new_path="$unix_path"
40131  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40132    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40133    new_path="$unix_path"
40134  fi
40135
40136
40137  # Now try to locate executable using which
40138  new_path=`$WHICH "$new_path" 2> /dev/null`
40139
40140  if test "x$new_path" = x; then
40141    # Oops. Which didn't find the executable.
40142    # The splitting of arguments from the executable at a space might have been incorrect,
40143    # since paths with space are more likely in Windows. Give it another try with the whole
40144    # argument.
40145    path="$complete"
40146    arguments="EOL"
40147    new_path="$path"
40148
40149  windows_path="$new_path"
40150  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40151    unix_path=`$CYGPATH -u "$windows_path"`
40152    new_path="$unix_path"
40153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40154    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40155    new_path="$unix_path"
40156  fi
40157
40158
40159    new_path=`$WHICH "$new_path" 2> /dev/null`
40160    # bat and cmd files are not always considered executable in MSYS causing which
40161    # to not find them
40162    if test "x$new_path" = x \
40163        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40164        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40165      new_path="$path"
40166
40167  windows_path="$new_path"
40168  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40169    unix_path=`$CYGPATH -u "$windows_path"`
40170    new_path="$unix_path"
40171  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40172    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40173    new_path="$unix_path"
40174  fi
40175
40176    fi
40177
40178    if test "x$new_path" = x; then
40179      # It's still not found. Now this is an unrecoverable error.
40180      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40181$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40182      has_space=`$ECHO "$complete" | $GREP " "`
40183      if test "x$has_space" != x; then
40184        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40185$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40186      fi
40187      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40188    fi
40189  fi
40190
40191  # Now new_path has a complete unix path to the binary
40192  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40193    # Keep paths in /bin as-is, but remove trailing .exe if any
40194    new_path="${new_path/%.exe/}"
40195    # Do not save /bin paths to all_fixpath_prefixes!
40196  else
40197    # Not in mixed or Windows style, start by that.
40198    new_path=`cmd //c echo $new_path`
40199
40200  input_path="$new_path"
40201  # Check if we need to convert this using DOS-style short mode. If the path
40202  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40203  # take no chances and rewrite it.
40204  # Note: m4 eats our [], so we need to use [ and ] instead.
40205  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40206  if test "x$has_forbidden_chars" != x; then
40207    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40208    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40209  fi
40210
40211    # Output is in $new_path
40212
40213  windows_path="$new_path"
40214  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40215    unix_path=`$CYGPATH -u "$windows_path"`
40216    new_path="$unix_path"
40217  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40218    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40219    new_path="$unix_path"
40220  fi
40221
40222    # remove trailing .exe if any
40223    new_path="${new_path/%.exe/}"
40224
40225    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40226    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40227  fi
40228
40229  else
40230    # We're on a posix platform. Hooray! :)
40231    # First separate the path from the arguments. This will split at the first
40232    # space.
40233    complete="$BUILD_CXX"
40234    path="${complete%% *}"
40235    tmp="$complete EOL"
40236    arguments="${tmp#* }"
40237
40238    # Cannot rely on the command "which" here since it doesn't always work.
40239    is_absolute_path=`$ECHO "$path" | $GREP ^/`
40240    if test -z "$is_absolute_path"; then
40241      # Path to executable is not absolute. Find it.
40242      IFS_save="$IFS"
40243      IFS=:
40244      for p in $PATH; do
40245        if test -f "$p/$path" && test -x "$p/$path"; then
40246          new_path="$p/$path"
40247          break
40248        fi
40249      done
40250      IFS="$IFS_save"
40251    else
40252      # This is an absolute path, we can use it without further modifications.
40253      new_path="$path"
40254    fi
40255
40256    if test "x$new_path" = x; then
40257      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40258$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40259      has_space=`$ECHO "$complete" | $GREP " "`
40260      if test "x$has_space" != x; then
40261        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40262$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40263      fi
40264      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40265    fi
40266  fi
40267
40268  # Now join together the path and the arguments once again
40269  if test "x$arguments" != xEOL; then
40270    new_complete="$new_path ${arguments% *}"
40271  else
40272    new_complete="$new_path"
40273  fi
40274
40275  if test "x$complete" != "x$new_complete"; then
40276    BUILD_CXX="$new_complete"
40277    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
40278$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
40279  fi
40280
40281
40282
40283  # Publish this variable in the help.
40284
40285
40286  if test "x$BUILD_LD" = x; then
40287    # The variable is not set by user, try to locate tool using the code snippet
40288    for ac_prog in ld
40289do
40290  # Extract the first word of "$ac_prog", so it can be a program name with args.
40291set dummy $ac_prog; ac_word=$2
40292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40293$as_echo_n "checking for $ac_word... " >&6; }
40294if ${ac_cv_path_BUILD_LD+:} false; then :
40295  $as_echo_n "(cached) " >&6
40296else
40297  case $BUILD_LD in
40298  [\\/]* | ?:[\\/]*)
40299  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40300  ;;
40301  *)
40302  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40303for as_dir in $PATH
40304do
40305  IFS=$as_save_IFS
40306  test -z "$as_dir" && as_dir=.
40307    for ac_exec_ext in '' $ac_executable_extensions; do
40308  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40309    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40310    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40311    break 2
40312  fi
40313done
40314  done
40315IFS=$as_save_IFS
40316
40317  ;;
40318esac
40319fi
40320BUILD_LD=$ac_cv_path_BUILD_LD
40321if test -n "$BUILD_LD"; then
40322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40323$as_echo "$BUILD_LD" >&6; }
40324else
40325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40326$as_echo "no" >&6; }
40327fi
40328
40329
40330  test -n "$BUILD_LD" && break
40331done
40332
40333  else
40334    # The variable is set, but is it from the command line or the environment?
40335
40336    # Try to remove the string !BUILD_LD! from our list.
40337    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
40338    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40339      # If it failed, the variable was not from the command line. Ignore it,
40340      # but warn the user (except for BASH, which is always set by the calling BASH).
40341      if test "xBUILD_LD" != xBASH; then
40342        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
40343$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
40344      fi
40345      # Try to locate tool using the code snippet
40346      for ac_prog in ld
40347do
40348  # Extract the first word of "$ac_prog", so it can be a program name with args.
40349set dummy $ac_prog; ac_word=$2
40350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40351$as_echo_n "checking for $ac_word... " >&6; }
40352if ${ac_cv_path_BUILD_LD+:} false; then :
40353  $as_echo_n "(cached) " >&6
40354else
40355  case $BUILD_LD in
40356  [\\/]* | ?:[\\/]*)
40357  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40358  ;;
40359  *)
40360  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40361for as_dir in $PATH
40362do
40363  IFS=$as_save_IFS
40364  test -z "$as_dir" && as_dir=.
40365    for ac_exec_ext in '' $ac_executable_extensions; do
40366  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40367    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40368    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40369    break 2
40370  fi
40371done
40372  done
40373IFS=$as_save_IFS
40374
40375  ;;
40376esac
40377fi
40378BUILD_LD=$ac_cv_path_BUILD_LD
40379if test -n "$BUILD_LD"; then
40380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40381$as_echo "$BUILD_LD" >&6; }
40382else
40383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40384$as_echo "no" >&6; }
40385fi
40386
40387
40388  test -n "$BUILD_LD" && break
40389done
40390
40391    else
40392      # If it succeeded, then it was overridden by the user. We will use it
40393      # for the tool.
40394
40395      # First remove it from the list of overridden variables, so we can test
40396      # for unknown variables in the end.
40397      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40398
40399      # Check if the provided tool contains a complete path.
40400      tool_specified="$BUILD_LD"
40401      tool_basename="${tool_specified##*/}"
40402      if test "x$tool_basename" = "x$tool_specified"; then
40403        # A command without a complete path is provided, search $PATH.
40404        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
40405$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
40406        # Extract the first word of "$tool_basename", so it can be a program name with args.
40407set dummy $tool_basename; ac_word=$2
40408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40409$as_echo_n "checking for $ac_word... " >&6; }
40410if ${ac_cv_path_BUILD_LD+:} false; then :
40411  $as_echo_n "(cached) " >&6
40412else
40413  case $BUILD_LD in
40414  [\\/]* | ?:[\\/]*)
40415  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40416  ;;
40417  *)
40418  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40419for as_dir in $PATH
40420do
40421  IFS=$as_save_IFS
40422  test -z "$as_dir" && as_dir=.
40423    for ac_exec_ext in '' $ac_executable_extensions; do
40424  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40425    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40426    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40427    break 2
40428  fi
40429done
40430  done
40431IFS=$as_save_IFS
40432
40433  ;;
40434esac
40435fi
40436BUILD_LD=$ac_cv_path_BUILD_LD
40437if test -n "$BUILD_LD"; then
40438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40439$as_echo "$BUILD_LD" >&6; }
40440else
40441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40442$as_echo "no" >&6; }
40443fi
40444
40445
40446        if test "x$BUILD_LD" = x; then
40447          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40448        fi
40449      else
40450        # Otherwise we believe it is a complete path. Use it as it is.
40451        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
40452$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
40453        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
40454$as_echo_n "checking for BUILD_LD... " >&6; }
40455        if test ! -x "$tool_specified"; then
40456          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40457$as_echo "not found" >&6; }
40458          as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
40459        fi
40460        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40461$as_echo "$tool_specified" >&6; }
40462      fi
40463    fi
40464  fi
40465
40466
40467
40468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40469
40470  # First separate the path from the arguments. This will split at the first
40471  # space.
40472  complete="$BUILD_LD"
40473  path="${complete%% *}"
40474  tmp="$complete EOL"
40475  arguments="${tmp#* }"
40476
40477  # Input might be given as Windows format, start by converting to
40478  # unix format.
40479  new_path=`$CYGPATH -u "$path"`
40480
40481  # Now try to locate executable using which
40482  new_path=`$WHICH "$new_path" 2> /dev/null`
40483  # bat and cmd files are not always considered executable in cygwin causing which
40484  # to not find them
40485  if test "x$new_path" = x \
40486      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40487      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40488    new_path=`$CYGPATH -u "$path"`
40489  fi
40490  if test "x$new_path" = x; then
40491    # Oops. Which didn't find the executable.
40492    # The splitting of arguments from the executable at a space might have been incorrect,
40493    # since paths with space are more likely in Windows. Give it another try with the whole
40494    # argument.
40495    path="$complete"
40496    arguments="EOL"
40497    new_path=`$CYGPATH -u "$path"`
40498    new_path=`$WHICH "$new_path" 2> /dev/null`
40499    # bat and cmd files are not always considered executable in cygwin causing which
40500    # to not find them
40501    if test "x$new_path" = x \
40502        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40503        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40504      new_path=`$CYGPATH -u "$path"`
40505    fi
40506    if test "x$new_path" = x; then
40507      # It's still not found. Now this is an unrecoverable error.
40508      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40509$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40510      has_space=`$ECHO "$complete" | $GREP " "`
40511      if test "x$has_space" != x; then
40512        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40513$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40514      fi
40515      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40516    fi
40517  fi
40518
40519  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40520  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40521  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40522  # "foo.exe" is OK but "foo" is an error.
40523  #
40524  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40525  # It is also a way to make sure we got the proper file name for the real test later on.
40526  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40527  if test "x$test_shortpath" = x; then
40528    # Short path failed, file does not exist as specified.
40529    # Try adding .exe or .cmd
40530    if test -f "${new_path}.exe"; then
40531      input_to_shortpath="${new_path}.exe"
40532    elif test -f "${new_path}.cmd"; then
40533      input_to_shortpath="${new_path}.cmd"
40534    else
40535      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
40536$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
40537      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40538$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40539      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40540    fi
40541  else
40542    input_to_shortpath="$new_path"
40543  fi
40544
40545  # Call helper function which possibly converts this using DOS-style short mode.
40546  # If so, the updated path is stored in $new_path.
40547  new_path="$input_to_shortpath"
40548
40549  input_path="$input_to_shortpath"
40550  # Check if we need to convert this using DOS-style short mode. If the path
40551  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40552  # take no chances and rewrite it.
40553  # Note: m4 eats our [], so we need to use [ and ] instead.
40554  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40555  if test "x$has_forbidden_chars" != x; then
40556    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40557    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40558    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40559    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40560      # Going to short mode and back again did indeed matter. Since short mode is
40561      # case insensitive, let's make it lowercase to improve readability.
40562      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40563      # Now convert it back to Unix-stile (cygpath)
40564      input_path=`$CYGPATH -u "$shortmode_path"`
40565      new_path="$input_path"
40566    fi
40567  fi
40568
40569  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40570  if test "x$test_cygdrive_prefix" = x; then
40571    # As a simple fix, exclude /usr/bin since it's not a real path.
40572    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40573      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40574      # a path prefixed by /cygdrive for fixpath to work.
40575      new_path="$CYGWIN_ROOT_PATH$input_path"
40576    fi
40577  fi
40578
40579  # remove trailing .exe if any
40580  new_path="${new_path/%.exe/}"
40581
40582  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40583
40584  # First separate the path from the arguments. This will split at the first
40585  # space.
40586  complete="$BUILD_LD"
40587  path="${complete%% *}"
40588  tmp="$complete EOL"
40589  arguments="${tmp#* }"
40590
40591  # Input might be given as Windows format, start by converting to
40592  # unix format.
40593  new_path="$path"
40594
40595  windows_path="$new_path"
40596  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40597    unix_path=`$CYGPATH -u "$windows_path"`
40598    new_path="$unix_path"
40599  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40600    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40601    new_path="$unix_path"
40602  fi
40603
40604
40605  # Now try to locate executable using which
40606  new_path=`$WHICH "$new_path" 2> /dev/null`
40607
40608  if test "x$new_path" = x; then
40609    # Oops. Which didn't find the executable.
40610    # The splitting of arguments from the executable at a space might have been incorrect,
40611    # since paths with space are more likely in Windows. Give it another try with the whole
40612    # argument.
40613    path="$complete"
40614    arguments="EOL"
40615    new_path="$path"
40616
40617  windows_path="$new_path"
40618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40619    unix_path=`$CYGPATH -u "$windows_path"`
40620    new_path="$unix_path"
40621  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40622    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40623    new_path="$unix_path"
40624  fi
40625
40626
40627    new_path=`$WHICH "$new_path" 2> /dev/null`
40628    # bat and cmd files are not always considered executable in MSYS causing which
40629    # to not find them
40630    if test "x$new_path" = x \
40631        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40632        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40633      new_path="$path"
40634
40635  windows_path="$new_path"
40636  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40637    unix_path=`$CYGPATH -u "$windows_path"`
40638    new_path="$unix_path"
40639  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40640    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40641    new_path="$unix_path"
40642  fi
40643
40644    fi
40645
40646    if test "x$new_path" = x; then
40647      # It's still not found. Now this is an unrecoverable error.
40648      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40649$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40650      has_space=`$ECHO "$complete" | $GREP " "`
40651      if test "x$has_space" != x; then
40652        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40653$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40654      fi
40655      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40656    fi
40657  fi
40658
40659  # Now new_path has a complete unix path to the binary
40660  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40661    # Keep paths in /bin as-is, but remove trailing .exe if any
40662    new_path="${new_path/%.exe/}"
40663    # Do not save /bin paths to all_fixpath_prefixes!
40664  else
40665    # Not in mixed or Windows style, start by that.
40666    new_path=`cmd //c echo $new_path`
40667
40668  input_path="$new_path"
40669  # Check if we need to convert this using DOS-style short mode. If the path
40670  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40671  # take no chances and rewrite it.
40672  # Note: m4 eats our [], so we need to use [ and ] instead.
40673  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40674  if test "x$has_forbidden_chars" != x; then
40675    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40676    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40677  fi
40678
40679    # Output is in $new_path
40680
40681  windows_path="$new_path"
40682  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40683    unix_path=`$CYGPATH -u "$windows_path"`
40684    new_path="$unix_path"
40685  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40686    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40687    new_path="$unix_path"
40688  fi
40689
40690    # remove trailing .exe if any
40691    new_path="${new_path/%.exe/}"
40692
40693    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40694    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40695  fi
40696
40697  else
40698    # We're on a posix platform. Hooray! :)
40699    # First separate the path from the arguments. This will split at the first
40700    # space.
40701    complete="$BUILD_LD"
40702    path="${complete%% *}"
40703    tmp="$complete EOL"
40704    arguments="${tmp#* }"
40705
40706    # Cannot rely on the command "which" here since it doesn't always work.
40707    is_absolute_path=`$ECHO "$path" | $GREP ^/`
40708    if test -z "$is_absolute_path"; then
40709      # Path to executable is not absolute. Find it.
40710      IFS_save="$IFS"
40711      IFS=:
40712      for p in $PATH; do
40713        if test -f "$p/$path" && test -x "$p/$path"; then
40714          new_path="$p/$path"
40715          break
40716        fi
40717      done
40718      IFS="$IFS_save"
40719    else
40720      # This is an absolute path, we can use it without further modifications.
40721      new_path="$path"
40722    fi
40723
40724    if test "x$new_path" = x; then
40725      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40726$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40727      has_space=`$ECHO "$complete" | $GREP " "`
40728      if test "x$has_space" != x; then
40729        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40730$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40731      fi
40732      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40733    fi
40734  fi
40735
40736  # Now join together the path and the arguments once again
40737  if test "x$arguments" != xEOL; then
40738    new_complete="$new_path ${arguments% *}"
40739  else
40740    new_complete="$new_path"
40741  fi
40742
40743  if test "x$complete" != "x$new_complete"; then
40744    BUILD_LD="$new_complete"
40745    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
40746$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
40747  fi
40748
40749  else
40750    # If we are not cross compiling, use the normal target compilers for
40751    # building the build platform executables.
40752    BUILD_CC="$CC"
40753    BUILD_CXX="$CXX"
40754    BUILD_LD="$LD"
40755  fi
40756
40757
40758
40759
40760
40761
40762  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40763    # For hotspot, we need these in Windows mixed path,
40764    # so rewrite them all. Need added .exe suffix.
40765    HOTSPOT_CXX="$CXX.exe"
40766    HOTSPOT_LD="$LD.exe"
40767    HOTSPOT_MT="$MT.exe"
40768    HOTSPOT_RC="$RC.exe"
40769
40770  unix_path="$HOTSPOT_CXX"
40771  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40772    windows_path=`$CYGPATH -m "$unix_path"`
40773    HOTSPOT_CXX="$windows_path"
40774  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40775    windows_path=`cmd //c echo $unix_path`
40776    HOTSPOT_CXX="$windows_path"
40777  fi
40778
40779
40780  unix_path="$HOTSPOT_LD"
40781  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40782    windows_path=`$CYGPATH -m "$unix_path"`
40783    HOTSPOT_LD="$windows_path"
40784  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40785    windows_path=`cmd //c echo $unix_path`
40786    HOTSPOT_LD="$windows_path"
40787  fi
40788
40789
40790  unix_path="$HOTSPOT_MT"
40791  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40792    windows_path=`$CYGPATH -m "$unix_path"`
40793    HOTSPOT_MT="$windows_path"
40794  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40795    windows_path=`cmd //c echo $unix_path`
40796    HOTSPOT_MT="$windows_path"
40797  fi
40798
40799
40800  unix_path="$HOTSPOT_RC"
40801  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40802    windows_path=`$CYGPATH -m "$unix_path"`
40803    HOTSPOT_RC="$windows_path"
40804  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40805    windows_path=`cmd //c echo $unix_path`
40806    HOTSPOT_RC="$windows_path"
40807  fi
40808
40809
40810
40811  else
40812    HOTSPOT_CXX="$CXX"
40813    HOTSPOT_LD="$LD"
40814  fi
40815
40816
40817
40818  if test  "x$TOOLCHAIN_TYPE" = xclang; then
40819    USE_CLANG=true
40820  fi
40821
40822
40823  # LDEXE is the linker to use, when creating executables. Not really used.
40824  # FIXME: These should just be removed!
40825  LDEXE="$LD"
40826  LDEXECXX="$LDCXX"
40827
40828
40829
40830
40831
40832
40833  # The package path is used only on macosx?
40834  # FIXME: clean this up, and/or move it elsewhere.
40835  PACKAGE_PATH=/opt/local
40836
40837
40838  # Check for extra potential brokenness.
40839  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40840    # On Windows, double-check that we got the right compiler.
40841    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
40842    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
40843    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
40844      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
40845        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
40846      fi
40847    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
40848      if test "x$COMPILER_CPU_TEST" != "xx64"; then
40849        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
40850      fi
40851    fi
40852  fi
40853
40854  if test "x$TOOLCHAIN_TYPE" = xgcc; then
40855    # If this is a --hash-style=gnu system, use --hash-style=both, why?
40856    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
40857    # This is later checked when setting flags.
40858
40859    # "-Og" suppported for GCC 4.8 and later
40860    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
40861
40862  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
40863$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
40864  supports=yes
40865
40866  saved_cflags="$CFLAGS"
40867  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
40868  ac_ext=c
40869ac_cpp='$CPP $CPPFLAGS'
40870ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40871ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40872ac_compiler_gnu=$ac_cv_c_compiler_gnu
40873
40874  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40875/* end confdefs.h.  */
40876int i;
40877_ACEOF
40878if ac_fn_c_try_compile "$LINENO"; then :
40879
40880else
40881  supports=no
40882fi
40883rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40884  ac_ext=cpp
40885ac_cpp='$CXXCPP $CPPFLAGS'
40886ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40887ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40888ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40889
40890  CFLAGS="$saved_cflags"
40891
40892  saved_cxxflags="$CXXFLAGS"
40893  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
40894  ac_ext=cpp
40895ac_cpp='$CXXCPP $CPPFLAGS'
40896ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40897ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40898ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40899
40900  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40901/* end confdefs.h.  */
40902int i;
40903_ACEOF
40904if ac_fn_cxx_try_compile "$LINENO"; then :
40905
40906else
40907  supports=no
40908fi
40909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40910  ac_ext=cpp
40911ac_cpp='$CXXCPP $CPPFLAGS'
40912ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40913ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40914ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40915
40916  CXXFLAGS="$saved_cxxflags"
40917
40918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40919$as_echo "$supports" >&6; }
40920  if test "x$supports" = "xyes" ; then
40921    HAS_CFLAG_OPTIMIZE_DEBUG=true
40922  else
40923    HAS_CFLAG_OPTIMIZE_DEBUG=false
40924  fi
40925
40926
40927    # "-fsanitize=undefined" supported for GCC 4.9 and later
40928    CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG="-fsanitize=undefined -fsanitize-recover"
40929
40930  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG\"" >&5
40931$as_echo_n "checking if compiler supports \"$CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG\"... " >&6; }
40932  supports=yes
40933
40934  saved_cflags="$CFLAGS"
40935  CFLAGS="$CFLAGS $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG"
40936  ac_ext=c
40937ac_cpp='$CPP $CPPFLAGS'
40938ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40939ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40940ac_compiler_gnu=$ac_cv_c_compiler_gnu
40941
40942  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40943/* end confdefs.h.  */
40944int i;
40945_ACEOF
40946if ac_fn_c_try_compile "$LINENO"; then :
40947
40948else
40949  supports=no
40950fi
40951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40952  ac_ext=cpp
40953ac_cpp='$CXXCPP $CPPFLAGS'
40954ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40955ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40956ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40957
40958  CFLAGS="$saved_cflags"
40959
40960  saved_cxxflags="$CXXFLAGS"
40961  CXXFLAGS="$CXXFLAG $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG"
40962  ac_ext=cpp
40963ac_cpp='$CXXCPP $CPPFLAGS'
40964ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40965ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40966ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40967
40968  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40969/* end confdefs.h.  */
40970int i;
40971_ACEOF
40972if ac_fn_cxx_try_compile "$LINENO"; then :
40973
40974else
40975  supports=no
40976fi
40977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40978  ac_ext=cpp
40979ac_cpp='$CXXCPP $CPPFLAGS'
40980ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40981ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40982ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40983
40984  CXXFLAGS="$saved_cxxflags"
40985
40986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40987$as_echo "$supports" >&6; }
40988  if test "x$supports" = "xyes" ; then
40989    HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR=true
40990  else
40991    HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR=false
40992  fi
40993
40994
40995    # "-z relro" supported in GNU binutils 2.17 and later
40996    LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
40997
40998  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
40999$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
41000  supports=yes
41001
41002  saved_ldflags="$LDFLAGS"
41003  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
41004  ac_ext=c
41005ac_cpp='$CPP $CPPFLAGS'
41006ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41007ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41008ac_compiler_gnu=$ac_cv_c_compiler_gnu
41009
41010  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41011/* end confdefs.h.  */
41012
41013int
41014main ()
41015{
41016
41017  ;
41018  return 0;
41019}
41020_ACEOF
41021if ac_fn_c_try_link "$LINENO"; then :
41022
41023else
41024  supports=no
41025fi
41026rm -f core conftest.err conftest.$ac_objext \
41027    conftest$ac_exeext conftest.$ac_ext
41028  ac_ext=cpp
41029ac_cpp='$CXXCPP $CPPFLAGS'
41030ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41031ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41032ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41033
41034  LDFLAGS="$saved_ldflags"
41035
41036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41037$as_echo "$supports" >&6; }
41038  if test "x$supports" = "xyes" ; then
41039    HAS_LINKER_RELRO=true
41040  else
41041    HAS_LINKER_RELRO=false
41042  fi
41043
41044
41045    # "-z now" supported in GNU binutils 2.11 and later
41046    LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
41047
41048  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
41049$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
41050  supports=yes
41051
41052  saved_ldflags="$LDFLAGS"
41053  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
41054  ac_ext=c
41055ac_cpp='$CPP $CPPFLAGS'
41056ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41057ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41058ac_compiler_gnu=$ac_cv_c_compiler_gnu
41059
41060  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41061/* end confdefs.h.  */
41062
41063int
41064main ()
41065{
41066
41067  ;
41068  return 0;
41069}
41070_ACEOF
41071if ac_fn_c_try_link "$LINENO"; then :
41072
41073else
41074  supports=no
41075fi
41076rm -f core conftest.err conftest.$ac_objext \
41077    conftest$ac_exeext conftest.$ac_ext
41078  ac_ext=cpp
41079ac_cpp='$CXXCPP $CPPFLAGS'
41080ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41081ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41082ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41083
41084  LDFLAGS="$saved_ldflags"
41085
41086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41087$as_echo "$supports" >&6; }
41088  if test "x$supports" = "xyes" ; then
41089    HAS_LINKER_NOW=true
41090  else
41091    HAS_LINKER_NOW=false
41092  fi
41093
41094  fi
41095
41096  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
41097  # in executable.'
41098  USING_BROKEN_SUSE_LD=no
41099  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
41100    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
41101$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
41102    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
41103    $ECHO "int main() { }" > main.c
41104    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
41105      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41106$as_echo "no" >&6; }
41107      USING_BROKEN_SUSE_LD=no
41108    else
41109      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41110$as_echo "yes" >&6; }
41111      USING_BROKEN_SUSE_LD=yes
41112    fi
41113    rm -rf version-script.map main.c a.out
41114  fi
41115
41116
41117
41118# Setup the JTReg Regression Test Harness.
41119
41120
41121# Check whether --with-jtreg was given.
41122if test "${with_jtreg+set}" = set; then :
41123  withval=$with_jtreg;
41124else
41125  with_jtreg=no
41126fi
41127
41128
41129  if test "x$with_jtreg" = xno; then
41130    # jtreg disabled
41131    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41132$as_echo_n "checking for jtreg... " >&6; }
41133    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41134$as_echo "no" >&6; }
41135  else
41136    if test "x$with_jtreg" != xyes; then
41137      # with path specified.
41138      JT_HOME="$with_jtreg"
41139    fi
41140
41141    if test "x$JT_HOME" != x; then
41142      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41143$as_echo_n "checking for jtreg... " >&6; }
41144
41145      # use JT_HOME enviroment var.
41146
41147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41148
41149  # Input might be given as Windows format, start by converting to
41150  # unix format.
41151  path="$JT_HOME"
41152  new_path=`$CYGPATH -u "$path"`
41153
41154  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41155  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41156  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41157  # "foo.exe" is OK but "foo" is an error.
41158  #
41159  # This test is therefore slightly more accurate than "test -f" to check for file precense.
41160  # It is also a way to make sure we got the proper file name for the real test later on.
41161  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41162  if test "x$test_shortpath" = x; then
41163    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41164$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41165    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
41166  fi
41167
41168  # Call helper function which possibly converts this using DOS-style short mode.
41169  # If so, the updated path is stored in $new_path.
41170
41171  input_path="$new_path"
41172  # Check if we need to convert this using DOS-style short mode. If the path
41173  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41174  # take no chances and rewrite it.
41175  # Note: m4 eats our [], so we need to use [ and ] instead.
41176  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41177  if test "x$has_forbidden_chars" != x; then
41178    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41179    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41180    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41181    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41182      # Going to short mode and back again did indeed matter. Since short mode is
41183      # case insensitive, let's make it lowercase to improve readability.
41184      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41185      # Now convert it back to Unix-stile (cygpath)
41186      input_path=`$CYGPATH -u "$shortmode_path"`
41187      new_path="$input_path"
41188    fi
41189  fi
41190
41191  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41192  if test "x$test_cygdrive_prefix" = x; then
41193    # As a simple fix, exclude /usr/bin since it's not a real path.
41194    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
41195      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41196      # a path prefixed by /cygdrive for fixpath to work.
41197      new_path="$CYGWIN_ROOT_PATH$input_path"
41198    fi
41199  fi
41200
41201
41202  if test "x$path" != "x$new_path"; then
41203    JT_HOME="$new_path"
41204    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41205$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41206  fi
41207
41208  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41209
41210  path="$JT_HOME"
41211  has_colon=`$ECHO $path | $GREP ^.:`
41212  new_path="$path"
41213  if test "x$has_colon" = x; then
41214    # Not in mixed or Windows style, start by that.
41215    new_path=`cmd //c echo $path`
41216  fi
41217
41218
41219  input_path="$new_path"
41220  # Check if we need to convert this using DOS-style short mode. If the path
41221  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41222  # take no chances and rewrite it.
41223  # Note: m4 eats our [], so we need to use [ and ] instead.
41224  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41225  if test "x$has_forbidden_chars" != x; then
41226    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41227    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41228  fi
41229
41230
41231  windows_path="$new_path"
41232  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41233    unix_path=`$CYGPATH -u "$windows_path"`
41234    new_path="$unix_path"
41235  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41236    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41237    new_path="$unix_path"
41238  fi
41239
41240  if test "x$path" != "x$new_path"; then
41241    JT_HOME="$new_path"
41242    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41243$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41244  fi
41245
41246  # Save the first 10 bytes of this path to the storage, so fixpath can work.
41247  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41248
41249  else
41250    # We're on a posix platform. Hooray! :)
41251    path="$JT_HOME"
41252    has_space=`$ECHO "$path" | $GREP " "`
41253    if test "x$has_space" != x; then
41254      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41255$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41256      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
41257    fi
41258
41259    # Use eval to expand a potential ~
41260    eval path="$path"
41261    if test ! -f "$path" && test ! -d "$path"; then
41262      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
41263    fi
41264
41265    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
41266  fi
41267
41268
41269      # jtreg win32 script works for everybody
41270      JTREGEXE="$JT_HOME/win32/bin/jtreg"
41271
41272      if test ! -f "$JTREGEXE"; then
41273        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
41274      fi
41275
41276      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41277$as_echo "$JTREGEXE" >&6; }
41278    else
41279      # try to find jtreg on path
41280
41281
41282
41283  # Publish this variable in the help.
41284
41285
41286  if test "x$JTREGEXE" = x; then
41287    # The variable is not set by user, try to locate tool using the code snippet
41288    for ac_prog in jtreg
41289do
41290  # Extract the first word of "$ac_prog", so it can be a program name with args.
41291set dummy $ac_prog; ac_word=$2
41292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41293$as_echo_n "checking for $ac_word... " >&6; }
41294if ${ac_cv_path_JTREGEXE+:} false; then :
41295  $as_echo_n "(cached) " >&6
41296else
41297  case $JTREGEXE in
41298  [\\/]* | ?:[\\/]*)
41299  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41300  ;;
41301  *)
41302  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41303for as_dir in $PATH
41304do
41305  IFS=$as_save_IFS
41306  test -z "$as_dir" && as_dir=.
41307    for ac_exec_ext in '' $ac_executable_extensions; do
41308  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41309    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41310    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41311    break 2
41312  fi
41313done
41314  done
41315IFS=$as_save_IFS
41316
41317  ;;
41318esac
41319fi
41320JTREGEXE=$ac_cv_path_JTREGEXE
41321if test -n "$JTREGEXE"; then
41322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41323$as_echo "$JTREGEXE" >&6; }
41324else
41325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41326$as_echo "no" >&6; }
41327fi
41328
41329
41330  test -n "$JTREGEXE" && break
41331done
41332
41333  else
41334    # The variable is set, but is it from the command line or the environment?
41335
41336    # Try to remove the string !JTREGEXE! from our list.
41337    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
41338    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41339      # If it failed, the variable was not from the command line. Ignore it,
41340      # but warn the user (except for BASH, which is always set by the calling BASH).
41341      if test "xJTREGEXE" != xBASH; then
41342        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
41343$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
41344      fi
41345      # Try to locate tool using the code snippet
41346      for ac_prog in jtreg
41347do
41348  # Extract the first word of "$ac_prog", so it can be a program name with args.
41349set dummy $ac_prog; ac_word=$2
41350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41351$as_echo_n "checking for $ac_word... " >&6; }
41352if ${ac_cv_path_JTREGEXE+:} false; then :
41353  $as_echo_n "(cached) " >&6
41354else
41355  case $JTREGEXE in
41356  [\\/]* | ?:[\\/]*)
41357  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41358  ;;
41359  *)
41360  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41361for as_dir in $PATH
41362do
41363  IFS=$as_save_IFS
41364  test -z "$as_dir" && as_dir=.
41365    for ac_exec_ext in '' $ac_executable_extensions; do
41366  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41367    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41368    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41369    break 2
41370  fi
41371done
41372  done
41373IFS=$as_save_IFS
41374
41375  ;;
41376esac
41377fi
41378JTREGEXE=$ac_cv_path_JTREGEXE
41379if test -n "$JTREGEXE"; then
41380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41381$as_echo "$JTREGEXE" >&6; }
41382else
41383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41384$as_echo "no" >&6; }
41385fi
41386
41387
41388  test -n "$JTREGEXE" && break
41389done
41390
41391    else
41392      # If it succeeded, then it was overridden by the user. We will use it
41393      # for the tool.
41394
41395      # First remove it from the list of overridden variables, so we can test
41396      # for unknown variables in the end.
41397      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41398
41399      # Check if the provided tool contains a complete path.
41400      tool_specified="$JTREGEXE"
41401      tool_basename="${tool_specified##*/}"
41402      if test "x$tool_basename" = "x$tool_specified"; then
41403        # A command without a complete path is provided, search $PATH.
41404        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
41405$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
41406        # Extract the first word of "$tool_basename", so it can be a program name with args.
41407set dummy $tool_basename; ac_word=$2
41408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41409$as_echo_n "checking for $ac_word... " >&6; }
41410if ${ac_cv_path_JTREGEXE+:} false; then :
41411  $as_echo_n "(cached) " >&6
41412else
41413  case $JTREGEXE in
41414  [\\/]* | ?:[\\/]*)
41415  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41416  ;;
41417  *)
41418  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41419for as_dir in $PATH
41420do
41421  IFS=$as_save_IFS
41422  test -z "$as_dir" && as_dir=.
41423    for ac_exec_ext in '' $ac_executable_extensions; do
41424  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41425    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41426    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41427    break 2
41428  fi
41429done
41430  done
41431IFS=$as_save_IFS
41432
41433  ;;
41434esac
41435fi
41436JTREGEXE=$ac_cv_path_JTREGEXE
41437if test -n "$JTREGEXE"; then
41438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41439$as_echo "$JTREGEXE" >&6; }
41440else
41441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41442$as_echo "no" >&6; }
41443fi
41444
41445
41446        if test "x$JTREGEXE" = x; then
41447          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41448        fi
41449      else
41450        # Otherwise we believe it is a complete path. Use it as it is.
41451        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
41452$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
41453        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
41454$as_echo_n "checking for JTREGEXE... " >&6; }
41455        if test ! -x "$tool_specified"; then
41456          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41457$as_echo "not found" >&6; }
41458          as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
41459        fi
41460        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41461$as_echo "$tool_specified" >&6; }
41462      fi
41463    fi
41464  fi
41465
41466
41467
41468  if test "x$JTREGEXE" = x; then
41469    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
41470  fi
41471
41472
41473      JT_HOME="`$DIRNAME $JTREGEXE`"
41474    fi
41475  fi
41476
41477
41478
41479
41480
41481
41482  # Option used to tell the compiler whether to create 32- or 64-bit executables
41483  if test "x$TOOLCHAIN_TYPE" = xxlc; then
41484    COMPILER_TARGET_BITS_FLAG="-q"
41485  else
41486    COMPILER_TARGET_BITS_FLAG="-m"
41487  fi
41488
41489
41490  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
41491  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41492    ARFLAGS="-r"
41493  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41494    ARFLAGS="-X64"
41495  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
41496    # lib.exe is used as AR to create static libraries.
41497    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
41498  else
41499    ARFLAGS=""
41500  fi
41501
41502
41503  ## Setup strip.
41504  # FIXME: should this really be per platform, or should it be per toolchain type?
41505  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
41506  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
41507  if test "x$OPENJDK_TARGET_OS" = xlinux; then
41508    STRIPFLAGS="-g"
41509  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
41510    STRIPFLAGS="-x"
41511  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41512    STRIPFLAGS="-S"
41513  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41514    STRIPFLAGS="-X32_64"
41515  fi
41516
41517  if test "x$OPENJDK_TARGET_OS" != xwindows; then
41518    POST_STRIP_CMD="$STRIP $STRIPFLAGS"
41519  fi
41520
41521
41522  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41523    # FIXME: break out into MCSFLAGS
41524    POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
41525  fi
41526
41527
41528  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41529    CC_OUT_OPTION=-Fo
41530    EXE_OUT_OPTION=-out:
41531    LD_OUT_OPTION=-out:
41532    AR_OUT_OPTION=-out:
41533  else
41534    # The option used to specify the target .o,.a or .so file.
41535    # When compiling, how to specify the to be created object file.
41536    CC_OUT_OPTION='-o$(SPACE)'
41537    # When linking, how to specify the to be created executable.
41538    EXE_OUT_OPTION='-o$(SPACE)'
41539    # When linking, how to specify the to be created dynamically linkable library.
41540    LD_OUT_OPTION='-o$(SPACE)'
41541    # When archiving, how to specify the to be create static archive for object files.
41542    AR_OUT_OPTION='rcs$(SPACE)'
41543  fi
41544
41545
41546
41547
41548
41549  # On Windows, we need to set RC flags.
41550  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41551    RC_FLAGS="-nologo -l 0x409 -r"
41552    if test "x$VARIANT" = xOPT; then
41553      RC_FLAGS="$RC_FLAGS -d NDEBUG"
41554    fi
41555
41556    # The version variables used to create RC_FLAGS may be overridden
41557    # in a custom configure script, or possibly the command line.
41558    # Let those variables be expanded at make time in spec.gmk.
41559    # The \$ are escaped to the shell, and the $(...) variables
41560    # are evaluated by make.
41561    RC_FLAGS="$RC_FLAGS \
41562        -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
41563        -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
41564        -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
41565        -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
41566        -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
41567        -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
41568        -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
41569  fi
41570
41571
41572  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41573    # silence copyright notice and other headers.
41574    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
41575  fi
41576
41577  if test "x$SYSROOT" != "x"; then
41578    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41579      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41580        # Solaris Studio does not have a concept of sysroot. Instead we must
41581        # make sure the default include and lib dirs are appended to each
41582        # compile and link command line.
41583        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
41584        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
41585            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
41586            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
41587      fi
41588    elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41589      # Apple only wants -isysroot <path>, but we also need -iframework<path>/System/Library/Frameworks
41590      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\" -iframework\"$SYSROOT/System/Library/Frameworks\""
41591      SYSROOT_LDFLAGS=$SYSROOT_CFLAGS
41592    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
41593      SYSROOT_CFLAGS="--sysroot=\"$SYSROOT\""
41594      SYSROOT_LDFLAGS="--sysroot=\"$SYSROOT\""
41595    elif test "x$TOOLCHAIN_TYPE" = xclang; then
41596      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
41597      SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
41598    fi
41599    # Propagate the sysroot args to hotspot
41600    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
41601    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
41602    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
41603  fi
41604
41605  # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
41606  # set this here so it doesn't have to be peppered throughout the forest
41607  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41608    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41609    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41610  fi
41611
41612
41613
41614
41615
41616# FIXME: Currently we must test this after toolchain but before flags. Fix!
41617
41618# Now we can test some aspects on the target using configure macros.
41619
41620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
41621$as_echo_n "checking for ANSI C header files... " >&6; }
41622if ${ac_cv_header_stdc+:} false; then :
41623  $as_echo_n "(cached) " >&6
41624else
41625  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41626/* end confdefs.h.  */
41627#include <stdlib.h>
41628#include <stdarg.h>
41629#include <string.h>
41630#include <float.h>
41631
41632int
41633main ()
41634{
41635
41636  ;
41637  return 0;
41638}
41639_ACEOF
41640if ac_fn_cxx_try_compile "$LINENO"; then :
41641  ac_cv_header_stdc=yes
41642else
41643  ac_cv_header_stdc=no
41644fi
41645rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41646
41647if test $ac_cv_header_stdc = yes; then
41648  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
41649  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41650/* end confdefs.h.  */
41651#include <string.h>
41652
41653_ACEOF
41654if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41655  $EGREP "memchr" >/dev/null 2>&1; then :
41656
41657else
41658  ac_cv_header_stdc=no
41659fi
41660rm -f conftest*
41661
41662fi
41663
41664if test $ac_cv_header_stdc = yes; then
41665  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
41666  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41667/* end confdefs.h.  */
41668#include <stdlib.h>
41669
41670_ACEOF
41671if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41672  $EGREP "free" >/dev/null 2>&1; then :
41673
41674else
41675  ac_cv_header_stdc=no
41676fi
41677rm -f conftest*
41678
41679fi
41680
41681if test $ac_cv_header_stdc = yes; then
41682  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
41683  if test "$cross_compiling" = yes; then :
41684  :
41685else
41686  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41687/* end confdefs.h.  */
41688#include <ctype.h>
41689#include <stdlib.h>
41690#if ((' ' & 0x0FF) == 0x020)
41691# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
41692# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
41693#else
41694# define ISLOWER(c) \
41695		   (('a' <= (c) && (c) <= 'i') \
41696		     || ('j' <= (c) && (c) <= 'r') \
41697		     || ('s' <= (c) && (c) <= 'z'))
41698# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
41699#endif
41700
41701#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
41702int
41703main ()
41704{
41705  int i;
41706  for (i = 0; i < 256; i++)
41707    if (XOR (islower (i), ISLOWER (i))
41708	|| toupper (i) != TOUPPER (i))
41709      return 2;
41710  return 0;
41711}
41712_ACEOF
41713if ac_fn_cxx_try_run "$LINENO"; then :
41714
41715else
41716  ac_cv_header_stdc=no
41717fi
41718rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41719  conftest.$ac_objext conftest.beam conftest.$ac_ext
41720fi
41721
41722fi
41723fi
41724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
41725$as_echo "$ac_cv_header_stdc" >&6; }
41726if test $ac_cv_header_stdc = yes; then
41727
41728$as_echo "#define STDC_HEADERS 1" >>confdefs.h
41729
41730fi
41731
41732# On IRIX 5.3, sys/types and inttypes.h are conflicting.
41733for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
41734		  inttypes.h stdint.h unistd.h
41735do :
41736  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
41737ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
41738"
41739if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
41740  cat >>confdefs.h <<_ACEOF
41741#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
41742_ACEOF
41743
41744fi
41745
41746done
41747
41748
41749
41750  ###############################################################################
41751  #
41752  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
41753  # (The JVM can use 32 or 64 bit Java pointers but that decision
41754  # is made at runtime.)
41755  #
41756
41757  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
41758    # Always specify -m flag on Solaris
41759    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
41760
41761  # When we add flags to the "official" CFLAGS etc, we need to
41762  # keep track of these additions in ADDED_CFLAGS etc. These
41763  # will later be checked to make sure only controlled additions
41764  # have been made to CFLAGS etc.
41765  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41766  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41767  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41768
41769  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41770  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41771  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41772
41773  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41774  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41775  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41776
41777  elif test "x$COMPILE_TYPE" = xreduced; then
41778    if test "x$OPENJDK_TARGET_OS" != xwindows; then
41779      # Specify -m if running reduced on other Posix platforms
41780
41781  # When we add flags to the "official" CFLAGS etc, we need to
41782  # keep track of these additions in ADDED_CFLAGS etc. These
41783  # will later be checked to make sure only controlled additions
41784  # have been made to CFLAGS etc.
41785  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41786  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41787  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41788
41789  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41790  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41791  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41792
41793  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41794  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41795  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41796
41797    fi
41798  fi
41799
41800  # Make compilation sanity check
41801  for ac_header in stdio.h
41802do :
41803  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
41804if test "x$ac_cv_header_stdio_h" = xyes; then :
41805  cat >>confdefs.h <<_ACEOF
41806#define HAVE_STDIO_H 1
41807_ACEOF
41808
41809else
41810
41811    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
41812$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
41813    if test "x$COMPILE_TYPE" = xreduced; then
41814      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
41815$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
41816    elif test "x$COMPILE_TYPE" = xcross; then
41817      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
41818$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
41819    fi
41820    as_fn_error $? "Cannot continue." "$LINENO" 5
41821
41822fi
41823
41824done
41825
41826
41827  # The cast to long int works around a bug in the HP C Compiler
41828# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41829# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41830# This bug is HP SR number 8606223364.
41831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41832$as_echo_n "checking size of int *... " >&6; }
41833if ${ac_cv_sizeof_int_p+:} false; then :
41834  $as_echo_n "(cached) " >&6
41835else
41836  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41837
41838else
41839  if test "$ac_cv_type_int_p" = yes; then
41840     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41841$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41842as_fn_error 77 "cannot compute sizeof (int *)
41843See \`config.log' for more details" "$LINENO" 5; }
41844   else
41845     ac_cv_sizeof_int_p=0
41846   fi
41847fi
41848
41849fi
41850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41851$as_echo "$ac_cv_sizeof_int_p" >&6; }
41852
41853
41854
41855cat >>confdefs.h <<_ACEOF
41856#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41857_ACEOF
41858
41859
41860
41861  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
41862  if test "x$ac_cv_sizeof_int_p" = x; then
41863    # The test failed, lets stick to the assumed value.
41864    { $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
41865$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
41866  else
41867    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41868
41869    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41870      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
41871      # Let's try to implicitely set the compilers target architecture and retry the test
41872      { $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
41873$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;}
41874      { $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
41875$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;}
41876
41877  # When we add flags to the "official" CFLAGS etc, we need to
41878  # keep track of these additions in ADDED_CFLAGS etc. These
41879  # will later be checked to make sure only controlled additions
41880  # have been made to CFLAGS etc.
41881  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41882  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41883  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41884
41885  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41886  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41887  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41888
41889  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41890  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41891  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41892
41893
41894      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
41895      unset ac_cv_sizeof_int_p
41896      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
41897      cat >>confdefs.h <<_ACEOF
41898#undef SIZEOF_INT_P
41899_ACEOF
41900
41901      # The cast to long int works around a bug in the HP C Compiler
41902# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41903# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41904# This bug is HP SR number 8606223364.
41905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41906$as_echo_n "checking size of int *... " >&6; }
41907if ${ac_cv_sizeof_int_p+:} false; then :
41908  $as_echo_n "(cached) " >&6
41909else
41910  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41911
41912else
41913  if test "$ac_cv_type_int_p" = yes; then
41914     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41915$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41916as_fn_error 77 "cannot compute sizeof (int *)
41917See \`config.log' for more details" "$LINENO" 5; }
41918   else
41919     ac_cv_sizeof_int_p=0
41920   fi
41921fi
41922
41923fi
41924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41925$as_echo "$ac_cv_sizeof_int_p" >&6; }
41926
41927
41928
41929cat >>confdefs.h <<_ACEOF
41930#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41931_ACEOF
41932
41933
41934
41935      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41936
41937      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41938        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
41939      fi
41940    fi
41941  fi
41942
41943  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
41944$as_echo_n "checking for target address size... " >&6; }
41945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
41946$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
41947
41948
41949  ###############################################################################
41950  #
41951  # Is the target little of big endian?
41952  #
41953   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
41954$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
41955if ${ac_cv_c_bigendian+:} false; then :
41956  $as_echo_n "(cached) " >&6
41957else
41958  ac_cv_c_bigendian=unknown
41959    # See if we're dealing with a universal compiler.
41960    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41961/* end confdefs.h.  */
41962#ifndef __APPLE_CC__
41963	       not a universal capable compiler
41964	     #endif
41965	     typedef int dummy;
41966
41967_ACEOF
41968if ac_fn_cxx_try_compile "$LINENO"; then :
41969
41970	# Check for potential -arch flags.  It is not universal unless
41971	# there are at least two -arch flags with different values.
41972	ac_arch=
41973	ac_prev=
41974	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
41975	 if test -n "$ac_prev"; then
41976	   case $ac_word in
41977	     i?86 | x86_64 | ppc | ppc64)
41978	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
41979		 ac_arch=$ac_word
41980	       else
41981		 ac_cv_c_bigendian=universal
41982		 break
41983	       fi
41984	       ;;
41985	   esac
41986	   ac_prev=
41987	 elif test "x$ac_word" = "x-arch"; then
41988	   ac_prev=arch
41989	 fi
41990       done
41991fi
41992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41993    if test $ac_cv_c_bigendian = unknown; then
41994      # See if sys/param.h defines the BYTE_ORDER macro.
41995      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41996/* end confdefs.h.  */
41997#include <sys/types.h>
41998	     #include <sys/param.h>
41999
42000int
42001main ()
42002{
42003#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
42004		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
42005		     && LITTLE_ENDIAN)
42006	      bogus endian macros
42007	     #endif
42008
42009  ;
42010  return 0;
42011}
42012_ACEOF
42013if ac_fn_cxx_try_compile "$LINENO"; then :
42014  # It does; now see whether it defined to BIG_ENDIAN or not.
42015	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42016/* end confdefs.h.  */
42017#include <sys/types.h>
42018		#include <sys/param.h>
42019
42020int
42021main ()
42022{
42023#if BYTE_ORDER != BIG_ENDIAN
42024		 not big endian
42025		#endif
42026
42027  ;
42028  return 0;
42029}
42030_ACEOF
42031if ac_fn_cxx_try_compile "$LINENO"; then :
42032  ac_cv_c_bigendian=yes
42033else
42034  ac_cv_c_bigendian=no
42035fi
42036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42037fi
42038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42039    fi
42040    if test $ac_cv_c_bigendian = unknown; then
42041      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
42042      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42043/* end confdefs.h.  */
42044#include <limits.h>
42045
42046int
42047main ()
42048{
42049#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
42050	      bogus endian macros
42051	     #endif
42052
42053  ;
42054  return 0;
42055}
42056_ACEOF
42057if ac_fn_cxx_try_compile "$LINENO"; then :
42058  # It does; now see whether it defined to _BIG_ENDIAN or not.
42059	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42060/* end confdefs.h.  */
42061#include <limits.h>
42062
42063int
42064main ()
42065{
42066#ifndef _BIG_ENDIAN
42067		 not big endian
42068		#endif
42069
42070  ;
42071  return 0;
42072}
42073_ACEOF
42074if ac_fn_cxx_try_compile "$LINENO"; then :
42075  ac_cv_c_bigendian=yes
42076else
42077  ac_cv_c_bigendian=no
42078fi
42079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42080fi
42081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42082    fi
42083    if test $ac_cv_c_bigendian = unknown; then
42084      # Compile a test program.
42085      if test "$cross_compiling" = yes; then :
42086  # Try to guess by grepping values from an object file.
42087	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42088/* end confdefs.h.  */
42089short int ascii_mm[] =
42090		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
42091		short int ascii_ii[] =
42092		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
42093		int use_ascii (int i) {
42094		  return ascii_mm[i] + ascii_ii[i];
42095		}
42096		short int ebcdic_ii[] =
42097		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
42098		short int ebcdic_mm[] =
42099		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
42100		int use_ebcdic (int i) {
42101		  return ebcdic_mm[i] + ebcdic_ii[i];
42102		}
42103		extern int foo;
42104
42105int
42106main ()
42107{
42108return use_ascii (foo) == use_ebcdic (foo);
42109  ;
42110  return 0;
42111}
42112_ACEOF
42113if ac_fn_cxx_try_compile "$LINENO"; then :
42114  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
42115	      ac_cv_c_bigendian=yes
42116	    fi
42117	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
42118	      if test "$ac_cv_c_bigendian" = unknown; then
42119		ac_cv_c_bigendian=no
42120	      else
42121		# finding both strings is unlikely to happen, but who knows?
42122		ac_cv_c_bigendian=unknown
42123	      fi
42124	    fi
42125fi
42126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42127else
42128  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42129/* end confdefs.h.  */
42130$ac_includes_default
42131int
42132main ()
42133{
42134
42135	     /* Are we little or big endian?  From Harbison&Steele.  */
42136	     union
42137	     {
42138	       long int l;
42139	       char c[sizeof (long int)];
42140	     } u;
42141	     u.l = 1;
42142	     return u.c[sizeof (long int) - 1] == 1;
42143
42144  ;
42145  return 0;
42146}
42147_ACEOF
42148if ac_fn_cxx_try_run "$LINENO"; then :
42149  ac_cv_c_bigendian=no
42150else
42151  ac_cv_c_bigendian=yes
42152fi
42153rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42154  conftest.$ac_objext conftest.beam conftest.$ac_ext
42155fi
42156
42157    fi
42158fi
42159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
42160$as_echo "$ac_cv_c_bigendian" >&6; }
42161 case $ac_cv_c_bigendian in #(
42162   yes)
42163     ENDIAN="big";; #(
42164   no)
42165     ENDIAN="little" ;; #(
42166   universal)
42167     ENDIAN="universal_endianness"
42168     ;; #(
42169   *)
42170     ENDIAN="unknown" ;;
42171 esac
42172
42173
42174  if test "x$ENDIAN" = xuniversal_endianness; then
42175    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
42176  fi
42177  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
42178    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
42179  fi
42180
42181
42182# Configure flags for the tools
42183
42184  ###############################################################################
42185  #
42186  # How to compile shared libraries.
42187  #
42188
42189  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42190    PICFLAG="-fPIC"
42191    C_FLAG_REORDER=''
42192    CXX_FLAG_REORDER=''
42193
42194    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42195      # Linking is different on MacOSX
42196      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42197      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42198      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42199      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42200      SET_SHARED_LIBRARY_MAPFILE=''
42201    else
42202      # Default works for linux, might work on other platforms as well.
42203      SHARED_LIBRARY_FLAGS='-shared'
42204      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42205      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42206      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42207      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42208    fi
42209  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42210    PICFLAG=''
42211    C_FLAG_REORDER=''
42212    CXX_FLAG_REORDER=''
42213
42214    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42215      # Linking is different on MacOSX
42216      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42217      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42218      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42219      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42220      SET_SHARED_LIBRARY_MAPFILE=''
42221    else
42222      # Default works for linux, might work on other platforms as well.
42223      SHARED_LIBRARY_FLAGS='-shared'
42224      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42225      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42226      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42227      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42228    fi
42229  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42230    PICFLAG="-KPIC"
42231    C_FLAG_REORDER='-xF'
42232    CXX_FLAG_REORDER='-xF'
42233    SHARED_LIBRARY_FLAGS="-G"
42234    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
42235    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42236    SET_SHARED_LIBRARY_NAME=''
42237    SET_SHARED_LIBRARY_MAPFILE='-M$1'
42238  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42239    PICFLAG="-qpic=large"
42240    C_FLAG_REORDER=''
42241    CXX_FLAG_REORDER=''
42242    SHARED_LIBRARY_FLAGS="-qmkshrobj"
42243    SET_EXECUTABLE_ORIGIN=""
42244    SET_SHARED_LIBRARY_ORIGIN=''
42245    SET_SHARED_LIBRARY_NAME=''
42246    SET_SHARED_LIBRARY_MAPFILE=''
42247  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42248    PICFLAG=""
42249    C_FLAG_REORDER=''
42250    CXX_FLAG_REORDER=''
42251    SHARED_LIBRARY_FLAGS="-LD"
42252    SET_EXECUTABLE_ORIGIN=''
42253    SET_SHARED_LIBRARY_ORIGIN=''
42254    SET_SHARED_LIBRARY_NAME=''
42255    SET_SHARED_LIBRARY_MAPFILE=''
42256  fi
42257
42258
42259
42260
42261
42262
42263
42264
42265
42266  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42267    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
42268    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
42269    CFLAGS_JDKLIB_EXTRA='-xstrconst'
42270  fi
42271  # The (cross) compiler is now configured, we can now test capabilities
42272  # of the target platform.
42273
42274
42275
42276  ###############################################################################
42277  #
42278  # Setup the opt flags for different compilers
42279  # and different operating systems.
42280  #
42281
42282  # FIXME: this was indirectly the old default, but just inherited.
42283  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42284  #   C_FLAG_DEPS="-MMD -MF"
42285  # fi
42286
42287  # Generate make dependency files
42288  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42289    C_FLAG_DEPS="-MMD -MF"
42290  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42291    C_FLAG_DEPS="-MMD -MF"
42292  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42293    C_FLAG_DEPS="-xMMD -xMF"
42294  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42295    C_FLAG_DEPS="-qmakedep=gcc -MF"
42296  fi
42297  CXX_FLAG_DEPS="$C_FLAG_DEPS"
42298
42299
42300
42301  # Debug symbols
42302  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42303    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
42304      # reduce from default "-g2" option to save space
42305      CFLAGS_DEBUG_SYMBOLS="-g1"
42306      CXXFLAGS_DEBUG_SYMBOLS="-g1"
42307    else
42308      CFLAGS_DEBUG_SYMBOLS="-g"
42309      CXXFLAGS_DEBUG_SYMBOLS="-g"
42310    fi
42311  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42312    CFLAGS_DEBUG_SYMBOLS="-g"
42313    CXXFLAGS_DEBUG_SYMBOLS="-g"
42314  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42315    CFLAGS_DEBUG_SYMBOLS="-g -xs"
42316    # FIXME: likely a bug, this disables debug symbols rather than enables them
42317    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
42318  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42319    CFLAGS_DEBUG_SYMBOLS="-g"
42320    CXXFLAGS_DEBUG_SYMBOLS="-g"
42321  fi
42322
42323
42324
42325  # bounds, memory and behavior checking options
42326  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42327    case $DEBUG_LEVEL in
42328    release )
42329      # no adjustment
42330      ;;
42331    fastdebug )
42332      # no adjustment
42333      ;;
42334    slowdebug )
42335      # Add runtime stack smashing and undefined behavior checks
42336      CFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
42337      CXXFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
42338      if test "x$HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR" = "xtrue"; then
42339        CFLAGS_DEBUG_OPTIONS="$CFLAGS_DEBUG_OPTIONS  $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG"
42340        CXXFLAGS_DEBUG_OPTIONS="$CXXFLAGS_DEBUG_OPTIONS $CFLAG_DETECT_UNDEFINED_BEHAVIsOR_FLAG"
42341      fi
42342      ;;
42343    esac
42344  fi
42345
42346
42347
42348  # Optimization levels
42349  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42350    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
42351
42352    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
42353      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
42354      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
42355      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
42356      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
42357      C_O_FLAG_DEBUG="-xregs=no%frameptr"
42358      C_O_FLAG_NONE="-xregs=no%frameptr"
42359      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
42360      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
42361      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
42362      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
42363      CXX_O_FLAG_NONE="-xregs=no%frameptr"
42364      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42365        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
42366        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
42367      fi
42368    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42369      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
42370      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42371      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42372      C_O_FLAG_DEBUG=""
42373      C_O_FLAG_NONE=""
42374      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
42375      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42376      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42377      C_O_FLAG_DEBUG=""
42378      CXX_O_FLAG_NONE=""
42379    fi
42380  else
42381    # The remaining toolchains share opt flags between CC and CXX;
42382    # setup for C and duplicate afterwards.
42383    if test "x$TOOLCHAIN_TYPE" = xgcc; then
42384      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42385        # On MacOSX we optimize for size, something
42386        # we should do for all platforms?
42387        C_O_FLAG_HIGHEST="-Os"
42388        C_O_FLAG_HI="-Os"
42389        C_O_FLAG_NORM="-Os"
42390      else
42391        C_O_FLAG_HIGHEST="-O3"
42392        C_O_FLAG_HI="-O3"
42393        C_O_FLAG_NORM="-O2"
42394      fi
42395      C_O_FLAG_DEBUG="-O0"
42396      C_O_FLAG_NONE="-O0"
42397    elif test "x$TOOLCHAIN_TYPE" = xclang; then
42398      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42399        # On MacOSX we optimize for size, something
42400        # we should do for all platforms?
42401        C_O_FLAG_HIGHEST="-Os"
42402        C_O_FLAG_HI="-Os"
42403        C_O_FLAG_NORM="-Os"
42404      else
42405        C_O_FLAG_HIGHEST="-O3"
42406        C_O_FLAG_HI="-O3"
42407        C_O_FLAG_NORM="-O2"
42408      fi
42409      C_O_FLAG_DEBUG="-O0"
42410      C_O_FLAG_NONE="-O0"
42411    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42412      C_O_FLAG_HIGHEST="-O3"
42413      C_O_FLAG_HI="-O3 -qstrict"
42414      C_O_FLAG_NORM="-O2"
42415      C_O_FLAG_DEBUG="-qnoopt"
42416      C_O_FLAG_NONE="-qnoop"
42417    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42418      C_O_FLAG_HIGHEST="-O2"
42419      C_O_FLAG_HI="-O1"
42420      C_O_FLAG_NORM="-O1"
42421      C_O_FLAG_DEBUG="-Od"
42422      C_O_FLAG_NONE="-Od"
42423    fi
42424    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
42425    CXX_O_FLAG_HI="$C_O_FLAG_HI"
42426    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
42427    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
42428    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
42429  fi
42430
42431  # Adjust optimization flags according to debug level.
42432  case $DEBUG_LEVEL in
42433    release )
42434      # no adjustment
42435      ;;
42436    fastdebug )
42437      # Not quite so much optimization
42438      C_O_FLAG_HI="$C_O_FLAG_NORM"
42439      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
42440      ;;
42441    slowdebug )
42442      # Disable optimization
42443      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
42444      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
42445      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
42446      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
42447      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
42448      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
42449      ;;
42450  esac
42451
42452
42453
42454
42455
42456
42457
42458
42459
42460
42461
42462
42463
42464  # Special extras...
42465  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42466    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42467      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42468      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42469    fi
42470  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42471    LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
42472    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
42473    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
42474  fi
42475
42476  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
42477    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
42478$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
42479  fi
42480
42481  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
42482    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
42483$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
42484  fi
42485
42486  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
42487    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
42488$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
42489  fi
42490
42491
42492# Check whether --with-extra-cflags was given.
42493if test "${with_extra_cflags+set}" = set; then :
42494  withval=$with_extra_cflags;
42495fi
42496
42497
42498
42499# Check whether --with-extra-cxxflags was given.
42500if test "${with_extra_cxxflags+set}" = set; then :
42501  withval=$with_extra_cxxflags;
42502fi
42503
42504
42505
42506# Check whether --with-extra-ldflags was given.
42507if test "${with_extra_ldflags+set}" = set; then :
42508  withval=$with_extra_ldflags;
42509fi
42510
42511
42512  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
42513  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
42514  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
42515
42516  # Hotspot needs these set in their legacy form
42517  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
42518  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
42519  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
42520
42521
42522
42523
42524
42525  ###############################################################################
42526  #
42527  # Now setup the CFLAGS and LDFLAGS for the JDK build.
42528  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
42529  #
42530
42531  # Setup compiler/platform specific flags into
42532  #    CFLAGS_JDK    - C Compiler flags
42533  #    CXXFLAGS_JDK  - C++ Compiler flags
42534  #    COMMON_CCXXFLAGS_JDK - common to C and C++
42535  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42536    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wno-parentheses -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
42537        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
42538    case $OPENJDK_TARGET_CPU_ARCH in
42539      arm )
42540        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42541        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42542        ;;
42543      ppc )
42544        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42545        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42546        ;;
42547      * )
42548        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
42549        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42550        ;;
42551    esac
42552  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42553    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
42554    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
42555      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
42556      CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
42557    fi
42558
42559    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
42560    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
42561  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42562    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42563    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42564  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42565    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
42566    -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
42567    -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
42568    -DWIN32 -DIAL"
42569    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
42570      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
42571    else
42572      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
42573    fi
42574  fi
42575
42576  ###############################################################################
42577
42578  # Adjust flags according to debug level.
42579  case $DEBUG_LEVEL in
42580    fastdebug | slowdebug )
42581      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
42582      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
42583      JAVAC_FLAGS="$JAVAC_FLAGS -g"
42584      ;;
42585    release )
42586      ;;
42587    * )
42588      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42589      ;;
42590  esac
42591
42592  # Setup LP64
42593  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
42594
42595  # Set some common defines. These works for all compilers, but assume
42596  # -D is universally accepted.
42597
42598  # Setup endianness
42599  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
42600    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
42601    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
42602    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
42603    #   Note: -Dmacro         is the same as    #define macro 1
42604    #         -Dmacro=        is the same as    #define macro
42605    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42606      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
42607    else
42608      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
42609    fi
42610  else
42611    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
42612    # are defined in the system?
42613    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42614      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
42615    else
42616      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
42617    fi
42618  fi
42619
42620  # Setup target OS define. Use OS target name but in upper case.
42621  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
42622  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
42623
42624  # Setup target CPU
42625  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
42626
42627  # Setup debug/release defines
42628  if test "x$DEBUG_LEVEL" = xrelease; then
42629    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
42630    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42631      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
42632    fi
42633  else
42634    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
42635  fi
42636
42637  # Setup release name
42638  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
42639
42640
42641  # Set some additional per-OS defines.
42642  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42643    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
42644  elif test "x$OPENJDK_TARGET_OS" = xaix; then
42645    # FIXME: PPC64 should not be here.
42646    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
42647  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
42648    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
42649  fi
42650
42651  # Additional macosx handling
42652  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42653    # Setting these parameters makes it an error to link to macosx APIs that are
42654    # newer than the given OS version and makes the linked binaries compatible
42655    # even if built on a newer version of the OS.
42656    # The expected format is X.Y.Z
42657    MACOSX_VERSION_MIN=10.7.0
42658
42659
42660    # The macro takes the version with no dots, ex: 1070
42661    # Let the flags variables get resolved in make for easier override on make
42662    # command line.
42663    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42664    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42665  fi
42666
42667  # Setup some hard coded includes
42668  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42669      -I${JDK_TOPDIR}/src/java.base/share/native/include \
42670      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
42671      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_API_DIR/native/include"
42672
42673  # The shared libraries are compiled using the picflag.
42674  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42675  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
42676
42677  # Executable flags
42678  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42679  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42680
42681
42682
42683
42684
42685
42686  # Setup LDFLAGS et al.
42687  #
42688
42689  # Now this is odd. The JDK native libraries have to link against libjvm.so
42690  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
42691  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
42692  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
42693  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
42694  # libraries will link to whatever is in memory. Yuck.
42695  #
42696  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
42697  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42698    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
42699    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42700      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
42701    fi
42702    # TODO: make -debug optional "--disable-full-debug-symbols"
42703    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
42704  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42705    # If this is a --hash-style=gnu system, use --hash-style=both, why?
42706    # We have previously set HAS_GNU_HASH if this is the case
42707    if test -n "$HAS_GNU_HASH"; then
42708      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
42709    fi
42710    if test "x$OPENJDK_TARGET_OS" = xlinux; then
42711      # And since we now know that the linker is gnu, then add -z defs, to forbid
42712      # undefined symbols in object files.
42713      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
42714      case $DEBUG_LEVEL in
42715        release )
42716          # tell linker to optimize libraries.
42717          # Should this be supplied to the OSS linker as well?
42718          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
42719          ;;
42720        slowdebug )
42721          if test "x$HAS_LINKER_NOW" = "xtrue"; then
42722            # do relocations at load
42723            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
42724            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
42725          fi
42726          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42727            # mark relocations read only
42728            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42729            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42730          fi
42731          ;;
42732        fastdebug )
42733          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42734            # mark relocations read only
42735            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42736            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42737          fi
42738          ;;
42739        * )
42740          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42741          ;;
42742        esac
42743    fi
42744  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42745    LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
42746    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
42747  fi
42748
42749  if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
42750    # If undefined behaviour detection is enabled then we need to tell linker.
42751    case $DEBUG_LEVEL in
42752      release | fastdebug )
42753        ;;
42754      slowdebug )
42755        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR" >&5
42756$as_echo "$as_me: WARNING: $HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR" >&2;}
42757        if test "x$HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR" = "xtrue"; then
42758          # enable undefined behaviour checking
42759          LDFLAGS_JDK="$LDFLAGS_JDK `$ECHO -n $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG | sed -e "s/ *\(^ \+\)/ -Xlinker \1/g"`"
42760          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK `$ECHO -n $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG | sed -e "s/ *\(^ \+\)/ -Xlinker \1/g"`"
42761        fi
42762        ;;
42763      * )
42764        as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42765        ;;
42766    esac
42767  fi
42768
42769  # Customize LDFLAGS for executables
42770
42771  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
42772
42773  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42774    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
42775      LDFLAGS_STACK_SIZE=1048576
42776    else
42777      LDFLAGS_STACK_SIZE=327680
42778    fi
42779    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
42780  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
42781    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
42782  fi
42783
42784  # Customize LDFLAGS for libs
42785  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
42786
42787  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42788    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${JDK_OUTPUTDIR}/lib"
42789    LDFLAGS_JDKLIB_SUFFIX=""
42790  else
42791    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
42792        -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
42793
42794    # On some platforms (mac) the linker warns about non existing -L dirs.
42795    # Add server first if available. Linking aginst client does not always produce the same results.
42796    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
42797    # Default to server for other variants.
42798    if test "x$JVM_VARIANT_SERVER" = xtrue; then
42799      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
42800    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
42801      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
42802    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
42803      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
42804    else
42805      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
42806    fi
42807
42808    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
42809    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42810      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
42811    fi
42812  fi
42813
42814
42815
42816
42817
42818
42819
42820
42821  # Some Zero and Shark settings.
42822  # ZERO_ARCHFLAG tells the compiler which mode to build for
42823  case "${OPENJDK_TARGET_CPU}" in
42824    s390)
42825      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
42826      ;;
42827    *)
42828      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42829  esac
42830
42831  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
42832$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
42833  supports=yes
42834
42835  saved_cflags="$CFLAGS"
42836  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
42837  ac_ext=c
42838ac_cpp='$CPP $CPPFLAGS'
42839ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42840ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42841ac_compiler_gnu=$ac_cv_c_compiler_gnu
42842
42843  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42844/* end confdefs.h.  */
42845int i;
42846_ACEOF
42847if ac_fn_c_try_compile "$LINENO"; then :
42848
42849else
42850  supports=no
42851fi
42852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42853  ac_ext=cpp
42854ac_cpp='$CXXCPP $CPPFLAGS'
42855ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42856ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42857ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42858
42859  CFLAGS="$saved_cflags"
42860
42861  saved_cxxflags="$CXXFLAGS"
42862  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
42863  ac_ext=cpp
42864ac_cpp='$CXXCPP $CPPFLAGS'
42865ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42866ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42867ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42868
42869  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42870/* end confdefs.h.  */
42871int i;
42872_ACEOF
42873if ac_fn_cxx_try_compile "$LINENO"; then :
42874
42875else
42876  supports=no
42877fi
42878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42879  ac_ext=cpp
42880ac_cpp='$CXXCPP $CPPFLAGS'
42881ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42882ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42883ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42884
42885  CXXFLAGS="$saved_cxxflags"
42886
42887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42888$as_echo "$supports" >&6; }
42889  if test "x$supports" = "xyes" ; then
42890    :
42891  else
42892    ZERO_ARCHFLAG=""
42893  fi
42894
42895
42896
42897  # Check that the compiler supports -mX (or -qX on AIX) flags
42898  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
42899
42900  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
42901$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
42902  supports=yes
42903
42904  saved_cflags="$CFLAGS"
42905  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42906  ac_ext=c
42907ac_cpp='$CPP $CPPFLAGS'
42908ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42909ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42910ac_compiler_gnu=$ac_cv_c_compiler_gnu
42911
42912  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42913/* end confdefs.h.  */
42914int i;
42915_ACEOF
42916if ac_fn_c_try_compile "$LINENO"; then :
42917
42918else
42919  supports=no
42920fi
42921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42922  ac_ext=cpp
42923ac_cpp='$CXXCPP $CPPFLAGS'
42924ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42925ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42926ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42927
42928  CFLAGS="$saved_cflags"
42929
42930  saved_cxxflags="$CXXFLAGS"
42931  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42932  ac_ext=cpp
42933ac_cpp='$CXXCPP $CPPFLAGS'
42934ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42935ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42936ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42937
42938  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42939/* end confdefs.h.  */
42940int i;
42941_ACEOF
42942if ac_fn_cxx_try_compile "$LINENO"; then :
42943
42944else
42945  supports=no
42946fi
42947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42948  ac_ext=cpp
42949ac_cpp='$CXXCPP $CPPFLAGS'
42950ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42951ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42952ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42953
42954  CXXFLAGS="$saved_cxxflags"
42955
42956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42957$as_echo "$supports" >&6; }
42958  if test "x$supports" = "xyes" ; then
42959    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
42960  else
42961    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
42962  fi
42963
42964
42965
42966  case "${TOOLCHAIN_TYPE}" in
42967    microsoft)
42968      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
42969      ;;
42970    solstudio)
42971      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
42972      ;;
42973    gcc)
42974      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42975      ;;
42976    clang)
42977      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42978      ;;
42979  esac
42980
42981
42982
42983# Setup debug symbols (need objcopy from the toolchain for that)
42984
42985  #
42986  # ENABLE_DEBUG_SYMBOLS
42987  # This must be done after the toolchain is setup, since we're looking at objcopy.
42988  #
42989  # Check whether --enable-debug-symbols was given.
42990if test "${enable_debug_symbols+set}" = set; then :
42991  enableval=$enable_debug_symbols;
42992fi
42993
42994
42995  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
42996$as_echo_n "checking if we should generate debug symbols... " >&6; }
42997
42998  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
42999    # explicit enabling of enable-debug-symbols and can't find objcopy
43000    #   this is an error
43001    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
43002  fi
43003
43004  if test "x$enable_debug_symbols" = "xyes"; then
43005    ENABLE_DEBUG_SYMBOLS=true
43006  elif test "x$enable_debug_symbols" = "xno"; then
43007    ENABLE_DEBUG_SYMBOLS=false
43008  else
43009    # Default is on if objcopy is found
43010    if test "x$OBJCOPY" != x; then
43011      ENABLE_DEBUG_SYMBOLS=true
43012    # MacOS X and Windows don't use objcopy but default is on for those OSes
43013    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
43014      ENABLE_DEBUG_SYMBOLS=true
43015    else
43016      ENABLE_DEBUG_SYMBOLS=false
43017    fi
43018  fi
43019
43020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
43021$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
43022
43023  #
43024  # ZIP_DEBUGINFO_FILES
43025  #
43026  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
43027$as_echo_n "checking if we should zip debug-info files... " >&6; }
43028  # Check whether --enable-zip-debug-info was given.
43029if test "${enable_zip_debug_info+set}" = set; then :
43030  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
43031else
43032  enable_zip_debug_info="yes"
43033fi
43034
43035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
43036$as_echo "${enable_zip_debug_info}" >&6; }
43037
43038  if test "x${enable_zip_debug_info}" = "xno"; then
43039    ZIP_DEBUGINFO_FILES=false
43040  else
43041    ZIP_DEBUGINFO_FILES=true
43042  fi
43043
43044
43045
43046
43047
43048###############################################################################
43049#
43050# Check dependencies for external and internal libraries.
43051#
43052###############################################################################
43053
43054# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
43055
43056  # When using cygwin or msys, we need a wrapper binary that renames
43057  # /cygdrive/c/ arguments into c:/ arguments and peeks into
43058  # @files and rewrites these too! This wrapper binary is
43059  # called fixpath.
43060  FIXPATH=
43061  if test "x$OPENJDK_BUILD_OS" = xwindows; then
43062    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
43063$as_echo_n "checking if fixpath can be created... " >&6; }
43064    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
43065    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
43066    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
43067      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
43068      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
43069      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
43070      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
43071    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
43072      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
43073      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
43074
43075      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
43076      # @ was chosen as separator to minimize risk of other tools messing around with it
43077      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
43078      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
43079
43080      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
43081    fi
43082    rm -f $OUTPUT_ROOT/fixpath*
43083    cd $OUTPUT_ROOT
43084    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
43085    cd $CURDIR
43086
43087    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
43088      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43089$as_echo "no" >&6; }
43090      cat $OUTPUT_ROOT/fixpath1.log
43091      as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
43092    fi
43093    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43094$as_echo "yes" >&6; }
43095    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
43096$as_echo_n "checking if fixpath.exe works... " >&6; }
43097    cd $OUTPUT_ROOT
43098    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
43099    cd $CURDIR
43100    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
43101      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43102$as_echo "no" >&6; }
43103      cat $OUTPUT_ROOT/fixpath2.log
43104      as_fn_error $? "fixpath did not work!" "$LINENO" 5
43105    fi
43106    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43107$as_echo "yes" >&6; }
43108    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
43109  fi
43110
43111
43112
43113
43114
43115
43116  ###############################################################################
43117  #
43118  # OS specific settings that we never will need to probe.
43119  #
43120  if test "x$OPENJDK_TARGET_OS" = xlinux; then
43121    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
43122$as_echo_n "checking what is not needed on Linux?... " >&6; }
43123    PULSE_NOT_NEEDED=yes
43124    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
43125$as_echo "pulse" >&6; }
43126  fi
43127
43128  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43129    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
43130$as_echo_n "checking what is not needed on Solaris?... " >&6; }
43131    ALSA_NOT_NEEDED=yes
43132    PULSE_NOT_NEEDED=yes
43133    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43134$as_echo "alsa pulse" >&6; }
43135  fi
43136
43137  if test "x$OPENJDK_TARGET_OS" = xaix; then
43138    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
43139$as_echo_n "checking what is not needed on AIX?... " >&6; }
43140    ALSA_NOT_NEEDED=yes
43141    PULSE_NOT_NEEDED=yes
43142    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43143$as_echo "alsa pulse" >&6; }
43144  fi
43145
43146
43147  if test "x$OPENJDK_TARGET_OS" = xwindows; then
43148    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
43149$as_echo_n "checking what is not needed on Windows?... " >&6; }
43150    CUPS_NOT_NEEDED=yes
43151    ALSA_NOT_NEEDED=yes
43152    PULSE_NOT_NEEDED=yes
43153    X11_NOT_NEEDED=yes
43154    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
43155$as_echo "alsa cups pulse x11" >&6; }
43156  fi
43157
43158  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43159    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
43160$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
43161    ALSA_NOT_NEEDED=yes
43162    PULSE_NOT_NEEDED=yes
43163    X11_NOT_NEEDED=yes
43164    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
43165$as_echo "alsa pulse x11" >&6; }
43166  fi
43167
43168  if test "x$OPENJDK_TARGET_OS" = xbsd; then
43169    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
43170$as_echo_n "checking what is not needed on bsd?... " >&6; }
43171    ALSA_NOT_NEEDED=yes
43172    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
43173$as_echo "alsa" >&6; }
43174  fi
43175
43176  if test "x$OPENJDK" = "xfalse"; then
43177    FREETYPE_NOT_NEEDED=yes
43178  fi
43179
43180  if test "x$SUPPORT_HEADFUL" = xno; then
43181    X11_NOT_NEEDED=yes
43182  fi
43183
43184
43185
43186  ###############################################################################
43187  #
43188  # Check for X Windows
43189  #
43190
43191  # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
43192  # Make a simple check for the libraries at the sysroot, and setup --x-includes and
43193  # --x-libraries for the sysroot, if that seems to be correct.
43194  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
43195    if test "x$SYSROOT" != "x"; then
43196      if test "x$x_includes" = xNONE; then
43197        if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
43198          x_includes="$SYSROOT/usr/X11R6/include"
43199        elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
43200          x_includes="$SYSROOT/usr/include"
43201        fi
43202      fi
43203      if test "x$x_libraries" = xNONE; then
43204        if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
43205          x_libraries="$SYSROOT/usr/X11R6/lib"
43206        elif test "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
43207          x_libraries="$SYSROOT/usr/lib64"
43208        elif test -f "$SYSROOT/usr/lib/libX11.so"; then
43209          x_libraries="$SYSROOT/usr/lib"
43210        fi
43211      fi
43212    fi
43213  fi
43214
43215  # Now let autoconf do it's magic
43216  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
43217$as_echo_n "checking for X... " >&6; }
43218
43219
43220# Check whether --with-x was given.
43221if test "${with_x+set}" = set; then :
43222  withval=$with_x;
43223fi
43224
43225# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
43226if test "x$with_x" = xno; then
43227  # The user explicitly disabled X.
43228  have_x=disabled
43229else
43230  case $x_includes,$x_libraries in #(
43231    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
43232    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
43233  $as_echo_n "(cached) " >&6
43234else
43235  # One or both of the vars are not set, and there is no cached value.
43236ac_x_includes=no ac_x_libraries=no
43237rm -f -r conftest.dir
43238if mkdir conftest.dir; then
43239  cd conftest.dir
43240  cat >Imakefile <<'_ACEOF'
43241incroot:
43242	@echo incroot='${INCROOT}'
43243usrlibdir:
43244	@echo usrlibdir='${USRLIBDIR}'
43245libdir:
43246	@echo libdir='${LIBDIR}'
43247_ACEOF
43248  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
43249    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
43250    for ac_var in incroot usrlibdir libdir; do
43251      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
43252    done
43253    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
43254    for ac_extension in a so sl dylib la dll; do
43255      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
43256	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
43257	ac_im_usrlibdir=$ac_im_libdir; break
43258      fi
43259    done
43260    # Screen out bogus values from the imake configuration.  They are
43261    # bogus both because they are the default anyway, and because
43262    # using them would break gcc on systems where it needs fixed includes.
43263    case $ac_im_incroot in
43264	/usr/include) ac_x_includes= ;;
43265	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
43266    esac
43267    case $ac_im_usrlibdir in
43268	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
43269	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
43270    esac
43271  fi
43272  cd ..
43273  rm -f -r conftest.dir
43274fi
43275
43276# Standard set of common directories for X headers.
43277# Check X11 before X11Rn because it is often a symlink to the current release.
43278ac_x_header_dirs='
43279/usr/X11/include
43280/usr/X11R7/include
43281/usr/X11R6/include
43282/usr/X11R5/include
43283/usr/X11R4/include
43284
43285/usr/include/X11
43286/usr/include/X11R7
43287/usr/include/X11R6
43288/usr/include/X11R5
43289/usr/include/X11R4
43290
43291/usr/local/X11/include
43292/usr/local/X11R7/include
43293/usr/local/X11R6/include
43294/usr/local/X11R5/include
43295/usr/local/X11R4/include
43296
43297/usr/local/include/X11
43298/usr/local/include/X11R7
43299/usr/local/include/X11R6
43300/usr/local/include/X11R5
43301/usr/local/include/X11R4
43302
43303/usr/X386/include
43304/usr/x386/include
43305/usr/XFree86/include/X11
43306
43307/usr/include
43308/usr/local/include
43309/usr/unsupported/include
43310/usr/athena/include
43311/usr/local/x11r5/include
43312/usr/lpp/Xamples/include
43313
43314/usr/openwin/include
43315/usr/openwin/share/include'
43316
43317if test "$ac_x_includes" = no; then
43318  # Guess where to find include files, by looking for Xlib.h.
43319  # First, try using that file with no special directory specified.
43320  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43321/* end confdefs.h.  */
43322#include <X11/Xlib.h>
43323_ACEOF
43324if ac_fn_cxx_try_cpp "$LINENO"; then :
43325  # We can compile using X headers with no special include directory.
43326ac_x_includes=
43327else
43328  for ac_dir in $ac_x_header_dirs; do
43329  if test -r "$ac_dir/X11/Xlib.h"; then
43330    ac_x_includes=$ac_dir
43331    break
43332  fi
43333done
43334fi
43335rm -f conftest.err conftest.i conftest.$ac_ext
43336fi # $ac_x_includes = no
43337
43338if test "$ac_x_libraries" = no; then
43339  # Check for the libraries.
43340  # See if we find them without any special options.
43341  # Don't add to $LIBS permanently.
43342  ac_save_LIBS=$LIBS
43343  LIBS="-lX11 $LIBS"
43344  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43345/* end confdefs.h.  */
43346#include <X11/Xlib.h>
43347int
43348main ()
43349{
43350XrmInitialize ()
43351  ;
43352  return 0;
43353}
43354_ACEOF
43355if ac_fn_cxx_try_link "$LINENO"; then :
43356  LIBS=$ac_save_LIBS
43357# We can link X programs with no special library path.
43358ac_x_libraries=
43359else
43360  LIBS=$ac_save_LIBS
43361for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
43362do
43363  # Don't even attempt the hair of trying to link an X program!
43364  for ac_extension in a so sl dylib la dll; do
43365    if test -r "$ac_dir/libX11.$ac_extension"; then
43366      ac_x_libraries=$ac_dir
43367      break 2
43368    fi
43369  done
43370done
43371fi
43372rm -f core conftest.err conftest.$ac_objext \
43373    conftest$ac_exeext conftest.$ac_ext
43374fi # $ac_x_libraries = no
43375
43376case $ac_x_includes,$ac_x_libraries in #(
43377  no,* | *,no | *\'*)
43378    # Didn't find X, or a directory has "'" in its name.
43379    ac_cv_have_x="have_x=no";; #(
43380  *)
43381    # Record where we found X for the cache.
43382    ac_cv_have_x="have_x=yes\
43383	ac_x_includes='$ac_x_includes'\
43384	ac_x_libraries='$ac_x_libraries'"
43385esac
43386fi
43387;; #(
43388    *) have_x=yes;;
43389  esac
43390  eval "$ac_cv_have_x"
43391fi # $with_x != no
43392
43393if test "$have_x" != yes; then
43394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
43395$as_echo "$have_x" >&6; }
43396  no_x=yes
43397else
43398  # If each of the values was on the command line, it overrides each guess.
43399  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
43400  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
43401  # Update the cache value to reflect the command line values.
43402  ac_cv_have_x="have_x=yes\
43403	ac_x_includes='$x_includes'\
43404	ac_x_libraries='$x_libraries'"
43405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
43406$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
43407fi
43408
43409  if test "$no_x" = yes; then
43410  # Not all programs may use this symbol, but it does not hurt to define it.
43411
43412$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
43413
43414  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
43415else
43416  if test -n "$x_includes"; then
43417    X_CFLAGS="$X_CFLAGS -I$x_includes"
43418  fi
43419
43420  # It would also be nice to do this for all -L options, not just this one.
43421  if test -n "$x_libraries"; then
43422    X_LIBS="$X_LIBS -L$x_libraries"
43423    # For Solaris; some versions of Sun CC require a space after -R and
43424    # others require no space.  Words are not sufficient . . . .
43425    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
43426$as_echo_n "checking whether -R must be followed by a space... " >&6; }
43427    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
43428    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
43429    ac_cxx_werror_flag=yes
43430    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43431/* end confdefs.h.  */
43432
43433int
43434main ()
43435{
43436
43437  ;
43438  return 0;
43439}
43440_ACEOF
43441if ac_fn_cxx_try_link "$LINENO"; then :
43442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43443$as_echo "no" >&6; }
43444       X_LIBS="$X_LIBS -R$x_libraries"
43445else
43446  LIBS="$ac_xsave_LIBS -R $x_libraries"
43447       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43448/* end confdefs.h.  */
43449
43450int
43451main ()
43452{
43453
43454  ;
43455  return 0;
43456}
43457_ACEOF
43458if ac_fn_cxx_try_link "$LINENO"; then :
43459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43460$as_echo "yes" >&6; }
43461	  X_LIBS="$X_LIBS -R $x_libraries"
43462else
43463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
43464$as_echo "neither works" >&6; }
43465fi
43466rm -f core conftest.err conftest.$ac_objext \
43467    conftest$ac_exeext conftest.$ac_ext
43468fi
43469rm -f core conftest.err conftest.$ac_objext \
43470    conftest$ac_exeext conftest.$ac_ext
43471    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
43472    LIBS=$ac_xsave_LIBS
43473  fi
43474
43475  # Check for system-dependent libraries X programs must link with.
43476  # Do this before checking for the system-independent R6 libraries
43477  # (-lICE), since we may need -lsocket or whatever for X linking.
43478
43479  if test "$ISC" = yes; then
43480    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
43481  else
43482    # Martyn Johnson says this is needed for Ultrix, if the X
43483    # libraries were built with DECnet support.  And Karl Berry says
43484    # the Alpha needs dnet_stub (dnet does not exist).
43485    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
43486    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43487/* end confdefs.h.  */
43488
43489/* Override any GCC internal prototype to avoid an error.
43490   Use char because int might match the return type of a GCC
43491   builtin and then its argument prototype would still apply.  */
43492#ifdef __cplusplus
43493extern "C"
43494#endif
43495char XOpenDisplay ();
43496int
43497main ()
43498{
43499return XOpenDisplay ();
43500  ;
43501  return 0;
43502}
43503_ACEOF
43504if ac_fn_cxx_try_link "$LINENO"; then :
43505
43506else
43507  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
43508$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
43509if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
43510  $as_echo_n "(cached) " >&6
43511else
43512  ac_check_lib_save_LIBS=$LIBS
43513LIBS="-ldnet  $LIBS"
43514cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43515/* end confdefs.h.  */
43516
43517/* Override any GCC internal prototype to avoid an error.
43518   Use char because int might match the return type of a GCC
43519   builtin and then its argument prototype would still apply.  */
43520#ifdef __cplusplus
43521extern "C"
43522#endif
43523char dnet_ntoa ();
43524int
43525main ()
43526{
43527return dnet_ntoa ();
43528  ;
43529  return 0;
43530}
43531_ACEOF
43532if ac_fn_cxx_try_link "$LINENO"; then :
43533  ac_cv_lib_dnet_dnet_ntoa=yes
43534else
43535  ac_cv_lib_dnet_dnet_ntoa=no
43536fi
43537rm -f core conftest.err conftest.$ac_objext \
43538    conftest$ac_exeext conftest.$ac_ext
43539LIBS=$ac_check_lib_save_LIBS
43540fi
43541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
43542$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
43543if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
43544  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
43545fi
43546
43547    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
43548      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
43549$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
43550if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
43551  $as_echo_n "(cached) " >&6
43552else
43553  ac_check_lib_save_LIBS=$LIBS
43554LIBS="-ldnet_stub  $LIBS"
43555cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43556/* end confdefs.h.  */
43557
43558/* Override any GCC internal prototype to avoid an error.
43559   Use char because int might match the return type of a GCC
43560   builtin and then its argument prototype would still apply.  */
43561#ifdef __cplusplus
43562extern "C"
43563#endif
43564char dnet_ntoa ();
43565int
43566main ()
43567{
43568return dnet_ntoa ();
43569  ;
43570  return 0;
43571}
43572_ACEOF
43573if ac_fn_cxx_try_link "$LINENO"; then :
43574  ac_cv_lib_dnet_stub_dnet_ntoa=yes
43575else
43576  ac_cv_lib_dnet_stub_dnet_ntoa=no
43577fi
43578rm -f core conftest.err conftest.$ac_objext \
43579    conftest$ac_exeext conftest.$ac_ext
43580LIBS=$ac_check_lib_save_LIBS
43581fi
43582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
43583$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
43584if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
43585  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
43586fi
43587
43588    fi
43589fi
43590rm -f core conftest.err conftest.$ac_objext \
43591    conftest$ac_exeext conftest.$ac_ext
43592    LIBS="$ac_xsave_LIBS"
43593
43594    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
43595    # to get the SysV transport functions.
43596    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
43597    # needs -lnsl.
43598    # The nsl library prevents programs from opening the X display
43599    # on Irix 5.2, according to T.E. Dickey.
43600    # The functions gethostbyname, getservbyname, and inet_addr are
43601    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
43602    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
43603if test "x$ac_cv_func_gethostbyname" = xyes; then :
43604
43605fi
43606
43607    if test $ac_cv_func_gethostbyname = no; then
43608      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
43609$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
43610if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
43611  $as_echo_n "(cached) " >&6
43612else
43613  ac_check_lib_save_LIBS=$LIBS
43614LIBS="-lnsl  $LIBS"
43615cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43616/* end confdefs.h.  */
43617
43618/* Override any GCC internal prototype to avoid an error.
43619   Use char because int might match the return type of a GCC
43620   builtin and then its argument prototype would still apply.  */
43621#ifdef __cplusplus
43622extern "C"
43623#endif
43624char gethostbyname ();
43625int
43626main ()
43627{
43628return gethostbyname ();
43629  ;
43630  return 0;
43631}
43632_ACEOF
43633if ac_fn_cxx_try_link "$LINENO"; then :
43634  ac_cv_lib_nsl_gethostbyname=yes
43635else
43636  ac_cv_lib_nsl_gethostbyname=no
43637fi
43638rm -f core conftest.err conftest.$ac_objext \
43639    conftest$ac_exeext conftest.$ac_ext
43640LIBS=$ac_check_lib_save_LIBS
43641fi
43642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
43643$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
43644if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
43645  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
43646fi
43647
43648      if test $ac_cv_lib_nsl_gethostbyname = no; then
43649	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
43650$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
43651if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
43652  $as_echo_n "(cached) " >&6
43653else
43654  ac_check_lib_save_LIBS=$LIBS
43655LIBS="-lbsd  $LIBS"
43656cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43657/* end confdefs.h.  */
43658
43659/* Override any GCC internal prototype to avoid an error.
43660   Use char because int might match the return type of a GCC
43661   builtin and then its argument prototype would still apply.  */
43662#ifdef __cplusplus
43663extern "C"
43664#endif
43665char gethostbyname ();
43666int
43667main ()
43668{
43669return gethostbyname ();
43670  ;
43671  return 0;
43672}
43673_ACEOF
43674if ac_fn_cxx_try_link "$LINENO"; then :
43675  ac_cv_lib_bsd_gethostbyname=yes
43676else
43677  ac_cv_lib_bsd_gethostbyname=no
43678fi
43679rm -f core conftest.err conftest.$ac_objext \
43680    conftest$ac_exeext conftest.$ac_ext
43681LIBS=$ac_check_lib_save_LIBS
43682fi
43683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
43684$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
43685if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
43686  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
43687fi
43688
43689      fi
43690    fi
43691
43692    # lieder@skyler.mavd.honeywell.com says without -lsocket,
43693    # socket/setsockopt and other routines are undefined under SCO ODT
43694    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
43695    # on later versions), says Simon Leinen: it contains gethostby*
43696    # variants that don't use the name server (or something).  -lsocket
43697    # must be given before -lnsl if both are needed.  We assume that
43698    # if connect needs -lnsl, so does gethostbyname.
43699    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
43700if test "x$ac_cv_func_connect" = xyes; then :
43701
43702fi
43703
43704    if test $ac_cv_func_connect = no; then
43705      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
43706$as_echo_n "checking for connect in -lsocket... " >&6; }
43707if ${ac_cv_lib_socket_connect+:} false; then :
43708  $as_echo_n "(cached) " >&6
43709else
43710  ac_check_lib_save_LIBS=$LIBS
43711LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
43712cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43713/* end confdefs.h.  */
43714
43715/* Override any GCC internal prototype to avoid an error.
43716   Use char because int might match the return type of a GCC
43717   builtin and then its argument prototype would still apply.  */
43718#ifdef __cplusplus
43719extern "C"
43720#endif
43721char connect ();
43722int
43723main ()
43724{
43725return connect ();
43726  ;
43727  return 0;
43728}
43729_ACEOF
43730if ac_fn_cxx_try_link "$LINENO"; then :
43731  ac_cv_lib_socket_connect=yes
43732else
43733  ac_cv_lib_socket_connect=no
43734fi
43735rm -f core conftest.err conftest.$ac_objext \
43736    conftest$ac_exeext conftest.$ac_ext
43737LIBS=$ac_check_lib_save_LIBS
43738fi
43739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
43740$as_echo "$ac_cv_lib_socket_connect" >&6; }
43741if test "x$ac_cv_lib_socket_connect" = xyes; then :
43742  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
43743fi
43744
43745    fi
43746
43747    # Guillermo Gomez says -lposix is necessary on A/UX.
43748    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
43749if test "x$ac_cv_func_remove" = xyes; then :
43750
43751fi
43752
43753    if test $ac_cv_func_remove = no; then
43754      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
43755$as_echo_n "checking for remove in -lposix... " >&6; }
43756if ${ac_cv_lib_posix_remove+:} false; then :
43757  $as_echo_n "(cached) " >&6
43758else
43759  ac_check_lib_save_LIBS=$LIBS
43760LIBS="-lposix  $LIBS"
43761cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43762/* end confdefs.h.  */
43763
43764/* Override any GCC internal prototype to avoid an error.
43765   Use char because int might match the return type of a GCC
43766   builtin and then its argument prototype would still apply.  */
43767#ifdef __cplusplus
43768extern "C"
43769#endif
43770char remove ();
43771int
43772main ()
43773{
43774return remove ();
43775  ;
43776  return 0;
43777}
43778_ACEOF
43779if ac_fn_cxx_try_link "$LINENO"; then :
43780  ac_cv_lib_posix_remove=yes
43781else
43782  ac_cv_lib_posix_remove=no
43783fi
43784rm -f core conftest.err conftest.$ac_objext \
43785    conftest$ac_exeext conftest.$ac_ext
43786LIBS=$ac_check_lib_save_LIBS
43787fi
43788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
43789$as_echo "$ac_cv_lib_posix_remove" >&6; }
43790if test "x$ac_cv_lib_posix_remove" = xyes; then :
43791  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
43792fi
43793
43794    fi
43795
43796    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
43797    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
43798if test "x$ac_cv_func_shmat" = xyes; then :
43799
43800fi
43801
43802    if test $ac_cv_func_shmat = no; then
43803      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
43804$as_echo_n "checking for shmat in -lipc... " >&6; }
43805if ${ac_cv_lib_ipc_shmat+:} false; then :
43806  $as_echo_n "(cached) " >&6
43807else
43808  ac_check_lib_save_LIBS=$LIBS
43809LIBS="-lipc  $LIBS"
43810cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43811/* end confdefs.h.  */
43812
43813/* Override any GCC internal prototype to avoid an error.
43814   Use char because int might match the return type of a GCC
43815   builtin and then its argument prototype would still apply.  */
43816#ifdef __cplusplus
43817extern "C"
43818#endif
43819char shmat ();
43820int
43821main ()
43822{
43823return shmat ();
43824  ;
43825  return 0;
43826}
43827_ACEOF
43828if ac_fn_cxx_try_link "$LINENO"; then :
43829  ac_cv_lib_ipc_shmat=yes
43830else
43831  ac_cv_lib_ipc_shmat=no
43832fi
43833rm -f core conftest.err conftest.$ac_objext \
43834    conftest$ac_exeext conftest.$ac_ext
43835LIBS=$ac_check_lib_save_LIBS
43836fi
43837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
43838$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
43839if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
43840  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
43841fi
43842
43843    fi
43844  fi
43845
43846  # Check for libraries that X11R6 Xt/Xaw programs need.
43847  ac_save_LDFLAGS=$LDFLAGS
43848  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
43849  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
43850  # check for ICE first), but we must link in the order -lSM -lICE or
43851  # we get undefined symbols.  So assume we have SM if we have ICE.
43852  # These have to be linked with before -lX11, unlike the other
43853  # libraries we check for below, so use a different variable.
43854  # John Interrante, Karl Berry
43855  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
43856$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
43857if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
43858  $as_echo_n "(cached) " >&6
43859else
43860  ac_check_lib_save_LIBS=$LIBS
43861LIBS="-lICE $X_EXTRA_LIBS $LIBS"
43862cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43863/* end confdefs.h.  */
43864
43865/* Override any GCC internal prototype to avoid an error.
43866   Use char because int might match the return type of a GCC
43867   builtin and then its argument prototype would still apply.  */
43868#ifdef __cplusplus
43869extern "C"
43870#endif
43871char IceConnectionNumber ();
43872int
43873main ()
43874{
43875return IceConnectionNumber ();
43876  ;
43877  return 0;
43878}
43879_ACEOF
43880if ac_fn_cxx_try_link "$LINENO"; then :
43881  ac_cv_lib_ICE_IceConnectionNumber=yes
43882else
43883  ac_cv_lib_ICE_IceConnectionNumber=no
43884fi
43885rm -f core conftest.err conftest.$ac_objext \
43886    conftest$ac_exeext conftest.$ac_ext
43887LIBS=$ac_check_lib_save_LIBS
43888fi
43889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
43890$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
43891if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
43892  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
43893fi
43894
43895  LDFLAGS=$ac_save_LDFLAGS
43896
43897fi
43898
43899
43900  # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
43901  # this doesn't make sense so we remove it.
43902  if test "x$COMPILE_TYPE" = xcross; then
43903    X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
43904  fi
43905
43906  if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
43907
43908  # Print a helpful message on how to acquire the necessary build dependency.
43909  # x11 is the help tag: freetype, cups, pulse, alsa etc
43910  MISSING_DEPENDENCY=x11
43911
43912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43913    cygwin_help $MISSING_DEPENDENCY
43914  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43915    msys_help $MISSING_DEPENDENCY
43916  else
43917    PKGHANDLER_COMMAND=
43918
43919    case $PKGHANDLER in
43920      apt-get)
43921        apt_help     $MISSING_DEPENDENCY ;;
43922      yum)
43923        yum_help     $MISSING_DEPENDENCY ;;
43924      port)
43925        port_help    $MISSING_DEPENDENCY ;;
43926      pkgutil)
43927        pkgutil_help $MISSING_DEPENDENCY ;;
43928      pkgadd)
43929        pkgadd_help  $MISSING_DEPENDENCY ;;
43930    esac
43931
43932    if test "x$PKGHANDLER_COMMAND" != x; then
43933      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43934    fi
43935  fi
43936
43937    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
43938  fi
43939
43940  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43941    OPENWIN_HOME="/usr/openwin"
43942    X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
43943    X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43944        -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
43945        -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43946        -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
43947  fi
43948
43949  #
43950  # Weird Sol10 something check...TODO change to try compile
43951  #
43952  if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
43953    if test "`uname -r`" = "5.10"; then
43954      if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
43955        X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
43956      fi
43957    fi
43958  fi
43959
43960  ac_ext=c
43961ac_cpp='$CPP $CPPFLAGS'
43962ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43963ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43964ac_compiler_gnu=$ac_cv_c_compiler_gnu
43965
43966  OLD_CFLAGS="$CFLAGS"
43967  CFLAGS="$CFLAGS $X_CFLAGS"
43968
43969  # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
43970  for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
43971do :
43972  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43973ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
43974        # include <X11/Xlib.h>
43975        # include <X11/Xutil.h>
43976
43977
43978"
43979if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43980  cat >>confdefs.h <<_ACEOF
43981#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43982_ACEOF
43983 X11_A_OK=yes
43984else
43985  X11_A_OK=no; break
43986fi
43987
43988done
43989
43990
43991  CFLAGS="$OLD_CFLAGS"
43992  ac_ext=cpp
43993ac_cpp='$CXXCPP $CPPFLAGS'
43994ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43995ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43996ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43997
43998
43999  if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
44000
44001  # Print a helpful message on how to acquire the necessary build dependency.
44002  # x11 is the help tag: freetype, cups, pulse, alsa etc
44003  MISSING_DEPENDENCY=x11
44004
44005  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44006    cygwin_help $MISSING_DEPENDENCY
44007  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44008    msys_help $MISSING_DEPENDENCY
44009  else
44010    PKGHANDLER_COMMAND=
44011
44012    case $PKGHANDLER in
44013      apt-get)
44014        apt_help     $MISSING_DEPENDENCY ;;
44015      yum)
44016        yum_help     $MISSING_DEPENDENCY ;;
44017      port)
44018        port_help    $MISSING_DEPENDENCY ;;
44019      pkgutil)
44020        pkgutil_help $MISSING_DEPENDENCY ;;
44021      pkgadd)
44022        pkgadd_help  $MISSING_DEPENDENCY ;;
44023    esac
44024
44025    if test "x$PKGHANDLER_COMMAND" != x; then
44026      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44027    fi
44028  fi
44029
44030    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
44031  fi
44032
44033
44034
44035
44036
44037
44038  ###############################################################################
44039  #
44040  # The common unix printing system cups is used to print from java.
44041  #
44042
44043# Check whether --with-cups was given.
44044if test "${with_cups+set}" = set; then :
44045  withval=$with_cups;
44046fi
44047
44048
44049# Check whether --with-cups-include was given.
44050if test "${with_cups_include+set}" = set; then :
44051  withval=$with_cups_include;
44052fi
44053
44054
44055  if test "x$CUPS_NOT_NEEDED" = xyes; then
44056    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
44057      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
44058$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
44059    fi
44060    CUPS_CFLAGS=
44061  else
44062    CUPS_FOUND=no
44063
44064    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
44065      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
44066    fi
44067
44068    if test "x${with_cups}" != x; then
44069      CUPS_CFLAGS="-I${with_cups}/include"
44070      CUPS_FOUND=yes
44071    fi
44072    if test "x${with_cups_include}" != x; then
44073      CUPS_CFLAGS="-I${with_cups_include}"
44074      CUPS_FOUND=yes
44075    fi
44076    if test "x$CUPS_FOUND" = xno; then
44077
44078
44079  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
44080    # Source the builddeps file again, to make sure it uses the latest variables!
44081    . $builddepsfile
44082    # Look for a target and build machine specific resource!
44083    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
44084    if test "x$resource" = x; then
44085      # Ok, lets instead look for a target specific resource
44086      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
44087    fi
44088    if test "x$resource" = x; then
44089      # Ok, lets instead look for a build specific resource
44090      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
44091    fi
44092    if test "x$resource" = x; then
44093      # Ok, lets instead look for a generic resource
44094      # (The cups comes from M4 and not the shell, thus no need for eval here.)
44095      resource=${builddep_cups}
44096    fi
44097    if test "x$resource" != x; then
44098      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
44099$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
44100      # If the resource in the builddeps.conf file is an existing directory,
44101      # for example /java/linux/cups
44102      if test -d ${resource}; then
44103        depdir=${resource}
44104      else
44105
44106  # cups is for example mymodule
44107  # $resource is for example libs/general/libmymod_1_2_3.zip
44108  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
44109  # $with_builddeps_dir is for example /localhome/builddeps
44110  # depdir is the name of the variable into which we store the depdir, eg MYMOD
44111  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
44112  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
44113  filename=`basename $resource`
44114  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
44115  filebase=${filename%%.*}
44116  extension=${filename#*.}
44117  installdir=$with_builddeps_dir/$filebase
44118  if test ! -f $installdir/$filename.unpacked; then
44119    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
44120$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
44121    if test ! -d $installdir; then
44122      mkdir -p $installdir
44123    fi
44124    if test ! -d $installdir; then
44125      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
44126    fi
44127    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
44128    touch $tmpfile
44129    if test ! -f $tmpfile; then
44130      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
44131    fi
44132
44133  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
44134  # $tmpfile is the local file name for the downloaded file.
44135  VALID_TOOL=no
44136  if test "x$BDEPS_FTP" = xwget; then
44137    VALID_TOOL=yes
44138    wget -O $tmpfile $with_builddeps_server/$resource
44139  fi
44140  if test "x$BDEPS_FTP" = xlftp; then
44141    VALID_TOOL=yes
44142    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
44143  fi
44144  if test "x$BDEPS_FTP" = xftp; then
44145    VALID_TOOL=yes
44146    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
44147    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
44148    FTPUSERPWD=${FTPSERVER%%@*}
44149    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
44150      FTPUSER=${userpwd%%:*}
44151      FTPPWD=${userpwd#*@}
44152      FTPSERVER=${FTPSERVER#*@}
44153    else
44154      FTPUSER=ftp
44155      FTPPWD=ftp
44156    fi
44157    # the "pass" command does not work on some
44158    # ftp clients (read ftp.exe) but if it works,
44159    # passive mode is better!
44160    ( \
44161        echo "user $FTPUSER $FTPPWD"        ; \
44162        echo "pass"                         ; \
44163        echo "bin"                          ; \
44164        echo "get $FTPPATH $tmpfile"              ; \
44165    ) | ftp -in $FTPSERVER
44166  fi
44167  if test "x$VALID_TOOL" != xyes; then
44168    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
44169  fi
44170
44171    mv $tmpfile $installdir/$filename
44172    if test ! -s $installdir/$filename; then
44173      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
44174    fi
44175    case "$extension" in
44176      zip)  echo "Unzipping $installdir/$filename..."
44177        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
44178        ;;
44179      tar.gz) echo "Untaring $installdir/$filename..."
44180        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44181        ;;
44182      tgz) echo "Untaring $installdir/$filename..."
44183        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44184        ;;
44185      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
44186        ;;
44187    esac
44188  fi
44189  if test -f $installdir/$filename.unpacked; then
44190    depdir=$installdir
44191  fi
44192
44193      fi
44194      # Source the builddeps file again, because in the previous command, the depdir
44195      # was updated to point at the current build dependency install directory.
44196      . $builddepsfile
44197      # Now extract variables from the builddeps.conf files.
44198      theroot=${builddep_cups_ROOT}
44199      thecflags=${builddep_cups_CFLAGS}
44200      thelibs=${builddep_cups_LIBS}
44201      if test "x$depdir" = x; then
44202        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
44203      fi
44204      CUPS=$depdir
44205      if test "x$theroot" != x; then
44206        CUPS="$theroot"
44207      fi
44208      if test "x$thecflags" != x; then
44209        CUPS_CFLAGS="$thecflags"
44210      fi
44211      if test "x$thelibs" != x; then
44212        CUPS_LIBS="$thelibs"
44213      fi
44214      CUPS_FOUND=yes
44215
44216    fi
44217
44218  fi
44219
44220    fi
44221    if test "x$CUPS_FOUND" = xno; then
44222      # Are the cups headers installed in the default /usr/include location?
44223      for ac_header in cups/cups.h cups/ppd.h
44224do :
44225  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44226ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
44227if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44228  cat >>confdefs.h <<_ACEOF
44229#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44230_ACEOF
44231
44232            CUPS_FOUND=yes
44233            CUPS_CFLAGS=
44234            DEFAULT_CUPS=yes
44235
44236
44237fi
44238
44239done
44240
44241    fi
44242    if test "x$CUPS_FOUND" = xno; then
44243      # Getting nervous now? Lets poke around for standard Solaris third-party
44244      # package installation locations.
44245      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
44246$as_echo_n "checking for cups headers... " >&6; }
44247      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
44248        # An SFW package seems to be installed!
44249        CUPS_FOUND=yes
44250        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
44251      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
44252        # A CSW package seems to be installed!
44253        CUPS_FOUND=yes
44254        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
44255      fi
44256      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
44257$as_echo "$CUPS_FOUND" >&6; }
44258    fi
44259    if test "x$CUPS_FOUND" = xno; then
44260
44261  # Print a helpful message on how to acquire the necessary build dependency.
44262  # cups is the help tag: freetype, cups, pulse, alsa etc
44263  MISSING_DEPENDENCY=cups
44264
44265  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44266    cygwin_help $MISSING_DEPENDENCY
44267  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44268    msys_help $MISSING_DEPENDENCY
44269  else
44270    PKGHANDLER_COMMAND=
44271
44272    case $PKGHANDLER in
44273      apt-get)
44274        apt_help     $MISSING_DEPENDENCY ;;
44275      yum)
44276        yum_help     $MISSING_DEPENDENCY ;;
44277      port)
44278        port_help    $MISSING_DEPENDENCY ;;
44279      pkgutil)
44280        pkgutil_help $MISSING_DEPENDENCY ;;
44281      pkgadd)
44282        pkgadd_help  $MISSING_DEPENDENCY ;;
44283    esac
44284
44285    if test "x$PKGHANDLER_COMMAND" != x; then
44286      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44287    fi
44288  fi
44289
44290      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
44291    fi
44292  fi
44293
44294
44295
44296
44297
44298
44299  ###############################################################################
44300  #
44301  # The ubiquitous freetype library is used to render fonts.
44302  #
44303
44304# Check whether --with-freetype was given.
44305if test "${with_freetype+set}" = set; then :
44306  withval=$with_freetype;
44307fi
44308
44309
44310# Check whether --with-freetype-include was given.
44311if test "${with_freetype_include+set}" = set; then :
44312  withval=$with_freetype_include;
44313fi
44314
44315
44316# Check whether --with-freetype-lib was given.
44317if test "${with_freetype_lib+set}" = set; then :
44318  withval=$with_freetype_lib;
44319fi
44320
44321  # Check whether --enable-freetype-bundling was given.
44322if test "${enable_freetype_bundling+set}" = set; then :
44323  enableval=$enable_freetype_bundling;
44324fi
44325
44326
44327  FREETYPE_CFLAGS=
44328  FREETYPE_LIBS=
44329  FREETYPE_BUNDLE_LIB_PATH=
44330
44331  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
44332    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
44333      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
44334$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
44335    fi
44336    if test "x$enable_freetype_bundling" != x; then
44337      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
44338$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
44339    fi
44340  else
44341    # freetype is needed to build; go get it!
44342
44343    BUNDLE_FREETYPE="$enable_freetype_bundling"
44344
44345    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
44346      # User has specified settings
44347
44348      if test "x$BUNDLE_FREETYPE" = x; then
44349        # If not specified, default is to bundle freetype
44350        BUNDLE_FREETYPE=yes
44351      fi
44352
44353      if test "x$with_freetype" != x; then
44354        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
44355        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
44356      fi
44357
44358      # Allow --with-freetype-lib and --with-freetype-include to override
44359      if test "x$with_freetype_include" != x; then
44360        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
44361      fi
44362      if test "x$with_freetype_lib" != x; then
44363        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
44364      fi
44365
44366      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44367        # Okay, we got it. Check that it works.
44368
44369  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44370  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44371  METHOD="--with-freetype"
44372
44373  # First check if the files exists.
44374  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44375    # We found an arbitrary include file. That's a good sign.
44376    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44377$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44378    FOUND_FREETYPE=yes
44379
44380    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44381    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44382      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44383$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44384      FOUND_FREETYPE=no
44385    else
44386      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44387        # On Windows, we will need both .lib and .dll file.
44388        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44389          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44390$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44391          FOUND_FREETYPE=no
44392        fi
44393      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44394          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44395        # Found lib in isa dir, use that instead.
44396        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44397      fi
44398    fi
44399  fi
44400
44401  if test "x$FOUND_FREETYPE" = xyes; then
44402
44403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44404
44405  # Input might be given as Windows format, start by converting to
44406  # unix format.
44407  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44408  new_path=`$CYGPATH -u "$path"`
44409
44410  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44411  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44412  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44413  # "foo.exe" is OK but "foo" is an error.
44414  #
44415  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44416  # It is also a way to make sure we got the proper file name for the real test later on.
44417  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44418  if test "x$test_shortpath" = x; then
44419    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44420$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44421    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44422  fi
44423
44424  # Call helper function which possibly converts this using DOS-style short mode.
44425  # If so, the updated path is stored in $new_path.
44426
44427  input_path="$new_path"
44428  # Check if we need to convert this using DOS-style short mode. If the path
44429  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44430  # take no chances and rewrite it.
44431  # Note: m4 eats our [], so we need to use [ and ] instead.
44432  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44433  if test "x$has_forbidden_chars" != x; then
44434    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44435    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44436    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44437    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44438      # Going to short mode and back again did indeed matter. Since short mode is
44439      # case insensitive, let's make it lowercase to improve readability.
44440      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44441      # Now convert it back to Unix-stile (cygpath)
44442      input_path=`$CYGPATH -u "$shortmode_path"`
44443      new_path="$input_path"
44444    fi
44445  fi
44446
44447  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44448  if test "x$test_cygdrive_prefix" = x; then
44449    # As a simple fix, exclude /usr/bin since it's not a real path.
44450    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44451      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44452      # a path prefixed by /cygdrive for fixpath to work.
44453      new_path="$CYGWIN_ROOT_PATH$input_path"
44454    fi
44455  fi
44456
44457
44458  if test "x$path" != "x$new_path"; then
44459    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44460    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44461$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44462  fi
44463
44464  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44465
44466  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44467  has_colon=`$ECHO $path | $GREP ^.:`
44468  new_path="$path"
44469  if test "x$has_colon" = x; then
44470    # Not in mixed or Windows style, start by that.
44471    new_path=`cmd //c echo $path`
44472  fi
44473
44474
44475  input_path="$new_path"
44476  # Check if we need to convert this using DOS-style short mode. If the path
44477  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44478  # take no chances and rewrite it.
44479  # Note: m4 eats our [], so we need to use [ and ] instead.
44480  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44481  if test "x$has_forbidden_chars" != x; then
44482    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44483    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44484  fi
44485
44486
44487  windows_path="$new_path"
44488  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44489    unix_path=`$CYGPATH -u "$windows_path"`
44490    new_path="$unix_path"
44491  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44492    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44493    new_path="$unix_path"
44494  fi
44495
44496  if test "x$path" != "x$new_path"; then
44497    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44498    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44499$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44500  fi
44501
44502  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44503  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44504
44505  else
44506    # We're on a posix platform. Hooray! :)
44507    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44508    has_space=`$ECHO "$path" | $GREP " "`
44509    if test "x$has_space" != x; then
44510      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44511$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44512      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44513    fi
44514
44515    # Use eval to expand a potential ~
44516    eval path="$path"
44517    if test ! -f "$path" && test ! -d "$path"; then
44518      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44519    fi
44520
44521    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44522  fi
44523
44524
44525  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44526
44527  # Input might be given as Windows format, start by converting to
44528  # unix format.
44529  path="$POTENTIAL_FREETYPE_LIB_PATH"
44530  new_path=`$CYGPATH -u "$path"`
44531
44532  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44533  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44534  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44535  # "foo.exe" is OK but "foo" is an error.
44536  #
44537  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44538  # It is also a way to make sure we got the proper file name for the real test later on.
44539  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44540  if test "x$test_shortpath" = x; then
44541    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44542$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44543    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44544  fi
44545
44546  # Call helper function which possibly converts this using DOS-style short mode.
44547  # If so, the updated path is stored in $new_path.
44548
44549  input_path="$new_path"
44550  # Check if we need to convert this using DOS-style short mode. If the path
44551  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44552  # take no chances and rewrite it.
44553  # Note: m4 eats our [], so we need to use [ and ] instead.
44554  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44555  if test "x$has_forbidden_chars" != x; then
44556    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44557    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44558    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44559    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44560      # Going to short mode and back again did indeed matter. Since short mode is
44561      # case insensitive, let's make it lowercase to improve readability.
44562      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44563      # Now convert it back to Unix-stile (cygpath)
44564      input_path=`$CYGPATH -u "$shortmode_path"`
44565      new_path="$input_path"
44566    fi
44567  fi
44568
44569  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44570  if test "x$test_cygdrive_prefix" = x; then
44571    # As a simple fix, exclude /usr/bin since it's not a real path.
44572    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44573      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44574      # a path prefixed by /cygdrive for fixpath to work.
44575      new_path="$CYGWIN_ROOT_PATH$input_path"
44576    fi
44577  fi
44578
44579
44580  if test "x$path" != "x$new_path"; then
44581    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44582    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44583$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44584  fi
44585
44586  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44587
44588  path="$POTENTIAL_FREETYPE_LIB_PATH"
44589  has_colon=`$ECHO $path | $GREP ^.:`
44590  new_path="$path"
44591  if test "x$has_colon" = x; then
44592    # Not in mixed or Windows style, start by that.
44593    new_path=`cmd //c echo $path`
44594  fi
44595
44596
44597  input_path="$new_path"
44598  # Check if we need to convert this using DOS-style short mode. If the path
44599  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44600  # take no chances and rewrite it.
44601  # Note: m4 eats our [], so we need to use [ and ] instead.
44602  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44603  if test "x$has_forbidden_chars" != x; then
44604    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44605    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44606  fi
44607
44608
44609  windows_path="$new_path"
44610  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44611    unix_path=`$CYGPATH -u "$windows_path"`
44612    new_path="$unix_path"
44613  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44614    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44615    new_path="$unix_path"
44616  fi
44617
44618  if test "x$path" != "x$new_path"; then
44619    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44620    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44621$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44622  fi
44623
44624  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44625  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44626
44627  else
44628    # We're on a posix platform. Hooray! :)
44629    path="$POTENTIAL_FREETYPE_LIB_PATH"
44630    has_space=`$ECHO "$path" | $GREP " "`
44631    if test "x$has_space" != x; then
44632      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44633$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44634      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44635    fi
44636
44637    # Use eval to expand a potential ~
44638    eval path="$path"
44639    if test ! -f "$path" && test ! -d "$path"; then
44640      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44641    fi
44642
44643    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44644  fi
44645
44646
44647    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44648    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44649$as_echo_n "checking for freetype includes... " >&6; }
44650    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44651$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44652    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44653    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44654$as_echo_n "checking for freetype libraries... " >&6; }
44655    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44656$as_echo "$FREETYPE_LIB_PATH" >&6; }
44657  fi
44658
44659        if test "x$FOUND_FREETYPE" != xyes; then
44660          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
44661        fi
44662      else
44663        # User specified only one of lib or include. This is an error.
44664        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
44665          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
44666$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
44667          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
44668        else
44669          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
44670$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
44671          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
44672        fi
44673      fi
44674    else
44675      # User did not specify settings, but we need freetype. Try to locate it.
44676
44677      if test "x$BUNDLE_FREETYPE" = x; then
44678        # If not specified, default is to bundle freetype only on windows
44679        if test "x$OPENJDK_TARGET_OS" = xwindows; then
44680          BUNDLE_FREETYPE=yes
44681        else
44682          BUNDLE_FREETYPE=no
44683        fi
44684      fi
44685
44686      if test "x$FOUND_FREETYPE" != xyes; then
44687        # Check builddeps
44688
44689
44690  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
44691    # Source the builddeps file again, to make sure it uses the latest variables!
44692    . $builddepsfile
44693    # Look for a target and build machine specific resource!
44694    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
44695    if test "x$resource" = x; then
44696      # Ok, lets instead look for a target specific resource
44697      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
44698    fi
44699    if test "x$resource" = x; then
44700      # Ok, lets instead look for a build specific resource
44701      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
44702    fi
44703    if test "x$resource" = x; then
44704      # Ok, lets instead look for a generic resource
44705      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
44706      resource=${builddep_freetype2}
44707    fi
44708    if test "x$resource" != x; then
44709      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
44710$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
44711      # If the resource in the builddeps.conf file is an existing directory,
44712      # for example /java/linux/cups
44713      if test -d ${resource}; then
44714        depdir=${resource}
44715      else
44716
44717  # freetype2 is for example mymodule
44718  # $resource is for example libs/general/libmymod_1_2_3.zip
44719  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
44720  # $with_builddeps_dir is for example /localhome/builddeps
44721  # depdir is the name of the variable into which we store the depdir, eg MYMOD
44722  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
44723  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
44724  filename=`basename $resource`
44725  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
44726  filebase=${filename%%.*}
44727  extension=${filename#*.}
44728  installdir=$with_builddeps_dir/$filebase
44729  if test ! -f $installdir/$filename.unpacked; then
44730    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
44731$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
44732    if test ! -d $installdir; then
44733      mkdir -p $installdir
44734    fi
44735    if test ! -d $installdir; then
44736      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
44737    fi
44738    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
44739    touch $tmpfile
44740    if test ! -f $tmpfile; then
44741      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
44742    fi
44743
44744  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
44745  # $tmpfile is the local file name for the downloaded file.
44746  VALID_TOOL=no
44747  if test "x$BDEPS_FTP" = xwget; then
44748    VALID_TOOL=yes
44749    wget -O $tmpfile $with_builddeps_server/$resource
44750  fi
44751  if test "x$BDEPS_FTP" = xlftp; then
44752    VALID_TOOL=yes
44753    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
44754  fi
44755  if test "x$BDEPS_FTP" = xftp; then
44756    VALID_TOOL=yes
44757    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
44758    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
44759    FTPUSERPWD=${FTPSERVER%%@*}
44760    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
44761      FTPUSER=${userpwd%%:*}
44762      FTPPWD=${userpwd#*@}
44763      FTPSERVER=${FTPSERVER#*@}
44764    else
44765      FTPUSER=ftp
44766      FTPPWD=ftp
44767    fi
44768    # the "pass" command does not work on some
44769    # ftp clients (read ftp.exe) but if it works,
44770    # passive mode is better!
44771    ( \
44772        echo "user $FTPUSER $FTPPWD"        ; \
44773        echo "pass"                         ; \
44774        echo "bin"                          ; \
44775        echo "get $FTPPATH $tmpfile"              ; \
44776    ) | ftp -in $FTPSERVER
44777  fi
44778  if test "x$VALID_TOOL" != xyes; then
44779    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
44780  fi
44781
44782    mv $tmpfile $installdir/$filename
44783    if test ! -s $installdir/$filename; then
44784      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
44785    fi
44786    case "$extension" in
44787      zip)  echo "Unzipping $installdir/$filename..."
44788        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
44789        ;;
44790      tar.gz) echo "Untaring $installdir/$filename..."
44791        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44792        ;;
44793      tgz) echo "Untaring $installdir/$filename..."
44794        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44795        ;;
44796      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
44797        ;;
44798    esac
44799  fi
44800  if test -f $installdir/$filename.unpacked; then
44801    depdir=$installdir
44802  fi
44803
44804      fi
44805      # Source the builddeps file again, because in the previous command, the depdir
44806      # was updated to point at the current build dependency install directory.
44807      . $builddepsfile
44808      # Now extract variables from the builddeps.conf files.
44809      theroot=${builddep_freetype2_ROOT}
44810      thecflags=${builddep_freetype2_CFLAGS}
44811      thelibs=${builddep_freetype2_LIBS}
44812      if test "x$depdir" = x; then
44813        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
44814      fi
44815      FREETYPE=$depdir
44816      if test "x$theroot" != x; then
44817        FREETYPE="$theroot"
44818      fi
44819      if test "x$thecflags" != x; then
44820        FREETYPE_CFLAGS="$thecflags"
44821      fi
44822      if test "x$thelibs" != x; then
44823        FREETYPE_LIBS="$thelibs"
44824      fi
44825      FOUND_FREETYPE=yes
44826      else FOUND_FREETYPE=no
44827
44828    fi
44829    else FOUND_FREETYPE=no
44830
44831  fi
44832
44833        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
44834        if test "x$FOUND_FREETYPE" = xyes; then
44835          if test "x$BUNDLE_FREETYPE" = xyes; then
44836            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
44837$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
44838            FOUND_FREETYPE=no
44839          else
44840            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
44841$as_echo_n "checking for freetype... " >&6; }
44842            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
44843$as_echo "yes (using builddeps)" >&6; }
44844          fi
44845        fi
44846      fi
44847
44848      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
44849      if test "x$SYSROOT" = x; then
44850        if test "x$FOUND_FREETYPE" != xyes; then
44851          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
44852          if test "x$PKG_CONFIG" != x; then
44853
44854pkg_failed=no
44855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
44856$as_echo_n "checking for FREETYPE... " >&6; }
44857
44858if test -n "$FREETYPE_CFLAGS"; then
44859    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
44860 elif test -n "$PKG_CONFIG"; then
44861    if test -n "$PKG_CONFIG" && \
44862    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
44863  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
44864  ac_status=$?
44865  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44866  test $ac_status = 0; }; then
44867  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
44868else
44869  pkg_failed=yes
44870fi
44871 else
44872    pkg_failed=untried
44873fi
44874if test -n "$FREETYPE_LIBS"; then
44875    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
44876 elif test -n "$PKG_CONFIG"; then
44877    if test -n "$PKG_CONFIG" && \
44878    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
44879  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
44880  ac_status=$?
44881  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44882  test $ac_status = 0; }; then
44883  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
44884else
44885  pkg_failed=yes
44886fi
44887 else
44888    pkg_failed=untried
44889fi
44890
44891
44892
44893if test $pkg_failed = yes; then
44894
44895if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
44896        _pkg_short_errors_supported=yes
44897else
44898        _pkg_short_errors_supported=no
44899fi
44900        if test $_pkg_short_errors_supported = yes; then
44901	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
44902        else
44903	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
44904        fi
44905	# Put the nasty error message in config.log where it belongs
44906	echo "$FREETYPE_PKG_ERRORS" >&5
44907
44908	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44909$as_echo "no" >&6; }
44910                FOUND_FREETYPE=no
44911elif test $pkg_failed = untried; then
44912	FOUND_FREETYPE=no
44913else
44914	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
44915	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
44916        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44917$as_echo "yes" >&6; }
44918	FOUND_FREETYPE=yes
44919fi
44920            if test "x$FOUND_FREETYPE" = xyes; then
44921              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
44922              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
44923              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
44924              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
44925                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
44926              fi
44927              # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
44928              if test "x$BUNDLE_FREETYPE" = xyes; then
44929                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
44930$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
44931                FOUND_FREETYPE=no
44932              else
44933                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
44934$as_echo_n "checking for freetype... " >&6; }
44935                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
44936$as_echo "yes (using pkg-config)" >&6; }
44937              fi
44938            fi
44939          fi
44940        fi
44941      fi
44942
44943      if test "x$FOUND_FREETYPE" != xyes; then
44944        # Check in well-known locations
44945        if test "x$OPENJDK_TARGET_OS" = xwindows; then
44946          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
44947
44948  windows_path="$FREETYPE_BASE_DIR"
44949  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44950    unix_path=`$CYGPATH -u "$windows_path"`
44951    FREETYPE_BASE_DIR="$unix_path"
44952  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44953    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44954    FREETYPE_BASE_DIR="$unix_path"
44955  fi
44956
44957
44958  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44959  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44960  METHOD="well-known location"
44961
44962  # First check if the files exists.
44963  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44964    # We found an arbitrary include file. That's a good sign.
44965    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44966$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44967    FOUND_FREETYPE=yes
44968
44969    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44970    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44971      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44972$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44973      FOUND_FREETYPE=no
44974    else
44975      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44976        # On Windows, we will need both .lib and .dll file.
44977        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44978          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44979$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44980          FOUND_FREETYPE=no
44981        fi
44982      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44983          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44984        # Found lib in isa dir, use that instead.
44985        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44986      fi
44987    fi
44988  fi
44989
44990  if test "x$FOUND_FREETYPE" = xyes; then
44991
44992  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44993
44994  # Input might be given as Windows format, start by converting to
44995  # unix format.
44996  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44997  new_path=`$CYGPATH -u "$path"`
44998
44999  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45000  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45001  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45002  # "foo.exe" is OK but "foo" is an error.
45003  #
45004  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45005  # It is also a way to make sure we got the proper file name for the real test later on.
45006  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45007  if test "x$test_shortpath" = x; then
45008    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45009$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45010    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45011  fi
45012
45013  # Call helper function which possibly converts this using DOS-style short mode.
45014  # If so, the updated path is stored in $new_path.
45015
45016  input_path="$new_path"
45017  # Check if we need to convert this using DOS-style short mode. If the path
45018  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45019  # take no chances and rewrite it.
45020  # Note: m4 eats our [], so we need to use [ and ] instead.
45021  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45022  if test "x$has_forbidden_chars" != x; then
45023    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45024    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45025    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45026    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45027      # Going to short mode and back again did indeed matter. Since short mode is
45028      # case insensitive, let's make it lowercase to improve readability.
45029      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45030      # Now convert it back to Unix-stile (cygpath)
45031      input_path=`$CYGPATH -u "$shortmode_path"`
45032      new_path="$input_path"
45033    fi
45034  fi
45035
45036  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45037  if test "x$test_cygdrive_prefix" = x; then
45038    # As a simple fix, exclude /usr/bin since it's not a real path.
45039    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45040      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45041      # a path prefixed by /cygdrive for fixpath to work.
45042      new_path="$CYGWIN_ROOT_PATH$input_path"
45043    fi
45044  fi
45045
45046
45047  if test "x$path" != "x$new_path"; then
45048    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45049    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45050$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45051  fi
45052
45053  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45054
45055  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45056  has_colon=`$ECHO $path | $GREP ^.:`
45057  new_path="$path"
45058  if test "x$has_colon" = x; then
45059    # Not in mixed or Windows style, start by that.
45060    new_path=`cmd //c echo $path`
45061  fi
45062
45063
45064  input_path="$new_path"
45065  # Check if we need to convert this using DOS-style short mode. If the path
45066  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45067  # take no chances and rewrite it.
45068  # Note: m4 eats our [], so we need to use [ and ] instead.
45069  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45070  if test "x$has_forbidden_chars" != x; then
45071    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45072    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45073  fi
45074
45075
45076  windows_path="$new_path"
45077  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45078    unix_path=`$CYGPATH -u "$windows_path"`
45079    new_path="$unix_path"
45080  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45081    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45082    new_path="$unix_path"
45083  fi
45084
45085  if test "x$path" != "x$new_path"; then
45086    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45087    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45088$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45089  fi
45090
45091  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45092  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45093
45094  else
45095    # We're on a posix platform. Hooray! :)
45096    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45097    has_space=`$ECHO "$path" | $GREP " "`
45098    if test "x$has_space" != x; then
45099      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45100$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45101      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45102    fi
45103
45104    # Use eval to expand a potential ~
45105    eval path="$path"
45106    if test ! -f "$path" && test ! -d "$path"; then
45107      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45108    fi
45109
45110    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45111  fi
45112
45113
45114  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45115
45116  # Input might be given as Windows format, start by converting to
45117  # unix format.
45118  path="$POTENTIAL_FREETYPE_LIB_PATH"
45119  new_path=`$CYGPATH -u "$path"`
45120
45121  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45122  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45123  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45124  # "foo.exe" is OK but "foo" is an error.
45125  #
45126  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45127  # It is also a way to make sure we got the proper file name for the real test later on.
45128  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45129  if test "x$test_shortpath" = x; then
45130    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45131$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45132    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45133  fi
45134
45135  # Call helper function which possibly converts this using DOS-style short mode.
45136  # If so, the updated path is stored in $new_path.
45137
45138  input_path="$new_path"
45139  # Check if we need to convert this using DOS-style short mode. If the path
45140  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45141  # take no chances and rewrite it.
45142  # Note: m4 eats our [], so we need to use [ and ] instead.
45143  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45144  if test "x$has_forbidden_chars" != x; then
45145    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45146    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45147    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45148    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45149      # Going to short mode and back again did indeed matter. Since short mode is
45150      # case insensitive, let's make it lowercase to improve readability.
45151      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45152      # Now convert it back to Unix-stile (cygpath)
45153      input_path=`$CYGPATH -u "$shortmode_path"`
45154      new_path="$input_path"
45155    fi
45156  fi
45157
45158  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45159  if test "x$test_cygdrive_prefix" = x; then
45160    # As a simple fix, exclude /usr/bin since it's not a real path.
45161    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45162      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45163      # a path prefixed by /cygdrive for fixpath to work.
45164      new_path="$CYGWIN_ROOT_PATH$input_path"
45165    fi
45166  fi
45167
45168
45169  if test "x$path" != "x$new_path"; then
45170    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45171    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45172$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45173  fi
45174
45175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45176
45177  path="$POTENTIAL_FREETYPE_LIB_PATH"
45178  has_colon=`$ECHO $path | $GREP ^.:`
45179  new_path="$path"
45180  if test "x$has_colon" = x; then
45181    # Not in mixed or Windows style, start by that.
45182    new_path=`cmd //c echo $path`
45183  fi
45184
45185
45186  input_path="$new_path"
45187  # Check if we need to convert this using DOS-style short mode. If the path
45188  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45189  # take no chances and rewrite it.
45190  # Note: m4 eats our [], so we need to use [ and ] instead.
45191  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45192  if test "x$has_forbidden_chars" != x; then
45193    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45194    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45195  fi
45196
45197
45198  windows_path="$new_path"
45199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45200    unix_path=`$CYGPATH -u "$windows_path"`
45201    new_path="$unix_path"
45202  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45203    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45204    new_path="$unix_path"
45205  fi
45206
45207  if test "x$path" != "x$new_path"; then
45208    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45209    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45210$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45211  fi
45212
45213  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45214  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45215
45216  else
45217    # We're on a posix platform. Hooray! :)
45218    path="$POTENTIAL_FREETYPE_LIB_PATH"
45219    has_space=`$ECHO "$path" | $GREP " "`
45220    if test "x$has_space" != x; then
45221      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45222$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45223      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45224    fi
45225
45226    # Use eval to expand a potential ~
45227    eval path="$path"
45228    if test ! -f "$path" && test ! -d "$path"; then
45229      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45230    fi
45231
45232    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45233  fi
45234
45235
45236    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45237    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45238$as_echo_n "checking for freetype includes... " >&6; }
45239    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45240$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45241    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45242    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45243$as_echo_n "checking for freetype libraries... " >&6; }
45244    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45245$as_echo "$FREETYPE_LIB_PATH" >&6; }
45246  fi
45247
45248          if test "x$FOUND_FREETYPE" != xyes; then
45249            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
45250
45251  windows_path="$FREETYPE_BASE_DIR"
45252  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45253    unix_path=`$CYGPATH -u "$windows_path"`
45254    FREETYPE_BASE_DIR="$unix_path"
45255  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45256    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45257    FREETYPE_BASE_DIR="$unix_path"
45258  fi
45259
45260
45261  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45262  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45263  METHOD="well-known location"
45264
45265  # First check if the files exists.
45266  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45267    # We found an arbitrary include file. That's a good sign.
45268    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45269$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45270    FOUND_FREETYPE=yes
45271
45272    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45273    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45274      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45275$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45276      FOUND_FREETYPE=no
45277    else
45278      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45279        # On Windows, we will need both .lib and .dll file.
45280        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45281          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45282$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45283          FOUND_FREETYPE=no
45284        fi
45285      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45286          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45287        # Found lib in isa dir, use that instead.
45288        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45289      fi
45290    fi
45291  fi
45292
45293  if test "x$FOUND_FREETYPE" = xyes; then
45294
45295  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45296
45297  # Input might be given as Windows format, start by converting to
45298  # unix format.
45299  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45300  new_path=`$CYGPATH -u "$path"`
45301
45302  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45303  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45304  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45305  # "foo.exe" is OK but "foo" is an error.
45306  #
45307  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45308  # It is also a way to make sure we got the proper file name for the real test later on.
45309  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45310  if test "x$test_shortpath" = x; then
45311    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45312$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45313    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45314  fi
45315
45316  # Call helper function which possibly converts this using DOS-style short mode.
45317  # If so, the updated path is stored in $new_path.
45318
45319  input_path="$new_path"
45320  # Check if we need to convert this using DOS-style short mode. If the path
45321  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45322  # take no chances and rewrite it.
45323  # Note: m4 eats our [], so we need to use [ and ] instead.
45324  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45325  if test "x$has_forbidden_chars" != x; then
45326    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45327    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45328    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45329    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45330      # Going to short mode and back again did indeed matter. Since short mode is
45331      # case insensitive, let's make it lowercase to improve readability.
45332      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45333      # Now convert it back to Unix-stile (cygpath)
45334      input_path=`$CYGPATH -u "$shortmode_path"`
45335      new_path="$input_path"
45336    fi
45337  fi
45338
45339  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45340  if test "x$test_cygdrive_prefix" = x; then
45341    # As a simple fix, exclude /usr/bin since it's not a real path.
45342    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45343      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45344      # a path prefixed by /cygdrive for fixpath to work.
45345      new_path="$CYGWIN_ROOT_PATH$input_path"
45346    fi
45347  fi
45348
45349
45350  if test "x$path" != "x$new_path"; then
45351    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45352    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45353$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45354  fi
45355
45356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45357
45358  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45359  has_colon=`$ECHO $path | $GREP ^.:`
45360  new_path="$path"
45361  if test "x$has_colon" = x; then
45362    # Not in mixed or Windows style, start by that.
45363    new_path=`cmd //c echo $path`
45364  fi
45365
45366
45367  input_path="$new_path"
45368  # Check if we need to convert this using DOS-style short mode. If the path
45369  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45370  # take no chances and rewrite it.
45371  # Note: m4 eats our [], so we need to use [ and ] instead.
45372  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45373  if test "x$has_forbidden_chars" != x; then
45374    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45375    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45376  fi
45377
45378
45379  windows_path="$new_path"
45380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45381    unix_path=`$CYGPATH -u "$windows_path"`
45382    new_path="$unix_path"
45383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45384    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45385    new_path="$unix_path"
45386  fi
45387
45388  if test "x$path" != "x$new_path"; then
45389    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45390    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45391$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45392  fi
45393
45394  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45395  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45396
45397  else
45398    # We're on a posix platform. Hooray! :)
45399    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45400    has_space=`$ECHO "$path" | $GREP " "`
45401    if test "x$has_space" != x; then
45402      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45403$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45404      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45405    fi
45406
45407    # Use eval to expand a potential ~
45408    eval path="$path"
45409    if test ! -f "$path" && test ! -d "$path"; then
45410      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45411    fi
45412
45413    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45414  fi
45415
45416
45417  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45418
45419  # Input might be given as Windows format, start by converting to
45420  # unix format.
45421  path="$POTENTIAL_FREETYPE_LIB_PATH"
45422  new_path=`$CYGPATH -u "$path"`
45423
45424  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45425  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45426  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45427  # "foo.exe" is OK but "foo" is an error.
45428  #
45429  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45430  # It is also a way to make sure we got the proper file name for the real test later on.
45431  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45432  if test "x$test_shortpath" = x; then
45433    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45434$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45435    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45436  fi
45437
45438  # Call helper function which possibly converts this using DOS-style short mode.
45439  # If so, the updated path is stored in $new_path.
45440
45441  input_path="$new_path"
45442  # Check if we need to convert this using DOS-style short mode. If the path
45443  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45444  # take no chances and rewrite it.
45445  # Note: m4 eats our [], so we need to use [ and ] instead.
45446  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45447  if test "x$has_forbidden_chars" != x; then
45448    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45449    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45450    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45451    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45452      # Going to short mode and back again did indeed matter. Since short mode is
45453      # case insensitive, let's make it lowercase to improve readability.
45454      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45455      # Now convert it back to Unix-stile (cygpath)
45456      input_path=`$CYGPATH -u "$shortmode_path"`
45457      new_path="$input_path"
45458    fi
45459  fi
45460
45461  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45462  if test "x$test_cygdrive_prefix" = x; then
45463    # As a simple fix, exclude /usr/bin since it's not a real path.
45464    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45465      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45466      # a path prefixed by /cygdrive for fixpath to work.
45467      new_path="$CYGWIN_ROOT_PATH$input_path"
45468    fi
45469  fi
45470
45471
45472  if test "x$path" != "x$new_path"; then
45473    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45474    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45475$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45476  fi
45477
45478  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45479
45480  path="$POTENTIAL_FREETYPE_LIB_PATH"
45481  has_colon=`$ECHO $path | $GREP ^.:`
45482  new_path="$path"
45483  if test "x$has_colon" = x; then
45484    # Not in mixed or Windows style, start by that.
45485    new_path=`cmd //c echo $path`
45486  fi
45487
45488
45489  input_path="$new_path"
45490  # Check if we need to convert this using DOS-style short mode. If the path
45491  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45492  # take no chances and rewrite it.
45493  # Note: m4 eats our [], so we need to use [ and ] instead.
45494  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45495  if test "x$has_forbidden_chars" != x; then
45496    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45497    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45498  fi
45499
45500
45501  windows_path="$new_path"
45502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45503    unix_path=`$CYGPATH -u "$windows_path"`
45504    new_path="$unix_path"
45505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45506    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45507    new_path="$unix_path"
45508  fi
45509
45510  if test "x$path" != "x$new_path"; then
45511    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45512    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45513$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45514  fi
45515
45516  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45517  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45518
45519  else
45520    # We're on a posix platform. Hooray! :)
45521    path="$POTENTIAL_FREETYPE_LIB_PATH"
45522    has_space=`$ECHO "$path" | $GREP " "`
45523    if test "x$has_space" != x; then
45524      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45525$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45526      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45527    fi
45528
45529    # Use eval to expand a potential ~
45530    eval path="$path"
45531    if test ! -f "$path" && test ! -d "$path"; then
45532      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45533    fi
45534
45535    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45536  fi
45537
45538
45539    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45540    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45541$as_echo_n "checking for freetype includes... " >&6; }
45542    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45543$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45544    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45545    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45546$as_echo_n "checking for freetype libraries... " >&6; }
45547    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45548$as_echo "$FREETYPE_LIB_PATH" >&6; }
45549  fi
45550
45551          fi
45552        else
45553          FREETYPE_BASE_DIR="$SYSROOT/usr"
45554
45555  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45556  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45557  METHOD="well-known location"
45558
45559  # First check if the files exists.
45560  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45561    # We found an arbitrary include file. That's a good sign.
45562    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45563$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45564    FOUND_FREETYPE=yes
45565
45566    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45567    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45568      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45569$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45570      FOUND_FREETYPE=no
45571    else
45572      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45573        # On Windows, we will need both .lib and .dll file.
45574        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45575          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45576$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45577          FOUND_FREETYPE=no
45578        fi
45579      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45580          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45581        # Found lib in isa dir, use that instead.
45582        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45583      fi
45584    fi
45585  fi
45586
45587  if test "x$FOUND_FREETYPE" = xyes; then
45588
45589  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45590
45591  # Input might be given as Windows format, start by converting to
45592  # unix format.
45593  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45594  new_path=`$CYGPATH -u "$path"`
45595
45596  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45597  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45598  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45599  # "foo.exe" is OK but "foo" is an error.
45600  #
45601  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45602  # It is also a way to make sure we got the proper file name for the real test later on.
45603  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45604  if test "x$test_shortpath" = x; then
45605    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45606$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45607    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45608  fi
45609
45610  # Call helper function which possibly converts this using DOS-style short mode.
45611  # If so, the updated path is stored in $new_path.
45612
45613  input_path="$new_path"
45614  # Check if we need to convert this using DOS-style short mode. If the path
45615  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45616  # take no chances and rewrite it.
45617  # Note: m4 eats our [], so we need to use [ and ] instead.
45618  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45619  if test "x$has_forbidden_chars" != x; then
45620    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45621    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45622    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45623    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45624      # Going to short mode and back again did indeed matter. Since short mode is
45625      # case insensitive, let's make it lowercase to improve readability.
45626      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45627      # Now convert it back to Unix-stile (cygpath)
45628      input_path=`$CYGPATH -u "$shortmode_path"`
45629      new_path="$input_path"
45630    fi
45631  fi
45632
45633  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45634  if test "x$test_cygdrive_prefix" = x; then
45635    # As a simple fix, exclude /usr/bin since it's not a real path.
45636    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45637      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45638      # a path prefixed by /cygdrive for fixpath to work.
45639      new_path="$CYGWIN_ROOT_PATH$input_path"
45640    fi
45641  fi
45642
45643
45644  if test "x$path" != "x$new_path"; then
45645    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45646    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45647$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45648  fi
45649
45650  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45651
45652  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45653  has_colon=`$ECHO $path | $GREP ^.:`
45654  new_path="$path"
45655  if test "x$has_colon" = x; then
45656    # Not in mixed or Windows style, start by that.
45657    new_path=`cmd //c echo $path`
45658  fi
45659
45660
45661  input_path="$new_path"
45662  # Check if we need to convert this using DOS-style short mode. If the path
45663  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45664  # take no chances and rewrite it.
45665  # Note: m4 eats our [], so we need to use [ and ] instead.
45666  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45667  if test "x$has_forbidden_chars" != x; then
45668    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45669    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45670  fi
45671
45672
45673  windows_path="$new_path"
45674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45675    unix_path=`$CYGPATH -u "$windows_path"`
45676    new_path="$unix_path"
45677  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45678    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45679    new_path="$unix_path"
45680  fi
45681
45682  if test "x$path" != "x$new_path"; then
45683    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45684    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45685$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45686  fi
45687
45688  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45689  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45690
45691  else
45692    # We're on a posix platform. Hooray! :)
45693    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45694    has_space=`$ECHO "$path" | $GREP " "`
45695    if test "x$has_space" != x; then
45696      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45697$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45698      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45699    fi
45700
45701    # Use eval to expand a potential ~
45702    eval path="$path"
45703    if test ! -f "$path" && test ! -d "$path"; then
45704      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45705    fi
45706
45707    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45708  fi
45709
45710
45711  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45712
45713  # Input might be given as Windows format, start by converting to
45714  # unix format.
45715  path="$POTENTIAL_FREETYPE_LIB_PATH"
45716  new_path=`$CYGPATH -u "$path"`
45717
45718  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45719  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45720  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45721  # "foo.exe" is OK but "foo" is an error.
45722  #
45723  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45724  # It is also a way to make sure we got the proper file name for the real test later on.
45725  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45726  if test "x$test_shortpath" = x; then
45727    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45728$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45729    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45730  fi
45731
45732  # Call helper function which possibly converts this using DOS-style short mode.
45733  # If so, the updated path is stored in $new_path.
45734
45735  input_path="$new_path"
45736  # Check if we need to convert this using DOS-style short mode. If the path
45737  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45738  # take no chances and rewrite it.
45739  # Note: m4 eats our [], so we need to use [ and ] instead.
45740  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45741  if test "x$has_forbidden_chars" != x; then
45742    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45743    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45744    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45745    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45746      # Going to short mode and back again did indeed matter. Since short mode is
45747      # case insensitive, let's make it lowercase to improve readability.
45748      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45749      # Now convert it back to Unix-stile (cygpath)
45750      input_path=`$CYGPATH -u "$shortmode_path"`
45751      new_path="$input_path"
45752    fi
45753  fi
45754
45755  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45756  if test "x$test_cygdrive_prefix" = x; then
45757    # As a simple fix, exclude /usr/bin since it's not a real path.
45758    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45759      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45760      # a path prefixed by /cygdrive for fixpath to work.
45761      new_path="$CYGWIN_ROOT_PATH$input_path"
45762    fi
45763  fi
45764
45765
45766  if test "x$path" != "x$new_path"; then
45767    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45768    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45769$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45770  fi
45771
45772  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45773
45774  path="$POTENTIAL_FREETYPE_LIB_PATH"
45775  has_colon=`$ECHO $path | $GREP ^.:`
45776  new_path="$path"
45777  if test "x$has_colon" = x; then
45778    # Not in mixed or Windows style, start by that.
45779    new_path=`cmd //c echo $path`
45780  fi
45781
45782
45783  input_path="$new_path"
45784  # Check if we need to convert this using DOS-style short mode. If the path
45785  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45786  # take no chances and rewrite it.
45787  # Note: m4 eats our [], so we need to use [ and ] instead.
45788  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45789  if test "x$has_forbidden_chars" != x; then
45790    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45791    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45792  fi
45793
45794
45795  windows_path="$new_path"
45796  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45797    unix_path=`$CYGPATH -u "$windows_path"`
45798    new_path="$unix_path"
45799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45800    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45801    new_path="$unix_path"
45802  fi
45803
45804  if test "x$path" != "x$new_path"; then
45805    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45806    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45807$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45808  fi
45809
45810  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45811  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45812
45813  else
45814    # We're on a posix platform. Hooray! :)
45815    path="$POTENTIAL_FREETYPE_LIB_PATH"
45816    has_space=`$ECHO "$path" | $GREP " "`
45817    if test "x$has_space" != x; then
45818      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45819$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45820      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45821    fi
45822
45823    # Use eval to expand a potential ~
45824    eval path="$path"
45825    if test ! -f "$path" && test ! -d "$path"; then
45826      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45827    fi
45828
45829    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45830  fi
45831
45832
45833    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45834    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45835$as_echo_n "checking for freetype includes... " >&6; }
45836    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45837$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45838    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45839    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45840$as_echo_n "checking for freetype libraries... " >&6; }
45841    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45842$as_echo "$FREETYPE_LIB_PATH" >&6; }
45843  fi
45844
45845
45846          if test "x$FOUND_FREETYPE" != xyes; then
45847            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
45848
45849  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45850  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45851  METHOD="well-known location"
45852
45853  # First check if the files exists.
45854  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45855    # We found an arbitrary include file. That's a good sign.
45856    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45857$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45858    FOUND_FREETYPE=yes
45859
45860    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45861    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45862      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45863$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45864      FOUND_FREETYPE=no
45865    else
45866      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45867        # On Windows, we will need both .lib and .dll file.
45868        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45869          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45870$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45871          FOUND_FREETYPE=no
45872        fi
45873      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45874          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45875        # Found lib in isa dir, use that instead.
45876        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45877      fi
45878    fi
45879  fi
45880
45881  if test "x$FOUND_FREETYPE" = xyes; then
45882
45883  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45884
45885  # Input might be given as Windows format, start by converting to
45886  # unix format.
45887  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45888  new_path=`$CYGPATH -u "$path"`
45889
45890  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45891  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45892  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45893  # "foo.exe" is OK but "foo" is an error.
45894  #
45895  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45896  # It is also a way to make sure we got the proper file name for the real test later on.
45897  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45898  if test "x$test_shortpath" = x; then
45899    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45900$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45901    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45902  fi
45903
45904  # Call helper function which possibly converts this using DOS-style short mode.
45905  # If so, the updated path is stored in $new_path.
45906
45907  input_path="$new_path"
45908  # Check if we need to convert this using DOS-style short mode. If the path
45909  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45910  # take no chances and rewrite it.
45911  # Note: m4 eats our [], so we need to use [ and ] instead.
45912  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45913  if test "x$has_forbidden_chars" != x; then
45914    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45915    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45916    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45917    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45918      # Going to short mode and back again did indeed matter. Since short mode is
45919      # case insensitive, let's make it lowercase to improve readability.
45920      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45921      # Now convert it back to Unix-stile (cygpath)
45922      input_path=`$CYGPATH -u "$shortmode_path"`
45923      new_path="$input_path"
45924    fi
45925  fi
45926
45927  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45928  if test "x$test_cygdrive_prefix" = x; then
45929    # As a simple fix, exclude /usr/bin since it's not a real path.
45930    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45931      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45932      # a path prefixed by /cygdrive for fixpath to work.
45933      new_path="$CYGWIN_ROOT_PATH$input_path"
45934    fi
45935  fi
45936
45937
45938  if test "x$path" != "x$new_path"; then
45939    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45940    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45941$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45942  fi
45943
45944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45945
45946  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45947  has_colon=`$ECHO $path | $GREP ^.:`
45948  new_path="$path"
45949  if test "x$has_colon" = x; then
45950    # Not in mixed or Windows style, start by that.
45951    new_path=`cmd //c echo $path`
45952  fi
45953
45954
45955  input_path="$new_path"
45956  # Check if we need to convert this using DOS-style short mode. If the path
45957  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45958  # take no chances and rewrite it.
45959  # Note: m4 eats our [], so we need to use [ and ] instead.
45960  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45961  if test "x$has_forbidden_chars" != x; then
45962    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45963    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45964  fi
45965
45966
45967  windows_path="$new_path"
45968  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45969    unix_path=`$CYGPATH -u "$windows_path"`
45970    new_path="$unix_path"
45971  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45972    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45973    new_path="$unix_path"
45974  fi
45975
45976  if test "x$path" != "x$new_path"; then
45977    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45978    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45979$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45980  fi
45981
45982  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45983  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45984
45985  else
45986    # We're on a posix platform. Hooray! :)
45987    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45988    has_space=`$ECHO "$path" | $GREP " "`
45989    if test "x$has_space" != x; then
45990      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45991$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45992      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45993    fi
45994
45995    # Use eval to expand a potential ~
45996    eval path="$path"
45997    if test ! -f "$path" && test ! -d "$path"; then
45998      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45999    fi
46000
46001    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46002  fi
46003
46004
46005  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46006
46007  # Input might be given as Windows format, start by converting to
46008  # unix format.
46009  path="$POTENTIAL_FREETYPE_LIB_PATH"
46010  new_path=`$CYGPATH -u "$path"`
46011
46012  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46013  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46014  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46015  # "foo.exe" is OK but "foo" is an error.
46016  #
46017  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46018  # It is also a way to make sure we got the proper file name for the real test later on.
46019  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46020  if test "x$test_shortpath" = x; then
46021    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46022$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46023    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46024  fi
46025
46026  # Call helper function which possibly converts this using DOS-style short mode.
46027  # If so, the updated path is stored in $new_path.
46028
46029  input_path="$new_path"
46030  # Check if we need to convert this using DOS-style short mode. If the path
46031  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46032  # take no chances and rewrite it.
46033  # Note: m4 eats our [], so we need to use [ and ] instead.
46034  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46035  if test "x$has_forbidden_chars" != x; then
46036    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46037    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46038    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46039    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46040      # Going to short mode and back again did indeed matter. Since short mode is
46041      # case insensitive, let's make it lowercase to improve readability.
46042      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46043      # Now convert it back to Unix-stile (cygpath)
46044      input_path=`$CYGPATH -u "$shortmode_path"`
46045      new_path="$input_path"
46046    fi
46047  fi
46048
46049  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46050  if test "x$test_cygdrive_prefix" = x; then
46051    # As a simple fix, exclude /usr/bin since it's not a real path.
46052    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46053      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46054      # a path prefixed by /cygdrive for fixpath to work.
46055      new_path="$CYGWIN_ROOT_PATH$input_path"
46056    fi
46057  fi
46058
46059
46060  if test "x$path" != "x$new_path"; then
46061    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46062    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46063$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46064  fi
46065
46066  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46067
46068  path="$POTENTIAL_FREETYPE_LIB_PATH"
46069  has_colon=`$ECHO $path | $GREP ^.:`
46070  new_path="$path"
46071  if test "x$has_colon" = x; then
46072    # Not in mixed or Windows style, start by that.
46073    new_path=`cmd //c echo $path`
46074  fi
46075
46076
46077  input_path="$new_path"
46078  # Check if we need to convert this using DOS-style short mode. If the path
46079  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46080  # take no chances and rewrite it.
46081  # Note: m4 eats our [], so we need to use [ and ] instead.
46082  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46083  if test "x$has_forbidden_chars" != x; then
46084    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46085    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46086  fi
46087
46088
46089  windows_path="$new_path"
46090  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46091    unix_path=`$CYGPATH -u "$windows_path"`
46092    new_path="$unix_path"
46093  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46094    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46095    new_path="$unix_path"
46096  fi
46097
46098  if test "x$path" != "x$new_path"; then
46099    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46100    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46101$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46102  fi
46103
46104  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46105  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46106
46107  else
46108    # We're on a posix platform. Hooray! :)
46109    path="$POTENTIAL_FREETYPE_LIB_PATH"
46110    has_space=`$ECHO "$path" | $GREP " "`
46111    if test "x$has_space" != x; then
46112      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46113$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46114      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46115    fi
46116
46117    # Use eval to expand a potential ~
46118    eval path="$path"
46119    if test ! -f "$path" && test ! -d "$path"; then
46120      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46121    fi
46122
46123    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46124  fi
46125
46126
46127    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46128    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46129$as_echo_n "checking for freetype includes... " >&6; }
46130    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46131$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46132    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46133    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46134$as_echo_n "checking for freetype libraries... " >&6; }
46135    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46136$as_echo "$FREETYPE_LIB_PATH" >&6; }
46137  fi
46138
46139          fi
46140
46141          if test "x$FOUND_FREETYPE" != xyes; then
46142            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
46143
46144  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46145  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46146  METHOD="well-known location"
46147
46148  # First check if the files exists.
46149  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46150    # We found an arbitrary include file. That's a good sign.
46151    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46152$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46153    FOUND_FREETYPE=yes
46154
46155    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
46156    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46157      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46158$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46159      FOUND_FREETYPE=no
46160    else
46161      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46162        # On Windows, we will need both .lib and .dll file.
46163        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
46164          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
46165$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
46166          FOUND_FREETYPE=no
46167        fi
46168      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46169          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46170        # Found lib in isa dir, use that instead.
46171        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46172      fi
46173    fi
46174  fi
46175
46176  if test "x$FOUND_FREETYPE" = xyes; then
46177
46178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46179
46180  # Input might be given as Windows format, start by converting to
46181  # unix format.
46182  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46183  new_path=`$CYGPATH -u "$path"`
46184
46185  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46186  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46187  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46188  # "foo.exe" is OK but "foo" is an error.
46189  #
46190  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46191  # It is also a way to make sure we got the proper file name for the real test later on.
46192  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46193  if test "x$test_shortpath" = x; then
46194    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46195$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46196    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46197  fi
46198
46199  # Call helper function which possibly converts this using DOS-style short mode.
46200  # If so, the updated path is stored in $new_path.
46201
46202  input_path="$new_path"
46203  # Check if we need to convert this using DOS-style short mode. If the path
46204  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46205  # take no chances and rewrite it.
46206  # Note: m4 eats our [], so we need to use [ and ] instead.
46207  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46208  if test "x$has_forbidden_chars" != x; then
46209    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46210    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46211    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46212    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46213      # Going to short mode and back again did indeed matter. Since short mode is
46214      # case insensitive, let's make it lowercase to improve readability.
46215      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46216      # Now convert it back to Unix-stile (cygpath)
46217      input_path=`$CYGPATH -u "$shortmode_path"`
46218      new_path="$input_path"
46219    fi
46220  fi
46221
46222  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46223  if test "x$test_cygdrive_prefix" = x; then
46224    # As a simple fix, exclude /usr/bin since it's not a real path.
46225    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46226      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46227      # a path prefixed by /cygdrive for fixpath to work.
46228      new_path="$CYGWIN_ROOT_PATH$input_path"
46229    fi
46230  fi
46231
46232
46233  if test "x$path" != "x$new_path"; then
46234    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46235    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46236$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46237  fi
46238
46239  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46240
46241  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46242  has_colon=`$ECHO $path | $GREP ^.:`
46243  new_path="$path"
46244  if test "x$has_colon" = x; then
46245    # Not in mixed or Windows style, start by that.
46246    new_path=`cmd //c echo $path`
46247  fi
46248
46249
46250  input_path="$new_path"
46251  # Check if we need to convert this using DOS-style short mode. If the path
46252  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46253  # take no chances and rewrite it.
46254  # Note: m4 eats our [], so we need to use [ and ] instead.
46255  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46256  if test "x$has_forbidden_chars" != x; then
46257    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46258    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46259  fi
46260
46261
46262  windows_path="$new_path"
46263  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46264    unix_path=`$CYGPATH -u "$windows_path"`
46265    new_path="$unix_path"
46266  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46267    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46268    new_path="$unix_path"
46269  fi
46270
46271  if test "x$path" != "x$new_path"; then
46272    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46273    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46274$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46275  fi
46276
46277  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46278  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46279
46280  else
46281    # We're on a posix platform. Hooray! :)
46282    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46283    has_space=`$ECHO "$path" | $GREP " "`
46284    if test "x$has_space" != x; then
46285      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46286$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46287      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46288    fi
46289
46290    # Use eval to expand a potential ~
46291    eval path="$path"
46292    if test ! -f "$path" && test ! -d "$path"; then
46293      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46294    fi
46295
46296    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46297  fi
46298
46299
46300  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46301
46302  # Input might be given as Windows format, start by converting to
46303  # unix format.
46304  path="$POTENTIAL_FREETYPE_LIB_PATH"
46305  new_path=`$CYGPATH -u "$path"`
46306
46307  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46308  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46309  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46310  # "foo.exe" is OK but "foo" is an error.
46311  #
46312  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46313  # It is also a way to make sure we got the proper file name for the real test later on.
46314  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46315  if test "x$test_shortpath" = x; then
46316    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46317$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46318    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46319  fi
46320
46321  # Call helper function which possibly converts this using DOS-style short mode.
46322  # If so, the updated path is stored in $new_path.
46323
46324  input_path="$new_path"
46325  # Check if we need to convert this using DOS-style short mode. If the path
46326  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46327  # take no chances and rewrite it.
46328  # Note: m4 eats our [], so we need to use [ and ] instead.
46329  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46330  if test "x$has_forbidden_chars" != x; then
46331    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46332    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46333    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46334    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46335      # Going to short mode and back again did indeed matter. Since short mode is
46336      # case insensitive, let's make it lowercase to improve readability.
46337      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46338      # Now convert it back to Unix-stile (cygpath)
46339      input_path=`$CYGPATH -u "$shortmode_path"`
46340      new_path="$input_path"
46341    fi
46342  fi
46343
46344  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46345  if test "x$test_cygdrive_prefix" = x; then
46346    # As a simple fix, exclude /usr/bin since it's not a real path.
46347    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46348      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46349      # a path prefixed by /cygdrive for fixpath to work.
46350      new_path="$CYGWIN_ROOT_PATH$input_path"
46351    fi
46352  fi
46353
46354
46355  if test "x$path" != "x$new_path"; then
46356    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46357    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46358$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46359  fi
46360
46361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46362
46363  path="$POTENTIAL_FREETYPE_LIB_PATH"
46364  has_colon=`$ECHO $path | $GREP ^.:`
46365  new_path="$path"
46366  if test "x$has_colon" = x; then
46367    # Not in mixed or Windows style, start by that.
46368    new_path=`cmd //c echo $path`
46369  fi
46370
46371
46372  input_path="$new_path"
46373  # Check if we need to convert this using DOS-style short mode. If the path
46374  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46375  # take no chances and rewrite it.
46376  # Note: m4 eats our [], so we need to use [ and ] instead.
46377  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46378  if test "x$has_forbidden_chars" != x; then
46379    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46380    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46381  fi
46382
46383
46384  windows_path="$new_path"
46385  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46386    unix_path=`$CYGPATH -u "$windows_path"`
46387    new_path="$unix_path"
46388  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46389    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46390    new_path="$unix_path"
46391  fi
46392
46393  if test "x$path" != "x$new_path"; then
46394    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46395    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46396$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46397  fi
46398
46399  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46400  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46401
46402  else
46403    # We're on a posix platform. Hooray! :)
46404    path="$POTENTIAL_FREETYPE_LIB_PATH"
46405    has_space=`$ECHO "$path" | $GREP " "`
46406    if test "x$has_space" != x; then
46407      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46408$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46409      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46410    fi
46411
46412    # Use eval to expand a potential ~
46413    eval path="$path"
46414    if test ! -f "$path" && test ! -d "$path"; then
46415      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46416    fi
46417
46418    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46419  fi
46420
46421
46422    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46423    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46424$as_echo_n "checking for freetype includes... " >&6; }
46425    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46426$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46427    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46428    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46429$as_echo_n "checking for freetype libraries... " >&6; }
46430    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46431$as_echo "$FREETYPE_LIB_PATH" >&6; }
46432  fi
46433
46434          fi
46435
46436          if test "x$FOUND_FREETYPE" != xyes; then
46437            FREETYPE_BASE_DIR="$SYSROOT/usr"
46438            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
46439
46440  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46441  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
46442  METHOD="well-known location"
46443
46444  # First check if the files exists.
46445  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46446    # We found an arbitrary include file. That's a good sign.
46447    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46448$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46449    FOUND_FREETYPE=yes
46450
46451    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
46452    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46453      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46454$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46455      FOUND_FREETYPE=no
46456    else
46457      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46458        # On Windows, we will need both .lib and .dll file.
46459        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
46460          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
46461$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
46462          FOUND_FREETYPE=no
46463        fi
46464      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46465          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46466        # Found lib in isa dir, use that instead.
46467        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46468      fi
46469    fi
46470  fi
46471
46472  if test "x$FOUND_FREETYPE" = xyes; then
46473
46474  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46475
46476  # Input might be given as Windows format, start by converting to
46477  # unix format.
46478  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46479  new_path=`$CYGPATH -u "$path"`
46480
46481  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46482  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46483  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46484  # "foo.exe" is OK but "foo" is an error.
46485  #
46486  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46487  # It is also a way to make sure we got the proper file name for the real test later on.
46488  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46489  if test "x$test_shortpath" = x; then
46490    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46491$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46492    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46493  fi
46494
46495  # Call helper function which possibly converts this using DOS-style short mode.
46496  # If so, the updated path is stored in $new_path.
46497
46498  input_path="$new_path"
46499  # Check if we need to convert this using DOS-style short mode. If the path
46500  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46501  # take no chances and rewrite it.
46502  # Note: m4 eats our [], so we need to use [ and ] instead.
46503  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46504  if test "x$has_forbidden_chars" != x; then
46505    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46506    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46507    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46508    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46509      # Going to short mode and back again did indeed matter. Since short mode is
46510      # case insensitive, let's make it lowercase to improve readability.
46511      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46512      # Now convert it back to Unix-stile (cygpath)
46513      input_path=`$CYGPATH -u "$shortmode_path"`
46514      new_path="$input_path"
46515    fi
46516  fi
46517
46518  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46519  if test "x$test_cygdrive_prefix" = x; then
46520    # As a simple fix, exclude /usr/bin since it's not a real path.
46521    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46522      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46523      # a path prefixed by /cygdrive for fixpath to work.
46524      new_path="$CYGWIN_ROOT_PATH$input_path"
46525    fi
46526  fi
46527
46528
46529  if test "x$path" != "x$new_path"; then
46530    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46531    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46532$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46533  fi
46534
46535  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46536
46537  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46538  has_colon=`$ECHO $path | $GREP ^.:`
46539  new_path="$path"
46540  if test "x$has_colon" = x; then
46541    # Not in mixed or Windows style, start by that.
46542    new_path=`cmd //c echo $path`
46543  fi
46544
46545
46546  input_path="$new_path"
46547  # Check if we need to convert this using DOS-style short mode. If the path
46548  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46549  # take no chances and rewrite it.
46550  # Note: m4 eats our [], so we need to use [ and ] instead.
46551  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46552  if test "x$has_forbidden_chars" != x; then
46553    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46554    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46555  fi
46556
46557
46558  windows_path="$new_path"
46559  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46560    unix_path=`$CYGPATH -u "$windows_path"`
46561    new_path="$unix_path"
46562  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46563    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46564    new_path="$unix_path"
46565  fi
46566
46567  if test "x$path" != "x$new_path"; then
46568    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46569    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46570$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46571  fi
46572
46573  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46574  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46575
46576  else
46577    # We're on a posix platform. Hooray! :)
46578    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46579    has_space=`$ECHO "$path" | $GREP " "`
46580    if test "x$has_space" != x; then
46581      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46582$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46583      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46584    fi
46585
46586    # Use eval to expand a potential ~
46587    eval path="$path"
46588    if test ! -f "$path" && test ! -d "$path"; then
46589      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46590    fi
46591
46592    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46593  fi
46594
46595
46596  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46597
46598  # Input might be given as Windows format, start by converting to
46599  # unix format.
46600  path="$POTENTIAL_FREETYPE_LIB_PATH"
46601  new_path=`$CYGPATH -u "$path"`
46602
46603  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46604  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46605  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46606  # "foo.exe" is OK but "foo" is an error.
46607  #
46608  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46609  # It is also a way to make sure we got the proper file name for the real test later on.
46610  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46611  if test "x$test_shortpath" = x; then
46612    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46613$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46614    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46615  fi
46616
46617  # Call helper function which possibly converts this using DOS-style short mode.
46618  # If so, the updated path is stored in $new_path.
46619
46620  input_path="$new_path"
46621  # Check if we need to convert this using DOS-style short mode. If the path
46622  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46623  # take no chances and rewrite it.
46624  # Note: m4 eats our [], so we need to use [ and ] instead.
46625  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46626  if test "x$has_forbidden_chars" != x; then
46627    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46628    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46629    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46630    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46631      # Going to short mode and back again did indeed matter. Since short mode is
46632      # case insensitive, let's make it lowercase to improve readability.
46633      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46634      # Now convert it back to Unix-stile (cygpath)
46635      input_path=`$CYGPATH -u "$shortmode_path"`
46636      new_path="$input_path"
46637    fi
46638  fi
46639
46640  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46641  if test "x$test_cygdrive_prefix" = x; then
46642    # As a simple fix, exclude /usr/bin since it's not a real path.
46643    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46644      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46645      # a path prefixed by /cygdrive for fixpath to work.
46646      new_path="$CYGWIN_ROOT_PATH$input_path"
46647    fi
46648  fi
46649
46650
46651  if test "x$path" != "x$new_path"; then
46652    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46653    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46654$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46655  fi
46656
46657  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46658
46659  path="$POTENTIAL_FREETYPE_LIB_PATH"
46660  has_colon=`$ECHO $path | $GREP ^.:`
46661  new_path="$path"
46662  if test "x$has_colon" = x; then
46663    # Not in mixed or Windows style, start by that.
46664    new_path=`cmd //c echo $path`
46665  fi
46666
46667
46668  input_path="$new_path"
46669  # Check if we need to convert this using DOS-style short mode. If the path
46670  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46671  # take no chances and rewrite it.
46672  # Note: m4 eats our [], so we need to use [ and ] instead.
46673  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46674  if test "x$has_forbidden_chars" != x; then
46675    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46676    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46677  fi
46678
46679
46680  windows_path="$new_path"
46681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46682    unix_path=`$CYGPATH -u "$windows_path"`
46683    new_path="$unix_path"
46684  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46685    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46686    new_path="$unix_path"
46687  fi
46688
46689  if test "x$path" != "x$new_path"; then
46690    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46691    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46692$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46693  fi
46694
46695  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46696  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46697
46698  else
46699    # We're on a posix platform. Hooray! :)
46700    path="$POTENTIAL_FREETYPE_LIB_PATH"
46701    has_space=`$ECHO "$path" | $GREP " "`
46702    if test "x$has_space" != x; then
46703      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46704$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46705      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46706    fi
46707
46708    # Use eval to expand a potential ~
46709    eval path="$path"
46710    if test ! -f "$path" && test ! -d "$path"; then
46711      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46712    fi
46713
46714    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46715  fi
46716
46717
46718    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46719    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46720$as_echo_n "checking for freetype includes... " >&6; }
46721    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46722$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46723    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46724    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46725$as_echo_n "checking for freetype libraries... " >&6; }
46726    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46727$as_echo "$FREETYPE_LIB_PATH" >&6; }
46728  fi
46729
46730            else
46731
46732  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46733  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
46734  METHOD="well-known location"
46735
46736  # First check if the files exists.
46737  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46738    # We found an arbitrary include file. That's a good sign.
46739    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46740$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46741    FOUND_FREETYPE=yes
46742
46743    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
46744    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46745      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46746$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46747      FOUND_FREETYPE=no
46748    else
46749      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46750        # On Windows, we will need both .lib and .dll file.
46751        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
46752          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
46753$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
46754          FOUND_FREETYPE=no
46755        fi
46756      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46757          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46758        # Found lib in isa dir, use that instead.
46759        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46760      fi
46761    fi
46762  fi
46763
46764  if test "x$FOUND_FREETYPE" = xyes; then
46765
46766  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46767
46768  # Input might be given as Windows format, start by converting to
46769  # unix format.
46770  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46771  new_path=`$CYGPATH -u "$path"`
46772
46773  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46774  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46775  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46776  # "foo.exe" is OK but "foo" is an error.
46777  #
46778  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46779  # It is also a way to make sure we got the proper file name for the real test later on.
46780  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46781  if test "x$test_shortpath" = x; then
46782    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46783$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46784    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46785  fi
46786
46787  # Call helper function which possibly converts this using DOS-style short mode.
46788  # If so, the updated path is stored in $new_path.
46789
46790  input_path="$new_path"
46791  # Check if we need to convert this using DOS-style short mode. If the path
46792  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46793  # take no chances and rewrite it.
46794  # Note: m4 eats our [], so we need to use [ and ] instead.
46795  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46796  if test "x$has_forbidden_chars" != x; then
46797    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46798    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46799    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46800    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46801      # Going to short mode and back again did indeed matter. Since short mode is
46802      # case insensitive, let's make it lowercase to improve readability.
46803      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46804      # Now convert it back to Unix-stile (cygpath)
46805      input_path=`$CYGPATH -u "$shortmode_path"`
46806      new_path="$input_path"
46807    fi
46808  fi
46809
46810  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46811  if test "x$test_cygdrive_prefix" = x; then
46812    # As a simple fix, exclude /usr/bin since it's not a real path.
46813    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46814      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46815      # a path prefixed by /cygdrive for fixpath to work.
46816      new_path="$CYGWIN_ROOT_PATH$input_path"
46817    fi
46818  fi
46819
46820
46821  if test "x$path" != "x$new_path"; then
46822    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46823    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46824$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46825  fi
46826
46827  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46828
46829  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46830  has_colon=`$ECHO $path | $GREP ^.:`
46831  new_path="$path"
46832  if test "x$has_colon" = x; then
46833    # Not in mixed or Windows style, start by that.
46834    new_path=`cmd //c echo $path`
46835  fi
46836
46837
46838  input_path="$new_path"
46839  # Check if we need to convert this using DOS-style short mode. If the path
46840  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46841  # take no chances and rewrite it.
46842  # Note: m4 eats our [], so we need to use [ and ] instead.
46843  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46844  if test "x$has_forbidden_chars" != x; then
46845    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46846    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46847  fi
46848
46849
46850  windows_path="$new_path"
46851  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46852    unix_path=`$CYGPATH -u "$windows_path"`
46853    new_path="$unix_path"
46854  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46855    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46856    new_path="$unix_path"
46857  fi
46858
46859  if test "x$path" != "x$new_path"; then
46860    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46861    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46862$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46863  fi
46864
46865  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46866  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46867
46868  else
46869    # We're on a posix platform. Hooray! :)
46870    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46871    has_space=`$ECHO "$path" | $GREP " "`
46872    if test "x$has_space" != x; then
46873      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46874$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46875      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46876    fi
46877
46878    # Use eval to expand a potential ~
46879    eval path="$path"
46880    if test ! -f "$path" && test ! -d "$path"; then
46881      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46882    fi
46883
46884    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46885  fi
46886
46887
46888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46889
46890  # Input might be given as Windows format, start by converting to
46891  # unix format.
46892  path="$POTENTIAL_FREETYPE_LIB_PATH"
46893  new_path=`$CYGPATH -u "$path"`
46894
46895  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46896  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46897  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46898  # "foo.exe" is OK but "foo" is an error.
46899  #
46900  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46901  # It is also a way to make sure we got the proper file name for the real test later on.
46902  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46903  if test "x$test_shortpath" = x; then
46904    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46905$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46906    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46907  fi
46908
46909  # Call helper function which possibly converts this using DOS-style short mode.
46910  # If so, the updated path is stored in $new_path.
46911
46912  input_path="$new_path"
46913  # Check if we need to convert this using DOS-style short mode. If the path
46914  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46915  # take no chances and rewrite it.
46916  # Note: m4 eats our [], so we need to use [ and ] instead.
46917  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46918  if test "x$has_forbidden_chars" != x; then
46919    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46920    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46921    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46922    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46923      # Going to short mode and back again did indeed matter. Since short mode is
46924      # case insensitive, let's make it lowercase to improve readability.
46925      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46926      # Now convert it back to Unix-stile (cygpath)
46927      input_path=`$CYGPATH -u "$shortmode_path"`
46928      new_path="$input_path"
46929    fi
46930  fi
46931
46932  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46933  if test "x$test_cygdrive_prefix" = x; then
46934    # As a simple fix, exclude /usr/bin since it's not a real path.
46935    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46936      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46937      # a path prefixed by /cygdrive for fixpath to work.
46938      new_path="$CYGWIN_ROOT_PATH$input_path"
46939    fi
46940  fi
46941
46942
46943  if test "x$path" != "x$new_path"; then
46944    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46945    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46946$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46947  fi
46948
46949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46950
46951  path="$POTENTIAL_FREETYPE_LIB_PATH"
46952  has_colon=`$ECHO $path | $GREP ^.:`
46953  new_path="$path"
46954  if test "x$has_colon" = x; then
46955    # Not in mixed or Windows style, start by that.
46956    new_path=`cmd //c echo $path`
46957  fi
46958
46959
46960  input_path="$new_path"
46961  # Check if we need to convert this using DOS-style short mode. If the path
46962  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46963  # take no chances and rewrite it.
46964  # Note: m4 eats our [], so we need to use [ and ] instead.
46965  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46966  if test "x$has_forbidden_chars" != x; then
46967    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46968    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46969  fi
46970
46971
46972  windows_path="$new_path"
46973  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46974    unix_path=`$CYGPATH -u "$windows_path"`
46975    new_path="$unix_path"
46976  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46977    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46978    new_path="$unix_path"
46979  fi
46980
46981  if test "x$path" != "x$new_path"; then
46982    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46983    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46984$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46985  fi
46986
46987  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46988  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46989
46990  else
46991    # We're on a posix platform. Hooray! :)
46992    path="$POTENTIAL_FREETYPE_LIB_PATH"
46993    has_space=`$ECHO "$path" | $GREP " "`
46994    if test "x$has_space" != x; then
46995      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46996$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46997      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46998    fi
46999
47000    # Use eval to expand a potential ~
47001    eval path="$path"
47002    if test ! -f "$path" && test ! -d "$path"; then
47003      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47004    fi
47005
47006    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47007  fi
47008
47009
47010    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47011    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47012$as_echo_n "checking for freetype includes... " >&6; }
47013    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47014$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47015    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47016    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47017$as_echo_n "checking for freetype libraries... " >&6; }
47018    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47019$as_echo "$FREETYPE_LIB_PATH" >&6; }
47020  fi
47021
47022              if test "x$FOUND_FREETYPE" != xyes; then
47023
47024  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47025  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
47026  METHOD="well-known location"
47027
47028  # First check if the files exists.
47029  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47030    # We found an arbitrary include file. That's a good sign.
47031    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47032$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47033    FOUND_FREETYPE=yes
47034
47035    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
47036    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47037      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47038$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47039      FOUND_FREETYPE=no
47040    else
47041      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47042        # On Windows, we will need both .lib and .dll file.
47043        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
47044          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
47045$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
47046          FOUND_FREETYPE=no
47047        fi
47048      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47049          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47050        # Found lib in isa dir, use that instead.
47051        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47052      fi
47053    fi
47054  fi
47055
47056  if test "x$FOUND_FREETYPE" = xyes; then
47057
47058  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47059
47060  # Input might be given as Windows format, start by converting to
47061  # unix format.
47062  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47063  new_path=`$CYGPATH -u "$path"`
47064
47065  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47066  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47067  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47068  # "foo.exe" is OK but "foo" is an error.
47069  #
47070  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47071  # It is also a way to make sure we got the proper file name for the real test later on.
47072  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47073  if test "x$test_shortpath" = x; then
47074    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47075$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47076    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47077  fi
47078
47079  # Call helper function which possibly converts this using DOS-style short mode.
47080  # If so, the updated path is stored in $new_path.
47081
47082  input_path="$new_path"
47083  # Check if we need to convert this using DOS-style short mode. If the path
47084  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47085  # take no chances and rewrite it.
47086  # Note: m4 eats our [], so we need to use [ and ] instead.
47087  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47088  if test "x$has_forbidden_chars" != x; then
47089    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47090    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47091    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47092    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47093      # Going to short mode and back again did indeed matter. Since short mode is
47094      # case insensitive, let's make it lowercase to improve readability.
47095      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47096      # Now convert it back to Unix-stile (cygpath)
47097      input_path=`$CYGPATH -u "$shortmode_path"`
47098      new_path="$input_path"
47099    fi
47100  fi
47101
47102  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47103  if test "x$test_cygdrive_prefix" = x; then
47104    # As a simple fix, exclude /usr/bin since it's not a real path.
47105    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47106      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47107      # a path prefixed by /cygdrive for fixpath to work.
47108      new_path="$CYGWIN_ROOT_PATH$input_path"
47109    fi
47110  fi
47111
47112
47113  if test "x$path" != "x$new_path"; then
47114    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47115    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47116$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47117  fi
47118
47119  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47120
47121  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47122  has_colon=`$ECHO $path | $GREP ^.:`
47123  new_path="$path"
47124  if test "x$has_colon" = x; then
47125    # Not in mixed or Windows style, start by that.
47126    new_path=`cmd //c echo $path`
47127  fi
47128
47129
47130  input_path="$new_path"
47131  # Check if we need to convert this using DOS-style short mode. If the path
47132  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47133  # take no chances and rewrite it.
47134  # Note: m4 eats our [], so we need to use [ and ] instead.
47135  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47136  if test "x$has_forbidden_chars" != x; then
47137    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47138    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47139  fi
47140
47141
47142  windows_path="$new_path"
47143  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47144    unix_path=`$CYGPATH -u "$windows_path"`
47145    new_path="$unix_path"
47146  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47147    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47148    new_path="$unix_path"
47149  fi
47150
47151  if test "x$path" != "x$new_path"; then
47152    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47153    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47154$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47155  fi
47156
47157  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47158  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47159
47160  else
47161    # We're on a posix platform. Hooray! :)
47162    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47163    has_space=`$ECHO "$path" | $GREP " "`
47164    if test "x$has_space" != x; then
47165      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47166$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47167      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47168    fi
47169
47170    # Use eval to expand a potential ~
47171    eval path="$path"
47172    if test ! -f "$path" && test ! -d "$path"; then
47173      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47174    fi
47175
47176    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47177  fi
47178
47179
47180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47181
47182  # Input might be given as Windows format, start by converting to
47183  # unix format.
47184  path="$POTENTIAL_FREETYPE_LIB_PATH"
47185  new_path=`$CYGPATH -u "$path"`
47186
47187  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47188  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47189  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47190  # "foo.exe" is OK but "foo" is an error.
47191  #
47192  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47193  # It is also a way to make sure we got the proper file name for the real test later on.
47194  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47195  if test "x$test_shortpath" = x; then
47196    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47197$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47198    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47199  fi
47200
47201  # Call helper function which possibly converts this using DOS-style short mode.
47202  # If so, the updated path is stored in $new_path.
47203
47204  input_path="$new_path"
47205  # Check if we need to convert this using DOS-style short mode. If the path
47206  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47207  # take no chances and rewrite it.
47208  # Note: m4 eats our [], so we need to use [ and ] instead.
47209  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47210  if test "x$has_forbidden_chars" != x; then
47211    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47212    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47213    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47214    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47215      # Going to short mode and back again did indeed matter. Since short mode is
47216      # case insensitive, let's make it lowercase to improve readability.
47217      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47218      # Now convert it back to Unix-stile (cygpath)
47219      input_path=`$CYGPATH -u "$shortmode_path"`
47220      new_path="$input_path"
47221    fi
47222  fi
47223
47224  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47225  if test "x$test_cygdrive_prefix" = x; then
47226    # As a simple fix, exclude /usr/bin since it's not a real path.
47227    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47228      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47229      # a path prefixed by /cygdrive for fixpath to work.
47230      new_path="$CYGWIN_ROOT_PATH$input_path"
47231    fi
47232  fi
47233
47234
47235  if test "x$path" != "x$new_path"; then
47236    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47237    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47238$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47239  fi
47240
47241  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47242
47243  path="$POTENTIAL_FREETYPE_LIB_PATH"
47244  has_colon=`$ECHO $path | $GREP ^.:`
47245  new_path="$path"
47246  if test "x$has_colon" = x; then
47247    # Not in mixed or Windows style, start by that.
47248    new_path=`cmd //c echo $path`
47249  fi
47250
47251
47252  input_path="$new_path"
47253  # Check if we need to convert this using DOS-style short mode. If the path
47254  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47255  # take no chances and rewrite it.
47256  # Note: m4 eats our [], so we need to use [ and ] instead.
47257  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47258  if test "x$has_forbidden_chars" != x; then
47259    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47260    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47261  fi
47262
47263
47264  windows_path="$new_path"
47265  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47266    unix_path=`$CYGPATH -u "$windows_path"`
47267    new_path="$unix_path"
47268  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47269    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47270    new_path="$unix_path"
47271  fi
47272
47273  if test "x$path" != "x$new_path"; then
47274    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47275    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47276$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47277  fi
47278
47279  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47280  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47281
47282  else
47283    # We're on a posix platform. Hooray! :)
47284    path="$POTENTIAL_FREETYPE_LIB_PATH"
47285    has_space=`$ECHO "$path" | $GREP " "`
47286    if test "x$has_space" != x; then
47287      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47288$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47289      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47290    fi
47291
47292    # Use eval to expand a potential ~
47293    eval path="$path"
47294    if test ! -f "$path" && test ! -d "$path"; then
47295      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47296    fi
47297
47298    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47299  fi
47300
47301
47302    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47303    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47304$as_echo_n "checking for freetype includes... " >&6; }
47305    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47306$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47307    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47308    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47309$as_echo_n "checking for freetype libraries... " >&6; }
47310    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47311$as_echo "$FREETYPE_LIB_PATH" >&6; }
47312  fi
47313
47314              fi
47315            fi
47316          fi
47317        fi
47318      fi # end check in well-known locations
47319
47320      if test "x$FOUND_FREETYPE" != xyes; then
47321
47322  # Print a helpful message on how to acquire the necessary build dependency.
47323  # freetype is the help tag: freetype, cups, pulse, alsa etc
47324  MISSING_DEPENDENCY=freetype
47325
47326  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47327    cygwin_help $MISSING_DEPENDENCY
47328  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47329    msys_help $MISSING_DEPENDENCY
47330  else
47331    PKGHANDLER_COMMAND=
47332
47333    case $PKGHANDLER in
47334      apt-get)
47335        apt_help     $MISSING_DEPENDENCY ;;
47336      yum)
47337        yum_help     $MISSING_DEPENDENCY ;;
47338      port)
47339        port_help    $MISSING_DEPENDENCY ;;
47340      pkgutil)
47341        pkgutil_help $MISSING_DEPENDENCY ;;
47342      pkgadd)
47343        pkgadd_help  $MISSING_DEPENDENCY ;;
47344    esac
47345
47346    if test "x$PKGHANDLER_COMMAND" != x; then
47347      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47348    fi
47349  fi
47350
47351        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
47352      fi
47353    fi # end user specified settings
47354
47355    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
47356    if test "x$FREETYPE_CFLAGS" = x; then
47357
47358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47359
47360  # Input might be given as Windows format, start by converting to
47361  # unix format.
47362  path="$FREETYPE_INCLUDE_PATH"
47363  new_path=`$CYGPATH -u "$path"`
47364
47365  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47366  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47367  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47368  # "foo.exe" is OK but "foo" is an error.
47369  #
47370  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47371  # It is also a way to make sure we got the proper file name for the real test later on.
47372  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47373  if test "x$test_shortpath" = x; then
47374    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47375$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47376    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
47377  fi
47378
47379  # Call helper function which possibly converts this using DOS-style short mode.
47380  # If so, the updated path is stored in $new_path.
47381
47382  input_path="$new_path"
47383  # Check if we need to convert this using DOS-style short mode. If the path
47384  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47385  # take no chances and rewrite it.
47386  # Note: m4 eats our [], so we need to use [ and ] instead.
47387  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47388  if test "x$has_forbidden_chars" != x; then
47389    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47390    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47391    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47392    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47393      # Going to short mode and back again did indeed matter. Since short mode is
47394      # case insensitive, let's make it lowercase to improve readability.
47395      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47396      # Now convert it back to Unix-stile (cygpath)
47397      input_path=`$CYGPATH -u "$shortmode_path"`
47398      new_path="$input_path"
47399    fi
47400  fi
47401
47402  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47403  if test "x$test_cygdrive_prefix" = x; then
47404    # As a simple fix, exclude /usr/bin since it's not a real path.
47405    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47406      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47407      # a path prefixed by /cygdrive for fixpath to work.
47408      new_path="$CYGWIN_ROOT_PATH$input_path"
47409    fi
47410  fi
47411
47412
47413  if test "x$path" != "x$new_path"; then
47414    FREETYPE_INCLUDE_PATH="$new_path"
47415    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47416$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47417  fi
47418
47419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47420
47421  path="$FREETYPE_INCLUDE_PATH"
47422  has_colon=`$ECHO $path | $GREP ^.:`
47423  new_path="$path"
47424  if test "x$has_colon" = x; then
47425    # Not in mixed or Windows style, start by that.
47426    new_path=`cmd //c echo $path`
47427  fi
47428
47429
47430  input_path="$new_path"
47431  # Check if we need to convert this using DOS-style short mode. If the path
47432  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47433  # take no chances and rewrite it.
47434  # Note: m4 eats our [], so we need to use [ and ] instead.
47435  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47436  if test "x$has_forbidden_chars" != x; then
47437    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47438    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47439  fi
47440
47441
47442  windows_path="$new_path"
47443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47444    unix_path=`$CYGPATH -u "$windows_path"`
47445    new_path="$unix_path"
47446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47447    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47448    new_path="$unix_path"
47449  fi
47450
47451  if test "x$path" != "x$new_path"; then
47452    FREETYPE_INCLUDE_PATH="$new_path"
47453    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47454$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47455  fi
47456
47457  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47458  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47459
47460  else
47461    # We're on a posix platform. Hooray! :)
47462    path="$FREETYPE_INCLUDE_PATH"
47463    has_space=`$ECHO "$path" | $GREP " "`
47464    if test "x$has_space" != x; then
47465      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47466$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47467      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47468    fi
47469
47470    # Use eval to expand a potential ~
47471    eval path="$path"
47472    if test ! -f "$path" && test ! -d "$path"; then
47473      as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47474    fi
47475
47476    FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47477  fi
47478
47479      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
47480        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
47481      else
47482        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
47483      fi
47484    fi
47485
47486    if test "x$FREETYPE_LIBS" = x; then
47487
47488  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47489
47490  # Input might be given as Windows format, start by converting to
47491  # unix format.
47492  path="$FREETYPE_LIB_PATH"
47493  new_path=`$CYGPATH -u "$path"`
47494
47495  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47496  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47497  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47498  # "foo.exe" is OK but "foo" is an error.
47499  #
47500  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47501  # It is also a way to make sure we got the proper file name for the real test later on.
47502  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47503  if test "x$test_shortpath" = x; then
47504    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47505$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47506    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
47507  fi
47508
47509  # Call helper function which possibly converts this using DOS-style short mode.
47510  # If so, the updated path is stored in $new_path.
47511
47512  input_path="$new_path"
47513  # Check if we need to convert this using DOS-style short mode. If the path
47514  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47515  # take no chances and rewrite it.
47516  # Note: m4 eats our [], so we need to use [ and ] instead.
47517  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47518  if test "x$has_forbidden_chars" != x; then
47519    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47520    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47521    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47522    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47523      # Going to short mode and back again did indeed matter. Since short mode is
47524      # case insensitive, let's make it lowercase to improve readability.
47525      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47526      # Now convert it back to Unix-stile (cygpath)
47527      input_path=`$CYGPATH -u "$shortmode_path"`
47528      new_path="$input_path"
47529    fi
47530  fi
47531
47532  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47533  if test "x$test_cygdrive_prefix" = x; then
47534    # As a simple fix, exclude /usr/bin since it's not a real path.
47535    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47536      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47537      # a path prefixed by /cygdrive for fixpath to work.
47538      new_path="$CYGWIN_ROOT_PATH$input_path"
47539    fi
47540  fi
47541
47542
47543  if test "x$path" != "x$new_path"; then
47544    FREETYPE_LIB_PATH="$new_path"
47545    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
47546$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47547  fi
47548
47549  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47550
47551  path="$FREETYPE_LIB_PATH"
47552  has_colon=`$ECHO $path | $GREP ^.:`
47553  new_path="$path"
47554  if test "x$has_colon" = x; then
47555    # Not in mixed or Windows style, start by that.
47556    new_path=`cmd //c echo $path`
47557  fi
47558
47559
47560  input_path="$new_path"
47561  # Check if we need to convert this using DOS-style short mode. If the path
47562  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47563  # take no chances and rewrite it.
47564  # Note: m4 eats our [], so we need to use [ and ] instead.
47565  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47566  if test "x$has_forbidden_chars" != x; then
47567    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47568    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47569  fi
47570
47571
47572  windows_path="$new_path"
47573  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47574    unix_path=`$CYGPATH -u "$windows_path"`
47575    new_path="$unix_path"
47576  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47577    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47578    new_path="$unix_path"
47579  fi
47580
47581  if test "x$path" != "x$new_path"; then
47582    FREETYPE_LIB_PATH="$new_path"
47583    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
47584$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47585  fi
47586
47587  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47588  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47589
47590  else
47591    # We're on a posix platform. Hooray! :)
47592    path="$FREETYPE_LIB_PATH"
47593    has_space=`$ECHO "$path" | $GREP " "`
47594    if test "x$has_space" != x; then
47595      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47596$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47597      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47598    fi
47599
47600    # Use eval to expand a potential ~
47601    eval path="$path"
47602    if test ! -f "$path" && test ! -d "$path"; then
47603      as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47604    fi
47605
47606    FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47607  fi
47608
47609      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47610        FREETYPE_LIBS="$FREETYPE_LIB_PATH/freetype.lib"
47611      else
47612        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -lfreetype"
47613      fi
47614    fi
47615
47616    # Try to compile it
47617    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
47618$as_echo_n "checking if we can compile and link with freetype... " >&6; }
47619    ac_ext=cpp
47620ac_cpp='$CXXCPP $CPPFLAGS'
47621ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47622ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47623ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47624
47625    PREV_CXXCFLAGS="$CXXFLAGS"
47626    PREV_LIBS="$LIBS"
47627    PREV_CXX="$CXX"
47628    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
47629    LIBS="$LIBS $FREETYPE_LIBS"
47630    CXX="$FIXPATH $CXX"
47631    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47632/* end confdefs.h.  */
47633
47634          #include<ft2build.h>
47635          #include FT_FREETYPE_H
47636          int main () {
47637            FT_Init_FreeType(NULL);
47638            return 0;
47639          }
47640
47641_ACEOF
47642if ac_fn_cxx_try_link "$LINENO"; then :
47643
47644          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47645$as_echo "yes" >&6; }
47646
47647else
47648
47649          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47650$as_echo "no" >&6; }
47651          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
47652$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
47653          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
47654$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
47655
47656
47657  # Print a helpful message on how to acquire the necessary build dependency.
47658  # freetype is the help tag: freetype, cups, pulse, alsa etc
47659  MISSING_DEPENDENCY=freetype
47660
47661  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47662    cygwin_help $MISSING_DEPENDENCY
47663  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47664    msys_help $MISSING_DEPENDENCY
47665  else
47666    PKGHANDLER_COMMAND=
47667
47668    case $PKGHANDLER in
47669      apt-get)
47670        apt_help     $MISSING_DEPENDENCY ;;
47671      yum)
47672        yum_help     $MISSING_DEPENDENCY ;;
47673      port)
47674        port_help    $MISSING_DEPENDENCY ;;
47675      pkgutil)
47676        pkgutil_help $MISSING_DEPENDENCY ;;
47677      pkgadd)
47678        pkgadd_help  $MISSING_DEPENDENCY ;;
47679    esac
47680
47681    if test "x$PKGHANDLER_COMMAND" != x; then
47682      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47683    fi
47684  fi
47685
47686
47687          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
47688
47689
47690fi
47691rm -f core conftest.err conftest.$ac_objext \
47692    conftest$ac_exeext conftest.$ac_ext
47693    CXXCFLAGS="$PREV_CXXFLAGS"
47694    LIBS="$PREV_LIBS"
47695    CXX="$PREV_CXX"
47696    ac_ext=cpp
47697ac_cpp='$CXXCPP $CPPFLAGS'
47698ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47699ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47700ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47701
47702
47703    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
47704$as_echo_n "checking if we should bundle freetype... " >&6; }
47705    if test "x$BUNDLE_FREETYPE" = xyes; then
47706      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
47707    fi
47708    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
47709$as_echo "$BUNDLE_FREETYPE" >&6; }
47710
47711  fi # end freetype needed
47712
47713
47714
47715
47716
47717
47718
47719  ###############################################################################
47720  #
47721  # Check for alsa headers and libraries. Used on Linux/GNU systems.
47722  #
47723
47724# Check whether --with-alsa was given.
47725if test "${with_alsa+set}" = set; then :
47726  withval=$with_alsa;
47727fi
47728
47729
47730# Check whether --with-alsa-include was given.
47731if test "${with_alsa_include+set}" = set; then :
47732  withval=$with_alsa_include;
47733fi
47734
47735
47736# Check whether --with-alsa-lib was given.
47737if test "${with_alsa_lib+set}" = set; then :
47738  withval=$with_alsa_lib;
47739fi
47740
47741
47742  if test "x$ALSA_NOT_NEEDED" = xyes; then
47743    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
47744      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
47745$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
47746    fi
47747    ALSA_CFLAGS=
47748    ALSA_LIBS=
47749  else
47750    ALSA_FOUND=no
47751
47752    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
47753      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
47754    fi
47755
47756    if test "x${with_alsa}" != x; then
47757      ALSA_LIBS="-L${with_alsa}/lib -lasound"
47758      ALSA_CFLAGS="-I${with_alsa}/include"
47759      ALSA_FOUND=yes
47760    fi
47761    if test "x${with_alsa_include}" != x; then
47762      ALSA_CFLAGS="-I${with_alsa_include}"
47763      ALSA_FOUND=yes
47764    fi
47765    if test "x${with_alsa_lib}" != x; then
47766      ALSA_LIBS="-L${with_alsa_lib} -lasound"
47767      ALSA_FOUND=yes
47768    fi
47769    if test "x$ALSA_FOUND" = xno; then
47770
47771
47772  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
47773    # Source the builddeps file again, to make sure it uses the latest variables!
47774    . $builddepsfile
47775    # Look for a target and build machine specific resource!
47776    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
47777    if test "x$resource" = x; then
47778      # Ok, lets instead look for a target specific resource
47779      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
47780    fi
47781    if test "x$resource" = x; then
47782      # Ok, lets instead look for a build specific resource
47783      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
47784    fi
47785    if test "x$resource" = x; then
47786      # Ok, lets instead look for a generic resource
47787      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
47788      resource=${builddep_alsa}
47789    fi
47790    if test "x$resource" != x; then
47791      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
47792$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
47793      # If the resource in the builddeps.conf file is an existing directory,
47794      # for example /java/linux/cups
47795      if test -d ${resource}; then
47796        depdir=${resource}
47797      else
47798
47799  # alsa is for example mymodule
47800  # $resource is for example libs/general/libmymod_1_2_3.zip
47801  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
47802  # $with_builddeps_dir is for example /localhome/builddeps
47803  # depdir is the name of the variable into which we store the depdir, eg MYMOD
47804  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
47805  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
47806  filename=`basename $resource`
47807  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
47808  filebase=${filename%%.*}
47809  extension=${filename#*.}
47810  installdir=$with_builddeps_dir/$filebase
47811  if test ! -f $installdir/$filename.unpacked; then
47812    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
47813$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
47814    if test ! -d $installdir; then
47815      mkdir -p $installdir
47816    fi
47817    if test ! -d $installdir; then
47818      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
47819    fi
47820    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
47821    touch $tmpfile
47822    if test ! -f $tmpfile; then
47823      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
47824    fi
47825
47826  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
47827  # $tmpfile is the local file name for the downloaded file.
47828  VALID_TOOL=no
47829  if test "x$BDEPS_FTP" = xwget; then
47830    VALID_TOOL=yes
47831    wget -O $tmpfile $with_builddeps_server/$resource
47832  fi
47833  if test "x$BDEPS_FTP" = xlftp; then
47834    VALID_TOOL=yes
47835    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
47836  fi
47837  if test "x$BDEPS_FTP" = xftp; then
47838    VALID_TOOL=yes
47839    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
47840    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
47841    FTPUSERPWD=${FTPSERVER%%@*}
47842    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
47843      FTPUSER=${userpwd%%:*}
47844      FTPPWD=${userpwd#*@}
47845      FTPSERVER=${FTPSERVER#*@}
47846    else
47847      FTPUSER=ftp
47848      FTPPWD=ftp
47849    fi
47850    # the "pass" command does not work on some
47851    # ftp clients (read ftp.exe) but if it works,
47852    # passive mode is better!
47853    ( \
47854        echo "user $FTPUSER $FTPPWD"        ; \
47855        echo "pass"                         ; \
47856        echo "bin"                          ; \
47857        echo "get $FTPPATH $tmpfile"              ; \
47858    ) | ftp -in $FTPSERVER
47859  fi
47860  if test "x$VALID_TOOL" != xyes; then
47861    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
47862  fi
47863
47864    mv $tmpfile $installdir/$filename
47865    if test ! -s $installdir/$filename; then
47866      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
47867    fi
47868    case "$extension" in
47869      zip)  echo "Unzipping $installdir/$filename..."
47870        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
47871        ;;
47872      tar.gz) echo "Untaring $installdir/$filename..."
47873        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
47874        ;;
47875      tgz) echo "Untaring $installdir/$filename..."
47876        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
47877        ;;
47878      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
47879        ;;
47880    esac
47881  fi
47882  if test -f $installdir/$filename.unpacked; then
47883    depdir=$installdir
47884  fi
47885
47886      fi
47887      # Source the builddeps file again, because in the previous command, the depdir
47888      # was updated to point at the current build dependency install directory.
47889      . $builddepsfile
47890      # Now extract variables from the builddeps.conf files.
47891      theroot=${builddep_alsa_ROOT}
47892      thecflags=${builddep_alsa_CFLAGS}
47893      thelibs=${builddep_alsa_LIBS}
47894      if test "x$depdir" = x; then
47895        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
47896      fi
47897      ALSA=$depdir
47898      if test "x$theroot" != x; then
47899        ALSA="$theroot"
47900      fi
47901      if test "x$thecflags" != x; then
47902        ALSA_CFLAGS="$thecflags"
47903      fi
47904      if test "x$thelibs" != x; then
47905        ALSA_LIBS="$thelibs"
47906      fi
47907      ALSA_FOUND=yes
47908      else ALSA_FOUND=no
47909
47910    fi
47911    else ALSA_FOUND=no
47912
47913  fi
47914
47915    fi
47916    # Do not try pkg-config if we have a sysroot set.
47917    if test "x$SYSROOT" = x; then
47918      if test "x$ALSA_FOUND" = xno; then
47919
47920pkg_failed=no
47921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
47922$as_echo_n "checking for ALSA... " >&6; }
47923
47924if test -n "$ALSA_CFLAGS"; then
47925    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
47926 elif test -n "$PKG_CONFIG"; then
47927    if test -n "$PKG_CONFIG" && \
47928    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
47929  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
47930  ac_status=$?
47931  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47932  test $ac_status = 0; }; then
47933  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
47934else
47935  pkg_failed=yes
47936fi
47937 else
47938    pkg_failed=untried
47939fi
47940if test -n "$ALSA_LIBS"; then
47941    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
47942 elif test -n "$PKG_CONFIG"; then
47943    if test -n "$PKG_CONFIG" && \
47944    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
47945  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
47946  ac_status=$?
47947  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47948  test $ac_status = 0; }; then
47949  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
47950else
47951  pkg_failed=yes
47952fi
47953 else
47954    pkg_failed=untried
47955fi
47956
47957
47958
47959if test $pkg_failed = yes; then
47960
47961if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
47962        _pkg_short_errors_supported=yes
47963else
47964        _pkg_short_errors_supported=no
47965fi
47966        if test $_pkg_short_errors_supported = yes; then
47967	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
47968        else
47969	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
47970        fi
47971	# Put the nasty error message in config.log where it belongs
47972	echo "$ALSA_PKG_ERRORS" >&5
47973
47974	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47975$as_echo "no" >&6; }
47976                ALSA_FOUND=no
47977elif test $pkg_failed = untried; then
47978	ALSA_FOUND=no
47979else
47980	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
47981	ALSA_LIBS=$pkg_cv_ALSA_LIBS
47982        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47983$as_echo "yes" >&6; }
47984	ALSA_FOUND=yes
47985fi
47986      fi
47987    fi
47988    if test "x$ALSA_FOUND" = xno; then
47989      for ac_header in alsa/asoundlib.h
47990do :
47991  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
47992if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
47993  cat >>confdefs.h <<_ACEOF
47994#define HAVE_ALSA_ASOUNDLIB_H 1
47995_ACEOF
47996
47997            ALSA_FOUND=yes
47998            ALSA_CFLAGS=-Iignoreme
47999            ALSA_LIBS=-lasound
48000            DEFAULT_ALSA=yes
48001
48002else
48003  ALSA_FOUND=no
48004fi
48005
48006done
48007
48008    fi
48009    if test "x$ALSA_FOUND" = xno; then
48010
48011  # Print a helpful message on how to acquire the necessary build dependency.
48012  # alsa is the help tag: freetype, cups, pulse, alsa etc
48013  MISSING_DEPENDENCY=alsa
48014
48015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48016    cygwin_help $MISSING_DEPENDENCY
48017  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48018    msys_help $MISSING_DEPENDENCY
48019  else
48020    PKGHANDLER_COMMAND=
48021
48022    case $PKGHANDLER in
48023      apt-get)
48024        apt_help     $MISSING_DEPENDENCY ;;
48025      yum)
48026        yum_help     $MISSING_DEPENDENCY ;;
48027      port)
48028        port_help    $MISSING_DEPENDENCY ;;
48029      pkgutil)
48030        pkgutil_help $MISSING_DEPENDENCY ;;
48031      pkgadd)
48032        pkgadd_help  $MISSING_DEPENDENCY ;;
48033    esac
48034
48035    if test "x$PKGHANDLER_COMMAND" != x; then
48036      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48037    fi
48038  fi
48039
48040      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
48041    fi
48042  fi
48043
48044
48045
48046
48047
48048
48049  ###############################################################################
48050  #
48051  # Check for the jpeg library
48052  #
48053
48054
48055# Check whether --with-libjpeg was given.
48056if test "${with_libjpeg+set}" = set; then :
48057  withval=$with_libjpeg;
48058fi
48059
48060
48061  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
48062$as_echo_n "checking for which libjpeg to use... " >&6; }
48063
48064  # default is bundled
48065  DEFAULT_LIBJPEG=bundled
48066
48067  #
48068  # if user didn't specify, use DEFAULT_LIBJPEG
48069  #
48070  if test "x${with_libjpeg}" = "x"; then
48071    with_libjpeg=${DEFAULT_LIBJPEG}
48072  fi
48073
48074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
48075$as_echo "${with_libjpeg}" >&6; }
48076
48077  if test "x${with_libjpeg}" = "xbundled"; then
48078    USE_EXTERNAL_LIBJPEG=false
48079  elif test "x${with_libjpeg}" = "xsystem"; then
48080    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
48081if test "x$ac_cv_header_jpeglib_h" = xyes; then :
48082
48083else
48084   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
48085fi
48086
48087
48088    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
48089$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
48090if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
48091  $as_echo_n "(cached) " >&6
48092else
48093  ac_check_lib_save_LIBS=$LIBS
48094LIBS="-ljpeg  $LIBS"
48095cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48096/* end confdefs.h.  */
48097
48098/* Override any GCC internal prototype to avoid an error.
48099   Use char because int might match the return type of a GCC
48100   builtin and then its argument prototype would still apply.  */
48101#ifdef __cplusplus
48102extern "C"
48103#endif
48104char jpeg_CreateDecompress ();
48105int
48106main ()
48107{
48108return jpeg_CreateDecompress ();
48109  ;
48110  return 0;
48111}
48112_ACEOF
48113if ac_fn_cxx_try_link "$LINENO"; then :
48114  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
48115else
48116  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
48117fi
48118rm -f core conftest.err conftest.$ac_objext \
48119    conftest$ac_exeext conftest.$ac_ext
48120LIBS=$ac_check_lib_save_LIBS
48121fi
48122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
48123$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
48124if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
48125  cat >>confdefs.h <<_ACEOF
48126#define HAVE_LIBJPEG 1
48127_ACEOF
48128
48129  LIBS="-ljpeg $LIBS"
48130
48131else
48132   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
48133fi
48134
48135
48136    USE_EXTERNAL_LIBJPEG=true
48137  else
48138    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
48139  fi
48140
48141
48142
48143  ###############################################################################
48144  #
48145  # Check for the gif library
48146  #
48147
48148
48149# Check whether --with-giflib was given.
48150if test "${with_giflib+set}" = set; then :
48151  withval=$with_giflib;
48152fi
48153
48154
48155
48156  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
48157$as_echo_n "checking for which giflib to use... " >&6; }
48158
48159  # default is bundled
48160  DEFAULT_GIFLIB=bundled
48161
48162  #
48163  # if user didn't specify, use DEFAULT_GIFLIB
48164  #
48165  if test "x${with_giflib}" = "x"; then
48166    with_giflib=${DEFAULT_GIFLIB}
48167  fi
48168
48169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
48170$as_echo "${with_giflib}" >&6; }
48171
48172  if test "x${with_giflib}" = "xbundled"; then
48173    USE_EXTERNAL_LIBGIF=false
48174  elif test "x${with_giflib}" = "xsystem"; then
48175    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
48176if test "x$ac_cv_header_gif_lib_h" = xyes; then :
48177
48178else
48179   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
48180fi
48181
48182
48183    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
48184$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
48185if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
48186  $as_echo_n "(cached) " >&6
48187else
48188  ac_check_lib_save_LIBS=$LIBS
48189LIBS="-lgif  $LIBS"
48190cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48191/* end confdefs.h.  */
48192
48193/* Override any GCC internal prototype to avoid an error.
48194   Use char because int might match the return type of a GCC
48195   builtin and then its argument prototype would still apply.  */
48196#ifdef __cplusplus
48197extern "C"
48198#endif
48199char DGifGetCode ();
48200int
48201main ()
48202{
48203return DGifGetCode ();
48204  ;
48205  return 0;
48206}
48207_ACEOF
48208if ac_fn_cxx_try_link "$LINENO"; then :
48209  ac_cv_lib_gif_DGifGetCode=yes
48210else
48211  ac_cv_lib_gif_DGifGetCode=no
48212fi
48213rm -f core conftest.err conftest.$ac_objext \
48214    conftest$ac_exeext conftest.$ac_ext
48215LIBS=$ac_check_lib_save_LIBS
48216fi
48217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
48218$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
48219if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
48220  cat >>confdefs.h <<_ACEOF
48221#define HAVE_LIBGIF 1
48222_ACEOF
48223
48224  LIBS="-lgif $LIBS"
48225
48226else
48227   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
48228fi
48229
48230
48231    USE_EXTERNAL_LIBGIF=true
48232  else
48233    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
48234  fi
48235
48236
48237  ###############################################################################
48238  #
48239  # Check for the lcms2 library
48240  #
48241
48242
48243# Check whether --with-lcms was given.
48244if test "${with_lcms+set}" = set; then :
48245  withval=$with_lcms;
48246fi
48247
48248
48249  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
48250$as_echo_n "checking for which lcms to use... " >&6; }
48251
48252  DEFAULT_LCMS=bundled
48253
48254  #
48255  # If user didn't specify, use DEFAULT_LCMS
48256  #
48257  if test "x${with_lcms}" = "x"; then
48258      with_lcms=${DEFAULT_LCMS}
48259  fi
48260
48261  if test "x${with_lcms}" = "xbundled"; then
48262    USE_EXTERNAL_LCMS=false
48263    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
48264$as_echo "bundled" >&6; }
48265  elif test "x${with_lcms}" = "xsystem"; then
48266    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
48267$as_echo "system" >&6; }
48268
48269pkg_failed=no
48270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
48271$as_echo_n "checking for LCMS... " >&6; }
48272
48273if test -n "$LCMS_CFLAGS"; then
48274    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
48275 elif test -n "$PKG_CONFIG"; then
48276    if test -n "$PKG_CONFIG" && \
48277    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
48278  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
48279  ac_status=$?
48280  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48281  test $ac_status = 0; }; then
48282  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
48283else
48284  pkg_failed=yes
48285fi
48286 else
48287    pkg_failed=untried
48288fi
48289if test -n "$LCMS_LIBS"; then
48290    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
48291 elif test -n "$PKG_CONFIG"; then
48292    if test -n "$PKG_CONFIG" && \
48293    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
48294  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
48295  ac_status=$?
48296  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48297  test $ac_status = 0; }; then
48298  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
48299else
48300  pkg_failed=yes
48301fi
48302 else
48303    pkg_failed=untried
48304fi
48305
48306
48307
48308if test $pkg_failed = yes; then
48309
48310if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48311        _pkg_short_errors_supported=yes
48312else
48313        _pkg_short_errors_supported=no
48314fi
48315        if test $_pkg_short_errors_supported = yes; then
48316	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
48317        else
48318	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
48319        fi
48320	# Put the nasty error message in config.log where it belongs
48321	echo "$LCMS_PKG_ERRORS" >&5
48322
48323	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48324$as_echo "no" >&6; }
48325                LCMS_FOUND=no
48326elif test $pkg_failed = untried; then
48327	LCMS_FOUND=no
48328else
48329	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
48330	LCMS_LIBS=$pkg_cv_LCMS_LIBS
48331        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48332$as_echo "yes" >&6; }
48333	LCMS_FOUND=yes
48334fi
48335    if test "x${LCMS_FOUND}" = "xyes"; then
48336      USE_EXTERNAL_LCMS=true
48337    else
48338      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
48339    fi
48340  else
48341    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
48342  fi
48343
48344
48345
48346  ###############################################################################
48347  #
48348  # Check for the png library
48349  #
48350
48351
48352# Check whether --with-libpng was given.
48353if test "${with_libpng+set}" = set; then :
48354  withval=$with_libpng;
48355fi
48356
48357
48358
48359  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
48360$as_echo_n "checking for which libpng to use... " >&6; }
48361
48362  # default is bundled
48363  DEFAULT_LIBPNG=bundled
48364
48365  #
48366  # if user didn't specify, use DEFAULT_LIBPNG
48367  #
48368  if test "x${with_libpng}" = "x"; then
48369      with_libpng=${DEFAULT_LIBPNG}
48370  fi
48371
48372  if test "x${with_libpng}" = "xbundled"; then
48373      USE_EXTERNAL_LIBPNG=false
48374      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
48375$as_echo "bundled" >&6; }
48376  elif test "x${with_libpng}" = "xsystem"; then
48377
48378pkg_failed=no
48379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
48380$as_echo_n "checking for PNG... " >&6; }
48381
48382if test -n "$PNG_CFLAGS"; then
48383    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
48384 elif test -n "$PKG_CONFIG"; then
48385    if test -n "$PKG_CONFIG" && \
48386    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
48387  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
48388  ac_status=$?
48389  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48390  test $ac_status = 0; }; then
48391  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
48392else
48393  pkg_failed=yes
48394fi
48395 else
48396    pkg_failed=untried
48397fi
48398if test -n "$PNG_LIBS"; then
48399    pkg_cv_PNG_LIBS="$PNG_LIBS"
48400 elif test -n "$PKG_CONFIG"; then
48401    if test -n "$PKG_CONFIG" && \
48402    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
48403  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
48404  ac_status=$?
48405  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48406  test $ac_status = 0; }; then
48407  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
48408else
48409  pkg_failed=yes
48410fi
48411 else
48412    pkg_failed=untried
48413fi
48414
48415
48416
48417if test $pkg_failed = yes; then
48418
48419if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48420        _pkg_short_errors_supported=yes
48421else
48422        _pkg_short_errors_supported=no
48423fi
48424        if test $_pkg_short_errors_supported = yes; then
48425	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
48426        else
48427	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
48428        fi
48429	# Put the nasty error message in config.log where it belongs
48430	echo "$PNG_PKG_ERRORS" >&5
48431
48432	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48433$as_echo "no" >&6; }
48434                 LIBPNG_FOUND=no
48435elif test $pkg_failed = untried; then
48436	 LIBPNG_FOUND=no
48437else
48438	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
48439	PNG_LIBS=$pkg_cv_PNG_LIBS
48440        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48441$as_echo "yes" >&6; }
48442	 LIBPNG_FOUND=yes
48443fi
48444      if test "x${LIBPNG_FOUND}" = "xyes"; then
48445          USE_EXTERNAL_LIBPNG=true
48446          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
48447$as_echo "system" >&6; }
48448      else
48449          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
48450$as_echo "system not found" >&6; }
48451          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
48452      fi
48453  else
48454      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
48455  fi
48456
48457
48458  ###############################################################################
48459  #
48460  # Check for the zlib library
48461  #
48462
48463
48464# Check whether --with-zlib was given.
48465if test "${with_zlib+set}" = set; then :
48466  withval=$with_zlib;
48467fi
48468
48469
48470  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
48471$as_echo_n "checking for compress in -lz... " >&6; }
48472if ${ac_cv_lib_z_compress+:} false; then :
48473  $as_echo_n "(cached) " >&6
48474else
48475  ac_check_lib_save_LIBS=$LIBS
48476LIBS="-lz  $LIBS"
48477cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48478/* end confdefs.h.  */
48479
48480/* Override any GCC internal prototype to avoid an error.
48481   Use char because int might match the return type of a GCC
48482   builtin and then its argument prototype would still apply.  */
48483#ifdef __cplusplus
48484extern "C"
48485#endif
48486char compress ();
48487int
48488main ()
48489{
48490return compress ();
48491  ;
48492  return 0;
48493}
48494_ACEOF
48495if ac_fn_cxx_try_link "$LINENO"; then :
48496  ac_cv_lib_z_compress=yes
48497else
48498  ac_cv_lib_z_compress=no
48499fi
48500rm -f core conftest.err conftest.$ac_objext \
48501    conftest$ac_exeext conftest.$ac_ext
48502LIBS=$ac_check_lib_save_LIBS
48503fi
48504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
48505$as_echo "$ac_cv_lib_z_compress" >&6; }
48506if test "x$ac_cv_lib_z_compress" = xyes; then :
48507   ZLIB_FOUND=yes
48508else
48509   ZLIB_FOUND=no
48510fi
48511
48512
48513  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
48514$as_echo_n "checking for which zlib to use... " >&6; }
48515
48516  DEFAULT_ZLIB=bundled
48517  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48518    #
48519    # On macosx default is system...on others default is
48520    #
48521    DEFAULT_ZLIB=system
48522  fi
48523
48524  if test "x${ZLIB_FOUND}" != "xyes"; then
48525    #
48526    # If we don't find any system...set default to bundled
48527    #
48528    DEFAULT_ZLIB=bundled
48529  fi
48530
48531  #
48532  # If user didn't specify, use DEFAULT_ZLIB
48533  #
48534  if test "x${with_zlib}" = "x"; then
48535    with_zlib=${DEFAULT_ZLIB}
48536  fi
48537
48538  if test "x${with_zlib}" = "xbundled"; then
48539    USE_EXTERNAL_LIBZ=false
48540    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
48541$as_echo "bundled" >&6; }
48542  elif test "x${with_zlib}" = "xsystem"; then
48543    if test "x${ZLIB_FOUND}" = "xyes"; then
48544      USE_EXTERNAL_LIBZ=true
48545      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
48546$as_echo "system" >&6; }
48547    else
48548      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
48549$as_echo "system not found" >&6; }
48550      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
48551    fi
48552  else
48553    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
48554  fi
48555
48556
48557
48558  ###############################################################################
48559  LIBZIP_CAN_USE_MMAP=true
48560
48561
48562
48563  ###############################################################################
48564  #
48565  # Check if altzone exists in time.h
48566  #
48567
48568  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48569/* end confdefs.h.  */
48570#include <time.h>
48571int
48572main ()
48573{
48574return (int)altzone;
48575  ;
48576  return 0;
48577}
48578_ACEOF
48579if ac_fn_cxx_try_link "$LINENO"; then :
48580  has_altzone=yes
48581else
48582  has_altzone=no
48583fi
48584rm -f core conftest.err conftest.$ac_objext \
48585    conftest$ac_exeext conftest.$ac_ext
48586  if test "x$has_altzone" = xyes; then
48587
48588$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
48589
48590  fi
48591
48592  ###############################################################################
48593  #
48594  # Check the maths library
48595  #
48596
48597  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
48598$as_echo_n "checking for cos in -lm... " >&6; }
48599if ${ac_cv_lib_m_cos+:} false; then :
48600  $as_echo_n "(cached) " >&6
48601else
48602  ac_check_lib_save_LIBS=$LIBS
48603LIBS="-lm  $LIBS"
48604cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48605/* end confdefs.h.  */
48606
48607/* Override any GCC internal prototype to avoid an error.
48608   Use char because int might match the return type of a GCC
48609   builtin and then its argument prototype would still apply.  */
48610#ifdef __cplusplus
48611extern "C"
48612#endif
48613char cos ();
48614int
48615main ()
48616{
48617return cos ();
48618  ;
48619  return 0;
48620}
48621_ACEOF
48622if ac_fn_cxx_try_link "$LINENO"; then :
48623  ac_cv_lib_m_cos=yes
48624else
48625  ac_cv_lib_m_cos=no
48626fi
48627rm -f core conftest.err conftest.$ac_objext \
48628    conftest$ac_exeext conftest.$ac_ext
48629LIBS=$ac_check_lib_save_LIBS
48630fi
48631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
48632$as_echo "$ac_cv_lib_m_cos" >&6; }
48633if test "x$ac_cv_lib_m_cos" = xyes; then :
48634  cat >>confdefs.h <<_ACEOF
48635#define HAVE_LIBM 1
48636_ACEOF
48637
48638  LIBS="-lm $LIBS"
48639
48640else
48641
48642        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
48643$as_echo "$as_me: Maths library was not found" >&6;}
48644
48645
48646fi
48647
48648
48649
48650  ###############################################################################
48651  #
48652  # Check for libdl.so
48653
48654  save_LIBS="$LIBS"
48655  LIBS=""
48656  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
48657$as_echo_n "checking for dlopen in -ldl... " >&6; }
48658if ${ac_cv_lib_dl_dlopen+:} false; then :
48659  $as_echo_n "(cached) " >&6
48660else
48661  ac_check_lib_save_LIBS=$LIBS
48662LIBS="-ldl  $LIBS"
48663cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48664/* end confdefs.h.  */
48665
48666/* Override any GCC internal prototype to avoid an error.
48667   Use char because int might match the return type of a GCC
48668   builtin and then its argument prototype would still apply.  */
48669#ifdef __cplusplus
48670extern "C"
48671#endif
48672char dlopen ();
48673int
48674main ()
48675{
48676return dlopen ();
48677  ;
48678  return 0;
48679}
48680_ACEOF
48681if ac_fn_cxx_try_link "$LINENO"; then :
48682  ac_cv_lib_dl_dlopen=yes
48683else
48684  ac_cv_lib_dl_dlopen=no
48685fi
48686rm -f core conftest.err conftest.$ac_objext \
48687    conftest$ac_exeext conftest.$ac_ext
48688LIBS=$ac_check_lib_save_LIBS
48689fi
48690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
48691$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
48692if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
48693  cat >>confdefs.h <<_ACEOF
48694#define HAVE_LIBDL 1
48695_ACEOF
48696
48697  LIBS="-ldl $LIBS"
48698
48699fi
48700
48701  LIBDL="$LIBS"
48702
48703  LIBS="$save_LIBS"
48704
48705
48706  ###############################################################################
48707  #
48708  # statically link libstdc++ before C++ ABI is stablized on Linux unless
48709  # dynamic build is configured on command line.
48710  #
48711
48712# Check whether --with-stdc++lib was given.
48713if test "${with_stdc__lib+set}" = set; then :
48714  withval=$with_stdc__lib;
48715        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
48716                && test "x$with_stdc__lib" != xdefault; then
48717          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
48718        fi
48719
48720else
48721  with_stdc__lib=default
48722
48723fi
48724
48725
48726  if test "x$OPENJDK_TARGET_OS" = xlinux; then
48727    # Test if -lstdc++ works.
48728    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
48729$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
48730    ac_ext=cpp
48731ac_cpp='$CXXCPP $CPPFLAGS'
48732ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48733ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48734ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48735
48736    OLD_CXXFLAGS="$CXXFLAGS"
48737    CXXFLAGS="$CXXFLAGS -lstdc++"
48738    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48739/* end confdefs.h.  */
48740
48741int
48742main ()
48743{
48744return 0;
48745  ;
48746  return 0;
48747}
48748_ACEOF
48749if ac_fn_cxx_try_link "$LINENO"; then :
48750  has_dynamic_libstdcxx=yes
48751else
48752  has_dynamic_libstdcxx=no
48753fi
48754rm -f core conftest.err conftest.$ac_objext \
48755    conftest$ac_exeext conftest.$ac_ext
48756    CXXFLAGS="$OLD_CXXFLAGS"
48757    ac_ext=cpp
48758ac_cpp='$CXXCPP $CPPFLAGS'
48759ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48760ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48761ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48762
48763    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
48764$as_echo "$has_dynamic_libstdcxx" >&6; }
48765
48766    # Test if stdc++ can be linked statically.
48767    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
48768$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
48769    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
48770    ac_ext=cpp
48771ac_cpp='$CXXCPP $CPPFLAGS'
48772ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48773ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48774ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48775
48776    OLD_LIBS="$LIBS"
48777    OLD_CXX="$CXX"
48778    LIBS="$STATIC_STDCXX_FLAGS"
48779    CXX="$CC"
48780    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48781/* end confdefs.h.  */
48782
48783int
48784main ()
48785{
48786return 0;
48787  ;
48788  return 0;
48789}
48790_ACEOF
48791if ac_fn_cxx_try_link "$LINENO"; then :
48792  has_static_libstdcxx=yes
48793else
48794  has_static_libstdcxx=no
48795fi
48796rm -f core conftest.err conftest.$ac_objext \
48797    conftest$ac_exeext conftest.$ac_ext
48798    LIBS="$OLD_LIBS"
48799    CXX="$OLD_CXX"
48800    ac_ext=cpp
48801ac_cpp='$CXXCPP $CPPFLAGS'
48802ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48803ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48804ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48805
48806    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
48807$as_echo "$has_static_libstdcxx" >&6; }
48808
48809    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
48810      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
48811    fi
48812
48813    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
48814      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
48815    fi
48816
48817    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
48818      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
48819    fi
48820
48821    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
48822$as_echo_n "checking how to link with libstdc++... " >&6; }
48823    # If dynamic was requested, it's available since it would fail above otherwise.
48824    # If dynamic wasn't requested, go with static unless it isn't available.
48825    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
48826      LIBCXX="$LIBCXX -lstdc++"
48827      LDCXX="$CXX"
48828      STATIC_CXX_SETTING="STATIC_CXX=false"
48829      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
48830$as_echo "dynamic" >&6; }
48831    else
48832      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
48833      LDCXX="$CC"
48834      STATIC_CXX_SETTING="STATIC_CXX=true"
48835      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
48836$as_echo "static" >&6; }
48837    fi
48838  fi
48839
48840
48841  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
48842    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
48843
48844pkg_failed=no
48845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
48846$as_echo_n "checking for LIBFFI... " >&6; }
48847
48848if test -n "$LIBFFI_CFLAGS"; then
48849    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
48850 elif test -n "$PKG_CONFIG"; then
48851    if test -n "$PKG_CONFIG" && \
48852    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
48853  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
48854  ac_status=$?
48855  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48856  test $ac_status = 0; }; then
48857  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
48858else
48859  pkg_failed=yes
48860fi
48861 else
48862    pkg_failed=untried
48863fi
48864if test -n "$LIBFFI_LIBS"; then
48865    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
48866 elif test -n "$PKG_CONFIG"; then
48867    if test -n "$PKG_CONFIG" && \
48868    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
48869  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
48870  ac_status=$?
48871  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48872  test $ac_status = 0; }; then
48873  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
48874else
48875  pkg_failed=yes
48876fi
48877 else
48878    pkg_failed=untried
48879fi
48880
48881
48882
48883if test $pkg_failed = yes; then
48884
48885if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48886        _pkg_short_errors_supported=yes
48887else
48888        _pkg_short_errors_supported=no
48889fi
48890        if test $_pkg_short_errors_supported = yes; then
48891	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
48892        else
48893	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
48894        fi
48895	# Put the nasty error message in config.log where it belongs
48896	echo "$LIBFFI_PKG_ERRORS" >&5
48897
48898	as_fn_error $? "Package requirements (libffi) were not met:
48899
48900$LIBFFI_PKG_ERRORS
48901
48902Consider adjusting the PKG_CONFIG_PATH environment variable if you
48903installed software in a non-standard prefix.
48904
48905Alternatively, you may set the environment variables LIBFFI_CFLAGS
48906and LIBFFI_LIBS to avoid the need to call pkg-config.
48907See the pkg-config man page for more details.
48908" "$LINENO" 5
48909elif test $pkg_failed = untried; then
48910	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48911$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48912as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
48913is in your PATH or set the PKG_CONFIG environment variable to the full
48914path to pkg-config.
48915
48916Alternatively, you may set the environment variables LIBFFI_CFLAGS
48917and LIBFFI_LIBS to avoid the need to call pkg-config.
48918See the pkg-config man page for more details.
48919
48920To get pkg-config, see <http://pkg-config.freedesktop.org/>.
48921See \`config.log' for more details" "$LINENO" 5; }
48922else
48923	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
48924	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
48925        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48926$as_echo "yes" >&6; }
48927	:
48928fi
48929
48930  fi
48931
48932  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
48933    # Extract the first word of "llvm-config", so it can be a program name with args.
48934set dummy llvm-config; ac_word=$2
48935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48936$as_echo_n "checking for $ac_word... " >&6; }
48937if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
48938  $as_echo_n "(cached) " >&6
48939else
48940  if test -n "$LLVM_CONFIG"; then
48941  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
48942else
48943as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48944for as_dir in $PATH
48945do
48946  IFS=$as_save_IFS
48947  test -z "$as_dir" && as_dir=.
48948    for ac_exec_ext in '' $ac_executable_extensions; do
48949  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48950    ac_cv_prog_LLVM_CONFIG="llvm-config"
48951    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48952    break 2
48953  fi
48954done
48955  done
48956IFS=$as_save_IFS
48957
48958fi
48959fi
48960LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
48961if test -n "$LLVM_CONFIG"; then
48962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
48963$as_echo "$LLVM_CONFIG" >&6; }
48964else
48965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48966$as_echo "no" >&6; }
48967fi
48968
48969
48970
48971    if test "x$LLVM_CONFIG" != xllvm-config; then
48972      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
48973    fi
48974
48975    llvm_components="jit mcjit engine nativecodegen native"
48976    unset LLVM_CFLAGS
48977    for flag in $("$LLVM_CONFIG" --cxxflags); do
48978      if echo "${flag}" | grep -q '^-[ID]'; then
48979        if test "${flag}" != "-D_DEBUG" ; then
48980          if test "${LLVM_CFLAGS}" != "" ; then
48981            LLVM_CFLAGS="${LLVM_CFLAGS} "
48982          fi
48983          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
48984        fi
48985      fi
48986    done
48987    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
48988    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
48989
48990    unset LLVM_LDFLAGS
48991    for flag in $("${LLVM_CONFIG}" --ldflags); do
48992      if echo "${flag}" | grep -q '^-L'; then
48993        if test "${LLVM_LDFLAGS}" != ""; then
48994          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
48995        fi
48996        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
48997      fi
48998    done
48999
49000    unset LLVM_LIBS
49001    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
49002      if echo "${flag}" | grep -q '^-l'; then
49003        if test "${LLVM_LIBS}" != ""; then
49004          LLVM_LIBS="${LLVM_LIBS} "
49005        fi
49006        LLVM_LIBS="${LLVM_LIBS}${flag}"
49007      fi
49008    done
49009
49010
49011
49012
49013  fi
49014
49015  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
49016  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
49017    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
49018  fi
49019
49020  # TODO better (platform agnostic) test
49021  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
49022    LIBCXX="-lstdc++"
49023  fi
49024
49025
49026
49027
49028  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
49029
49030
49031# Check whether --with-msvcr-dll was given.
49032if test "${with_msvcr_dll+set}" = set; then :
49033  withval=$with_msvcr_dll;
49034fi
49035
49036
49037  if test "x$with_msvcr_dll" != x; then
49038    # If given explicitely by user, do not probe. If not present, fail directly.
49039
49040  POSSIBLE_MSVCR_DLL="$with_msvcr_dll"
49041  METHOD="--with-msvcr-dll"
49042  if test -e "$POSSIBLE_MSVCR_DLL"; then
49043    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49044$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49045
49046    # Need to check if the found msvcr is correct architecture
49047    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49048$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49049    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49050    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49051      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49052      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49053      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49054        CORRECT_MSVCR_ARCH="PE32 executable"
49055      else
49056        CORRECT_MSVCR_ARCH="PE32+ executable"
49057      fi
49058    else
49059      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49060        CORRECT_MSVCR_ARCH=386
49061      else
49062        CORRECT_MSVCR_ARCH=x86-64
49063      fi
49064    fi
49065    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49066      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49067$as_echo "ok" >&6; }
49068      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49069      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49070$as_echo_n "checking for msvcr100.dll... " >&6; }
49071      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49072$as_echo "$MSVCR_DLL" >&6; }
49073    else
49074      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49075$as_echo "incorrect, ignoring" >&6; }
49076      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49077$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49078    fi
49079  fi
49080
49081    if test "x$MSVCR_DLL" = x; then
49082      as_fn_error $? "Could not find a proper msvcr100.dll as specified by --with-msvcr-dll" "$LINENO" 5
49083    fi
49084  fi
49085
49086  if test "x$MSVCR_DLL" = x; then
49087    # Probe: Using well-known location from Visual Studio 10.0
49088    if test "x$VCINSTALLDIR" != x; then
49089      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
49090
49091  windows_path="$CYGWIN_VC_INSTALL_DIR"
49092  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49093    unix_path=`$CYGPATH -u "$windows_path"`
49094    CYGWIN_VC_INSTALL_DIR="$unix_path"
49095  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49096    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49097    CYGWIN_VC_INSTALL_DIR="$unix_path"
49098  fi
49099
49100      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49101        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll"
49102      else
49103        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll"
49104      fi
49105
49106  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49107  METHOD="well-known location in VCINSTALLDIR"
49108  if test -e "$POSSIBLE_MSVCR_DLL"; then
49109    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49110$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49111
49112    # Need to check if the found msvcr is correct architecture
49113    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49114$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49115    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49116    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49117      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49118      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49119      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49120        CORRECT_MSVCR_ARCH="PE32 executable"
49121      else
49122        CORRECT_MSVCR_ARCH="PE32+ executable"
49123      fi
49124    else
49125      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49126        CORRECT_MSVCR_ARCH=386
49127      else
49128        CORRECT_MSVCR_ARCH=x86-64
49129      fi
49130    fi
49131    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49132      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49133$as_echo "ok" >&6; }
49134      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49135      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49136$as_echo_n "checking for msvcr100.dll... " >&6; }
49137      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49138$as_echo "$MSVCR_DLL" >&6; }
49139    else
49140      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49141$as_echo "incorrect, ignoring" >&6; }
49142      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49143$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49144    fi
49145  fi
49146
49147    fi
49148  fi
49149
49150  if test "x$MSVCR_DLL" = x; then
49151    # Probe: Check in the Boot JDK directory.
49152    POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
49153
49154  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49155  METHOD="well-known location in Boot JDK"
49156  if test -e "$POSSIBLE_MSVCR_DLL"; then
49157    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49158$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49159
49160    # Need to check if the found msvcr is correct architecture
49161    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49162$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49163    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49164    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49165      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49166      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49167      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49168        CORRECT_MSVCR_ARCH="PE32 executable"
49169      else
49170        CORRECT_MSVCR_ARCH="PE32+ executable"
49171      fi
49172    else
49173      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49174        CORRECT_MSVCR_ARCH=386
49175      else
49176        CORRECT_MSVCR_ARCH=x86-64
49177      fi
49178    fi
49179    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49180      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49181$as_echo "ok" >&6; }
49182      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49183      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49184$as_echo_n "checking for msvcr100.dll... " >&6; }
49185      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49186$as_echo "$MSVCR_DLL" >&6; }
49187    else
49188      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49189$as_echo "incorrect, ignoring" >&6; }
49190      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49191$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49192    fi
49193  fi
49194
49195  fi
49196
49197  if test "x$MSVCR_DLL" = x; then
49198    # Probe: Look in the Windows system32 directory
49199    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
49200
49201  windows_path="$CYGWIN_SYSTEMROOT"
49202  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49203    unix_path=`$CYGPATH -u "$windows_path"`
49204    CYGWIN_SYSTEMROOT="$unix_path"
49205  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49206    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49207    CYGWIN_SYSTEMROOT="$unix_path"
49208  fi
49209
49210    POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
49211
49212  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49213  METHOD="well-known location in SYSTEMROOT"
49214  if test -e "$POSSIBLE_MSVCR_DLL"; then
49215    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49216$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49217
49218    # Need to check if the found msvcr is correct architecture
49219    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49220$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49221    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49222    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49223      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49224      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49225      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49226        CORRECT_MSVCR_ARCH="PE32 executable"
49227      else
49228        CORRECT_MSVCR_ARCH="PE32+ executable"
49229      fi
49230    else
49231      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49232        CORRECT_MSVCR_ARCH=386
49233      else
49234        CORRECT_MSVCR_ARCH=x86-64
49235      fi
49236    fi
49237    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49238      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49239$as_echo "ok" >&6; }
49240      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49241      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49242$as_echo_n "checking for msvcr100.dll... " >&6; }
49243      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49244$as_echo "$MSVCR_DLL" >&6; }
49245    else
49246      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49247$as_echo "incorrect, ignoring" >&6; }
49248      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49249$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49250    fi
49251  fi
49252
49253  fi
49254
49255  if test "x$MSVCR_DLL" = x; then
49256    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
49257    if test "x$VS100COMNTOOLS" != x; then
49258      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
49259
49260  windows_path="$CYGWIN_VS_TOOLS_DIR"
49261  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49262    unix_path=`$CYGPATH -u "$windows_path"`
49263    CYGWIN_VS_TOOLS_DIR="$unix_path"
49264  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49265    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49266    CYGWIN_VS_TOOLS_DIR="$unix_path"
49267  fi
49268
49269      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49270        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1`
49271      else
49272        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1`
49273      fi
49274
49275  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49276  METHOD="search of VS100COMNTOOLS"
49277  if test -e "$POSSIBLE_MSVCR_DLL"; then
49278    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49279$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49280
49281    # Need to check if the found msvcr is correct architecture
49282    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49283$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49284    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49285    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49286      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49287      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49288      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49289        CORRECT_MSVCR_ARCH="PE32 executable"
49290      else
49291        CORRECT_MSVCR_ARCH="PE32+ executable"
49292      fi
49293    else
49294      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49295        CORRECT_MSVCR_ARCH=386
49296      else
49297        CORRECT_MSVCR_ARCH=x86-64
49298      fi
49299    fi
49300    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49301      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49302$as_echo "ok" >&6; }
49303      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49304      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49305$as_echo_n "checking for msvcr100.dll... " >&6; }
49306      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49307$as_echo "$MSVCR_DLL" >&6; }
49308    else
49309      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49310$as_echo "incorrect, ignoring" >&6; }
49311      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49312$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49313    fi
49314  fi
49315
49316    fi
49317  fi
49318
49319  if test "x$MSVCR_DLL" = x; then
49320    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
49321    # (This was the original behaviour; kept since it might turn up something)
49322    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
49323      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49324        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1`
49325      else
49326        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
49327        if test "x$POSSIBLE_MSVCR_DLL" = x; then
49328          # We're grasping at straws now...
49329          POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
49330        fi
49331      fi
49332
49333
49334  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49335  METHOD="search of VCINSTALLDIR"
49336  if test -e "$POSSIBLE_MSVCR_DLL"; then
49337    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49338$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49339
49340    # Need to check if the found msvcr is correct architecture
49341    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49342$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49343    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49344    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49345      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49346      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49347      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49348        CORRECT_MSVCR_ARCH="PE32 executable"
49349      else
49350        CORRECT_MSVCR_ARCH="PE32+ executable"
49351      fi
49352    else
49353      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49354        CORRECT_MSVCR_ARCH=386
49355      else
49356        CORRECT_MSVCR_ARCH=x86-64
49357      fi
49358    fi
49359    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49360      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49361$as_echo "ok" >&6; }
49362      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49363      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49364$as_echo_n "checking for msvcr100.dll... " >&6; }
49365      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49366$as_echo "$MSVCR_DLL" >&6; }
49367    else
49368      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49369$as_echo "incorrect, ignoring" >&6; }
49370      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49371$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49372    fi
49373  fi
49374
49375    fi
49376  fi
49377
49378  if test "x$MSVCR_DLL" = x; then
49379    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49380$as_echo_n "checking for msvcr100.dll... " >&6; }
49381    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49382$as_echo "no" >&6; }
49383    as_fn_error $? "Could not find msvcr100.dll. Please specify using --with-msvcr-dll." "$LINENO" 5
49384  fi
49385
49386
49387  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49388
49389  # Input might be given as Windows format, start by converting to
49390  # unix format.
49391  path="$MSVCR_DLL"
49392  new_path=`$CYGPATH -u "$path"`
49393
49394  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49395  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49396  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49397  # "foo.exe" is OK but "foo" is an error.
49398  #
49399  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49400  # It is also a way to make sure we got the proper file name for the real test later on.
49401  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49402  if test "x$test_shortpath" = x; then
49403    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
49404$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
49405    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
49406  fi
49407
49408  # Call helper function which possibly converts this using DOS-style short mode.
49409  # If so, the updated path is stored in $new_path.
49410
49411  input_path="$new_path"
49412  # Check if we need to convert this using DOS-style short mode. If the path
49413  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49414  # take no chances and rewrite it.
49415  # Note: m4 eats our [], so we need to use [ and ] instead.
49416  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49417  if test "x$has_forbidden_chars" != x; then
49418    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49419    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49420    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49421    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49422      # Going to short mode and back again did indeed matter. Since short mode is
49423      # case insensitive, let's make it lowercase to improve readability.
49424      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49425      # Now convert it back to Unix-stile (cygpath)
49426      input_path=`$CYGPATH -u "$shortmode_path"`
49427      new_path="$input_path"
49428    fi
49429  fi
49430
49431  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49432  if test "x$test_cygdrive_prefix" = x; then
49433    # As a simple fix, exclude /usr/bin since it's not a real path.
49434    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49435      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49436      # a path prefixed by /cygdrive for fixpath to work.
49437      new_path="$CYGWIN_ROOT_PATH$input_path"
49438    fi
49439  fi
49440
49441
49442  if test "x$path" != "x$new_path"; then
49443    MSVCR_DLL="$new_path"
49444    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
49445$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
49446  fi
49447
49448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49449
49450  path="$MSVCR_DLL"
49451  has_colon=`$ECHO $path | $GREP ^.:`
49452  new_path="$path"
49453  if test "x$has_colon" = x; then
49454    # Not in mixed or Windows style, start by that.
49455    new_path=`cmd //c echo $path`
49456  fi
49457
49458
49459  input_path="$new_path"
49460  # Check if we need to convert this using DOS-style short mode. If the path
49461  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49462  # take no chances and rewrite it.
49463  # Note: m4 eats our [], so we need to use [ and ] instead.
49464  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49465  if test "x$has_forbidden_chars" != x; then
49466    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49467    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49468  fi
49469
49470
49471  windows_path="$new_path"
49472  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49473    unix_path=`$CYGPATH -u "$windows_path"`
49474    new_path="$unix_path"
49475  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49476    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49477    new_path="$unix_path"
49478  fi
49479
49480  if test "x$path" != "x$new_path"; then
49481    MSVCR_DLL="$new_path"
49482    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
49483$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
49484  fi
49485
49486  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49487  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49488
49489  else
49490    # We're on a posix platform. Hooray! :)
49491    path="$MSVCR_DLL"
49492    has_space=`$ECHO "$path" | $GREP " "`
49493    if test "x$has_space" != x; then
49494      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
49495$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
49496      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49497    fi
49498
49499    # Use eval to expand a potential ~
49500    eval path="$path"
49501    if test ! -f "$path" && test ! -d "$path"; then
49502      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49503    fi
49504
49505    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
49506  fi
49507
49508
49509
49510
49511# Check whether --with-dxsdk was given.
49512if test "${with_dxsdk+set}" = set; then :
49513  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
49514$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
49515fi
49516
49517
49518
49519
49520# Check whether --with-dxsdk-lib was given.
49521if test "${with_dxsdk_lib+set}" = set; then :
49522  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
49523$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
49524fi
49525
49526
49527
49528
49529# Check whether --with-dxsdk-include was given.
49530if test "${with_dxsdk_include+set}" = set; then :
49531  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
49532$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
49533fi
49534
49535
49536  fi
49537
49538
49539
49540###############################################################################
49541#
49542# We need to do some final tweaking, when everything else is done.
49543#
49544###############################################################################
49545
49546
49547  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
49548
49549
49550  # The name of the Service Agent jar.
49551  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
49552  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
49553    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
49554  fi
49555
49556
49557
49558    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
49559$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
49560
49561    if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
49562      ENABLE_INTREE_EC=yes
49563      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49564$as_echo "yes" >&6; }
49565    else
49566      ENABLE_INTREE_EC=no
49567      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49568$as_echo "no" >&6; }
49569    fi
49570
49571
49572
49573
49574###############################################################################
49575#
49576# Configure parts of the build that only affect the build performance,
49577# not the result.
49578#
49579###############################################################################
49580
49581
49582  # How many cores do we have on this build system?
49583
49584# Check whether --with-num-cores was given.
49585if test "${with_num_cores+set}" = set; then :
49586  withval=$with_num_cores;
49587fi
49588
49589  if test "x$with_num_cores" = x; then
49590    # The number of cores were not specified, try to probe them.
49591
49592  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
49593$as_echo_n "checking for number of cores... " >&6; }
49594  NUM_CORES=1
49595  FOUND_CORES=no
49596
49597  if test -f /proc/cpuinfo; then
49598    # Looks like a Linux (or cygwin) system
49599    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
49600    FOUND_CORES=yes
49601  elif test -x /usr/sbin/psrinfo; then
49602    # Looks like a Solaris system
49603    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
49604    FOUND_CORES=yes
49605  elif test -x /usr/sbin/system_profiler; then
49606    # Looks like a MacOSX system
49607    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
49608    FOUND_CORES=yes
49609  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
49610    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
49611    FOUND_CORES=yes
49612  elif test -n "$NUMBER_OF_PROCESSORS"; then
49613    # On windows, look in the env
49614    NUM_CORES=$NUMBER_OF_PROCESSORS
49615    FOUND_CORES=yes
49616  fi
49617
49618  if test "x$FOUND_CORES" = xyes; then
49619    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
49620$as_echo "$NUM_CORES" >&6; }
49621  else
49622    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
49623$as_echo "could not detect number of cores, defaulting to 1" >&6; }
49624    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
49625$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
49626  fi
49627
49628  else
49629    NUM_CORES=$with_num_cores
49630  fi
49631
49632
49633
49634  # How much memory do we have on this build system?
49635
49636# Check whether --with-memory-size was given.
49637if test "${with_memory_size+set}" = set; then :
49638  withval=$with_memory_size;
49639fi
49640
49641  if test "x$with_memory_size" = x; then
49642    # The memory size was not specified, try to probe it.
49643
49644  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
49645$as_echo_n "checking for memory size... " >&6; }
49646  # Default to 1024 MB
49647  MEMORY_SIZE=1024
49648  FOUND_MEM=no
49649
49650  if test -f /proc/meminfo; then
49651    # Looks like a Linux (or cygwin) system
49652    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
49653    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
49654    FOUND_MEM=yes
49655  elif test -x /usr/sbin/prtconf; then
49656    # Looks like a Solaris or AIX system
49657    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
49658    FOUND_MEM=yes
49659  elif test -x /usr/sbin/system_profiler; then
49660    # Looks like a MacOSX system
49661    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
49662    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
49663    FOUND_MEM=yes
49664  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
49665    # Windows, but without cygwin
49666    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
49667    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
49668    FOUND_MEM=yes
49669  fi
49670
49671  if test "x$FOUND_MEM" = xyes; then
49672    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
49673$as_echo "$MEMORY_SIZE MB" >&6; }
49674  else
49675    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
49676$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
49677    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
49678$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
49679  fi
49680
49681  else
49682    MEMORY_SIZE=$with_memory_size
49683  fi
49684
49685
49686
49687  # Provide a decent default number of parallel jobs for make depending on
49688  # number of cores, amount of memory and machine architecture.
49689
49690# Check whether --with-jobs was given.
49691if test "${with_jobs+set}" = set; then :
49692  withval=$with_jobs;
49693fi
49694
49695  if test "x$with_jobs" = x; then
49696    # Number of jobs was not specified, calculate.
49697    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
49698$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
49699    # Approximate memory in GB.
49700    memory_gb=`expr $MEMORY_SIZE / 1024`
49701    # Pick the lowest of memory in gb and number of cores.
49702    if test "$memory_gb" -lt "$NUM_CORES"; then
49703      JOBS="$memory_gb"
49704    else
49705      JOBS="$NUM_CORES"
49706      # On bigger machines, leave some room for other processes to run
49707      if test "$JOBS" -gt "4"; then
49708        JOBS=`expr $JOBS '*' 90 / 100`
49709      fi
49710    fi
49711    # Cap number of jobs to 16
49712    if test "$JOBS" -gt "16"; then
49713      JOBS=16
49714    fi
49715    if test "$JOBS" -eq "0"; then
49716      JOBS=1
49717    fi
49718    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
49719$as_echo "$JOBS" >&6; }
49720  else
49721    JOBS=$with_jobs
49722  fi
49723
49724
49725
49726# Setup arguments for the boot jdk (after cores and memory have been setup)
49727
49728  ##############################################################################
49729  #
49730  # Specify jvm options for anything that is run with the Boot JDK.
49731  # Not all JVM:s accept the same arguments on the command line.
49732  #
49733
49734# Check whether --with-boot-jdk-jvmargs was given.
49735if test "${with_boot_jdk_jvmargs+set}" = set; then :
49736  withval=$with_boot_jdk_jvmargs;
49737fi
49738
49739
49740  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
49741$as_echo_n "checking flags for boot jdk java command ... " >&6; }
49742
49743  # Disable special log output when a debug build is used as Boot JDK...
49744
49745  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
49746  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
49747  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
49748  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
49749  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
49750  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
49751    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
49752    JVM_ARG_OK=true
49753  else
49754    $ECHO "Arg failed:" >&5
49755    $ECHO "$OUTPUT" >&5
49756    JVM_ARG_OK=false
49757  fi
49758
49759
49760  # Apply user provided options.
49761
49762  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
49763  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
49764  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
49765  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
49766  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
49767  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
49768    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
49769    JVM_ARG_OK=true
49770  else
49771    $ECHO "Arg failed:" >&5
49772    $ECHO "$OUTPUT" >&5
49773    JVM_ARG_OK=false
49774  fi
49775
49776
49777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
49778$as_echo "$boot_jdk_jvmargs" >&6; }
49779
49780  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
49781  JAVA_FLAGS=$boot_jdk_jvmargs
49782
49783
49784
49785  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
49786$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
49787
49788  # Starting amount of heap memory.
49789
49790  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
49791  $ECHO "Command: $JAVA -Xms64M -version" >&5
49792  OUTPUT=`$JAVA -Xms64M -version 2>&1`
49793  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
49794  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
49795  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
49796    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
49797    JVM_ARG_OK=true
49798  else
49799    $ECHO "Arg failed:" >&5
49800    $ECHO "$OUTPUT" >&5
49801    JVM_ARG_OK=false
49802  fi
49803
49804
49805  # Maximum amount of heap memory.
49806  # Maximum stack size.
49807  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
49808  if test "x$BUILD_NUM_BITS" = x32; then
49809    if test "$JVM_MAX_HEAP" -gt "1100"; then
49810      JVM_MAX_HEAP=1100
49811    elif test "$JVM_MAX_HEAP" -lt "512"; then
49812      JVM_MAX_HEAP=512
49813    fi
49814    STACK_SIZE=768
49815  else
49816    # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
49817    # pointers are used. Apparently, we need to increase the heap and stack
49818    # space for the jvm. More specifically, when running javac to build huge
49819    # jdk batch
49820    if test "$JVM_MAX_HEAP" -gt "1600"; then
49821      JVM_MAX_HEAP=1600
49822    elif test "$JVM_MAX_HEAP" -lt "512"; then
49823      JVM_MAX_HEAP=512
49824    fi
49825    STACK_SIZE=1536
49826  fi
49827
49828  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
49829  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
49830  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
49831  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
49832  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
49833  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
49834    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
49835    JVM_ARG_OK=true
49836  else
49837    $ECHO "Arg failed:" >&5
49838    $ECHO "$OUTPUT" >&5
49839    JVM_ARG_OK=false
49840  fi
49841
49842
49843  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
49844  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
49845  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
49846  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
49847  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
49848  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
49849    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
49850    JVM_ARG_OK=true
49851  else
49852    $ECHO "Arg failed:" >&5
49853    $ECHO "$OUTPUT" >&5
49854    JVM_ARG_OK=false
49855  fi
49856
49857
49858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
49859$as_echo "$boot_jdk_jvmargs_big" >&6; }
49860
49861  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
49862
49863
49864
49865  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
49866$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
49867
49868  # Use serial gc for small short lived tools if possible
49869
49870  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
49871  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
49872  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
49873  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
49874  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
49875  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
49876    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
49877    JVM_ARG_OK=true
49878  else
49879    $ECHO "Arg failed:" >&5
49880    $ECHO "$OUTPUT" >&5
49881    JVM_ARG_OK=false
49882  fi
49883
49884
49885  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
49886  $ECHO "Command: $JAVA -Xms32M -version" >&5
49887  OUTPUT=`$JAVA -Xms32M -version 2>&1`
49888  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
49889  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
49890  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
49891    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
49892    JVM_ARG_OK=true
49893  else
49894    $ECHO "Arg failed:" >&5
49895    $ECHO "$OUTPUT" >&5
49896    JVM_ARG_OK=false
49897  fi
49898
49899
49900  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
49901  $ECHO "Command: $JAVA -Xmx512M -version" >&5
49902  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
49903  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
49904  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
49905  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
49906    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
49907    JVM_ARG_OK=true
49908  else
49909    $ECHO "Arg failed:" >&5
49910    $ECHO "$OUTPUT" >&5
49911    JVM_ARG_OK=false
49912  fi
49913
49914
49915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
49916$as_echo "$boot_jdk_jvmargs_small" >&6; }
49917
49918  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
49919
49920
49921  JAVA_TOOL_FLAGS_SMALL=""
49922  for f in $JAVA_FLAGS_SMALL; do
49923    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
49924  done
49925
49926
49927
49928# Setup smart javac (after cores and memory have been setup)
49929
49930
49931# Check whether --with-sjavac-server-java was given.
49932if test "${with_sjavac_server_java+set}" = set; then :
49933  withval=$with_sjavac_server_java;
49934fi
49935
49936
49937  if test "x$with_sjavac_server_java" != x; then
49938    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
49939    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
49940    if test "x$FOUND_VERSION" = x; then
49941      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
49942    fi
49943  else
49944    SJAVAC_SERVER_JAVA="$JAVA"
49945  fi
49946
49947
49948  if test "$MEMORY_SIZE" -gt "3000"; then
49949
49950  $ECHO "Check if jvm arg is ok: -d64" >&5
49951  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
49952  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
49953  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
49954  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
49955  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
49956    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
49957    JVM_ARG_OK=true
49958  else
49959    $ECHO "Arg failed:" >&5
49960    $ECHO "$OUTPUT" >&5
49961    JVM_ARG_OK=false
49962  fi
49963
49964    if test "$JVM_ARG_OK" = true; then
49965      JVM_64BIT=true
49966      JVM_ARG_OK=false
49967    fi
49968  fi
49969
49970  MX_VALUE=`expr $MEMORY_SIZE / 2`
49971  if test "$JVM_64BIT" = true; then
49972    # Set ms lower than mx since more than one instance of the server might
49973    # get launched at the same time before they figure out which instance won.
49974    MS_VALUE=512
49975    if test "$MX_VALUE" -gt "2048"; then
49976      MX_VALUE=2048
49977    fi
49978  else
49979    MS_VALUE=256
49980    if test "$MX_VALUE" -gt "1500"; then
49981      MX_VALUE=1500
49982    fi
49983  fi
49984  if test "$MX_VALUE" -lt "512"; then
49985    MX_VALUE=512
49986  fi
49987
49988  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
49989  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
49990  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
49991  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
49992  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
49993  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
49994    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
49995    JVM_ARG_OK=true
49996  else
49997    $ECHO "Arg failed:" >&5
49998    $ECHO "$OUTPUT" >&5
49999    JVM_ARG_OK=false
50000  fi
50001
50002
50003  # Check whether --enable-sjavac was given.
50004if test "${enable_sjavac+set}" = set; then :
50005  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
50006else
50007  ENABLE_SJAVAC='no'
50008fi
50009
50010  if test "x$JVM_ARG_OK" = "xfalse"; then
50011    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
50012$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
50013    ENABLE_SJAVAC=no;
50014  fi
50015  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
50016$as_echo_n "checking whether to use sjavac... " >&6; }
50017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
50018$as_echo "$ENABLE_SJAVAC" >&6; }
50019
50020
50021  if test "x$ENABLE_SJAVAC" = xyes; then
50022    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
50023  else
50024    SJAVAC_SERVER_DIR=
50025  fi
50026
50027
50028
50029# Can the C/C++ compiler use precompiled headers?
50030
50031
50032  ###############################################################################
50033  #
50034  # Can the C/C++ compiler use precompiled headers?
50035  #
50036  # Check whether --enable-precompiled-headers was given.
50037if test "${enable_precompiled_headers+set}" = set; then :
50038  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
50039else
50040  ENABLE_PRECOMPH=yes
50041fi
50042
50043
50044  USE_PRECOMPILED_HEADER=1
50045  if test "x$ENABLE_PRECOMPH" = xno; then
50046    USE_PRECOMPILED_HEADER=0
50047  fi
50048
50049  if test "x$ENABLE_PRECOMPH" = xyes; then
50050    # Check that the compiler actually supports precomp headers.
50051    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50052      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
50053$as_echo_n "checking that precompiled headers work... " >&6; }
50054      echo "int alfa();" > conftest.h
50055      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
50056      if test ! -f conftest.hpp.gch; then
50057        USE_PRECOMPILED_HEADER=0
50058        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50059$as_echo "no" >&6; }
50060      else
50061        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50062$as_echo "yes" >&6; }
50063      fi
50064      rm -f conftest.h conftest.hpp.gch
50065    fi
50066  fi
50067
50068
50069
50070
50071# Setup use of ccache, if available
50072
50073  # Check whether --enable-ccache was given.
50074if test "${enable_ccache+set}" = set; then :
50075  enableval=$enable_ccache;
50076fi
50077
50078
50079  CCACHE=
50080  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
50081$as_echo_n "checking is ccache enabled... " >&6; }
50082  ENABLE_CCACHE=$enable_ccache
50083  if test "x$enable_ccache" = xyes; then
50084    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50085$as_echo "yes" >&6; }
50086    OLD_PATH="$PATH"
50087    if test "x$TOOLCHAIN_PATH" != x; then
50088      PATH=$TOOLCHAIN_PATH:$PATH
50089    fi
50090
50091
50092
50093  # Publish this variable in the help.
50094
50095
50096  if test "x$CCACHE" = x; then
50097    # The variable is not set by user, try to locate tool using the code snippet
50098    for ac_prog in ccache
50099do
50100  # Extract the first word of "$ac_prog", so it can be a program name with args.
50101set dummy $ac_prog; ac_word=$2
50102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
50103$as_echo_n "checking for $ac_word... " >&6; }
50104if ${ac_cv_path_CCACHE+:} false; then :
50105  $as_echo_n "(cached) " >&6
50106else
50107  case $CCACHE in
50108  [\\/]* | ?:[\\/]*)
50109  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
50110  ;;
50111  *)
50112  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50113for as_dir in $PATH
50114do
50115  IFS=$as_save_IFS
50116  test -z "$as_dir" && as_dir=.
50117    for ac_exec_ext in '' $ac_executable_extensions; do
50118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
50119    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
50120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
50121    break 2
50122  fi
50123done
50124  done
50125IFS=$as_save_IFS
50126
50127  ;;
50128esac
50129fi
50130CCACHE=$ac_cv_path_CCACHE
50131if test -n "$CCACHE"; then
50132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
50133$as_echo "$CCACHE" >&6; }
50134else
50135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50136$as_echo "no" >&6; }
50137fi
50138
50139
50140  test -n "$CCACHE" && break
50141done
50142
50143  else
50144    # The variable is set, but is it from the command line or the environment?
50145
50146    # Try to remove the string !CCACHE! from our list.
50147    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
50148    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
50149      # If it failed, the variable was not from the command line. Ignore it,
50150      # but warn the user (except for BASH, which is always set by the calling BASH).
50151      if test "xCCACHE" != xBASH; then
50152        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
50153$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
50154      fi
50155      # Try to locate tool using the code snippet
50156      for ac_prog in ccache
50157do
50158  # Extract the first word of "$ac_prog", so it can be a program name with args.
50159set dummy $ac_prog; ac_word=$2
50160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
50161$as_echo_n "checking for $ac_word... " >&6; }
50162if ${ac_cv_path_CCACHE+:} false; then :
50163  $as_echo_n "(cached) " >&6
50164else
50165  case $CCACHE in
50166  [\\/]* | ?:[\\/]*)
50167  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
50168  ;;
50169  *)
50170  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50171for as_dir in $PATH
50172do
50173  IFS=$as_save_IFS
50174  test -z "$as_dir" && as_dir=.
50175    for ac_exec_ext in '' $ac_executable_extensions; do
50176  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
50177    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
50178    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
50179    break 2
50180  fi
50181done
50182  done
50183IFS=$as_save_IFS
50184
50185  ;;
50186esac
50187fi
50188CCACHE=$ac_cv_path_CCACHE
50189if test -n "$CCACHE"; then
50190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
50191$as_echo "$CCACHE" >&6; }
50192else
50193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50194$as_echo "no" >&6; }
50195fi
50196
50197
50198  test -n "$CCACHE" && break
50199done
50200
50201    else
50202      # If it succeeded, then it was overridden by the user. We will use it
50203      # for the tool.
50204
50205      # First remove it from the list of overridden variables, so we can test
50206      # for unknown variables in the end.
50207      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
50208
50209      # Check if the provided tool contains a complete path.
50210      tool_specified="$CCACHE"
50211      tool_basename="${tool_specified##*/}"
50212      if test "x$tool_basename" = "x$tool_specified"; then
50213        # A command without a complete path is provided, search $PATH.
50214        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
50215$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
50216        # Extract the first word of "$tool_basename", so it can be a program name with args.
50217set dummy $tool_basename; ac_word=$2
50218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
50219$as_echo_n "checking for $ac_word... " >&6; }
50220if ${ac_cv_path_CCACHE+:} false; then :
50221  $as_echo_n "(cached) " >&6
50222else
50223  case $CCACHE in
50224  [\\/]* | ?:[\\/]*)
50225  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
50226  ;;
50227  *)
50228  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50229for as_dir in $PATH
50230do
50231  IFS=$as_save_IFS
50232  test -z "$as_dir" && as_dir=.
50233    for ac_exec_ext in '' $ac_executable_extensions; do
50234  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
50235    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
50236    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
50237    break 2
50238  fi
50239done
50240  done
50241IFS=$as_save_IFS
50242
50243  ;;
50244esac
50245fi
50246CCACHE=$ac_cv_path_CCACHE
50247if test -n "$CCACHE"; then
50248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
50249$as_echo "$CCACHE" >&6; }
50250else
50251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50252$as_echo "no" >&6; }
50253fi
50254
50255
50256        if test "x$CCACHE" = x; then
50257          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
50258        fi
50259      else
50260        # Otherwise we believe it is a complete path. Use it as it is.
50261        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
50262$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
50263        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
50264$as_echo_n "checking for CCACHE... " >&6; }
50265        if test ! -x "$tool_specified"; then
50266          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
50267$as_echo "not found" >&6; }
50268          as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
50269        fi
50270        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
50271$as_echo "$tool_specified" >&6; }
50272      fi
50273    fi
50274  fi
50275
50276
50277
50278  if test "x$CCACHE" = x; then
50279    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
50280  fi
50281
50282
50283    CCACHE_STATUS="enabled"
50284    PATH="$OLD_PATH"
50285  elif test "x$enable_ccache" = xno; then
50286    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
50287$as_echo "no, explicitly disabled" >&6; }
50288  elif test "x$enable_ccache" = x; then
50289    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50290$as_echo "no" >&6; }
50291  else
50292    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
50293$as_echo "unknown" >&6; }
50294    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
50295  fi
50296
50297
50298
50299# Check whether --with-ccache-dir was given.
50300if test "${with_ccache_dir+set}" = set; then :
50301  withval=$with_ccache_dir;
50302fi
50303
50304
50305  if test "x$with_ccache_dir" != x; then
50306    # When using a non home ccache directory, assume the use is to share ccache files
50307    # with other users. Thus change the umask.
50308    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
50309    if test "x$CCACHE" = x; then
50310      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
50311$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
50312    fi
50313  fi
50314
50315  if test "x$CCACHE" != x; then
50316
50317  if test "x$CCACHE" != x; then
50318    # Only use ccache if it is 3.1.4 or later, which supports
50319    # precompiled headers.
50320    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
50321$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
50322    HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
50323    if test "x$HAS_GOOD_CCACHE" = x; then
50324      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
50325$as_echo "no, disabling ccache" >&6; }
50326      CCACHE=
50327      CCACHE_STATUS="disabled"
50328    else
50329      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50330$as_echo "yes" >&6; }
50331      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
50332$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
50333      PUSHED_FLAGS="$CXXFLAGS"
50334      CXXFLAGS="-fpch-preprocess $CXXFLAGS"
50335      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50336/* end confdefs.h.  */
50337
50338int
50339main ()
50340{
50341
50342  ;
50343  return 0;
50344}
50345_ACEOF
50346if ac_fn_cxx_try_compile "$LINENO"; then :
50347  CC_KNOWS_CCACHE_TRICK=yes
50348else
50349  CC_KNOWS_CCACHE_TRICK=no
50350fi
50351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50352      CXXFLAGS="$PUSHED_FLAGS"
50353      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
50354        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50355$as_echo "yes" >&6; }
50356      else
50357        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
50358$as_echo "no, disabling ccaching of precompiled headers" >&6; }
50359        CCACHE=
50360        CCACHE_STATUS="disabled"
50361      fi
50362    fi
50363  fi
50364
50365  if test "x$CCACHE" != x; then
50366    CCACHE_SLOPPINESS=time_macros
50367    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
50368    CCACHE_FLAGS=-fpch-preprocess
50369
50370    if test "x$SET_CCACHE_DIR" != x; then
50371      mkdir -p $CCACHE_DIR > /dev/null 2>&1
50372      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
50373    fi
50374  fi
50375
50376  fi
50377
50378
50379###############################################################################
50380#
50381# And now the finish...
50382#
50383###############################################################################
50384
50385# Check for some common pitfalls
50386
50387  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50388    file_to_test="$SRC_ROOT/LICENSE"
50389    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
50390      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
50391    fi
50392  fi
50393
50394
50395  # Did user specify any unknown variables?
50396
50397  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
50398    # Replace the separating ! with spaces before presenting for end user.
50399    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
50400    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
50401$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
50402  fi
50403
50404
50405  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
50406$as_echo_n "checking if build directory is on local disk... " >&6; }
50407
50408  # df -l lists only local disks; if the given directory is not found then
50409  # a non-zero exit code is given
50410  if test "x$DF" = x; then
50411    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50412      # msys does not have df; use Windows "net use" instead.
50413      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
50414      if test "x$IS_NETWORK_DISK" = x; then
50415        OUTPUT_DIR_IS_LOCAL="yes"
50416      else
50417        OUTPUT_DIR_IS_LOCAL="no"
50418      fi
50419    else
50420      # No df here, say it's local
50421      OUTPUT_DIR_IS_LOCAL="yes"
50422    fi
50423  else
50424    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
50425      OUTPUT_DIR_IS_LOCAL="yes"
50426    else
50427      OUTPUT_DIR_IS_LOCAL="no"
50428    fi
50429  fi
50430
50431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
50432$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
50433
50434
50435
50436  # Check if the user has any old-style ALT_ variables set.
50437  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
50438
50439  # Before generating output files, test if they exist. If they do, this is a reconfigure.
50440  # Since we can't properly handle the dependencies for this, warn the user about the situation
50441  if test -e $OUTPUT_ROOT/spec.gmk; then
50442    IS_RECONFIGURE=yes
50443  else
50444    IS_RECONFIGURE=no
50445  fi
50446
50447
50448# At the end, call the custom hook. (Dummy macro if no custom sources available)
50449
50450
50451# We're messing a bit with internal autoconf variables to put the config.status
50452# in the output directory instead of the current directory.
50453CONFIG_STATUS="$OUTPUT_ROOT/config.status"
50454
50455# Create the actual output files. Now the main work of configure is done.
50456cat >confcache <<\_ACEOF
50457# This file is a shell script that caches the results of configure
50458# tests run on this system so they can be shared between configure
50459# scripts and configure runs, see configure's option --config-cache.
50460# It is not useful on other systems.  If it contains results you don't
50461# want to keep, you may remove or edit it.
50462#
50463# config.status only pays attention to the cache file if you give it
50464# the --recheck option to rerun configure.
50465#
50466# `ac_cv_env_foo' variables (set or unset) will be overridden when
50467# loading this file, other *unset* `ac_cv_foo' will be assigned the
50468# following values.
50469
50470_ACEOF
50471
50472# The following way of writing the cache mishandles newlines in values,
50473# but we know of no workaround that is simple, portable, and efficient.
50474# So, we kill variables containing newlines.
50475# Ultrix sh set writes to stderr and can't be redirected directly,
50476# and sets the high bit in the cache file unless we assign to the vars.
50477(
50478  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
50479    eval ac_val=\$$ac_var
50480    case $ac_val in #(
50481    *${as_nl}*)
50482      case $ac_var in #(
50483      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
50484$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
50485      esac
50486      case $ac_var in #(
50487      _ | IFS | as_nl) ;; #(
50488      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
50489      *) { eval $ac_var=; unset $ac_var;} ;;
50490      esac ;;
50491    esac
50492  done
50493
50494  (set) 2>&1 |
50495    case $as_nl`(ac_space=' '; set) 2>&1` in #(
50496    *${as_nl}ac_space=\ *)
50497      # `set' does not quote correctly, so add quotes: double-quote
50498      # substitution turns \\\\ into \\, and sed turns \\ into \.
50499      sed -n \
50500	"s/'/'\\\\''/g;
50501	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
50502      ;; #(
50503    *)
50504      # `set' quotes correctly as required by POSIX, so do not add quotes.
50505      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
50506      ;;
50507    esac |
50508    sort
50509) |
50510  sed '
50511     /^ac_cv_env_/b end
50512     t clear
50513     :clear
50514     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
50515     t end
50516     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
50517     :end' >>confcache
50518if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
50519  if test -w "$cache_file"; then
50520    if test "x$cache_file" != "x/dev/null"; then
50521      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
50522$as_echo "$as_me: updating cache $cache_file" >&6;}
50523      if test ! -f "$cache_file" || test -h "$cache_file"; then
50524	cat confcache >"$cache_file"
50525      else
50526        case $cache_file in #(
50527        */* | ?:*)
50528	  mv -f confcache "$cache_file"$$ &&
50529	  mv -f "$cache_file"$$ "$cache_file" ;; #(
50530        *)
50531	  mv -f confcache "$cache_file" ;;
50532	esac
50533      fi
50534    fi
50535  else
50536    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
50537$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
50538  fi
50539fi
50540rm -f confcache
50541
50542test "x$prefix" = xNONE && prefix=$ac_default_prefix
50543# Let make expand exec_prefix.
50544test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
50545
50546DEFS=-DHAVE_CONFIG_H
50547
50548ac_libobjs=
50549ac_ltlibobjs=
50550U=
50551for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
50552  # 1. Remove the extension, and $U if already installed.
50553  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
50554  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
50555  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
50556  #    will be set to the directory where LIBOBJS objects are built.
50557  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
50558  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
50559done
50560LIBOBJS=$ac_libobjs
50561
50562LTLIBOBJS=$ac_ltlibobjs
50563
50564
50565
50566: "${CONFIG_STATUS=./config.status}"
50567ac_write_fail=0
50568ac_clean_files_save=$ac_clean_files
50569ac_clean_files="$ac_clean_files $CONFIG_STATUS"
50570{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
50571$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
50572as_write_fail=0
50573cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
50574#! $SHELL
50575# Generated by $as_me.
50576# Run this file to recreate the current configuration.
50577# Compiler output produced by configure, useful for debugging
50578# configure, is in config.log if it exists.
50579
50580debug=false
50581ac_cs_recheck=false
50582ac_cs_silent=false
50583
50584SHELL=\${CONFIG_SHELL-$SHELL}
50585export SHELL
50586_ASEOF
50587cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
50588## -------------------- ##
50589## M4sh Initialization. ##
50590## -------------------- ##
50591
50592# Be more Bourne compatible
50593DUALCASE=1; export DUALCASE # for MKS sh
50594if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
50595  emulate sh
50596  NULLCMD=:
50597  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
50598  # is contrary to our usage.  Disable this feature.
50599  alias -g '${1+"$@"}'='"$@"'
50600  setopt NO_GLOB_SUBST
50601else
50602  case `(set -o) 2>/dev/null` in #(
50603  *posix*) :
50604    set -o posix ;; #(
50605  *) :
50606     ;;
50607esac
50608fi
50609
50610
50611as_nl='
50612'
50613export as_nl
50614# Printing a long string crashes Solaris 7 /usr/bin/printf.
50615as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
50616as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
50617as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
50618# Prefer a ksh shell builtin over an external printf program on Solaris,
50619# but without wasting forks for bash or zsh.
50620if test -z "$BASH_VERSION$ZSH_VERSION" \
50621    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
50622  as_echo='print -r --'
50623  as_echo_n='print -rn --'
50624elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50625  as_echo='printf %s\n'
50626  as_echo_n='printf %s'
50627else
50628  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
50629    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
50630    as_echo_n='/usr/ucb/echo -n'
50631  else
50632    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
50633    as_echo_n_body='eval
50634      arg=$1;
50635      case $arg in #(
50636      *"$as_nl"*)
50637	expr "X$arg" : "X\\(.*\\)$as_nl";
50638	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
50639      esac;
50640      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
50641    '
50642    export as_echo_n_body
50643    as_echo_n='sh -c $as_echo_n_body as_echo'
50644  fi
50645  export as_echo_body
50646  as_echo='sh -c $as_echo_body as_echo'
50647fi
50648
50649# The user is always right.
50650if test "${PATH_SEPARATOR+set}" != set; then
50651  PATH_SEPARATOR=:
50652  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
50653    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
50654      PATH_SEPARATOR=';'
50655  }
50656fi
50657
50658
50659# IFS
50660# We need space, tab and new line, in precisely that order.  Quoting is
50661# there to prevent editors from complaining about space-tab.
50662# (If _AS_PATH_WALK were called with IFS unset, it would disable word
50663# splitting by setting IFS to empty value.)
50664IFS=" ""	$as_nl"
50665
50666# Find who we are.  Look in the path if we contain no directory separator.
50667as_myself=
50668case $0 in #((
50669  *[\\/]* ) as_myself=$0 ;;
50670  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50671for as_dir in $PATH
50672do
50673  IFS=$as_save_IFS
50674  test -z "$as_dir" && as_dir=.
50675    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
50676  done
50677IFS=$as_save_IFS
50678
50679     ;;
50680esac
50681# We did not find ourselves, most probably we were run as `sh COMMAND'
50682# in which case we are not to be found in the path.
50683if test "x$as_myself" = x; then
50684  as_myself=$0
50685fi
50686if test ! -f "$as_myself"; then
50687  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
50688  exit 1
50689fi
50690
50691# Unset variables that we do not need and which cause bugs (e.g. in
50692# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
50693# suppresses any "Segmentation fault" message there.  '((' could
50694# trigger a bug in pdksh 5.2.14.
50695for as_var in BASH_ENV ENV MAIL MAILPATH
50696do eval test x\${$as_var+set} = xset \
50697  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
50698done
50699PS1='$ '
50700PS2='> '
50701PS4='+ '
50702
50703# NLS nuisances.
50704LC_ALL=C
50705export LC_ALL
50706LANGUAGE=C
50707export LANGUAGE
50708
50709# CDPATH.
50710(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
50711
50712
50713# as_fn_error STATUS ERROR [LINENO LOG_FD]
50714# ----------------------------------------
50715# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
50716# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
50717# script with STATUS, using 1 if that was 0.
50718as_fn_error ()
50719{
50720  as_status=$1; test $as_status -eq 0 && as_status=1
50721  if test "$4"; then
50722    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
50723    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
50724  fi
50725  $as_echo "$as_me: error: $2" >&2
50726  as_fn_exit $as_status
50727} # as_fn_error
50728
50729
50730# as_fn_set_status STATUS
50731# -----------------------
50732# Set $? to STATUS, without forking.
50733as_fn_set_status ()
50734{
50735  return $1
50736} # as_fn_set_status
50737
50738# as_fn_exit STATUS
50739# -----------------
50740# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
50741as_fn_exit ()
50742{
50743  set +e
50744  as_fn_set_status $1
50745  exit $1
50746} # as_fn_exit
50747
50748# as_fn_unset VAR
50749# ---------------
50750# Portably unset VAR.
50751as_fn_unset ()
50752{
50753  { eval $1=; unset $1;}
50754}
50755as_unset=as_fn_unset
50756# as_fn_append VAR VALUE
50757# ----------------------
50758# Append the text in VALUE to the end of the definition contained in VAR. Take
50759# advantage of any shell optimizations that allow amortized linear growth over
50760# repeated appends, instead of the typical quadratic growth present in naive
50761# implementations.
50762if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
50763  eval 'as_fn_append ()
50764  {
50765    eval $1+=\$2
50766  }'
50767else
50768  as_fn_append ()
50769  {
50770    eval $1=\$$1\$2
50771  }
50772fi # as_fn_append
50773
50774# as_fn_arith ARG...
50775# ------------------
50776# Perform arithmetic evaluation on the ARGs, and store the result in the
50777# global $as_val. Take advantage of shells that can avoid forks. The arguments
50778# must be portable across $(()) and expr.
50779if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
50780  eval 'as_fn_arith ()
50781  {
50782    as_val=$(( $* ))
50783  }'
50784else
50785  as_fn_arith ()
50786  {
50787    as_val=`expr "$@" || test $? -eq 1`
50788  }
50789fi # as_fn_arith
50790
50791
50792if expr a : '\(a\)' >/dev/null 2>&1 &&
50793   test "X`expr 00001 : '.*\(...\)'`" = X001; then
50794  as_expr=expr
50795else
50796  as_expr=false
50797fi
50798
50799if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
50800  as_basename=basename
50801else
50802  as_basename=false
50803fi
50804
50805if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
50806  as_dirname=dirname
50807else
50808  as_dirname=false
50809fi
50810
50811as_me=`$as_basename -- "$0" ||
50812$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
50813	 X"$0" : 'X\(//\)$' \| \
50814	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
50815$as_echo X/"$0" |
50816    sed '/^.*\/\([^/][^/]*\)\/*$/{
50817	    s//\1/
50818	    q
50819	  }
50820	  /^X\/\(\/\/\)$/{
50821	    s//\1/
50822	    q
50823	  }
50824	  /^X\/\(\/\).*/{
50825	    s//\1/
50826	    q
50827	  }
50828	  s/.*/./; q'`
50829
50830# Avoid depending upon Character Ranges.
50831as_cr_letters='abcdefghijklmnopqrstuvwxyz'
50832as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
50833as_cr_Letters=$as_cr_letters$as_cr_LETTERS
50834as_cr_digits='0123456789'
50835as_cr_alnum=$as_cr_Letters$as_cr_digits
50836
50837ECHO_C= ECHO_N= ECHO_T=
50838case `echo -n x` in #(((((
50839-n*)
50840  case `echo 'xy\c'` in
50841  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
50842  xy)  ECHO_C='\c';;
50843  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
50844       ECHO_T='	';;
50845  esac;;
50846*)
50847  ECHO_N='-n';;
50848esac
50849
50850rm -f conf$$ conf$$.exe conf$$.file
50851if test -d conf$$.dir; then
50852  rm -f conf$$.dir/conf$$.file
50853else
50854  rm -f conf$$.dir
50855  mkdir conf$$.dir 2>/dev/null
50856fi
50857if (echo >conf$$.file) 2>/dev/null; then
50858  if ln -s conf$$.file conf$$ 2>/dev/null; then
50859    as_ln_s='ln -s'
50860    # ... but there are two gotchas:
50861    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
50862    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
50863    # In both cases, we have to default to `cp -pR'.
50864    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
50865      as_ln_s='cp -pR'
50866  elif ln conf$$.file conf$$ 2>/dev/null; then
50867    as_ln_s=ln
50868  else
50869    as_ln_s='cp -pR'
50870  fi
50871else
50872  as_ln_s='cp -pR'
50873fi
50874rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
50875rmdir conf$$.dir 2>/dev/null
50876
50877
50878# as_fn_mkdir_p
50879# -------------
50880# Create "$as_dir" as a directory, including parents if necessary.
50881as_fn_mkdir_p ()
50882{
50883
50884  case $as_dir in #(
50885  -*) as_dir=./$as_dir;;
50886  esac
50887  test -d "$as_dir" || eval $as_mkdir_p || {
50888    as_dirs=
50889    while :; do
50890      case $as_dir in #(
50891      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
50892      *) as_qdir=$as_dir;;
50893      esac
50894      as_dirs="'$as_qdir' $as_dirs"
50895      as_dir=`$as_dirname -- "$as_dir" ||
50896$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
50897	 X"$as_dir" : 'X\(//\)[^/]' \| \
50898	 X"$as_dir" : 'X\(//\)$' \| \
50899	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
50900$as_echo X"$as_dir" |
50901    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
50902	    s//\1/
50903	    q
50904	  }
50905	  /^X\(\/\/\)[^/].*/{
50906	    s//\1/
50907	    q
50908	  }
50909	  /^X\(\/\/\)$/{
50910	    s//\1/
50911	    q
50912	  }
50913	  /^X\(\/\).*/{
50914	    s//\1/
50915	    q
50916	  }
50917	  s/.*/./; q'`
50918      test -d "$as_dir" && break
50919    done
50920    test -z "$as_dirs" || eval "mkdir $as_dirs"
50921  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
50922
50923
50924} # as_fn_mkdir_p
50925if mkdir -p . 2>/dev/null; then
50926  as_mkdir_p='mkdir -p "$as_dir"'
50927else
50928  test -d ./-p && rmdir ./-p
50929  as_mkdir_p=false
50930fi
50931
50932
50933# as_fn_executable_p FILE
50934# -----------------------
50935# Test if FILE is an executable regular file.
50936as_fn_executable_p ()
50937{
50938  test -f "$1" && test -x "$1"
50939} # as_fn_executable_p
50940as_test_x='test -x'
50941as_executable_p=as_fn_executable_p
50942
50943# Sed expression to map a string onto a valid CPP name.
50944as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
50945
50946# Sed expression to map a string onto a valid variable name.
50947as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
50948
50949
50950exec 6>&1
50951## ----------------------------------- ##
50952## Main body of $CONFIG_STATUS script. ##
50953## ----------------------------------- ##
50954_ASEOF
50955test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
50956
50957cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50958# Save the log message, to keep $0 and so on meaningful, and to
50959# report actual input values of CONFIG_FILES etc. instead of their
50960# values after options handling.
50961ac_log="
50962This file was extended by OpenJDK $as_me jdk9, which was
50963generated by GNU Autoconf 2.69.  Invocation command line was
50964
50965  CONFIG_FILES    = $CONFIG_FILES
50966  CONFIG_HEADERS  = $CONFIG_HEADERS
50967  CONFIG_LINKS    = $CONFIG_LINKS
50968  CONFIG_COMMANDS = $CONFIG_COMMANDS
50969  $ $0 $@
50970
50971on `(hostname || uname -n) 2>/dev/null | sed 1q`
50972"
50973
50974_ACEOF
50975
50976case $ac_config_files in *"
50977"*) set x $ac_config_files; shift; ac_config_files=$*;;
50978esac
50979
50980case $ac_config_headers in *"
50981"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
50982esac
50983
50984
50985cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50986# Files that config.status was made for.
50987config_files="$ac_config_files"
50988config_headers="$ac_config_headers"
50989
50990_ACEOF
50991
50992cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50993ac_cs_usage="\
50994\`$as_me' instantiates files and other configuration actions
50995from templates according to the current configuration.  Unless the files
50996and actions are specified as TAGs, all are instantiated by default.
50997
50998Usage: $0 [OPTION]... [TAG]...
50999
51000  -h, --help       print this help, then exit
51001  -V, --version    print version number and configuration settings, then exit
51002      --config     print configuration, then exit
51003  -q, --quiet, --silent
51004                   do not print progress messages
51005  -d, --debug      don't remove temporary files
51006      --recheck    update $as_me by reconfiguring in the same conditions
51007      --file=FILE[:TEMPLATE]
51008                   instantiate the configuration file FILE
51009      --header=FILE[:TEMPLATE]
51010                   instantiate the configuration header FILE
51011
51012Configuration files:
51013$config_files
51014
51015Configuration headers:
51016$config_headers
51017
51018Report bugs to <build-dev@openjdk.java.net>.
51019OpenJDK home page: <http://openjdk.java.net>."
51020
51021_ACEOF
51022cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51023ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
51024ac_cs_version="\\
51025OpenJDK config.status jdk9
51026configured by $0, generated by GNU Autoconf 2.69,
51027  with options \\"\$ac_cs_config\\"
51028
51029Copyright (C) 2012 Free Software Foundation, Inc.
51030This config.status script is free software; the Free Software Foundation
51031gives unlimited permission to copy, distribute and modify it."
51032
51033ac_pwd='$ac_pwd'
51034srcdir='$srcdir'
51035AWK='$AWK'
51036test -n "\$AWK" || AWK=awk
51037_ACEOF
51038
51039cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51040# The default lists apply if the user does not specify any file.
51041ac_need_defaults=:
51042while test $# != 0
51043do
51044  case $1 in
51045  --*=?*)
51046    ac_option=`expr "X$1" : 'X\([^=]*\)='`
51047    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
51048    ac_shift=:
51049    ;;
51050  --*=)
51051    ac_option=`expr "X$1" : 'X\([^=]*\)='`
51052    ac_optarg=
51053    ac_shift=:
51054    ;;
51055  *)
51056    ac_option=$1
51057    ac_optarg=$2
51058    ac_shift=shift
51059    ;;
51060  esac
51061
51062  case $ac_option in
51063  # Handling of the options.
51064  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
51065    ac_cs_recheck=: ;;
51066  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
51067    $as_echo "$ac_cs_version"; exit ;;
51068  --config | --confi | --conf | --con | --co | --c )
51069    $as_echo "$ac_cs_config"; exit ;;
51070  --debug | --debu | --deb | --de | --d | -d )
51071    debug=: ;;
51072  --file | --fil | --fi | --f )
51073    $ac_shift
51074    case $ac_optarg in
51075    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
51076    '') as_fn_error $? "missing file argument" ;;
51077    esac
51078    as_fn_append CONFIG_FILES " '$ac_optarg'"
51079    ac_need_defaults=false;;
51080  --header | --heade | --head | --hea )
51081    $ac_shift
51082    case $ac_optarg in
51083    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
51084    esac
51085    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
51086    ac_need_defaults=false;;
51087  --he | --h)
51088    # Conflict between --help and --header
51089    as_fn_error $? "ambiguous option: \`$1'
51090Try \`$0 --help' for more information.";;
51091  --help | --hel | -h )
51092    $as_echo "$ac_cs_usage"; exit ;;
51093  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
51094  | -silent | --silent | --silen | --sile | --sil | --si | --s)
51095    ac_cs_silent=: ;;
51096
51097  # This is an error.
51098  -*) as_fn_error $? "unrecognized option: \`$1'
51099Try \`$0 --help' for more information." ;;
51100
51101  *) as_fn_append ac_config_targets " $1"
51102     ac_need_defaults=false ;;
51103
51104  esac
51105  shift
51106done
51107
51108ac_configure_extra_args=
51109
51110if $ac_cs_silent; then
51111  exec 6>/dev/null
51112  ac_configure_extra_args="$ac_configure_extra_args --silent"
51113fi
51114
51115_ACEOF
51116cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51117if \$ac_cs_recheck; then
51118  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
51119  shift
51120  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
51121  CONFIG_SHELL='$SHELL'
51122  export CONFIG_SHELL
51123  exec "\$@"
51124fi
51125
51126_ACEOF
51127cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51128exec 5>>config.log
51129{
51130  echo
51131  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
51132## Running $as_me. ##
51133_ASBOX
51134  $as_echo "$ac_log"
51135} >&5
51136
51137_ACEOF
51138cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51139_ACEOF
51140
51141cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51142
51143# Handling of arguments.
51144for ac_config_target in $ac_config_targets
51145do
51146  case $ac_config_target in
51147    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
51148    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
51149    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
51150    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
51151    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
51152    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
51153    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
51154
51155  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
51156  esac
51157done
51158
51159
51160# If the user did not use the arguments to specify the items to instantiate,
51161# then the envvar interface is used.  Set only those that are not.
51162# We use the long form for the default assignment because of an extremely
51163# bizarre bug on SunOS 4.1.3.
51164if $ac_need_defaults; then
51165  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
51166  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
51167fi
51168
51169# Have a temporary directory for convenience.  Make it in the build tree
51170# simply because there is no reason against having it here, and in addition,
51171# creating and moving files from /tmp can sometimes cause problems.
51172# Hook for its removal unless debugging.
51173# Note that there is a small window in which the directory will not be cleaned:
51174# after its creation but before its name has been assigned to `$tmp'.
51175$debug ||
51176{
51177  tmp= ac_tmp=
51178  trap 'exit_status=$?
51179  : "${ac_tmp:=$tmp}"
51180  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
51181' 0
51182  trap 'as_fn_exit 1' 1 2 13 15
51183}
51184# Create a (secure) tmp directory for tmp files.
51185
51186{
51187  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
51188  test -d "$tmp"
51189}  ||
51190{
51191  tmp=./conf$$-$RANDOM
51192  (umask 077 && mkdir "$tmp")
51193} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
51194ac_tmp=$tmp
51195
51196# Set up the scripts for CONFIG_FILES section.
51197# No need to generate them if there are no CONFIG_FILES.
51198# This happens for instance with `./config.status config.h'.
51199if test -n "$CONFIG_FILES"; then
51200
51201
51202ac_cr=`echo X | tr X '\015'`
51203# On cygwin, bash can eat \r inside `` if the user requested igncr.
51204# But we know of no other shell where ac_cr would be empty at this
51205# point, so we can use a bashism as a fallback.
51206if test "x$ac_cr" = x; then
51207  eval ac_cr=\$\'\\r\'
51208fi
51209ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
51210if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
51211  ac_cs_awk_cr='\\r'
51212else
51213  ac_cs_awk_cr=$ac_cr
51214fi
51215
51216echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
51217_ACEOF
51218
51219
51220{
51221  echo "cat >conf$$subs.awk <<_ACEOF" &&
51222  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
51223  echo "_ACEOF"
51224} >conf$$subs.sh ||
51225  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
51226ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
51227ac_delim='%!_!# '
51228for ac_last_try in false false false false false :; do
51229  . ./conf$$subs.sh ||
51230    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
51231
51232  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
51233  if test $ac_delim_n = $ac_delim_num; then
51234    break
51235  elif $ac_last_try; then
51236    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
51237  else
51238    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
51239  fi
51240done
51241rm -f conf$$subs.sh
51242
51243cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51244cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
51245_ACEOF
51246sed -n '
51247h
51248s/^/S["/; s/!.*/"]=/
51249p
51250g
51251s/^[^!]*!//
51252:repl
51253t repl
51254s/'"$ac_delim"'$//
51255t delim
51256:nl
51257h
51258s/\(.\{148\}\)..*/\1/
51259t more1
51260s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
51261p
51262n
51263b repl
51264:more1
51265s/["\\]/\\&/g; s/^/"/; s/$/"\\/
51266p
51267g
51268s/.\{148\}//
51269t nl
51270:delim
51271h
51272s/\(.\{148\}\)..*/\1/
51273t more2
51274s/["\\]/\\&/g; s/^/"/; s/$/"/
51275p
51276b
51277:more2
51278s/["\\]/\\&/g; s/^/"/; s/$/"\\/
51279p
51280g
51281s/.\{148\}//
51282t delim
51283' <conf$$subs.awk | sed '
51284/^[^""]/{
51285  N
51286  s/\n//
51287}
51288' >>$CONFIG_STATUS || ac_write_fail=1
51289rm -f conf$$subs.awk
51290cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51291_ACAWK
51292cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
51293  for (key in S) S_is_set[key] = 1
51294  FS = ""
51295
51296}
51297{
51298  line = $ 0
51299  nfields = split(line, field, "@")
51300  substed = 0
51301  len = length(field[1])
51302  for (i = 2; i < nfields; i++) {
51303    key = field[i]
51304    keylen = length(key)
51305    if (S_is_set[key]) {
51306      value = S[key]
51307      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
51308      len += length(value) + length(field[++i])
51309      substed = 1
51310    } else
51311      len += 1 + keylen
51312  }
51313
51314  print line
51315}
51316
51317_ACAWK
51318_ACEOF
51319cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51320if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
51321  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
51322else
51323  cat
51324fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
51325  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
51326_ACEOF
51327
51328# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
51329# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
51330# trailing colons and then remove the whole line if VPATH becomes empty
51331# (actually we leave an empty line to preserve line numbers).
51332if test "x$srcdir" = x.; then
51333  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
51334h
51335s///
51336s/^/:/
51337s/[	 ]*$/:/
51338s/:\$(srcdir):/:/g
51339s/:\${srcdir}:/:/g
51340s/:@srcdir@:/:/g
51341s/^:*//
51342s/:*$//
51343x
51344s/\(=[	 ]*\).*/\1/
51345G
51346s/\n//
51347s/^[^=]*=[	 ]*$//
51348}'
51349fi
51350
51351cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51352fi # test -n "$CONFIG_FILES"
51353
51354# Set up the scripts for CONFIG_HEADERS section.
51355# No need to generate them if there are no CONFIG_HEADERS.
51356# This happens for instance with `./config.status Makefile'.
51357if test -n "$CONFIG_HEADERS"; then
51358cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
51359BEGIN {
51360_ACEOF
51361
51362# Transform confdefs.h into an awk script `defines.awk', embedded as
51363# here-document in config.status, that substitutes the proper values into
51364# config.h.in to produce config.h.
51365
51366# Create a delimiter string that does not exist in confdefs.h, to ease
51367# handling of long lines.
51368ac_delim='%!_!# '
51369for ac_last_try in false false :; do
51370  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
51371  if test -z "$ac_tt"; then
51372    break
51373  elif $ac_last_try; then
51374    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
51375  else
51376    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
51377  fi
51378done
51379
51380# For the awk script, D is an array of macro values keyed by name,
51381# likewise P contains macro parameters if any.  Preserve backslash
51382# newline sequences.
51383
51384ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
51385sed -n '
51386s/.\{148\}/&'"$ac_delim"'/g
51387t rset
51388:rset
51389s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
51390t def
51391d
51392:def
51393s/\\$//
51394t bsnl
51395s/["\\]/\\&/g
51396s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
51397D["\1"]=" \3"/p
51398s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
51399d
51400:bsnl
51401s/["\\]/\\&/g
51402s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
51403D["\1"]=" \3\\\\\\n"\\/p
51404t cont
51405s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
51406t cont
51407d
51408:cont
51409n
51410s/.\{148\}/&'"$ac_delim"'/g
51411t clear
51412:clear
51413s/\\$//
51414t bsnlc
51415s/["\\]/\\&/g; s/^/"/; s/$/"/p
51416d
51417:bsnlc
51418s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
51419b cont
51420' <confdefs.h | sed '
51421s/'"$ac_delim"'/"\\\
51422"/g' >>$CONFIG_STATUS || ac_write_fail=1
51423
51424cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51425  for (key in D) D_is_set[key] = 1
51426  FS = ""
51427}
51428/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
51429  line = \$ 0
51430  split(line, arg, " ")
51431  if (arg[1] == "#") {
51432    defundef = arg[2]
51433    mac1 = arg[3]
51434  } else {
51435    defundef = substr(arg[1], 2)
51436    mac1 = arg[2]
51437  }
51438  split(mac1, mac2, "(") #)
51439  macro = mac2[1]
51440  prefix = substr(line, 1, index(line, defundef) - 1)
51441  if (D_is_set[macro]) {
51442    # Preserve the white space surrounding the "#".
51443    print prefix "define", macro P[macro] D[macro]
51444    next
51445  } else {
51446    # Replace #undef with comments.  This is necessary, for example,
51447    # in the case of _POSIX_SOURCE, which is predefined and required
51448    # on some systems where configure will not decide to define it.
51449    if (defundef == "undef") {
51450      print "/*", prefix defundef, macro, "*/"
51451      next
51452    }
51453  }
51454}
51455{ print }
51456_ACAWK
51457_ACEOF
51458cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51459  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
51460fi # test -n "$CONFIG_HEADERS"
51461
51462
51463eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
51464shift
51465for ac_tag
51466do
51467  case $ac_tag in
51468  :[FHLC]) ac_mode=$ac_tag; continue;;
51469  esac
51470  case $ac_mode$ac_tag in
51471  :[FHL]*:*);;
51472  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
51473  :[FH]-) ac_tag=-:-;;
51474  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
51475  esac
51476  ac_save_IFS=$IFS
51477  IFS=:
51478  set x $ac_tag
51479  IFS=$ac_save_IFS
51480  shift
51481  ac_file=$1
51482  shift
51483
51484  case $ac_mode in
51485  :L) ac_source=$1;;
51486  :[FH])
51487    ac_file_inputs=
51488    for ac_f
51489    do
51490      case $ac_f in
51491      -) ac_f="$ac_tmp/stdin";;
51492      *) # Look for the file first in the build tree, then in the source tree
51493	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
51494	 # because $ac_f cannot contain `:'.
51495	 test -f "$ac_f" ||
51496	   case $ac_f in
51497	   [\\/$]*) false;;
51498	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
51499	   esac ||
51500	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
51501      esac
51502      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
51503      as_fn_append ac_file_inputs " '$ac_f'"
51504    done
51505
51506    # Let's still pretend it is `configure' which instantiates (i.e., don't
51507    # use $as_me), people would be surprised to read:
51508    #    /* config.h.  Generated by config.status.  */
51509    configure_input='Generated from '`
51510	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
51511	`' by configure.'
51512    if test x"$ac_file" != x-; then
51513      configure_input="$ac_file.  $configure_input"
51514      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
51515$as_echo "$as_me: creating $ac_file" >&6;}
51516    fi
51517    # Neutralize special characters interpreted by sed in replacement strings.
51518    case $configure_input in #(
51519    *\&* | *\|* | *\\* )
51520       ac_sed_conf_input=`$as_echo "$configure_input" |
51521       sed 's/[\\\\&|]/\\\\&/g'`;; #(
51522    *) ac_sed_conf_input=$configure_input;;
51523    esac
51524
51525    case $ac_tag in
51526    *:-:* | *:-) cat >"$ac_tmp/stdin" \
51527      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
51528    esac
51529    ;;
51530  esac
51531
51532  ac_dir=`$as_dirname -- "$ac_file" ||
51533$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
51534	 X"$ac_file" : 'X\(//\)[^/]' \| \
51535	 X"$ac_file" : 'X\(//\)$' \| \
51536	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
51537$as_echo X"$ac_file" |
51538    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
51539	    s//\1/
51540	    q
51541	  }
51542	  /^X\(\/\/\)[^/].*/{
51543	    s//\1/
51544	    q
51545	  }
51546	  /^X\(\/\/\)$/{
51547	    s//\1/
51548	    q
51549	  }
51550	  /^X\(\/\).*/{
51551	    s//\1/
51552	    q
51553	  }
51554	  s/.*/./; q'`
51555  as_dir="$ac_dir"; as_fn_mkdir_p
51556  ac_builddir=.
51557
51558case "$ac_dir" in
51559.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
51560*)
51561  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
51562  # A ".." for each directory in $ac_dir_suffix.
51563  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
51564  case $ac_top_builddir_sub in
51565  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
51566  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
51567  esac ;;
51568esac
51569ac_abs_top_builddir=$ac_pwd
51570ac_abs_builddir=$ac_pwd$ac_dir_suffix
51571# for backward compatibility:
51572ac_top_builddir=$ac_top_build_prefix
51573
51574case $srcdir in
51575  .)  # We are building in place.
51576    ac_srcdir=.
51577    ac_top_srcdir=$ac_top_builddir_sub
51578    ac_abs_top_srcdir=$ac_pwd ;;
51579  [\\/]* | ?:[\\/]* )  # Absolute name.
51580    ac_srcdir=$srcdir$ac_dir_suffix;
51581    ac_top_srcdir=$srcdir
51582    ac_abs_top_srcdir=$srcdir ;;
51583  *) # Relative name.
51584    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
51585    ac_top_srcdir=$ac_top_build_prefix$srcdir
51586    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
51587esac
51588ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
51589
51590
51591  case $ac_mode in
51592  :F)
51593  #
51594  # CONFIG_FILE
51595  #
51596
51597_ACEOF
51598
51599cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51600# If the template does not know about datarootdir, expand it.
51601# FIXME: This hack should be removed a few years after 2.60.
51602ac_datarootdir_hack=; ac_datarootdir_seen=
51603ac_sed_dataroot='
51604/datarootdir/ {
51605  p
51606  q
51607}
51608/@datadir@/p
51609/@docdir@/p
51610/@infodir@/p
51611/@localedir@/p
51612/@mandir@/p'
51613case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
51614*datarootdir*) ac_datarootdir_seen=yes;;
51615*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
51616  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
51617$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
51618_ACEOF
51619cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51620  ac_datarootdir_hack='
51621  s&@datadir@&$datadir&g
51622  s&@docdir@&$docdir&g
51623  s&@infodir@&$infodir&g
51624  s&@localedir@&$localedir&g
51625  s&@mandir@&$mandir&g
51626  s&\\\${datarootdir}&$datarootdir&g' ;;
51627esac
51628_ACEOF
51629
51630# Neutralize VPATH when `$srcdir' = `.'.
51631# Shell code in configure.ac might set extrasub.
51632# FIXME: do we really want to maintain this feature?
51633cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51634ac_sed_extra="$ac_vpsub
51635$extrasub
51636_ACEOF
51637cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51638:t
51639/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
51640s|@configure_input@|$ac_sed_conf_input|;t t
51641s&@top_builddir@&$ac_top_builddir_sub&;t t
51642s&@top_build_prefix@&$ac_top_build_prefix&;t t
51643s&@srcdir@&$ac_srcdir&;t t
51644s&@abs_srcdir@&$ac_abs_srcdir&;t t
51645s&@top_srcdir@&$ac_top_srcdir&;t t
51646s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
51647s&@builddir@&$ac_builddir&;t t
51648s&@abs_builddir@&$ac_abs_builddir&;t t
51649s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
51650$ac_datarootdir_hack
51651"
51652eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
51653  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
51654
51655test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
51656  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
51657  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
51658      "$ac_tmp/out"`; test -z "$ac_out"; } &&
51659  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
51660which seems to be undefined.  Please make sure it is defined" >&5
51661$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
51662which seems to be undefined.  Please make sure it is defined" >&2;}
51663
51664  rm -f "$ac_tmp/stdin"
51665  case $ac_file in
51666  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
51667  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
51668  esac \
51669  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
51670 ;;
51671  :H)
51672  #
51673  # CONFIG_HEADER
51674  #
51675  if test x"$ac_file" != x-; then
51676    {
51677      $as_echo "/* $configure_input  */" \
51678      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
51679    } >"$ac_tmp/config.h" \
51680      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
51681    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
51682      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
51683$as_echo "$as_me: $ac_file is unchanged" >&6;}
51684    else
51685      rm -f "$ac_file"
51686      mv "$ac_tmp/config.h" "$ac_file" \
51687	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
51688    fi
51689  else
51690    $as_echo "/* $configure_input  */" \
51691      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
51692      || as_fn_error $? "could not create -" "$LINENO" 5
51693  fi
51694 ;;
51695
51696
51697  esac
51698
51699done # for ac_tag
51700
51701
51702as_fn_exit 0
51703_ACEOF
51704ac_clean_files=$ac_clean_files_save
51705
51706test $ac_write_fail = 0 ||
51707  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
51708
51709
51710# configure is writing to config.log, and then calls config.status.
51711# config.status does its own redirection, appending to config.log.
51712# Unfortunately, on DOS this fails, as config.log is still kept open
51713# by configure, so config.status won't be able to write to it; its
51714# output is simply discarded.  So we exec the FD to /dev/null,
51715# effectively closing config.log, so it can be properly (re)opened and
51716# appended to by config.status.  When coming back to configure, we
51717# need to make the FD available again.
51718if test "$no_create" != yes; then
51719  ac_cs_success=:
51720  ac_config_status_args=
51721  test "$silent" = yes &&
51722    ac_config_status_args="$ac_config_status_args --quiet"
51723  exec 5>/dev/null
51724  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
51725  exec 5>>config.log
51726  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
51727  # would make configure fail if this is the last instruction.
51728  $ac_cs_success || as_fn_exit 1
51729fi
51730if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
51731  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
51732$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
51733fi
51734
51735
51736# Try to move the config.log file to the output directory.
51737if test -e ./config.log; then
51738  $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
51739fi
51740
51741# Make the compare script executable
51742$CHMOD +x $OUTPUT_ROOT/compare.sh
51743
51744# Finally output some useful information to the user
51745
51746  # Finally output some useful information to the user
51747
51748  printf "\n"
51749  printf "====================================================\n"
51750  if test "x$no_create" != "xyes"; then
51751    if test "x$IS_RECONFIGURE" != "xyes"; then
51752      printf "A new configuration has been successfully created in\n %s\n" "$OUTPUT_ROOT"
51753    else
51754      printf "The existing configuration has been successfully updated in\n %s\n" "$OUTPUT_ROOT"
51755    fi
51756  else
51757    if test "x$IS_RECONFIGURE" != "xyes"; then
51758      printf "A configuration has been successfully checked but not created\n"
51759    else
51760      printf "The existing configuration has been successfully checked in\n %s\n" "$OUTPUT_ROOT"
51761    fi
51762  fi
51763  if test "x$CONFIGURE_COMMAND_LINE" != x; then
51764    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
51765  else
51766    printf "using default settings.\n"
51767  fi
51768
51769  printf "\n"
51770  printf "Configuration summary:\n"
51771  printf "* Debug level:    $DEBUG_LEVEL\n"
51772  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
51773  printf "* JDK variant:    $JDK_VARIANT\n"
51774  printf "* JVM variants:   $with_jvm_variants\n"
51775  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
51776
51777  printf "\n"
51778  printf "Tools summary:\n"
51779  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
51780    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
51781  fi
51782  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
51783  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)\n"
51784  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
51785  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
51786
51787  printf "\n"
51788  printf "Build performance summary:\n"
51789  printf "* Cores to use:   $JOBS\n"
51790  printf "* Memory limit:   $MEMORY_SIZE MB\n"
51791  if test "x$CCACHE_STATUS" != "x"; then
51792    printf "* ccache status:  $CCACHE_STATUS\n"
51793  fi
51794  printf "\n"
51795
51796  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
51797    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
51798    printf "will result in longer build times.\n"
51799    printf "\n"
51800  fi
51801
51802  if test "x$FOUND_ALT_VARIABLES" != "x"; then
51803    printf "WARNING: You have old-style ALT_ environment variables set.\n"
51804    printf "These are not respected, and will be ignored. It is recommended\n"
51805    printf "that you clean your environment. The following variables are set:\n"
51806    printf "$FOUND_ALT_VARIABLES\n"
51807    printf "\n"
51808  fi
51809
51810  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
51811    printf "WARNING: Your build output directory is not on a local disk.\n"
51812    printf "This will severely degrade build performance!\n"
51813    printf "It is recommended that you create an output directory on a local disk,\n"
51814    printf "and run the configure script again from that directory.\n"
51815    printf "\n"
51816  fi
51817
51818  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
51819    printf "WARNING: The result of this configuration has overridden an older\n"
51820    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
51821    printf "proper build. Failure to do so might result in strange build problems.\n"
51822    printf "\n"
51823  fi
51824
51825  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
51826    printf "WARNING: The result of this configuration was not saved.\n"
51827    printf "You should run without '--no-create | -n' to create the configuration.\n"
51828    printf "\n"
51829  fi
51830
51831