generated-configure.sh revision 1145:2a1d4d3e8c8e
1#!/bin/bash
2#
3# ##########################################################
4# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
5# ##########################################################
6#
7#! /bin/sh
8# Guess values for system-dependent variables and create Makefiles.
9# Generated by GNU Autoconf 2.69 for OpenJDK jdk9.
10#
11# Report bugs to <build-dev@openjdk.java.net>.
12#
13#
14# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
15#
16#
17# This configure script is free software; the Free Software Foundation
18# gives unlimited permission to copy, distribute and modify it.
19## -------------------- ##
20## M4sh Initialization. ##
21## -------------------- ##
22
23# Be more Bourne compatible
24DUALCASE=1; export DUALCASE # for MKS sh
25if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
26  emulate sh
27  NULLCMD=:
28  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29  # is contrary to our usage.  Disable this feature.
30  alias -g '${1+"$@"}'='"$@"'
31  setopt NO_GLOB_SUBST
32else
33  case `(set -o) 2>/dev/null` in #(
34  *posix*) :
35    set -o posix ;; #(
36  *) :
37     ;;
38esac
39fi
40
41
42as_nl='
43'
44export as_nl
45# Printing a long string crashes Solaris 7 /usr/bin/printf.
46as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
47as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
48as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
49# Prefer a ksh shell builtin over an external printf program on Solaris,
50# but without wasting forks for bash or zsh.
51if test -z "$BASH_VERSION$ZSH_VERSION" \
52    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53  as_echo='print -r --'
54  as_echo_n='print -rn --'
55elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
56  as_echo='printf %s\n'
57  as_echo_n='printf %s'
58else
59  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
60    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
61    as_echo_n='/usr/ucb/echo -n'
62  else
63    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
64    as_echo_n_body='eval
65      arg=$1;
66      case $arg in #(
67      *"$as_nl"*)
68	expr "X$arg" : "X\\(.*\\)$as_nl";
69	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
70      esac;
71      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
72    '
73    export as_echo_n_body
74    as_echo_n='sh -c $as_echo_n_body as_echo'
75  fi
76  export as_echo_body
77  as_echo='sh -c $as_echo_body as_echo'
78fi
79
80# The user is always right.
81if test "${PATH_SEPARATOR+set}" != set; then
82  PATH_SEPARATOR=:
83  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
84    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
85      PATH_SEPARATOR=';'
86  }
87fi
88
89
90# IFS
91# We need space, tab and new line, in precisely that order.  Quoting is
92# there to prevent editors from complaining about space-tab.
93# (If _AS_PATH_WALK were called with IFS unset, it would disable word
94# splitting by setting IFS to empty value.)
95IFS=" ""	$as_nl"
96
97# Find who we are.  Look in the path if we contain no directory separator.
98as_myself=
99case $0 in #((
100  *[\\/]* ) as_myself=$0 ;;
101  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
102for as_dir in $PATH
103do
104  IFS=$as_save_IFS
105  test -z "$as_dir" && as_dir=.
106    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
107  done
108IFS=$as_save_IFS
109
110     ;;
111esac
112# We did not find ourselves, most probably we were run as `sh COMMAND'
113# in which case we are not to be found in the path.
114if test "x$as_myself" = x; then
115  as_myself=$0
116fi
117if test ! -f "$as_myself"; then
118  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
119  exit 1
120fi
121
122# Unset variables that we do not need and which cause bugs (e.g. in
123# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
124# suppresses any "Segmentation fault" message there.  '((' could
125# trigger a bug in pdksh 5.2.14.
126for as_var in BASH_ENV ENV MAIL MAILPATH
127do eval test x\${$as_var+set} = xset \
128  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
129done
130PS1='$ '
131PS2='> '
132PS4='+ '
133
134# NLS nuisances.
135LC_ALL=C
136export LC_ALL
137LANGUAGE=C
138export LANGUAGE
139
140# CDPATH.
141(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
142
143# Use a proper internal environment variable to ensure we don't fall
144  # into an infinite loop, continuously re-executing ourselves.
145  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
146    _as_can_reexec=no; export _as_can_reexec;
147    # We cannot yet assume a decent shell, so we have to provide a
148# neutralization value for shells without unset; and this also
149# works around shells that cannot unset nonexistent variables.
150# Preserve -v and -x to the replacement shell.
151BASH_ENV=/dev/null
152ENV=/dev/null
153(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
154case $- in # ((((
155  *v*x* | *x*v* ) as_opts=-vx ;;
156  *v* ) as_opts=-v ;;
157  *x* ) as_opts=-x ;;
158  * ) as_opts= ;;
159esac
160exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
161# Admittedly, this is quite paranoid, since all the known shells bail
162# out after a failed `exec'.
163$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
164as_fn_exit 255
165  fi
166  # We don't want this to propagate to other subprocesses.
167          { _as_can_reexec=; unset _as_can_reexec;}
168if test "x$CONFIG_SHELL" = x; then
169  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
170  emulate sh
171  NULLCMD=:
172  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
173  # is contrary to our usage.  Disable this feature.
174  alias -g '\${1+\"\$@\"}'='\"\$@\"'
175  setopt NO_GLOB_SUBST
176else
177  case \`(set -o) 2>/dev/null\` in #(
178  *posix*) :
179    set -o posix ;; #(
180  *) :
181     ;;
182esac
183fi
184"
185  as_required="as_fn_return () { (exit \$1); }
186as_fn_success () { as_fn_return 0; }
187as_fn_failure () { as_fn_return 1; }
188as_fn_ret_success () { return 0; }
189as_fn_ret_failure () { return 1; }
190
191exitcode=0
192as_fn_success || { exitcode=1; echo as_fn_success failed.; }
193as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
194as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
195as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
196if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
197
198else
199  exitcode=1; echo positional parameters were not saved.
200fi
201test x\$exitcode = x0 || exit 1
202test -x / || exit 1"
203  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
204  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
205  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
206  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
207test \$(( 1 + 1 )) = 2 || exit 1"
208  if (eval "$as_required") 2>/dev/null; then :
209  as_have_required=yes
210else
211  as_have_required=no
212fi
213  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
214
215else
216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
217as_found=false
218for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
219do
220  IFS=$as_save_IFS
221  test -z "$as_dir" && as_dir=.
222  as_found=:
223  case $as_dir in #(
224	 /*)
225	   for as_base in sh bash ksh sh5; do
226	     # Try only shells that exist, to save several forks.
227	     as_shell=$as_dir/$as_base
228	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
229		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
230  CONFIG_SHELL=$as_shell as_have_required=yes
231		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
232  break 2
233fi
234fi
235	   done;;
236       esac
237  as_found=false
238done
239$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
240	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
241  CONFIG_SHELL=$SHELL as_have_required=yes
242fi; }
243IFS=$as_save_IFS
244
245
246      if test "x$CONFIG_SHELL" != x; then :
247  export CONFIG_SHELL
248             # We cannot yet assume a decent shell, so we have to provide a
249# neutralization value for shells without unset; and this also
250# works around shells that cannot unset nonexistent variables.
251# Preserve -v and -x to the replacement shell.
252BASH_ENV=/dev/null
253ENV=/dev/null
254(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
255case $- in # ((((
256  *v*x* | *x*v* ) as_opts=-vx ;;
257  *v* ) as_opts=-v ;;
258  *x* ) as_opts=-x ;;
259  * ) as_opts= ;;
260esac
261exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
262# Admittedly, this is quite paranoid, since all the known shells bail
263# out after a failed `exec'.
264$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
265exit 255
266fi
267
268    if test x$as_have_required = xno; then :
269  $as_echo "$0: This script requires a shell more modern than all"
270  $as_echo "$0: the shells that I found on your system."
271  if test x${ZSH_VERSION+set} = xset ; then
272    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
273    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
274  else
275    $as_echo "$0: Please tell bug-autoconf@gnu.org and
276$0: build-dev@openjdk.java.net about your system, including
277$0: any error possibly output before this message. Then
278$0: install a modern shell, or manually run the script
279$0: under such a shell if you do have one."
280  fi
281  exit 1
282fi
283fi
284fi
285SHELL=${CONFIG_SHELL-/bin/sh}
286export SHELL
287# Unset more variables known to interfere with behavior of common tools.
288CLICOLOR_FORCE= GREP_OPTIONS=
289unset CLICOLOR_FORCE GREP_OPTIONS
290
291## --------------------- ##
292## M4sh Shell Functions. ##
293## --------------------- ##
294# as_fn_unset VAR
295# ---------------
296# Portably unset VAR.
297as_fn_unset ()
298{
299  { eval $1=; unset $1;}
300}
301as_unset=as_fn_unset
302
303# as_fn_set_status STATUS
304# -----------------------
305# Set $? to STATUS, without forking.
306as_fn_set_status ()
307{
308  return $1
309} # as_fn_set_status
310
311# as_fn_exit STATUS
312# -----------------
313# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
314as_fn_exit ()
315{
316  set +e
317  as_fn_set_status $1
318  exit $1
319} # as_fn_exit
320
321# as_fn_mkdir_p
322# -------------
323# Create "$as_dir" as a directory, including parents if necessary.
324as_fn_mkdir_p ()
325{
326
327  case $as_dir in #(
328  -*) as_dir=./$as_dir;;
329  esac
330  test -d "$as_dir" || eval $as_mkdir_p || {
331    as_dirs=
332    while :; do
333      case $as_dir in #(
334      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
335      *) as_qdir=$as_dir;;
336      esac
337      as_dirs="'$as_qdir' $as_dirs"
338      as_dir=`$as_dirname -- "$as_dir" ||
339$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
340	 X"$as_dir" : 'X\(//\)[^/]' \| \
341	 X"$as_dir" : 'X\(//\)$' \| \
342	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
343$as_echo X"$as_dir" |
344    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
345	    s//\1/
346	    q
347	  }
348	  /^X\(\/\/\)[^/].*/{
349	    s//\1/
350	    q
351	  }
352	  /^X\(\/\/\)$/{
353	    s//\1/
354	    q
355	  }
356	  /^X\(\/\).*/{
357	    s//\1/
358	    q
359	  }
360	  s/.*/./; q'`
361      test -d "$as_dir" && break
362    done
363    test -z "$as_dirs" || eval "mkdir $as_dirs"
364  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
365
366
367} # as_fn_mkdir_p
368
369# as_fn_executable_p FILE
370# -----------------------
371# Test if FILE is an executable regular file.
372as_fn_executable_p ()
373{
374  test -f "$1" && test -x "$1"
375} # as_fn_executable_p
376# as_fn_append VAR VALUE
377# ----------------------
378# Append the text in VALUE to the end of the definition contained in VAR. Take
379# advantage of any shell optimizations that allow amortized linear growth over
380# repeated appends, instead of the typical quadratic growth present in naive
381# implementations.
382if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
383  eval 'as_fn_append ()
384  {
385    eval $1+=\$2
386  }'
387else
388  as_fn_append ()
389  {
390    eval $1=\$$1\$2
391  }
392fi # as_fn_append
393
394# as_fn_arith ARG...
395# ------------------
396# Perform arithmetic evaluation on the ARGs, and store the result in the
397# global $as_val. Take advantage of shells that can avoid forks. The arguments
398# must be portable across $(()) and expr.
399if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
400  eval 'as_fn_arith ()
401  {
402    as_val=$(( $* ))
403  }'
404else
405  as_fn_arith ()
406  {
407    as_val=`expr "$@" || test $? -eq 1`
408  }
409fi # as_fn_arith
410
411
412# as_fn_error STATUS ERROR [LINENO LOG_FD]
413# ----------------------------------------
414# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
415# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
416# script with STATUS, using 1 if that was 0.
417as_fn_error ()
418{
419  as_status=$1; test $as_status -eq 0 && as_status=1
420  if test "$4"; then
421    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
422    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
423  fi
424  $as_echo "$as_me: error: $2" >&2
425  as_fn_exit $as_status
426} # as_fn_error
427
428if expr a : '\(a\)' >/dev/null 2>&1 &&
429   test "X`expr 00001 : '.*\(...\)'`" = X001; then
430  as_expr=expr
431else
432  as_expr=false
433fi
434
435if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
436  as_basename=basename
437else
438  as_basename=false
439fi
440
441if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
442  as_dirname=dirname
443else
444  as_dirname=false
445fi
446
447as_me=`$as_basename -- "$0" ||
448$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
449	 X"$0" : 'X\(//\)$' \| \
450	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
451$as_echo X/"$0" |
452    sed '/^.*\/\([^/][^/]*\)\/*$/{
453	    s//\1/
454	    q
455	  }
456	  /^X\/\(\/\/\)$/{
457	    s//\1/
458	    q
459	  }
460	  /^X\/\(\/\).*/{
461	    s//\1/
462	    q
463	  }
464	  s/.*/./; q'`
465
466# Avoid depending upon Character Ranges.
467as_cr_letters='abcdefghijklmnopqrstuvwxyz'
468as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
469as_cr_Letters=$as_cr_letters$as_cr_LETTERS
470as_cr_digits='0123456789'
471as_cr_alnum=$as_cr_Letters$as_cr_digits
472
473
474  as_lineno_1=$LINENO as_lineno_1a=$LINENO
475  as_lineno_2=$LINENO as_lineno_2a=$LINENO
476  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
477  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
478  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
479  sed -n '
480    p
481    /[$]LINENO/=
482  ' <$as_myself |
483    sed '
484      s/[$]LINENO.*/&-/
485      t lineno
486      b
487      :lineno
488      N
489      :loop
490      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
491      t loop
492      s/-\n.*//
493    ' >$as_me.lineno &&
494  chmod +x "$as_me.lineno" ||
495    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
496
497  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
498  # already done that, so ensure we don't try to do so again and fall
499  # in an infinite loop.  This has already happened in practice.
500  _as_can_reexec=no; export _as_can_reexec
501  # Don't try to exec as it changes $[0], causing all sort of problems
502  # (the dirname of $[0] is not the place where we might find the
503  # original and so on.  Autoconf is especially sensitive to this).
504  . "./$as_me.lineno"
505  # Exit status is that of the last command.
506  exit
507}
508
509ECHO_C= ECHO_N= ECHO_T=
510case `echo -n x` in #(((((
511-n*)
512  case `echo 'xy\c'` in
513  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
514  xy)  ECHO_C='\c';;
515  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
516       ECHO_T='	';;
517  esac;;
518*)
519  ECHO_N='-n';;
520esac
521
522rm -f conf$$ conf$$.exe conf$$.file
523if test -d conf$$.dir; then
524  rm -f conf$$.dir/conf$$.file
525else
526  rm -f conf$$.dir
527  mkdir conf$$.dir 2>/dev/null
528fi
529if (echo >conf$$.file) 2>/dev/null; then
530  if ln -s conf$$.file conf$$ 2>/dev/null; then
531    as_ln_s='ln -s'
532    # ... but there are two gotchas:
533    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
534    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
535    # In both cases, we have to default to `cp -pR'.
536    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
537      as_ln_s='cp -pR'
538  elif ln conf$$.file conf$$ 2>/dev/null; then
539    as_ln_s=ln
540  else
541    as_ln_s='cp -pR'
542  fi
543else
544  as_ln_s='cp -pR'
545fi
546rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
547rmdir conf$$.dir 2>/dev/null
548
549if mkdir -p . 2>/dev/null; then
550  as_mkdir_p='mkdir -p "$as_dir"'
551else
552  test -d ./-p && rmdir ./-p
553  as_mkdir_p=false
554fi
555
556as_test_x='test -x'
557as_executable_p=as_fn_executable_p
558
559# Sed expression to map a string onto a valid CPP name.
560as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
561
562# Sed expression to map a string onto a valid variable name.
563as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
564
565
566test -n "$DJDIR" || exec 7<&0 </dev/null
567exec 6>&1
568
569# Name of the host.
570# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
571# so uname gets run too.
572ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
573
574#
575# Initializations.
576#
577ac_default_prefix=/usr/local
578ac_clean_files=
579ac_config_libobj_dir=.
580LIBOBJS=
581cross_compiling=no
582subdirs=
583MFLAGS=
584MAKEFLAGS=
585
586# Identity of this package.
587PACKAGE_NAME='OpenJDK'
588PACKAGE_TARNAME='openjdk'
589PACKAGE_VERSION='jdk9'
590PACKAGE_STRING='OpenJDK jdk9'
591PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
592PACKAGE_URL='http://openjdk.java.net'
593
594# Factoring default headers for most tests.
595ac_includes_default="\
596#include <stdio.h>
597#ifdef HAVE_SYS_TYPES_H
598# include <sys/types.h>
599#endif
600#ifdef HAVE_SYS_STAT_H
601# include <sys/stat.h>
602#endif
603#ifdef STDC_HEADERS
604# include <stdlib.h>
605# include <stddef.h>
606#else
607# ifdef HAVE_STDLIB_H
608#  include <stdlib.h>
609# endif
610#endif
611#ifdef HAVE_STRING_H
612# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
613#  include <memory.h>
614# endif
615# include <string.h>
616#endif
617#ifdef HAVE_STRINGS_H
618# include <strings.h>
619#endif
620#ifdef HAVE_INTTYPES_H
621# include <inttypes.h>
622#endif
623#ifdef HAVE_STDINT_H
624# include <stdint.h>
625#endif
626#ifdef HAVE_UNISTD_H
627# include <unistd.h>
628#endif"
629
630ac_subst_vars='LTLIBOBJS
631LIBOBJS
632CCACHE
633USE_PRECOMPILED_HEADER
634SJAVAC_SERVER_DIR
635ENABLE_SJAVAC
636SJAVAC_SERVER_JAVA
637JOBS
638MEMORY_SIZE
639NUM_CORES
640ENABLE_INTREE_EC
641SALIB_NAME
642HOTSPOT_MAKE_ARGS
643MSVCR_DLL
644LIBCXX
645LLVM_LIBS
646LLVM_LDFLAGS
647LLVM_CFLAGS
648LLVM_CONFIG
649LIBFFI_LIBS
650LIBFFI_CFLAGS
651STATIC_CXX_SETTING
652LIBDL
653LIBM
654LIBZIP_CAN_USE_MMAP
655USE_EXTERNAL_LIBZ
656USE_EXTERNAL_LIBPNG
657PNG_LIBS
658PNG_CFLAGS
659USE_EXTERNAL_LCMS
660LCMS_LIBS
661LCMS_CFLAGS
662USE_EXTERNAL_LIBGIF
663USE_EXTERNAL_LIBJPEG
664ALSA_LIBS
665ALSA_CFLAGS
666FREETYPE_BUNDLE_LIB_PATH
667FREETYPE_LIBS
668FREETYPE_CFLAGS
669CUPS_CFLAGS
670X_EXTRA_LIBS
671X_LIBS
672X_PRE_LIBS
673X_CFLAGS
674XMKMF
675FIXPATH
676ZIP_DEBUGINFO_FILES
677ENABLE_DEBUG_SYMBOLS
678CFLAGS_WARNINGS_ARE_ERRORS
679COMPILER_SUPPORTS_TARGET_BITS_FLAG
680ZERO_ARCHFLAG
681LDFLAGS_CXX_JDK
682LDFLAGS_JDKEXE_SUFFIX
683LDFLAGS_JDKLIB_SUFFIX
684LDFLAGS_JDKEXE
685LDFLAGS_JDKLIB
686CXXFLAGS_JDKEXE
687CXXFLAGS_JDKLIB
688CFLAGS_JDKEXE
689CFLAGS_JDKLIB
690MACOSX_VERSION_MIN
691LEGACY_EXTRA_LDFLAGS
692LEGACY_EXTRA_CXXFLAGS
693LEGACY_EXTRA_CFLAGS
694CXX_O_FLAG_NONE
695CXX_O_FLAG_DEBUG
696CXX_O_FLAG_NORM
697CXX_O_FLAG_HI
698CXX_O_FLAG_HIGHEST
699C_O_FLAG_NONE
700C_O_FLAG_DEBUG
701C_O_FLAG_NORM
702C_O_FLAG_HI
703C_O_FLAG_HIGHEST
704CXXFLAGS_DEBUG_OPTIONS
705CFLAGS_DEBUG_OPTIONS
706CXXFLAGS_DEBUG_SYMBOLS
707CFLAGS_DEBUG_SYMBOLS
708CXX_FLAG_DEPS
709C_FLAG_DEPS
710SET_SHARED_LIBRARY_MAPFILE
711SET_SHARED_LIBRARY_NAME
712SET_SHARED_LIBRARY_ORIGIN
713SET_EXECUTABLE_ORIGIN
714SHARED_LIBRARY_FLAGS
715CXX_FLAG_REORDER
716C_FLAG_REORDER
717SYSROOT_LDFLAGS
718SYSROOT_CFLAGS
719RC_FLAGS
720AR_OUT_OPTION
721LD_OUT_OPTION
722EXE_OUT_OPTION
723CC_OUT_OPTION
724POST_MCS_CMD
725POST_STRIP_CMD
726ARFLAGS
727COMPILER_TARGET_BITS_FLAG
728JT_HOME
729JTREGEXE
730USING_BROKEN_SUSE_LD
731PACKAGE_PATH
732LDEXECXX
733LDEXE
734USE_CLANG
735HOTSPOT_LD
736HOTSPOT_CXX
737HOTSPOT_RC
738HOTSPOT_MT
739BUILD_LD
740BUILD_CXX
741BUILD_CC
742ac_ct_OBJDUMP
743OBJDUMP
744ac_ct_OBJCOPY
745OBJCOPY
746ac_ct_NM
747ac_ct_STRIP
748MCS
749GNM
750NM
751STRIP
752DUMPBIN
753RC
754MT
755LIPO
756ac_ct_OBJC
757OBJCFLAGS
758OBJC
759ac_ct_AR
760AR
761AS
762LDCXX
763LD
764CXXCPP
765CPP
766ac_ct_CXX
767CXXFLAGS
768CXX
769ac_ct_PROPER_COMPILER_CXX
770PROPER_COMPILER_CXX
771TOOLCHAIN_PATH_CXX
772POTENTIAL_CXX
773OBJEXT
774EXEEXT
775ac_ct_CC
776CPPFLAGS
777LDFLAGS
778CFLAGS
779CC
780ac_ct_PROPER_COMPILER_CC
781PROPER_COMPILER_CC
782TOOLCHAIN_PATH_CC
783POTENTIAL_CC
784VS_LIB
785VS_INCLUDE
786VS_PATH
787CYGWIN_LINK
788EXE_SUFFIX
789OBJ_SUFFIX
790STATIC_LIBRARY
791SHARED_LIBRARY
792STATIC_LIBRARY_SUFFIX
793SHARED_LIBRARY_SUFFIX
794LIBRARY_PREFIX
795TOOLCHAIN_TYPE
796BUILD_HOTSPOT
797HOTSPOT_DIST
798BUILD_OUTPUT
799OVERRIDE_SRC_ROOT
800ADD_SRC_ROOT
801JDK_TOPDIR
802NASHORN_TOPDIR
803HOTSPOT_TOPDIR
804JAXWS_TOPDIR
805JAXP_TOPDIR
806CORBA_TOPDIR
807LANGTOOLS_TOPDIR
808JAVA_TOOL_FLAGS_SMALL
809JAVA_FLAGS_SMALL
810JAVA_FLAGS_BIG
811JAVA_FLAGS
812JAVAC_FLAGS
813BOOT_JDK_SOURCETARGET
814JARSIGNER
815NATIVE2ASCII
816JAR
817JAVAH
818JAVAC
819JAVA
820BOOT_JDK
821BOOT_TOOLSJAR
822BOOT_RTJAR
823JAVA_CHECK
824JAVAC_CHECK
825COOKED_BUILD_NUMBER
826JDK_VERSION
827COPYRIGHT_YEAR
828MACOSX_BUNDLE_ID_BASE
829MACOSX_BUNDLE_NAME_BASE
830COMPANY_NAME
831JDK_RC_PLATFORM_NAME
832PRODUCT_SUFFIX
833PRODUCT_NAME
834LAUNCHER_NAME
835MILESTONE
836JDK_BUILD_NUMBER
837JDK_UPDATE_VERSION
838JDK_MICRO_VERSION
839JDK_MINOR_VERSION
840JDK_MAJOR_VERSION
841USER_RELEASE_SUFFIX
842COMPRESS_JARS
843RMICONNECTOR_IIOP
844UNLIMITED_CRYPTO
845CACERTS_FILE
846TEST_IN_BUILD
847BUILD_HEADLESS
848SUPPORT_HEADFUL
849SUPPORT_HEADLESS
850BDEPS_FTP
851BDEPS_UNZIP
852OS_VERSION_MICRO
853OS_VERSION_MINOR
854OS_VERSION_MAJOR
855PKG_CONFIG
856CODESIGN
857XATTR
858DSYMUTIL
859IS_GNU_TIME
860TIME
861STAT
862HG
863READELF
864OTOOL
865LDD
866ZIP
867UNZIP
868FIND_DELETE
869OUTPUT_SYNC
870OUTPUT_SYNC_SUPPORTED
871MAKE
872CHECK_TOOLSDIR_MAKE
873CHECK_TOOLSDIR_GMAKE
874CHECK_MAKE
875CHECK_GMAKE
876PKGHANDLER
877OUTPUT_ROOT
878CONF_NAME
879SPEC
880SDKROOT
881XCODEBUILD
882BUILD_VARIANT_RELEASE
883DEBUG_CLASSFILES
884FASTDEBUG
885VARIANT
886DEBUG_LEVEL
887MACOSX_UNIVERSAL
888INCLUDE_SA
889JVM_VARIANT_CORE
890JVM_VARIANT_ZEROSHARK
891JVM_VARIANT_ZERO
892JVM_VARIANT_KERNEL
893JVM_VARIANT_MINIMAL1
894JVM_VARIANT_CLIENT
895JVM_VARIANT_SERVER
896JVM_VARIANTS
897JVM_INTERPRETER
898JDK_VARIANT
899SET_OPENJDK
900BUILD_LOG_WRAPPER
901BUILD_LOG_PREVIOUS
902BUILD_LOG
903TOPDIR
904PATH_SEP
905ZERO_ARCHDEF
906DEFINE_CROSS_COMPILE_ARCH
907LP64
908OPENJDK_TARGET_OS_EXPORT_DIR
909OPENJDK_TARGET_OS_API_DIR
910OPENJDK_TARGET_CPU_JLI_CFLAGS
911OPENJDK_TARGET_CPU_OSARCH
912OPENJDK_TARGET_CPU_ISADIR
913OPENJDK_TARGET_CPU_LIBDIR
914OPENJDK_TARGET_CPU_LEGACY_LIB
915OPENJDK_TARGET_CPU_LEGACY
916REQUIRED_OS_VERSION
917REQUIRED_OS_NAME
918COMPILE_TYPE
919OPENJDK_TARGET_CPU_ENDIAN
920OPENJDK_TARGET_CPU_BITS
921OPENJDK_TARGET_CPU_ARCH
922OPENJDK_TARGET_CPU
923OPENJDK_TARGET_OS_ENV
924OPENJDK_TARGET_OS_API
925OPENJDK_TARGET_OS
926OPENJDK_BUILD_CPU_ENDIAN
927OPENJDK_BUILD_CPU_BITS
928OPENJDK_BUILD_CPU_ARCH
929OPENJDK_BUILD_CPU
930OPENJDK_BUILD_OS_ENV
931OPENJDK_BUILD_OS_API
932OPENJDK_BUILD_OS
933OPENJDK_BUILD_AUTOCONF_NAME
934OPENJDK_TARGET_AUTOCONF_NAME
935target_os
936target_vendor
937target_cpu
938target
939host_os
940host_vendor
941host_cpu
942host
943build_os
944build_vendor
945build_cpu
946build
947CPIO
948SETFILE
949DF
950READLINK
951CYGPATH
952SED
953FGREP
954EGREP
955GREP
956AWK
957XARGS
958WHICH
959WC
960UNIQ
961UNAME
962TR
963TOUCH
964TEE
965TAR
966TAIL
967SORT
968SH
969RM
970PRINTF
971NAWK
972MV
973MKTEMP
974MKDIR
975LS
976LN
977HEAD
978FIND
979FILE
980EXPR
981ECHO
982DIRNAME
983DIFF
984DATE
985CUT
986CP
987COMM
988CMP
989CHMOD
990CAT
991BASH
992BASENAME
993DATE_WHEN_CONFIGURED
994CONFIGURE_COMMAND_LINE
995target_alias
996host_alias
997build_alias
998LIBS
999ECHO_T
1000ECHO_N
1001ECHO_C
1002DEFS
1003mandir
1004localedir
1005libdir
1006psdir
1007pdfdir
1008dvidir
1009htmldir
1010infodir
1011docdir
1012oldincludedir
1013includedir
1014localstatedir
1015sharedstatedir
1016sysconfdir
1017datadir
1018datarootdir
1019libexecdir
1020sbindir
1021bindir
1022program_transform_name
1023prefix
1024exec_prefix
1025PACKAGE_URL
1026PACKAGE_BUGREPORT
1027PACKAGE_STRING
1028PACKAGE_VERSION
1029PACKAGE_TARNAME
1030PACKAGE_NAME
1031PATH_SEPARATOR
1032SHELL'
1033ac_subst_files=''
1034ac_user_opts='
1035enable_option_checking
1036with_target_bits
1037enable_openjdk_only
1038with_custom_make_dir
1039with_jdk_variant
1040with_jvm_interpreter
1041with_jvm_variants
1042enable_debug
1043with_debug_level
1044with_devkit
1045with_sys_root
1046with_sysroot
1047with_tools_dir
1048with_toolchain_path
1049with_extra_path
1050with_sdk_name
1051with_conf_name
1052with_output_sync
1053with_builddeps_conf
1054with_builddeps_server
1055with_builddeps_dir
1056with_builddeps_group
1057enable_headful
1058enable_hotspot_test_in_build
1059with_cacerts_file
1060enable_unlimited_crypto
1061enable_rmiconnector_iiop
1062with_milestone
1063with_update_version
1064with_user_release_suffix
1065with_build_number
1066with_boot_jdk
1067with_boot_jdk_jvmargs
1068with_add_source_root
1069with_override_source_root
1070with_adds_and_overrides
1071with_override_langtools
1072with_override_corba
1073with_override_jaxp
1074with_override_jaxws
1075with_override_hotspot
1076with_override_nashorn
1077with_override_jdk
1078with_import_hotspot
1079with_toolchain_type
1080with_jtreg
1081with_extra_cflags
1082with_extra_cxxflags
1083with_extra_ldflags
1084enable_debug_symbols
1085enable_zip_debug_info
1086with_x
1087with_cups
1088with_cups_include
1089with_freetype
1090with_freetype_include
1091with_freetype_lib
1092enable_freetype_bundling
1093with_alsa
1094with_alsa_include
1095with_alsa_lib
1096with_libjpeg
1097with_giflib
1098with_lcms
1099with_libpng
1100with_zlib
1101with_stdc__lib
1102with_msvcr_dll
1103with_dxsdk
1104with_dxsdk_lib
1105with_dxsdk_include
1106with_num_cores
1107with_memory_size
1108with_jobs
1109with_sjavac_server_java
1110enable_sjavac
1111enable_precompiled_headers
1112enable_ccache
1113with_ccache_dir
1114'
1115      ac_precious_vars='build_alias
1116host_alias
1117target_alias
1118BASENAME
1119BASH
1120CAT
1121CHMOD
1122CMP
1123COMM
1124CP
1125CUT
1126DATE
1127DIFF
1128DIRNAME
1129ECHO
1130EXPR
1131FILE
1132FIND
1133HEAD
1134LN
1135LS
1136MKDIR
1137MKTEMP
1138MV
1139NAWK
1140PRINTF
1141RM
1142SH
1143SORT
1144TAIL
1145TAR
1146TEE
1147TOUCH
1148TR
1149UNAME
1150UNIQ
1151WC
1152WHICH
1153XARGS
1154AWK
1155GREP
1156EGREP
1157FGREP
1158SED
1159CYGPATH
1160READLINK
1161DF
1162SETFILE
1163CPIO
1164UNZIP
1165ZIP
1166LDD
1167OTOOL
1168READELF
1169HG
1170STAT
1171TIME
1172DSYMUTIL
1173XATTR
1174CODESIGN
1175PKG_CONFIG
1176JAVA
1177JAVAC
1178JAVAH
1179JAR
1180NATIVE2ASCII
1181JARSIGNER
1182CC
1183CFLAGS
1184LDFLAGS
1185LIBS
1186CPPFLAGS
1187CXX
1188CXXFLAGS
1189CCC
1190CPP
1191CXXCPP
1192AS
1193AR
1194OBJC
1195OBJCFLAGS
1196LIPO
1197STRIP
1198NM
1199GNM
1200MCS
1201OBJCOPY
1202OBJDUMP
1203BUILD_CC
1204BUILD_CXX
1205BUILD_LD
1206JTREGEXE
1207XMKMF
1208FREETYPE_CFLAGS
1209FREETYPE_LIBS
1210ALSA_CFLAGS
1211ALSA_LIBS
1212LCMS_CFLAGS
1213LCMS_LIBS
1214PNG_CFLAGS
1215PNG_LIBS
1216LIBFFI_CFLAGS
1217LIBFFI_LIBS
1218CCACHE'
1219
1220
1221# Initialize some variables set by options.
1222ac_init_help=
1223ac_init_version=false
1224ac_unrecognized_opts=
1225ac_unrecognized_sep=
1226# The variables have the same names as the options, with
1227# dashes changed to underlines.
1228cache_file=/dev/null
1229exec_prefix=NONE
1230no_create=
1231no_recursion=
1232prefix=NONE
1233program_prefix=NONE
1234program_suffix=NONE
1235program_transform_name=s,x,x,
1236silent=
1237site=
1238srcdir=
1239verbose=
1240x_includes=NONE
1241x_libraries=NONE
1242
1243# Installation directory options.
1244# These are left unexpanded so users can "make install exec_prefix=/foo"
1245# and all the variables that are supposed to be based on exec_prefix
1246# by default will actually change.
1247# Use braces instead of parens because sh, perl, etc. also accept them.
1248# (The list follows the same order as the GNU Coding Standards.)
1249bindir='${exec_prefix}/bin'
1250sbindir='${exec_prefix}/sbin'
1251libexecdir='${exec_prefix}/libexec'
1252datarootdir='${prefix}/share'
1253datadir='${datarootdir}'
1254sysconfdir='${prefix}/etc'
1255sharedstatedir='${prefix}/com'
1256localstatedir='${prefix}/var'
1257includedir='${prefix}/include'
1258oldincludedir='/usr/include'
1259docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1260infodir='${datarootdir}/info'
1261htmldir='${docdir}'
1262dvidir='${docdir}'
1263pdfdir='${docdir}'
1264psdir='${docdir}'
1265libdir='${exec_prefix}/lib'
1266localedir='${datarootdir}/locale'
1267mandir='${datarootdir}/man'
1268
1269ac_prev=
1270ac_dashdash=
1271for ac_option
1272do
1273  # If the previous option needs an argument, assign it.
1274  if test -n "$ac_prev"; then
1275    eval $ac_prev=\$ac_option
1276    ac_prev=
1277    continue
1278  fi
1279
1280  case $ac_option in
1281  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1282  *=)   ac_optarg= ;;
1283  *)    ac_optarg=yes ;;
1284  esac
1285
1286  # Accept the important Cygnus configure options, so we can diagnose typos.
1287
1288  case $ac_dashdash$ac_option in
1289  --)
1290    ac_dashdash=yes ;;
1291
1292  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1293    ac_prev=bindir ;;
1294  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1295    bindir=$ac_optarg ;;
1296
1297  -build | --build | --buil | --bui | --bu)
1298    ac_prev=build_alias ;;
1299  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1300    build_alias=$ac_optarg ;;
1301
1302  -cache-file | --cache-file | --cache-fil | --cache-fi \
1303  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1304    ac_prev=cache_file ;;
1305  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1306  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1307    cache_file=$ac_optarg ;;
1308
1309  --config-cache | -C)
1310    cache_file=config.cache ;;
1311
1312  -datadir | --datadir | --datadi | --datad)
1313    ac_prev=datadir ;;
1314  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1315    datadir=$ac_optarg ;;
1316
1317  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1318  | --dataroo | --dataro | --datar)
1319    ac_prev=datarootdir ;;
1320  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1321  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1322    datarootdir=$ac_optarg ;;
1323
1324  -disable-* | --disable-*)
1325    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1326    # Reject names that are not valid shell variable names.
1327    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1328      as_fn_error $? "invalid feature name: $ac_useropt"
1329    ac_useropt_orig=$ac_useropt
1330    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1331    case $ac_user_opts in
1332      *"
1333"enable_$ac_useropt"
1334"*) ;;
1335      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1336	 ac_unrecognized_sep=', ';;
1337    esac
1338    eval enable_$ac_useropt=no ;;
1339
1340  -docdir | --docdir | --docdi | --doc | --do)
1341    ac_prev=docdir ;;
1342  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1343    docdir=$ac_optarg ;;
1344
1345  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1346    ac_prev=dvidir ;;
1347  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1348    dvidir=$ac_optarg ;;
1349
1350  -enable-* | --enable-*)
1351    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1352    # Reject names that are not valid shell variable names.
1353    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1354      as_fn_error $? "invalid feature name: $ac_useropt"
1355    ac_useropt_orig=$ac_useropt
1356    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1357    case $ac_user_opts in
1358      *"
1359"enable_$ac_useropt"
1360"*) ;;
1361      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1362	 ac_unrecognized_sep=', ';;
1363    esac
1364    eval enable_$ac_useropt=\$ac_optarg ;;
1365
1366  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1367  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1368  | --exec | --exe | --ex)
1369    ac_prev=exec_prefix ;;
1370  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1371  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1372  | --exec=* | --exe=* | --ex=*)
1373    exec_prefix=$ac_optarg ;;
1374
1375  -gas | --gas | --ga | --g)
1376    # Obsolete; use --with-gas.
1377    with_gas=yes ;;
1378
1379  -help | --help | --hel | --he | -h)
1380    ac_init_help=long ;;
1381  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1382    ac_init_help=recursive ;;
1383  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1384    ac_init_help=short ;;
1385
1386  -host | --host | --hos | --ho)
1387    ac_prev=host_alias ;;
1388  -host=* | --host=* | --hos=* | --ho=*)
1389    host_alias=$ac_optarg ;;
1390
1391  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1392    ac_prev=htmldir ;;
1393  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1394  | --ht=*)
1395    htmldir=$ac_optarg ;;
1396
1397  -includedir | --includedir | --includedi | --included | --include \
1398  | --includ | --inclu | --incl | --inc)
1399    ac_prev=includedir ;;
1400  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1401  | --includ=* | --inclu=* | --incl=* | --inc=*)
1402    includedir=$ac_optarg ;;
1403
1404  -infodir | --infodir | --infodi | --infod | --info | --inf)
1405    ac_prev=infodir ;;
1406  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1407    infodir=$ac_optarg ;;
1408
1409  -libdir | --libdir | --libdi | --libd)
1410    ac_prev=libdir ;;
1411  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1412    libdir=$ac_optarg ;;
1413
1414  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1415  | --libexe | --libex | --libe)
1416    ac_prev=libexecdir ;;
1417  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1418  | --libexe=* | --libex=* | --libe=*)
1419    libexecdir=$ac_optarg ;;
1420
1421  -localedir | --localedir | --localedi | --localed | --locale)
1422    ac_prev=localedir ;;
1423  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1424    localedir=$ac_optarg ;;
1425
1426  -localstatedir | --localstatedir | --localstatedi | --localstated \
1427  | --localstate | --localstat | --localsta | --localst | --locals)
1428    ac_prev=localstatedir ;;
1429  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1430  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1431    localstatedir=$ac_optarg ;;
1432
1433  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1434    ac_prev=mandir ;;
1435  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1436    mandir=$ac_optarg ;;
1437
1438  -nfp | --nfp | --nf)
1439    # Obsolete; use --without-fp.
1440    with_fp=no ;;
1441
1442  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1443  | --no-cr | --no-c | -n)
1444    no_create=yes ;;
1445
1446  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1447  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1448    no_recursion=yes ;;
1449
1450  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1451  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1452  | --oldin | --oldi | --old | --ol | --o)
1453    ac_prev=oldincludedir ;;
1454  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1455  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1456  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1457    oldincludedir=$ac_optarg ;;
1458
1459  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1460    ac_prev=prefix ;;
1461  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1462    prefix=$ac_optarg ;;
1463
1464  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1465  | --program-pre | --program-pr | --program-p)
1466    ac_prev=program_prefix ;;
1467  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1468  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1469    program_prefix=$ac_optarg ;;
1470
1471  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1472  | --program-suf | --program-su | --program-s)
1473    ac_prev=program_suffix ;;
1474  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1475  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1476    program_suffix=$ac_optarg ;;
1477
1478  -program-transform-name | --program-transform-name \
1479  | --program-transform-nam | --program-transform-na \
1480  | --program-transform-n | --program-transform- \
1481  | --program-transform | --program-transfor \
1482  | --program-transfo | --program-transf \
1483  | --program-trans | --program-tran \
1484  | --progr-tra | --program-tr | --program-t)
1485    ac_prev=program_transform_name ;;
1486  -program-transform-name=* | --program-transform-name=* \
1487  | --program-transform-nam=* | --program-transform-na=* \
1488  | --program-transform-n=* | --program-transform-=* \
1489  | --program-transform=* | --program-transfor=* \
1490  | --program-transfo=* | --program-transf=* \
1491  | --program-trans=* | --program-tran=* \
1492  | --progr-tra=* | --program-tr=* | --program-t=*)
1493    program_transform_name=$ac_optarg ;;
1494
1495  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1496    ac_prev=pdfdir ;;
1497  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1498    pdfdir=$ac_optarg ;;
1499
1500  -psdir | --psdir | --psdi | --psd | --ps)
1501    ac_prev=psdir ;;
1502  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1503    psdir=$ac_optarg ;;
1504
1505  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1506  | -silent | --silent | --silen | --sile | --sil)
1507    silent=yes ;;
1508
1509  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1510    ac_prev=sbindir ;;
1511  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1512  | --sbi=* | --sb=*)
1513    sbindir=$ac_optarg ;;
1514
1515  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1516  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1517  | --sharedst | --shareds | --shared | --share | --shar \
1518  | --sha | --sh)
1519    ac_prev=sharedstatedir ;;
1520  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1521  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1522  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1523  | --sha=* | --sh=*)
1524    sharedstatedir=$ac_optarg ;;
1525
1526  -site | --site | --sit)
1527    ac_prev=site ;;
1528  -site=* | --site=* | --sit=*)
1529    site=$ac_optarg ;;
1530
1531  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1532    ac_prev=srcdir ;;
1533  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1534    srcdir=$ac_optarg ;;
1535
1536  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1537  | --syscon | --sysco | --sysc | --sys | --sy)
1538    ac_prev=sysconfdir ;;
1539  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1540  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1541    sysconfdir=$ac_optarg ;;
1542
1543  -target | --target | --targe | --targ | --tar | --ta | --t)
1544    ac_prev=target_alias ;;
1545  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1546    target_alias=$ac_optarg ;;
1547
1548  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1549    verbose=yes ;;
1550
1551  -version | --version | --versio | --versi | --vers | -V)
1552    ac_init_version=: ;;
1553
1554  -with-* | --with-*)
1555    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1556    # Reject names that are not valid shell variable names.
1557    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1558      as_fn_error $? "invalid package name: $ac_useropt"
1559    ac_useropt_orig=$ac_useropt
1560    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1561    case $ac_user_opts in
1562      *"
1563"with_$ac_useropt"
1564"*) ;;
1565      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1566	 ac_unrecognized_sep=', ';;
1567    esac
1568    eval with_$ac_useropt=\$ac_optarg ;;
1569
1570  -without-* | --without-*)
1571    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1572    # Reject names that are not valid shell variable names.
1573    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1574      as_fn_error $? "invalid package name: $ac_useropt"
1575    ac_useropt_orig=$ac_useropt
1576    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1577    case $ac_user_opts in
1578      *"
1579"with_$ac_useropt"
1580"*) ;;
1581      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1582	 ac_unrecognized_sep=', ';;
1583    esac
1584    eval with_$ac_useropt=no ;;
1585
1586  --x)
1587    # Obsolete; use --with-x.
1588    with_x=yes ;;
1589
1590  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1591  | --x-incl | --x-inc | --x-in | --x-i)
1592    ac_prev=x_includes ;;
1593  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1594  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1595    x_includes=$ac_optarg ;;
1596
1597  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1598  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1599    ac_prev=x_libraries ;;
1600  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1601  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1602    x_libraries=$ac_optarg ;;
1603
1604  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1605Try \`$0 --help' for more information"
1606    ;;
1607
1608  *=*)
1609    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1610    # Reject names that are not valid shell variable names.
1611    case $ac_envvar in #(
1612      '' | [0-9]* | *[!_$as_cr_alnum]* )
1613      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1614    esac
1615    eval $ac_envvar=\$ac_optarg
1616    export $ac_envvar ;;
1617
1618  *)
1619    # FIXME: should be removed in autoconf 3.0.
1620    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1621    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1622      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1623    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1624    ;;
1625
1626  esac
1627done
1628
1629if test -n "$ac_prev"; then
1630  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1631  as_fn_error $? "missing argument to $ac_option"
1632fi
1633
1634if test -n "$ac_unrecognized_opts"; then
1635  case $enable_option_checking in
1636    no) ;;
1637    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1638    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1639  esac
1640fi
1641
1642# Check all directory arguments for consistency.
1643for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1644		datadir sysconfdir sharedstatedir localstatedir includedir \
1645		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1646		libdir localedir mandir
1647do
1648  eval ac_val=\$$ac_var
1649  # Remove trailing slashes.
1650  case $ac_val in
1651    */ )
1652      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1653      eval $ac_var=\$ac_val;;
1654  esac
1655  # Be sure to have absolute directory names.
1656  case $ac_val in
1657    [\\/$]* | ?:[\\/]* )  continue;;
1658    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1659  esac
1660  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1661done
1662
1663# There might be people who depend on the old broken behavior: `$host'
1664# used to hold the argument of --host etc.
1665# FIXME: To remove some day.
1666build=$build_alias
1667host=$host_alias
1668target=$target_alias
1669
1670# FIXME: To remove some day.
1671if test "x$host_alias" != x; then
1672  if test "x$build_alias" = x; then
1673    cross_compiling=maybe
1674  elif test "x$build_alias" != "x$host_alias"; then
1675    cross_compiling=yes
1676  fi
1677fi
1678
1679ac_tool_prefix=
1680test -n "$host_alias" && ac_tool_prefix=$host_alias-
1681
1682test "$silent" = yes && exec 6>/dev/null
1683
1684
1685ac_pwd=`pwd` && test -n "$ac_pwd" &&
1686ac_ls_di=`ls -di .` &&
1687ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1688  as_fn_error $? "working directory cannot be determined"
1689test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1690  as_fn_error $? "pwd does not report name of working directory"
1691
1692
1693# Find the source files, if location was not specified.
1694if test -z "$srcdir"; then
1695  ac_srcdir_defaulted=yes
1696  # Try the directory containing this script, then the parent directory.
1697  ac_confdir=`$as_dirname -- "$as_myself" ||
1698$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1699	 X"$as_myself" : 'X\(//\)[^/]' \| \
1700	 X"$as_myself" : 'X\(//\)$' \| \
1701	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1702$as_echo X"$as_myself" |
1703    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1704	    s//\1/
1705	    q
1706	  }
1707	  /^X\(\/\/\)[^/].*/{
1708	    s//\1/
1709	    q
1710	  }
1711	  /^X\(\/\/\)$/{
1712	    s//\1/
1713	    q
1714	  }
1715	  /^X\(\/\).*/{
1716	    s//\1/
1717	    q
1718	  }
1719	  s/.*/./; q'`
1720  srcdir=$ac_confdir
1721  if test ! -r "$srcdir/$ac_unique_file"; then
1722    srcdir=..
1723  fi
1724else
1725  ac_srcdir_defaulted=no
1726fi
1727if test ! -r "$srcdir/$ac_unique_file"; then
1728  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1729  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1730fi
1731ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1732ac_abs_confdir=`(
1733	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1734	pwd)`
1735# When building in place, set srcdir=.
1736if test "$ac_abs_confdir" = "$ac_pwd"; then
1737  srcdir=.
1738fi
1739# Remove unnecessary trailing slashes from srcdir.
1740# Double slashes in file names in object file debugging info
1741# mess up M-x gdb in Emacs.
1742case $srcdir in
1743*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1744esac
1745for ac_var in $ac_precious_vars; do
1746  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1747  eval ac_env_${ac_var}_value=\$${ac_var}
1748  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1749  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1750done
1751
1752#
1753# Report the --help message.
1754#
1755if test "$ac_init_help" = "long"; then
1756  # Omit some internal or obsolete options to make the list less imposing.
1757  # This message is too long to be a string in the A/UX 3.1 sh.
1758  cat <<_ACEOF
1759\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1760
1761Usage: $0 [OPTION]... [VAR=VALUE]...
1762
1763To assign environment variables (e.g., CC, CFLAGS...), specify them as
1764VAR=VALUE.  See below for descriptions of some of the useful variables.
1765
1766Defaults for the options are specified in brackets.
1767
1768Configuration:
1769  -h, --help              display this help and exit
1770      --help=short        display options specific to this package
1771      --help=recursive    display the short help of all the included packages
1772  -V, --version           display version information and exit
1773  -q, --quiet, --silent   do not print \`checking ...' messages
1774      --cache-file=FILE   cache test results in FILE [disabled]
1775  -C, --config-cache      alias for \`--cache-file=config.cache'
1776  -n, --no-create         do not create output files
1777      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1778
1779Installation directories:
1780  --prefix=PREFIX         install architecture-independent files in PREFIX
1781                          [$ac_default_prefix]
1782  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1783                          [PREFIX]
1784
1785By default, \`make install' will install all the files in
1786\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1787an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1788for instance \`--prefix=\$HOME'.
1789
1790For better control, use the options below.
1791
1792Fine tuning of the installation directories:
1793  --bindir=DIR            user executables [EPREFIX/bin]
1794  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1795  --libexecdir=DIR        program executables [EPREFIX/libexec]
1796  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1797  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1798  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1799  --libdir=DIR            object code libraries [EPREFIX/lib]
1800  --includedir=DIR        C header files [PREFIX/include]
1801  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1802  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1803  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1804  --infodir=DIR           info documentation [DATAROOTDIR/info]
1805  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1806  --mandir=DIR            man documentation [DATAROOTDIR/man]
1807  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1808  --htmldir=DIR           html documentation [DOCDIR]
1809  --dvidir=DIR            dvi documentation [DOCDIR]
1810  --pdfdir=DIR            pdf documentation [DOCDIR]
1811  --psdir=DIR             ps documentation [DOCDIR]
1812_ACEOF
1813
1814  cat <<\_ACEOF
1815
1816X features:
1817  --x-includes=DIR    X include files are in DIR
1818  --x-libraries=DIR   X library files are in DIR
1819
1820System types:
1821  --build=BUILD     configure for building on BUILD [guessed]
1822  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1823  --target=TARGET   configure for building compilers for TARGET [HOST]
1824_ACEOF
1825fi
1826
1827if test -n "$ac_init_help"; then
1828  case $ac_init_help in
1829     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1830   esac
1831  cat <<\_ACEOF
1832
1833Optional Features:
1834  --disable-option-checking  ignore unrecognized --enable/--with options
1835  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1836  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1837  --enable-openjdk-only   suppress building custom source even if present
1838                          [disabled]
1839  --enable-debug          set the debug level to fastdebug (shorthand for
1840                          --with-debug-level=fastdebug) [disabled]
1841  --disable-headful       disable building headful support (graphical UI
1842                          support) [enabled]
1843  --enable-hotspot-test-in-build
1844                          run the Queens test after Hotspot build [disabled]
1845  --enable-unlimited-crypto
1846                          Enable unlimited crypto policy [disabled]
1847  --enable-rmiconnector-iiop
1848                          enable the JMX RMIConnector iiop transport
1849                          [disabled]
1850  --disable-debug-symbols disable generation of debug symbols [enabled]
1851  --disable-zip-debug-info
1852                          disable zipping of debug-info files [enabled]
1853  --disable-freetype-bundling
1854                          disable bundling of the freetype library with the
1855                          build result [enabled on Windows or when using
1856                          --with-freetype, disabled otherwise]
1857  --enable-sjavac         use sjavac to do fast incremental compiles
1858                          [disabled]
1859  --disable-precompiled-headers
1860                          disable using precompiled headers when compiling C++
1861                          [enabled]
1862  --enable-ccache         enable using ccache to speed up recompilations
1863                          [disabled]
1864
1865Optional Packages:
1866  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1867  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1868  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1869                          support it), e.g. --with-target-bits=32 [guessed]
1870  --with-custom-make-dir  Deprecated. Option is kept for backwards
1871                          compatibility and is ignored
1872  --with-jdk-variant      JDK variant to build (normal) [normal]
1873  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1874  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1875                          client, minimal1, kernel, zero, zeroshark, core)
1876                          [server]
1877  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1878                          optimized (HotSpot build only)) [release]
1879  --with-devkit           use this devkit for compilers, tools and resources
1880  --with-sys-root         alias for --with-sysroot for backwards compatability
1881  --with-sysroot          use this directory as sysroot
1882  --with-tools-dir        alias for --with-toolchain-path for backwards
1883                          compatibility
1884  --with-toolchain-path   prepend these directories when searching for
1885                          toolchain binaries (compilers etc)
1886  --with-extra-path       prepend these directories to the default path
1887  --with-sdk-name         use the platform SDK of the given name. [macosx]
1888  --with-conf-name        use this as the name of the configuration [generated
1889                          from important configuration options]
1890  --with-output-sync      set make output sync type if supported by make.
1891                          [recurse]
1892  --with-builddeps-conf   use this configuration file for the builddeps
1893  --with-builddeps-server download and use build dependencies from this server
1894                          url
1895  --with-builddeps-dir    store downloaded build dependencies here
1896                          [/localhome/builddeps]
1897  --with-builddeps-group  chgrp the downloaded build dependencies to this
1898                          group
1899  --with-cacerts-file     specify alternative cacerts file
1900  --with-milestone        Set milestone value for build [internal]
1901  --with-update-version   Set update version value for build [b00]
1902  --with-user-release-suffix
1903                          Add a custom string to the version string if build
1904                          number is not set.[username_builddateb00]
1905  --with-build-number     Set build number value for build [b00]
1906  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1907  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
1908                          invocations of boot JDK, overriding the default
1909                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1910                          -enableassertions"
1911  --with-add-source-root  for each and every source directory, look in this
1912                          additional source root for the same directory; if it
1913                          exists and have files in it, include it in the build
1914  --with-override-source-root
1915                          for each and every source directory, look in this
1916                          override source root for the same directory; if it
1917                          exists, use that directory instead and ignore the
1918                          directory in the original source root
1919  --with-adds-and-overrides
1920                          use the subdirs 'adds' and 'overrides' in the
1921                          specified directory as add-source-root and
1922                          override-source-root
1923  --with-override-langtools
1924                          use this langtools dir for the build
1925  --with-override-corba   use this corba dir for the build
1926  --with-override-jaxp    use this jaxp dir for the build
1927  --with-override-jaxws   use this jaxws dir for the build
1928  --with-override-hotspot use this hotspot dir for the build
1929  --with-override-nashorn use this nashorn dir for the build
1930  --with-override-jdk     use this jdk dir for the build
1931  --with-import-hotspot   import hotspot binaries from this jdk image or
1932                          hotspot build dist dir instead of building from
1933                          source
1934  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1935                          to show possible values [platform dependent]
1936  --with-jtreg            Regression Test Harness [probed]
1937  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1938  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1939  --with-extra-ldflags    extra flags to be used when linking jdk
1940  --with-x                use the X Window System
1941  --with-cups             specify prefix directory for the cups package
1942                          (expecting the headers under PATH/include)
1943  --with-cups-include     specify directory for the cups include files
1944  --with-freetype         specify prefix directory for the freetype package
1945                          (expecting the libraries under PATH/lib and the
1946                          headers under PATH/include)
1947  --with-freetype-include specify directory for the freetype include files
1948  --with-freetype-lib     specify directory for the freetype library
1949  --with-alsa             specify prefix directory for the alsa package
1950                          (expecting the libraries under PATH/lib and the
1951                          headers under PATH/include)
1952  --with-alsa-include     specify directory for the alsa include files
1953  --with-alsa-lib         specify directory for the alsa library
1954  --with-libjpeg          use libjpeg from build system or OpenJDK source
1955                          (system, bundled) [bundled]
1956  --with-giflib           use giflib from build system or OpenJDK source
1957                          (system, bundled) [bundled]
1958  --with-lcms             use lcms2 from build system or OpenJDK source
1959                          (system, bundled) [bundled]
1960  --with-libpng           use libpng from build system or OpenJDK source
1961                          (system, bundled) [bundled]
1962  --with-zlib             use zlib from build system or OpenJDK source
1963                          (system, bundled) [bundled]
1964  --with-stdc++lib=<static>,<dynamic>,<default>
1965                          force linking of the C++ runtime on Linux to either
1966                          static or dynamic, default is static with dynamic as
1967                          fallback
1968  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1969                          only) [probed]
1970  --with-dxsdk            Deprecated. Option is kept for backwards
1971                          compatibility and is ignored
1972  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1973                          compatibility and is ignored
1974  --with-dxsdk-include    Deprecated. Option is kept for backwards
1975                          compatibility and is ignored
1976  --with-num-cores        number of cores in the build system, e.g.
1977                          --with-num-cores=8 [probed]
1978  --with-memory-size      memory (in MB) available in the build system, e.g.
1979                          --with-memory-size=1024 [probed]
1980  --with-jobs             number of parallel jobs to let make run [calculated
1981                          based on cores and memory]
1982  --with-sjavac-server-java
1983                          use this java binary for running the sjavac
1984                          background server [Boot JDK java]
1985  --with-ccache-dir       where to store ccache files [~/.ccache]
1986
1987Some influential environment variables:
1988  BASENAME    Override default value for BASENAME
1989  BASH        Override default value for BASH
1990  CAT         Override default value for CAT
1991  CHMOD       Override default value for CHMOD
1992  CMP         Override default value for CMP
1993  COMM        Override default value for COMM
1994  CP          Override default value for CP
1995  CUT         Override default value for CUT
1996  DATE        Override default value for DATE
1997  DIFF        Override default value for DIFF
1998  DIRNAME     Override default value for DIRNAME
1999  ECHO        Override default value for ECHO
2000  EXPR        Override default value for EXPR
2001  FILE        Override default value for FILE
2002  FIND        Override default value for FIND
2003  HEAD        Override default value for HEAD
2004  LN          Override default value for LN
2005  LS          Override default value for LS
2006  MKDIR       Override default value for MKDIR
2007  MKTEMP      Override default value for MKTEMP
2008  MV          Override default value for MV
2009  NAWK        Override default value for NAWK
2010  PRINTF      Override default value for PRINTF
2011  RM          Override default value for RM
2012  SH          Override default value for SH
2013  SORT        Override default value for SORT
2014  TAIL        Override default value for TAIL
2015  TAR         Override default value for TAR
2016  TEE         Override default value for TEE
2017  TOUCH       Override default value for TOUCH
2018  TR          Override default value for TR
2019  UNAME       Override default value for UNAME
2020  UNIQ        Override default value for UNIQ
2021  WC          Override default value for WC
2022  WHICH       Override default value for WHICH
2023  XARGS       Override default value for XARGS
2024  AWK         Override default value for AWK
2025  GREP        Override default value for GREP
2026  EGREP       Override default value for EGREP
2027  FGREP       Override default value for FGREP
2028  SED         Override default value for SED
2029  CYGPATH     Override default value for CYGPATH
2030  READLINK    Override default value for READLINK
2031  DF          Override default value for DF
2032  SETFILE     Override default value for SETFILE
2033  CPIO        Override default value for CPIO
2034  UNZIP       Override default value for UNZIP
2035  ZIP         Override default value for ZIP
2036  LDD         Override default value for LDD
2037  OTOOL       Override default value for OTOOL
2038  READELF     Override default value for READELF
2039  HG          Override default value for HG
2040  STAT        Override default value for STAT
2041  TIME        Override default value for TIME
2042  DSYMUTIL    Override default value for DSYMUTIL
2043  XATTR       Override default value for XATTR
2044  CODESIGN    Override default value for CODESIGN
2045  PKG_CONFIG  path to pkg-config utility
2046  JAVA        Override default value for JAVA
2047  JAVAC       Override default value for JAVAC
2048  JAVAH       Override default value for JAVAH
2049  JAR         Override default value for JAR
2050  NATIVE2ASCII
2051              Override default value for NATIVE2ASCII
2052  JARSIGNER   Override default value for JARSIGNER
2053  CC          C compiler command
2054  CFLAGS      C compiler flags
2055  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2056              nonstandard directory <lib dir>
2057  LIBS        libraries to pass to the linker, e.g. -l<library>
2058  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2059              you have headers in a nonstandard directory <include dir>
2060  CXX         C++ compiler command
2061  CXXFLAGS    C++ compiler flags
2062  CPP         C preprocessor
2063  CXXCPP      C++ preprocessor
2064  AS          Override default value for AS
2065  AR          Override default value for AR
2066  OBJC        Objective C compiler command
2067  OBJCFLAGS   Objective C compiler flags
2068  LIPO        Override default value for LIPO
2069  STRIP       Override default value for STRIP
2070  NM          Override default value for NM
2071  GNM         Override default value for GNM
2072  MCS         Override default value for MCS
2073  OBJCOPY     Override default value for OBJCOPY
2074  OBJDUMP     Override default value for OBJDUMP
2075  BUILD_CC    Override default value for BUILD_CC
2076  BUILD_CXX   Override default value for BUILD_CXX
2077  BUILD_LD    Override default value for BUILD_LD
2078  JTREGEXE    Override default value for JTREGEXE
2079  XMKMF       Path to xmkmf, Makefile generator for X Window System
2080  FREETYPE_CFLAGS
2081              C compiler flags for FREETYPE, overriding pkg-config
2082  FREETYPE_LIBS
2083              linker flags for FREETYPE, overriding pkg-config
2084  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2085  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2086  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2087  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2088  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2089  PNG_LIBS    linker flags for PNG, overriding pkg-config
2090  LIBFFI_CFLAGS
2091              C compiler flags for LIBFFI, overriding pkg-config
2092  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2093  CCACHE      Override default value for CCACHE
2094
2095Use these variables to override the choices made by `configure' or to help
2096it to find libraries and programs with nonstandard names/locations.
2097
2098Report bugs to <build-dev@openjdk.java.net>.
2099OpenJDK home page: <http://openjdk.java.net>.
2100_ACEOF
2101ac_status=$?
2102fi
2103
2104if test "$ac_init_help" = "recursive"; then
2105  # If there are subdirs, report their specific --help.
2106  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2107    test -d "$ac_dir" ||
2108      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2109      continue
2110    ac_builddir=.
2111
2112case "$ac_dir" in
2113.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2114*)
2115  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2116  # A ".." for each directory in $ac_dir_suffix.
2117  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2118  case $ac_top_builddir_sub in
2119  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2120  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2121  esac ;;
2122esac
2123ac_abs_top_builddir=$ac_pwd
2124ac_abs_builddir=$ac_pwd$ac_dir_suffix
2125# for backward compatibility:
2126ac_top_builddir=$ac_top_build_prefix
2127
2128case $srcdir in
2129  .)  # We are building in place.
2130    ac_srcdir=.
2131    ac_top_srcdir=$ac_top_builddir_sub
2132    ac_abs_top_srcdir=$ac_pwd ;;
2133  [\\/]* | ?:[\\/]* )  # Absolute name.
2134    ac_srcdir=$srcdir$ac_dir_suffix;
2135    ac_top_srcdir=$srcdir
2136    ac_abs_top_srcdir=$srcdir ;;
2137  *) # Relative name.
2138    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2139    ac_top_srcdir=$ac_top_build_prefix$srcdir
2140    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2141esac
2142ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2143
2144    cd "$ac_dir" || { ac_status=$?; continue; }
2145    # Check for guested configure.
2146    if test -f "$ac_srcdir/configure.gnu"; then
2147      echo &&
2148      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2149    elif test -f "$ac_srcdir/configure"; then
2150      echo &&
2151      $SHELL "$ac_srcdir/configure" --help=recursive
2152    else
2153      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2154    fi || ac_status=$?
2155    cd "$ac_pwd" || { ac_status=$?; break; }
2156  done
2157fi
2158
2159test -n "$ac_init_help" && exit $ac_status
2160if $ac_init_version; then
2161  cat <<\_ACEOF
2162OpenJDK configure jdk9
2163generated by GNU Autoconf 2.69
2164
2165Copyright (C) 2012 Free Software Foundation, Inc.
2166This configure script is free software; the Free Software Foundation
2167gives unlimited permission to copy, distribute and modify it.
2168_ACEOF
2169  exit
2170fi
2171
2172## ------------------------ ##
2173## Autoconf initialization. ##
2174## ------------------------ ##
2175
2176# ac_fn_c_try_compile LINENO
2177# --------------------------
2178# Try to compile conftest.$ac_ext, and return whether this succeeded.
2179ac_fn_c_try_compile ()
2180{
2181  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2182  rm -f conftest.$ac_objext
2183  if { { ac_try="$ac_compile"
2184case "(($ac_try" in
2185  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2186  *) ac_try_echo=$ac_try;;
2187esac
2188eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2189$as_echo "$ac_try_echo"; } >&5
2190  (eval "$ac_compile") 2>conftest.err
2191  ac_status=$?
2192  if test -s conftest.err; then
2193    grep -v '^ *+' conftest.err >conftest.er1
2194    cat conftest.er1 >&5
2195    mv -f conftest.er1 conftest.err
2196  fi
2197  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2198  test $ac_status = 0; } && {
2199	 test -z "$ac_c_werror_flag" ||
2200	 test ! -s conftest.err
2201       } && test -s conftest.$ac_objext; then :
2202  ac_retval=0
2203else
2204  $as_echo "$as_me: failed program was:" >&5
2205sed 's/^/| /' conftest.$ac_ext >&5
2206
2207	ac_retval=1
2208fi
2209  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2210  as_fn_set_status $ac_retval
2211
2212} # ac_fn_c_try_compile
2213
2214# ac_fn_cxx_try_compile LINENO
2215# ----------------------------
2216# Try to compile conftest.$ac_ext, and return whether this succeeded.
2217ac_fn_cxx_try_compile ()
2218{
2219  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2220  rm -f conftest.$ac_objext
2221  if { { ac_try="$ac_compile"
2222case "(($ac_try" in
2223  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2224  *) ac_try_echo=$ac_try;;
2225esac
2226eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2227$as_echo "$ac_try_echo"; } >&5
2228  (eval "$ac_compile") 2>conftest.err
2229  ac_status=$?
2230  if test -s conftest.err; then
2231    grep -v '^ *+' conftest.err >conftest.er1
2232    cat conftest.er1 >&5
2233    mv -f conftest.er1 conftest.err
2234  fi
2235  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2236  test $ac_status = 0; } && {
2237	 test -z "$ac_cxx_werror_flag" ||
2238	 test ! -s conftest.err
2239       } && test -s conftest.$ac_objext; then :
2240  ac_retval=0
2241else
2242  $as_echo "$as_me: failed program was:" >&5
2243sed 's/^/| /' conftest.$ac_ext >&5
2244
2245	ac_retval=1
2246fi
2247  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2248  as_fn_set_status $ac_retval
2249
2250} # ac_fn_cxx_try_compile
2251
2252# ac_fn_c_try_cpp LINENO
2253# ----------------------
2254# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2255ac_fn_c_try_cpp ()
2256{
2257  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2258  if { { ac_try="$ac_cpp conftest.$ac_ext"
2259case "(($ac_try" in
2260  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2261  *) ac_try_echo=$ac_try;;
2262esac
2263eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2264$as_echo "$ac_try_echo"; } >&5
2265  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2266  ac_status=$?
2267  if test -s conftest.err; then
2268    grep -v '^ *+' conftest.err >conftest.er1
2269    cat conftest.er1 >&5
2270    mv -f conftest.er1 conftest.err
2271  fi
2272  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2273  test $ac_status = 0; } > conftest.i && {
2274	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2275	 test ! -s conftest.err
2276       }; then :
2277  ac_retval=0
2278else
2279  $as_echo "$as_me: failed program was:" >&5
2280sed 's/^/| /' conftest.$ac_ext >&5
2281
2282    ac_retval=1
2283fi
2284  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2285  as_fn_set_status $ac_retval
2286
2287} # ac_fn_c_try_cpp
2288
2289# ac_fn_cxx_try_cpp LINENO
2290# ------------------------
2291# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2292ac_fn_cxx_try_cpp ()
2293{
2294  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2295  if { { ac_try="$ac_cpp conftest.$ac_ext"
2296case "(($ac_try" in
2297  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2298  *) ac_try_echo=$ac_try;;
2299esac
2300eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2301$as_echo "$ac_try_echo"; } >&5
2302  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2303  ac_status=$?
2304  if test -s conftest.err; then
2305    grep -v '^ *+' conftest.err >conftest.er1
2306    cat conftest.er1 >&5
2307    mv -f conftest.er1 conftest.err
2308  fi
2309  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2310  test $ac_status = 0; } > conftest.i && {
2311	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2312	 test ! -s conftest.err
2313       }; then :
2314  ac_retval=0
2315else
2316  $as_echo "$as_me: failed program was:" >&5
2317sed 's/^/| /' conftest.$ac_ext >&5
2318
2319    ac_retval=1
2320fi
2321  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2322  as_fn_set_status $ac_retval
2323
2324} # ac_fn_cxx_try_cpp
2325
2326# ac_fn_objc_try_compile LINENO
2327# -----------------------------
2328# Try to compile conftest.$ac_ext, and return whether this succeeded.
2329ac_fn_objc_try_compile ()
2330{
2331  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2332  rm -f conftest.$ac_objext
2333  if { { ac_try="$ac_compile"
2334case "(($ac_try" in
2335  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2336  *) ac_try_echo=$ac_try;;
2337esac
2338eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2339$as_echo "$ac_try_echo"; } >&5
2340  (eval "$ac_compile") 2>conftest.err
2341  ac_status=$?
2342  if test -s conftest.err; then
2343    grep -v '^ *+' conftest.err >conftest.er1
2344    cat conftest.er1 >&5
2345    mv -f conftest.er1 conftest.err
2346  fi
2347  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2348  test $ac_status = 0; } && {
2349	 test -z "$ac_objc_werror_flag" ||
2350	 test ! -s conftest.err
2351       } && test -s conftest.$ac_objext; then :
2352  ac_retval=0
2353else
2354  $as_echo "$as_me: failed program was:" >&5
2355sed 's/^/| /' conftest.$ac_ext >&5
2356
2357	ac_retval=1
2358fi
2359  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2360  as_fn_set_status $ac_retval
2361
2362} # ac_fn_objc_try_compile
2363
2364# ac_fn_c_try_link LINENO
2365# -----------------------
2366# Try to link conftest.$ac_ext, and return whether this succeeded.
2367ac_fn_c_try_link ()
2368{
2369  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2370  rm -f conftest.$ac_objext conftest$ac_exeext
2371  if { { ac_try="$ac_link"
2372case "(($ac_try" in
2373  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2374  *) ac_try_echo=$ac_try;;
2375esac
2376eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2377$as_echo "$ac_try_echo"; } >&5
2378  (eval "$ac_link") 2>conftest.err
2379  ac_status=$?
2380  if test -s conftest.err; then
2381    grep -v '^ *+' conftest.err >conftest.er1
2382    cat conftest.er1 >&5
2383    mv -f conftest.er1 conftest.err
2384  fi
2385  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2386  test $ac_status = 0; } && {
2387	 test -z "$ac_c_werror_flag" ||
2388	 test ! -s conftest.err
2389       } && test -s conftest$ac_exeext && {
2390	 test "$cross_compiling" = yes ||
2391	 test -x conftest$ac_exeext
2392       }; then :
2393  ac_retval=0
2394else
2395  $as_echo "$as_me: failed program was:" >&5
2396sed 's/^/| /' conftest.$ac_ext >&5
2397
2398	ac_retval=1
2399fi
2400  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2401  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2402  # interfere with the next link command; also delete a directory that is
2403  # left behind by Apple's compiler.  We do this before executing the actions.
2404  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2405  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2406  as_fn_set_status $ac_retval
2407
2408} # ac_fn_c_try_link
2409
2410# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2411# ---------------------------------------------------------
2412# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2413# the include files in INCLUDES and setting the cache variable VAR
2414# accordingly.
2415ac_fn_cxx_check_header_mongrel ()
2416{
2417  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2418  if eval \${$3+:} false; then :
2419  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2420$as_echo_n "checking for $2... " >&6; }
2421if eval \${$3+:} false; then :
2422  $as_echo_n "(cached) " >&6
2423fi
2424eval ac_res=\$$3
2425	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2426$as_echo "$ac_res" >&6; }
2427else
2428  # Is the header compilable?
2429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2430$as_echo_n "checking $2 usability... " >&6; }
2431cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2432/* end confdefs.h.  */
2433$4
2434#include <$2>
2435_ACEOF
2436if ac_fn_cxx_try_compile "$LINENO"; then :
2437  ac_header_compiler=yes
2438else
2439  ac_header_compiler=no
2440fi
2441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2443$as_echo "$ac_header_compiler" >&6; }
2444
2445# Is the header present?
2446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2447$as_echo_n "checking $2 presence... " >&6; }
2448cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2449/* end confdefs.h.  */
2450#include <$2>
2451_ACEOF
2452if ac_fn_cxx_try_cpp "$LINENO"; then :
2453  ac_header_preproc=yes
2454else
2455  ac_header_preproc=no
2456fi
2457rm -f conftest.err conftest.i conftest.$ac_ext
2458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2459$as_echo "$ac_header_preproc" >&6; }
2460
2461# So?  What about this header?
2462case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2463  yes:no: )
2464    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2465$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2466    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2467$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2468    ;;
2469  no:yes:* )
2470    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2471$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2472    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2473$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2474    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2475$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2476    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2477$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2478    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2479$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2480( $as_echo "## ----------------------------------------- ##
2481## Report this to build-dev@openjdk.java.net ##
2482## ----------------------------------------- ##"
2483     ) | sed "s/^/$as_me: WARNING:     /" >&2
2484    ;;
2485esac
2486  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2487$as_echo_n "checking for $2... " >&6; }
2488if eval \${$3+:} false; then :
2489  $as_echo_n "(cached) " >&6
2490else
2491  eval "$3=\$ac_header_compiler"
2492fi
2493eval ac_res=\$$3
2494	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2495$as_echo "$ac_res" >&6; }
2496fi
2497  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2498
2499} # ac_fn_cxx_check_header_mongrel
2500
2501# ac_fn_cxx_try_run LINENO
2502# ------------------------
2503# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2504# that executables *can* be run.
2505ac_fn_cxx_try_run ()
2506{
2507  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2508  if { { ac_try="$ac_link"
2509case "(($ac_try" in
2510  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2511  *) ac_try_echo=$ac_try;;
2512esac
2513eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2514$as_echo "$ac_try_echo"; } >&5
2515  (eval "$ac_link") 2>&5
2516  ac_status=$?
2517  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2518  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2519  { { case "(($ac_try" in
2520  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2521  *) ac_try_echo=$ac_try;;
2522esac
2523eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2524$as_echo "$ac_try_echo"; } >&5
2525  (eval "$ac_try") 2>&5
2526  ac_status=$?
2527  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2528  test $ac_status = 0; }; }; then :
2529  ac_retval=0
2530else
2531  $as_echo "$as_me: program exited with status $ac_status" >&5
2532       $as_echo "$as_me: failed program was:" >&5
2533sed 's/^/| /' conftest.$ac_ext >&5
2534
2535       ac_retval=$ac_status
2536fi
2537  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2538  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2539  as_fn_set_status $ac_retval
2540
2541} # ac_fn_cxx_try_run
2542
2543# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2544# ---------------------------------------------------------
2545# Tests whether HEADER exists and can be compiled using the include files in
2546# INCLUDES, setting the cache variable VAR accordingly.
2547ac_fn_cxx_check_header_compile ()
2548{
2549  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2550  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2551$as_echo_n "checking for $2... " >&6; }
2552if eval \${$3+:} false; then :
2553  $as_echo_n "(cached) " >&6
2554else
2555  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2556/* end confdefs.h.  */
2557$4
2558#include <$2>
2559_ACEOF
2560if ac_fn_cxx_try_compile "$LINENO"; then :
2561  eval "$3=yes"
2562else
2563  eval "$3=no"
2564fi
2565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2566fi
2567eval ac_res=\$$3
2568	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2569$as_echo "$ac_res" >&6; }
2570  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2571
2572} # ac_fn_cxx_check_header_compile
2573
2574# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2575# ----------------------------------------------
2576# Tries to find the compile-time value of EXPR in a program that includes
2577# INCLUDES, setting VAR accordingly. Returns whether the value could be
2578# computed
2579ac_fn_cxx_compute_int ()
2580{
2581  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2582  if test "$cross_compiling" = yes; then
2583    # Depending upon the size, compute the lo and hi bounds.
2584cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2585/* end confdefs.h.  */
2586$4
2587int
2588main ()
2589{
2590static int test_array [1 - 2 * !(($2) >= 0)];
2591test_array [0] = 0;
2592return test_array [0];
2593
2594  ;
2595  return 0;
2596}
2597_ACEOF
2598if ac_fn_cxx_try_compile "$LINENO"; then :
2599  ac_lo=0 ac_mid=0
2600  while :; do
2601    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2602/* end confdefs.h.  */
2603$4
2604int
2605main ()
2606{
2607static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2608test_array [0] = 0;
2609return test_array [0];
2610
2611  ;
2612  return 0;
2613}
2614_ACEOF
2615if ac_fn_cxx_try_compile "$LINENO"; then :
2616  ac_hi=$ac_mid; break
2617else
2618  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2619			if test $ac_lo -le $ac_mid; then
2620			  ac_lo= ac_hi=
2621			  break
2622			fi
2623			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2624fi
2625rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2626  done
2627else
2628  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2629/* end confdefs.h.  */
2630$4
2631int
2632main ()
2633{
2634static int test_array [1 - 2 * !(($2) < 0)];
2635test_array [0] = 0;
2636return test_array [0];
2637
2638  ;
2639  return 0;
2640}
2641_ACEOF
2642if ac_fn_cxx_try_compile "$LINENO"; then :
2643  ac_hi=-1 ac_mid=-1
2644  while :; do
2645    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2646/* end confdefs.h.  */
2647$4
2648int
2649main ()
2650{
2651static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2652test_array [0] = 0;
2653return test_array [0];
2654
2655  ;
2656  return 0;
2657}
2658_ACEOF
2659if ac_fn_cxx_try_compile "$LINENO"; then :
2660  ac_lo=$ac_mid; break
2661else
2662  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2663			if test $ac_mid -le $ac_hi; then
2664			  ac_lo= ac_hi=
2665			  break
2666			fi
2667			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2668fi
2669rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2670  done
2671else
2672  ac_lo= ac_hi=
2673fi
2674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2675fi
2676rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2677# Binary search between lo and hi bounds.
2678while test "x$ac_lo" != "x$ac_hi"; do
2679  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2680  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2681/* end confdefs.h.  */
2682$4
2683int
2684main ()
2685{
2686static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2687test_array [0] = 0;
2688return test_array [0];
2689
2690  ;
2691  return 0;
2692}
2693_ACEOF
2694if ac_fn_cxx_try_compile "$LINENO"; then :
2695  ac_hi=$ac_mid
2696else
2697  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2698fi
2699rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2700done
2701case $ac_lo in #((
2702?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2703'') ac_retval=1 ;;
2704esac
2705  else
2706    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2707/* end confdefs.h.  */
2708$4
2709static long int longval () { return $2; }
2710static unsigned long int ulongval () { return $2; }
2711#include <stdio.h>
2712#include <stdlib.h>
2713int
2714main ()
2715{
2716
2717  FILE *f = fopen ("conftest.val", "w");
2718  if (! f)
2719    return 1;
2720  if (($2) < 0)
2721    {
2722      long int i = longval ();
2723      if (i != ($2))
2724	return 1;
2725      fprintf (f, "%ld", i);
2726    }
2727  else
2728    {
2729      unsigned long int i = ulongval ();
2730      if (i != ($2))
2731	return 1;
2732      fprintf (f, "%lu", i);
2733    }
2734  /* Do not output a trailing newline, as this causes \r\n confusion
2735     on some platforms.  */
2736  return ferror (f) || fclose (f) != 0;
2737
2738  ;
2739  return 0;
2740}
2741_ACEOF
2742if ac_fn_cxx_try_run "$LINENO"; then :
2743  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2744else
2745  ac_retval=1
2746fi
2747rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2748  conftest.$ac_objext conftest.beam conftest.$ac_ext
2749rm -f conftest.val
2750
2751  fi
2752  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2753  as_fn_set_status $ac_retval
2754
2755} # ac_fn_cxx_compute_int
2756
2757# ac_fn_cxx_try_link LINENO
2758# -------------------------
2759# Try to link conftest.$ac_ext, and return whether this succeeded.
2760ac_fn_cxx_try_link ()
2761{
2762  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2763  rm -f conftest.$ac_objext conftest$ac_exeext
2764  if { { ac_try="$ac_link"
2765case "(($ac_try" in
2766  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2767  *) ac_try_echo=$ac_try;;
2768esac
2769eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2770$as_echo "$ac_try_echo"; } >&5
2771  (eval "$ac_link") 2>conftest.err
2772  ac_status=$?
2773  if test -s conftest.err; then
2774    grep -v '^ *+' conftest.err >conftest.er1
2775    cat conftest.er1 >&5
2776    mv -f conftest.er1 conftest.err
2777  fi
2778  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2779  test $ac_status = 0; } && {
2780	 test -z "$ac_cxx_werror_flag" ||
2781	 test ! -s conftest.err
2782       } && test -s conftest$ac_exeext && {
2783	 test "$cross_compiling" = yes ||
2784	 test -x conftest$ac_exeext
2785       }; then :
2786  ac_retval=0
2787else
2788  $as_echo "$as_me: failed program was:" >&5
2789sed 's/^/| /' conftest.$ac_ext >&5
2790
2791	ac_retval=1
2792fi
2793  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2794  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2795  # interfere with the next link command; also delete a directory that is
2796  # left behind by Apple's compiler.  We do this before executing the actions.
2797  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2798  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2799  as_fn_set_status $ac_retval
2800
2801} # ac_fn_cxx_try_link
2802
2803# ac_fn_cxx_check_func LINENO FUNC VAR
2804# ------------------------------------
2805# Tests whether FUNC exists, setting the cache variable VAR accordingly
2806ac_fn_cxx_check_func ()
2807{
2808  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2809  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2810$as_echo_n "checking for $2... " >&6; }
2811if eval \${$3+:} false; then :
2812  $as_echo_n "(cached) " >&6
2813else
2814  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2815/* end confdefs.h.  */
2816/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2817   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2818#define $2 innocuous_$2
2819
2820/* System header to define __stub macros and hopefully few prototypes,
2821    which can conflict with char $2 (); below.
2822    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2823    <limits.h> exists even on freestanding compilers.  */
2824
2825#ifdef __STDC__
2826# include <limits.h>
2827#else
2828# include <assert.h>
2829#endif
2830
2831#undef $2
2832
2833/* Override any GCC internal prototype to avoid an error.
2834   Use char because int might match the return type of a GCC
2835   builtin and then its argument prototype would still apply.  */
2836#ifdef __cplusplus
2837extern "C"
2838#endif
2839char $2 ();
2840/* The GNU C library defines this for functions which it implements
2841    to always fail with ENOSYS.  Some functions are actually named
2842    something starting with __ and the normal name is an alias.  */
2843#if defined __stub_$2 || defined __stub___$2
2844choke me
2845#endif
2846
2847int
2848main ()
2849{
2850return $2 ();
2851  ;
2852  return 0;
2853}
2854_ACEOF
2855if ac_fn_cxx_try_link "$LINENO"; then :
2856  eval "$3=yes"
2857else
2858  eval "$3=no"
2859fi
2860rm -f core conftest.err conftest.$ac_objext \
2861    conftest$ac_exeext conftest.$ac_ext
2862fi
2863eval ac_res=\$$3
2864	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2865$as_echo "$ac_res" >&6; }
2866  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2867
2868} # ac_fn_cxx_check_func
2869
2870# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2871# -------------------------------------------------------
2872# Tests whether HEADER exists and can be compiled using the include files in
2873# INCLUDES, setting the cache variable VAR accordingly.
2874ac_fn_c_check_header_compile ()
2875{
2876  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2877  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2878$as_echo_n "checking for $2... " >&6; }
2879if eval \${$3+:} false; then :
2880  $as_echo_n "(cached) " >&6
2881else
2882  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2883/* end confdefs.h.  */
2884$4
2885#include <$2>
2886_ACEOF
2887if ac_fn_c_try_compile "$LINENO"; then :
2888  eval "$3=yes"
2889else
2890  eval "$3=no"
2891fi
2892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2893fi
2894eval ac_res=\$$3
2895	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2896$as_echo "$ac_res" >&6; }
2897  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2898
2899} # ac_fn_c_check_header_compile
2900cat >config.log <<_ACEOF
2901This file contains any messages produced by compilers while
2902running configure, to aid debugging if configure makes a mistake.
2903
2904It was created by OpenJDK $as_me jdk9, which was
2905generated by GNU Autoconf 2.69.  Invocation command line was
2906
2907  $ $0 $@
2908
2909_ACEOF
2910exec 5>>config.log
2911{
2912cat <<_ASUNAME
2913## --------- ##
2914## Platform. ##
2915## --------- ##
2916
2917hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2918uname -m = `(uname -m) 2>/dev/null || echo unknown`
2919uname -r = `(uname -r) 2>/dev/null || echo unknown`
2920uname -s = `(uname -s) 2>/dev/null || echo unknown`
2921uname -v = `(uname -v) 2>/dev/null || echo unknown`
2922
2923/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2924/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2925
2926/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2927/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2928/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2929/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2930/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2931/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2932/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2933
2934_ASUNAME
2935
2936as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2937for as_dir in $PATH
2938do
2939  IFS=$as_save_IFS
2940  test -z "$as_dir" && as_dir=.
2941    $as_echo "PATH: $as_dir"
2942  done
2943IFS=$as_save_IFS
2944
2945} >&5
2946
2947cat >&5 <<_ACEOF
2948
2949
2950## ----------- ##
2951## Core tests. ##
2952## ----------- ##
2953
2954_ACEOF
2955
2956
2957# Keep a trace of the command line.
2958# Strip out --no-create and --no-recursion so they do not pile up.
2959# Strip out --silent because we don't want to record it for future runs.
2960# Also quote any args containing shell meta-characters.
2961# Make two passes to allow for proper duplicate-argument suppression.
2962ac_configure_args=
2963ac_configure_args0=
2964ac_configure_args1=
2965ac_must_keep_next=false
2966for ac_pass in 1 2
2967do
2968  for ac_arg
2969  do
2970    case $ac_arg in
2971    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2972    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2973    | -silent | --silent | --silen | --sile | --sil)
2974      continue ;;
2975    *\'*)
2976      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2977    esac
2978    case $ac_pass in
2979    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2980    2)
2981      as_fn_append ac_configure_args1 " '$ac_arg'"
2982      if test $ac_must_keep_next = true; then
2983	ac_must_keep_next=false # Got value, back to normal.
2984      else
2985	case $ac_arg in
2986	  *=* | --config-cache | -C | -disable-* | --disable-* \
2987	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2988	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2989	  | -with-* | --with-* | -without-* | --without-* | --x)
2990	    case "$ac_configure_args0 " in
2991	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2992	    esac
2993	    ;;
2994	  -* ) ac_must_keep_next=true ;;
2995	esac
2996      fi
2997      as_fn_append ac_configure_args " '$ac_arg'"
2998      ;;
2999    esac
3000  done
3001done
3002{ ac_configure_args0=; unset ac_configure_args0;}
3003{ ac_configure_args1=; unset ac_configure_args1;}
3004
3005# When interrupted or exit'd, cleanup temporary files, and complete
3006# config.log.  We remove comments because anyway the quotes in there
3007# would cause problems or look ugly.
3008# WARNING: Use '\'' to represent an apostrophe within the trap.
3009# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3010trap 'exit_status=$?
3011  # Save into config.log some information that might help in debugging.
3012  {
3013    echo
3014
3015    $as_echo "## ---------------- ##
3016## Cache variables. ##
3017## ---------------- ##"
3018    echo
3019    # The following way of writing the cache mishandles newlines in values,
3020(
3021  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3022    eval ac_val=\$$ac_var
3023    case $ac_val in #(
3024    *${as_nl}*)
3025      case $ac_var in #(
3026      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3027$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3028      esac
3029      case $ac_var in #(
3030      _ | IFS | as_nl) ;; #(
3031      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3032      *) { eval $ac_var=; unset $ac_var;} ;;
3033      esac ;;
3034    esac
3035  done
3036  (set) 2>&1 |
3037    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3038    *${as_nl}ac_space=\ *)
3039      sed -n \
3040	"s/'\''/'\''\\\\'\'''\''/g;
3041	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3042      ;; #(
3043    *)
3044      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3045      ;;
3046    esac |
3047    sort
3048)
3049    echo
3050
3051    $as_echo "## ----------------- ##
3052## Output variables. ##
3053## ----------------- ##"
3054    echo
3055    for ac_var in $ac_subst_vars
3056    do
3057      eval ac_val=\$$ac_var
3058      case $ac_val in
3059      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3060      esac
3061      $as_echo "$ac_var='\''$ac_val'\''"
3062    done | sort
3063    echo
3064
3065    if test -n "$ac_subst_files"; then
3066      $as_echo "## ------------------- ##
3067## File substitutions. ##
3068## ------------------- ##"
3069      echo
3070      for ac_var in $ac_subst_files
3071      do
3072	eval ac_val=\$$ac_var
3073	case $ac_val in
3074	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3075	esac
3076	$as_echo "$ac_var='\''$ac_val'\''"
3077      done | sort
3078      echo
3079    fi
3080
3081    if test -s confdefs.h; then
3082      $as_echo "## ----------- ##
3083## confdefs.h. ##
3084## ----------- ##"
3085      echo
3086      cat confdefs.h
3087      echo
3088    fi
3089    test "$ac_signal" != 0 &&
3090      $as_echo "$as_me: caught signal $ac_signal"
3091    $as_echo "$as_me: exit $exit_status"
3092  } >&5
3093  rm -f core *.core core.conftest.* &&
3094    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3095    exit $exit_status
3096' 0
3097for ac_signal in 1 2 13 15; do
3098  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3099done
3100ac_signal=0
3101
3102# confdefs.h avoids OS command line length limits that DEFS can exceed.
3103rm -f -r conftest* confdefs.h
3104
3105$as_echo "/* confdefs.h */" > confdefs.h
3106
3107# Predefined preprocessor variables.
3108
3109cat >>confdefs.h <<_ACEOF
3110#define PACKAGE_NAME "$PACKAGE_NAME"
3111_ACEOF
3112
3113cat >>confdefs.h <<_ACEOF
3114#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3115_ACEOF
3116
3117cat >>confdefs.h <<_ACEOF
3118#define PACKAGE_VERSION "$PACKAGE_VERSION"
3119_ACEOF
3120
3121cat >>confdefs.h <<_ACEOF
3122#define PACKAGE_STRING "$PACKAGE_STRING"
3123_ACEOF
3124
3125cat >>confdefs.h <<_ACEOF
3126#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3127_ACEOF
3128
3129cat >>confdefs.h <<_ACEOF
3130#define PACKAGE_URL "$PACKAGE_URL"
3131_ACEOF
3132
3133
3134# Let the site file select an alternate cache file if it wants to.
3135# Prefer an explicitly selected file to automatically selected ones.
3136ac_site_file1=NONE
3137ac_site_file2=NONE
3138if test -n "$CONFIG_SITE"; then
3139  # We do not want a PATH search for config.site.
3140  case $CONFIG_SITE in #((
3141    -*)  ac_site_file1=./$CONFIG_SITE;;
3142    */*) ac_site_file1=$CONFIG_SITE;;
3143    *)   ac_site_file1=./$CONFIG_SITE;;
3144  esac
3145elif test "x$prefix" != xNONE; then
3146  ac_site_file1=$prefix/share/config.site
3147  ac_site_file2=$prefix/etc/config.site
3148else
3149  ac_site_file1=$ac_default_prefix/share/config.site
3150  ac_site_file2=$ac_default_prefix/etc/config.site
3151fi
3152for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3153do
3154  test "x$ac_site_file" = xNONE && continue
3155  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3156    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3157$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3158    sed 's/^/| /' "$ac_site_file" >&5
3159    . "$ac_site_file" \
3160      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3161$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3162as_fn_error $? "failed to load site script $ac_site_file
3163See \`config.log' for more details" "$LINENO" 5; }
3164  fi
3165done
3166
3167if test -r "$cache_file"; then
3168  # Some versions of bash will fail to source /dev/null (special files
3169  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3170  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3171    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3172$as_echo "$as_me: loading cache $cache_file" >&6;}
3173    case $cache_file in
3174      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3175      *)                      . "./$cache_file";;
3176    esac
3177  fi
3178else
3179  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3180$as_echo "$as_me: creating cache $cache_file" >&6;}
3181  >$cache_file
3182fi
3183
3184# Check that the precious variables saved in the cache have kept the same
3185# value.
3186ac_cache_corrupted=false
3187for ac_var in $ac_precious_vars; do
3188  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3189  eval ac_new_set=\$ac_env_${ac_var}_set
3190  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3191  eval ac_new_val=\$ac_env_${ac_var}_value
3192  case $ac_old_set,$ac_new_set in
3193    set,)
3194      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3195$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3196      ac_cache_corrupted=: ;;
3197    ,set)
3198      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3199$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3200      ac_cache_corrupted=: ;;
3201    ,);;
3202    *)
3203      if test "x$ac_old_val" != "x$ac_new_val"; then
3204	# differences in whitespace do not lead to failure.
3205	ac_old_val_w=`echo x $ac_old_val`
3206	ac_new_val_w=`echo x $ac_new_val`
3207	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3208	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3209$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3210	  ac_cache_corrupted=:
3211	else
3212	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3213$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3214	  eval $ac_var=\$ac_old_val
3215	fi
3216	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3217$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3218	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3219$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3220      fi;;
3221  esac
3222  # Pass precious variables to config.status.
3223  if test "$ac_new_set" = set; then
3224    case $ac_new_val in
3225    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3226    *) ac_arg=$ac_var=$ac_new_val ;;
3227    esac
3228    case " $ac_configure_args " in
3229      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3230      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3231    esac
3232  fi
3233done
3234if $ac_cache_corrupted; then
3235  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3236$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3237  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3238$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3239  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3240fi
3241## -------------------- ##
3242## Main body of script. ##
3243## -------------------- ##
3244
3245ac_ext=c
3246ac_cpp='$CPP $CPPFLAGS'
3247ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3248ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3249ac_compiler_gnu=$ac_cv_c_compiler_gnu
3250
3251
3252
3253ac_aux_dir=
3254for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3255  if test -f "$ac_dir/install-sh"; then
3256    ac_aux_dir=$ac_dir
3257    ac_install_sh="$ac_aux_dir/install-sh -c"
3258    break
3259  elif test -f "$ac_dir/install.sh"; then
3260    ac_aux_dir=$ac_dir
3261    ac_install_sh="$ac_aux_dir/install.sh -c"
3262    break
3263  elif test -f "$ac_dir/shtool"; then
3264    ac_aux_dir=$ac_dir
3265    ac_install_sh="$ac_aux_dir/shtool install -c"
3266    break
3267  fi
3268done
3269if test -z "$ac_aux_dir"; then
3270  as_fn_error $? "cannot find install-sh, install.sh, or shtool in $TOPDIR/common/autoconf/build-aux \"$srcdir\"/$TOPDIR/common/autoconf/build-aux" "$LINENO" 5
3271fi
3272
3273# These three variables are undocumented and unsupported,
3274# and are intended to be withdrawn in a future Autoconf release.
3275# They can cause serious problems if a builder's source tree is in a directory
3276# whose full name contains unusual characters.
3277ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3278ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3279ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3280
3281
3282# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3283
3284#
3285# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3286# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3287#
3288# This code is free software; you can redistribute it and/or modify it
3289# under the terms of the GNU General Public License version 2 only, as
3290# published by the Free Software Foundation.  Oracle designates this
3291# particular file as subject to the "Classpath" exception as provided
3292# by Oracle in the LICENSE file that accompanied this code.
3293#
3294# This code is distributed in the hope that it will be useful, but WITHOUT
3295# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3296# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3297# version 2 for more details (a copy is included in the LICENSE file that
3298# accompanied this code).
3299#
3300# You should have received a copy of the GNU General Public License version
3301# 2 along with this work; if not, write to the Free Software Foundation,
3302# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3303#
3304# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3305# or visit www.oracle.com if you need additional information or have any
3306# questions.
3307#
3308
3309#
3310# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3311#
3312# This program is free software; you can redistribute it and/or modify
3313# it under the terms of the GNU General Public License as published by
3314# the Free Software Foundation; either version 2 of the License, or
3315# (at your option) any later version.
3316#
3317# This program is distributed in the hope that it will be useful, but
3318# WITHOUT ANY WARRANTY; without even the implied warranty of
3319# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3320# General Public License for more details.
3321#
3322# You should have received a copy of the GNU General Public License
3323# along with this program; if not, write to the Free Software
3324# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3325#
3326# As a special exception to the GNU General Public License, if you
3327# distribute this file as part of a program that contains a
3328# configuration script generated by Autoconf, you may include it under
3329# the same distribution terms that you use for the rest of that program.
3330
3331# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3332# ----------------------------------
3333# PKG_PROG_PKG_CONFIG
3334
3335# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3336#
3337# Check to see whether a particular set of modules exists.  Similar
3338# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3339#
3340#
3341# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3342# this or PKG_CHECK_MODULES is called, or make sure to call
3343# PKG_CHECK_EXISTS manually
3344# --------------------------------------------------------------
3345
3346
3347
3348# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3349# ---------------------------------------------
3350# _PKG_CONFIG
3351
3352# _PKG_SHORT_ERRORS_SUPPORTED
3353# -----------------------------
3354# _PKG_SHORT_ERRORS_SUPPORTED
3355
3356
3357# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3358# [ACTION-IF-NOT-FOUND])
3359#
3360#
3361# Note that if there is a possibility the first call to
3362# PKG_CHECK_MODULES might not happen, you should be sure to include an
3363# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3364#
3365#
3366# --------------------------------------------------------------
3367# PKG_CHECK_MODULES
3368
3369
3370# Include these first...
3371#
3372# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3373# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3374#
3375# This code is free software; you can redistribute it and/or modify it
3376# under the terms of the GNU General Public License version 2 only, as
3377# published by the Free Software Foundation.  Oracle designates this
3378# particular file as subject to the "Classpath" exception as provided
3379# by Oracle in the LICENSE file that accompanied this code.
3380#
3381# This code is distributed in the hope that it will be useful, but WITHOUT
3382# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3383# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3384# version 2 for more details (a copy is included in the LICENSE file that
3385# accompanied this code).
3386#
3387# You should have received a copy of the GNU General Public License version
3388# 2 along with this work; if not, write to the Free Software Foundation,
3389# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3390#
3391# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3392# or visit www.oracle.com if you need additional information or have any
3393# questions.
3394#
3395
3396# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3397# If so, then append $1 to $2 \
3398# Also set JVM_ARG_OK to true/false depending on outcome.
3399
3400
3401# Appends a string to a path variable, only adding the : when needed.
3402
3403
3404# Prepends a string to a path variable, only adding the : when needed.
3405
3406
3407# This will make sure the given variable points to a full and proper
3408# path. This means:
3409# 1) There will be no spaces in the path. On posix platforms,
3410#    spaces in the path will result in an error. On Windows,
3411#    the path will be rewritten using short-style to be space-free.
3412# 2) The path will be absolute, and it will be in unix-style (on
3413#     cygwin).
3414# $1: The name of the variable to fix
3415
3416
3417# This will make sure the given variable points to a executable
3418# with a full and proper path. This means:
3419# 1) There will be no spaces in the path. On posix platforms,
3420#    spaces in the path will result in an error. On Windows,
3421#    the path will be rewritten using short-style to be space-free.
3422# 2) The path will be absolute, and it will be in unix-style (on
3423#     cygwin).
3424# Any arguments given to the executable is preserved.
3425# If the input variable does not have a directory specification, then
3426# it need to be in the PATH.
3427# $1: The name of the variable to fix
3428
3429
3430
3431
3432# Register a --with argument but mark it as deprecated
3433# $1: The name of the with argument to deprecate, not including --with-
3434
3435
3436# Register a --enable argument but mark it as deprecated
3437# $1: The name of the with argument to deprecate, not including --enable-
3438# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3439
3440
3441
3442
3443# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3444# $1: variable to check
3445
3446
3447# Check that there are no unprocessed overridden variables left.
3448# If so, they are an incorrect argument and we will exit with an error.
3449
3450
3451# Setup a tool for the given variable. If correctly specified by the user,
3452# use that value, otherwise search for the tool using the supplied code snippet.
3453# $1: variable to set
3454# $2: code snippet to call to look for the tool
3455
3456
3457# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3458# $1: variable to set
3459# $2: executable name (or list of names) to look for
3460
3461
3462# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3463# $1: variable to set
3464# $2: executable name (or list of names) to look for
3465
3466
3467# Like BASIC_PATH_PROGS but fails if no tool was found.
3468# $1: variable to set
3469# $2: executable name (or list of names) to look for
3470
3471
3472# Like BASIC_SETUP_TOOL but fails if no tool was found.
3473# $1: variable to set
3474# $2: autoconf macro to call to look for the special tool
3475
3476
3477# Setup the most fundamental tools that relies on not much else to set up,
3478# but is used by much of the early bootstrap code.
3479
3480
3481# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491#%%% Simple tools %%%
3492
3493# Check if we have found a usable version of make
3494# $1: the path to a potential make binary (or empty)
3495# $2: the description on how we found this
3496
3497
3498
3499
3500# Goes looking for a usable version of GNU make.
3501
3502
3503
3504
3505
3506
3507# Check if build directory is on local disk. If not possible to determine,
3508# we prefer to claim it's local.
3509# Argument 1: directory to test
3510# Argument 2: what to do if it is on local disk
3511# Argument 3: what to do otherwise (remote disk or failure)
3512
3513
3514# Check that source files have basic read permissions set. This might
3515# not be the case in cygwin in certain conditions.
3516
3517
3518
3519
3520#
3521# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3522# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3523#
3524# This code is free software; you can redistribute it and/or modify it
3525# under the terms of the GNU General Public License version 2 only, as
3526# published by the Free Software Foundation.  Oracle designates this
3527# particular file as subject to the "Classpath" exception as provided
3528# by Oracle in the LICENSE file that accompanied this code.
3529#
3530# This code is distributed in the hope that it will be useful, but WITHOUT
3531# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3532# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3533# version 2 for more details (a copy is included in the LICENSE file that
3534# accompanied this code).
3535#
3536# You should have received a copy of the GNU General Public License version
3537# 2 along with this work; if not, write to the Free Software Foundation,
3538# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3539#
3540# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3541# or visit www.oracle.com if you need additional information or have any
3542# questions.
3543#
3544
3545
3546
3547
3548
3549# Helper function which possibly converts a path using DOS-style short mode.
3550# If so, the updated path is stored in $new_path.
3551# $1: The path to check
3552
3553
3554# Helper function which possibly converts a path using DOS-style short mode.
3555# If so, the updated path is stored in $new_path.
3556# $1: The path to check
3557
3558
3559# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3560# and could probably be heavily simplified. However, all changes in this
3561# area tend to need lot of testing in different scenarios, and in lack of
3562# proper unit testing, cleaning this up has not been deemed worth the effort
3563# at the moment.
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3574
3575
3576
3577
3578#
3579# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3580# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3581#
3582# This code is free software; you can redistribute it and/or modify it
3583# under the terms of the GNU General Public License version 2 only, as
3584# published by the Free Software Foundation.  Oracle designates this
3585# particular file as subject to the "Classpath" exception as provided
3586# by Oracle in the LICENSE file that accompanied this code.
3587#
3588# This code is distributed in the hope that it will be useful, but WITHOUT
3589# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3590# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3591# version 2 for more details (a copy is included in the LICENSE file that
3592# accompanied this code).
3593#
3594# You should have received a copy of the GNU General Public License version
3595# 2 along with this work; if not, write to the Free Software Foundation,
3596# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3597#
3598# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3599# or visit www.oracle.com if you need additional information or have any
3600# questions.
3601#
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613# ... then the rest
3614#
3615# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3616# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3617#
3618# This code is free software; you can redistribute it and/or modify it
3619# under the terms of the GNU General Public License version 2 only, as
3620# published by the Free Software Foundation.  Oracle designates this
3621# particular file as subject to the "Classpath" exception as provided
3622# by Oracle in the LICENSE file that accompanied this code.
3623#
3624# This code is distributed in the hope that it will be useful, but WITHOUT
3625# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3626# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3627# version 2 for more details (a copy is included in the LICENSE file that
3628# accompanied this code).
3629#
3630# You should have received a copy of the GNU General Public License version
3631# 2 along with this work; if not, write to the Free Software Foundation,
3632# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3633#
3634# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3635# or visit www.oracle.com if you need additional information or have any
3636# questions.
3637#
3638
3639########################################################################
3640# This file handles detection of the Boot JDK. The Boot JDK detection
3641# process has been developed as a response to solve a complex real-world
3642# problem. Initially, it was simple, but it has grown as platform after
3643# platform, idiosyncracy after idiosyncracy has been supported.
3644#
3645# The basic idea is this:
3646# 1) You need an acceptable *) JDK to use as a Boot JDK
3647# 2) There are several ways to locate a JDK, that are mostly platform
3648#    dependent **)
3649# 3) You can have multiple JDKs installed
3650# 4) If possible, configure should try to dig out an acceptable JDK
3651#    automatically, without having to resort to command-line options
3652#
3653# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3654#     javac) and not a JRE, etc.
3655#
3656# **) On Windows we typically use a well-known path.
3657#     On MacOSX we typically use the tool java_home.
3658#     On Linux we typically find javac in the $PATH, and then follow a
3659#     chain of symlinks that often ends up in a real JDK.
3660#
3661# This leads to the code where we check in different ways to locate a
3662# JDK, and if one is found, check if it is acceptable. If not, we print
3663# our reasons for rejecting it (useful when debugging non-working
3664# configure situations) and continue checking the next one.
3665########################################################################
3666
3667# Execute the check given as argument, and verify the result
3668# If the Boot JDK was previously found, do nothing
3669# $1 A command line (typically autoconf macro) to execute
3670
3671
3672# Test: Is bootjdk explicitely set by command line arguments?
3673
3674
3675# Test: Is bootjdk available from builddeps?
3676
3677
3678# Test: Is $JAVA_HOME set?
3679
3680
3681# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3682
3683
3684# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3685# $1: Argument to the java_home binary (optional)
3686
3687
3688# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3689
3690
3691# Look for a jdk in the given path. If there are multiple, try to select the newest.
3692# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3693# $1 = Path to directory containing jdk installations.
3694# $2 = String to append to the found JDK directory to get the proper JDK home
3695
3696
3697# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3698# environmental variable as base for where to look.
3699# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3700
3701
3702# Test: Is there a JDK installed in default, well-known locations?
3703
3704
3705# Check that a command-line tool in the Boot JDK is correct
3706# $1 = name of variable to assign
3707# $2 = name of binary
3708
3709
3710###############################################################################
3711#
3712# We need a Boot JDK to bootstrap the build.
3713#
3714
3715
3716
3717
3718
3719#
3720# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3721# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3722#
3723# This code is free software; you can redistribute it and/or modify it
3724# under the terms of the GNU General Public License version 2 only, as
3725# published by the Free Software Foundation.  Oracle designates this
3726# particular file as subject to the "Classpath" exception as provided
3727# by Oracle in the LICENSE file that accompanied this code.
3728#
3729# This code is distributed in the hope that it will be useful, but WITHOUT
3730# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3731# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3732# version 2 for more details (a copy is included in the LICENSE file that
3733# accompanied this code).
3734#
3735# You should have received a copy of the GNU General Public License version
3736# 2 along with this work; if not, write to the Free Software Foundation,
3737# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3738#
3739# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3740# or visit www.oracle.com if you need additional information or have any
3741# questions.
3742#
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763#
3764# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3765# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3766#
3767# This code is free software; you can redistribute it and/or modify it
3768# under the terms of the GNU General Public License version 2 only, as
3769# published by the Free Software Foundation.  Oracle designates this
3770# particular file as subject to the "Classpath" exception as provided
3771# by Oracle in the LICENSE file that accompanied this code.
3772#
3773# This code is distributed in the hope that it will be useful, but WITHOUT
3774# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3775# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3776# version 2 for more details (a copy is included in the LICENSE file that
3777# accompanied this code).
3778#
3779# You should have received a copy of the GNU General Public License version
3780# 2 along with this work; if not, write to the Free Software Foundation,
3781# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3782#
3783# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3784# or visit www.oracle.com if you need additional information or have any
3785# questions.
3786#
3787
3788
3789
3790
3791
3792# Documentation on common flags used for solstudio in HIGHEST.
3793#
3794# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3795#          done with care, there are some assumptions below that need to
3796#          be understood about the use of pointers, and IEEE behavior.
3797#
3798# -fns: Use non-standard floating point mode (not IEEE 754)
3799# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3800# -fsingle: Use single precision floating point with 'float'
3801# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3802#   (Source with excessing pointer casting and data access with mixed
3803#    pointer types are not recommended)
3804# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3805#   (If you expect perfect errno behavior, do not use this)
3806# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3807# -xrestrict: Pointer parameters to functions do not overlap
3808#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3809#    If you pass in multiple pointers to the same data, do not use this)
3810# -xlibmil: Inline some library routines
3811#   (If you expect perfect errno behavior, do not use this)
3812# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3813#   (If you expect perfect errno behavior, do not use this)
3814#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3815
3816    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3817    # Bug?
3818    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3819    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3820    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3821    #fi
3822
3823
3824
3825
3826
3827# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3828#                                   [RUN-IF-FALSE])
3829# ------------------------------------------------------------
3830# Check that the c and c++ compilers support an argument
3831
3832
3833# FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3834#                                    [RUN-IF-FALSE])
3835# ------------------------------------------------------------
3836# Check that the linker support an argument
3837
3838
3839
3840
3841#
3842# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3843# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3844#
3845# This code is free software; you can redistribute it and/or modify it
3846# under the terms of the GNU General Public License version 2 only, as
3847# published by the Free Software Foundation.  Oracle designates this
3848# particular file as subject to the "Classpath" exception as provided
3849# by Oracle in the LICENSE file that accompanied this code.
3850#
3851# This code is distributed in the hope that it will be useful, but WITHOUT
3852# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3853# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3854# version 2 for more details (a copy is included in the LICENSE file that
3855# accompanied this code).
3856#
3857# You should have received a copy of the GNU General Public License version
3858# 2 along with this work; if not, write to the Free Software Foundation,
3859# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3860#
3861# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3862# or visit www.oracle.com if you need additional information or have any
3863# questions.
3864#
3865
3866
3867
3868
3869
3870cygwin_help() {
3871  case $1 in
3872    unzip)
3873      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3874      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3875      ;;
3876    zip)
3877      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3878      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3879      ;;
3880    make)
3881      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3882      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3883      ;;
3884    freetype)
3885      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
3886        HELP_MSG="To install freetype, run:
3887wget \"http://gnuwin32.sourceforge.net/downlinks/freetype.php\" -O /tmp/freetype-setup.exe
3888chmod +x /tmp/freetype-setup.exe
3889/tmp/freetype-setup.exe
3890Follow GUI prompts, and install to default directory \"C:\Program Files (x86)\GnuWin32\".
3891After installation, locate lib/libfreetype.dll.a and make a copy with the name freetype.dll."
3892      else
3893        HELP_MSG="You need to build a 64-bit version of freetype.
3894This is not readily available.
3895You can find source code and build instructions on
3896http://www.freetype.org/
3897If you put the resulting build in \"C:\Program Files\GnuWin32\", it will be found automatically."
3898      fi
3899      ;;
3900  esac
3901}
3902
3903msys_help() {
3904  PKGHANDLER_COMMAND=""
3905}
3906
3907apt_help() {
3908  case $1 in
3909    devkit)
3910      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3911    openjdk)
3912      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3913    alsa)
3914      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3915    cups)
3916      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3917    freetype)
3918      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3919    pulse)
3920      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3921    x11)
3922      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3923    ccache)
3924      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3925  esac
3926}
3927
3928yum_help() {
3929  case $1 in
3930    devkit)
3931      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3932    openjdk)
3933      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3934    alsa)
3935      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3936    cups)
3937      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3938    freetype)
3939      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3940    pulse)
3941      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3942    x11)
3943      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
3944    ccache)
3945      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3946  esac
3947}
3948
3949port_help() {
3950  PKGHANDLER_COMMAND=""
3951}
3952
3953pkgutil_help() {
3954  PKGHANDLER_COMMAND=""
3955}
3956
3957pkgadd_help() {
3958  PKGHANDLER_COMMAND=""
3959}
3960
3961# This function will check if we're called from the "configure" wrapper while
3962# printing --help. If so, we will print out additional information that can
3963# only be extracted within the autoconf script, and then exit. This must be
3964# called at the very beginning in configure.ac.
3965
3966
3967
3968
3969#
3970# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3971# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3972#
3973# This code is free software; you can redistribute it and/or modify it
3974# under the terms of the GNU General Public License version 2 only, as
3975# published by the Free Software Foundation.  Oracle designates this
3976# particular file as subject to the "Classpath" exception as provided
3977# by Oracle in the LICENSE file that accompanied this code.
3978#
3979# This code is distributed in the hope that it will be useful, but WITHOUT
3980# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3981# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3982# version 2 for more details (a copy is included in the LICENSE file that
3983# accompanied this code).
3984#
3985# You should have received a copy of the GNU General Public License version
3986# 2 along with this work; if not, write to the Free Software Foundation,
3987# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3988#
3989# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3990# or visit www.oracle.com if you need additional information or have any
3991# questions.
3992#
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003###############################################################################
4004#
4005# Should we build only OpenJDK even if closed sources are present?
4006#
4007
4008
4009
4010
4011###############################################################################
4012#
4013# Setup version numbers
4014#
4015
4016
4017
4018
4019
4020
4021#
4022# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4023# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4024#
4025# This code is free software; you can redistribute it and/or modify it
4026# under the terms of the GNU General Public License version 2 only, as
4027# published by the Free Software Foundation.  Oracle designates this
4028# particular file as subject to the "Classpath" exception as provided
4029# by Oracle in the LICENSE file that accompanied this code.
4030#
4031# This code is distributed in the hope that it will be useful, but WITHOUT
4032# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4033# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4034# version 2 for more details (a copy is included in the LICENSE file that
4035# accompanied this code).
4036#
4037# You should have received a copy of the GNU General Public License version
4038# 2 along with this work; if not, write to the Free Software Foundation,
4039# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4040#
4041# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4042# or visit www.oracle.com if you need additional information or have any
4043# questions.
4044#
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064#
4065# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4066# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4067#
4068# This code is free software; you can redistribute it and/or modify it
4069# under the terms of the GNU General Public License version 2 only, as
4070# published by the Free Software Foundation.  Oracle designates this
4071# particular file as subject to the "Classpath" exception as provided
4072# by Oracle in the LICENSE file that accompanied this code.
4073#
4074# This code is distributed in the hope that it will be useful, but WITHOUT
4075# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4076# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4077# version 2 for more details (a copy is included in the LICENSE file that
4078# accompanied this code).
4079#
4080# You should have received a copy of the GNU General Public License version
4081# 2 along with this work; if not, write to the Free Software Foundation,
4082# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4083#
4084# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4085# or visit www.oracle.com if you need additional information or have any
4086# questions.
4087#
4088
4089# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4090# Converts autoconf style CPU name to OpenJDK style, into
4091# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4092
4093
4094# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4095# Converts autoconf style OS name to OpenJDK style, into
4096# VAR_OS and VAR_OS_API.
4097
4098
4099# Expects $host_os $host_cpu $build_os and $build_cpu
4100# and $with_target_bits to have been setup!
4101#
4102# Translate the standard triplet(quadruplet) definition
4103# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4104# OPENJDK_BUILD_OS, etc.
4105
4106
4107# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4108# accordingly. Must be done after setting up build and target system, but before
4109# doing anything else with these values.
4110
4111
4112# Setup the legacy variables, for controlling the old makefiles.
4113#
4114
4115
4116
4117
4118#%%% Build and target systems %%%
4119
4120
4121
4122
4123# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4124# Add -mX to various FLAGS variables.
4125
4126
4127
4128
4129
4130
4131#
4132# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4133# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4134#
4135# This code is free software; you can redistribute it and/or modify it
4136# under the terms of the GNU General Public License version 2 only, as
4137# published by the Free Software Foundation.  Oracle designates this
4138# particular file as subject to the "Classpath" exception as provided
4139# by Oracle in the LICENSE file that accompanied this code.
4140#
4141# This code is distributed in the hope that it will be useful, but WITHOUT
4142# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4143# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4144# version 2 for more details (a copy is included in the LICENSE file that
4145# accompanied this code).
4146#
4147# You should have received a copy of the GNU General Public License version
4148# 2 along with this work; if not, write to the Free Software Foundation,
4149# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4150#
4151# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4152# or visit www.oracle.com if you need additional information or have any
4153# questions.
4154#
4155
4156
4157
4158
4159
4160
4161
4162
4163#
4164# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4165# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4166#
4167# This code is free software; you can redistribute it and/or modify it
4168# under the terms of the GNU General Public License version 2 only, as
4169# published by the Free Software Foundation.  Oracle designates this
4170# particular file as subject to the "Classpath" exception as provided
4171# by Oracle in the LICENSE file that accompanied this code.
4172#
4173# This code is distributed in the hope that it will be useful, but WITHOUT
4174# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4175# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4176# version 2 for more details (a copy is included in the LICENSE file that
4177# accompanied this code).
4178#
4179# You should have received a copy of the GNU General Public License version
4180# 2 along with this work; if not, write to the Free Software Foundation,
4181# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4182#
4183# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4184# or visit www.oracle.com if you need additional information or have any
4185# questions.
4186#
4187
4188########################################################################
4189# This file is responsible for detecting, verifying and setting up the
4190# toolchain, i.e. the compiler, linker and related utilities. It will setup
4191# proper paths to the binaries, but it will not setup any flags.
4192#
4193# The binaries used is determined by the toolchain type, which is the family of
4194# compilers and related tools that are used.
4195########################################################################
4196
4197
4198# All valid toolchains, regardless of platform (used by help.m4)
4199VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4200
4201# These toolchains are valid on different platforms
4202VALID_TOOLCHAINS_linux="gcc clang"
4203VALID_TOOLCHAINS_solaris="solstudio"
4204VALID_TOOLCHAINS_macosx="gcc clang"
4205VALID_TOOLCHAINS_aix="xlc"
4206VALID_TOOLCHAINS_windows="microsoft"
4207
4208# Toolchain descriptions
4209TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4210TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4211TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4212TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4213TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4214
4215# Setup a number of variables describing how native output files are
4216# named on this platform/toolchain.
4217
4218
4219# Determine which toolchain type to use, and make sure it is valid for this
4220# platform. Setup various information about the selected toolchain.
4221
4222
4223# Before we start detecting the toolchain executables, we might need some
4224# special setup, e.g. additional paths etc.
4225
4226
4227# Restore path, etc
4228
4229
4230# Check if a compiler is of the toolchain type we expect, and save the version
4231# information from it. If the compiler does not match the expected type,
4232# this function will abort using AC_MSG_ERROR. If it matches, the version will
4233# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4234# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4235#
4236# $1 = compiler to test (CC or CXX)
4237# $2 = human readable name of compiler (C or C++)
4238
4239
4240# Try to locate the given C or C++ compiler in the path, or otherwise.
4241#
4242# $1 = compiler to test (CC or CXX)
4243# $2 = human readable name of compiler (C or C++)
4244# $3 = list of compiler names to search for
4245
4246
4247# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4248# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4249# archiver (AR). Verify that the compilers are correct according to the
4250# toolchain type.
4251
4252
4253# Setup additional tools that is considered a part of the toolchain, but not the
4254# core part. Many of these are highly platform-specific and do not exist,
4255# and/or are not needed on all platforms.
4256
4257
4258# Setup the build tools (i.e, the compiler and linker used to build programs
4259# that should be run on the build platform, not the target platform, as a build
4260# helper). Since the non-cross-compile case uses the normal, target compilers
4261# for this, we can only do this after these have been setup.
4262
4263
4264# Setup legacy variables that are still needed as alternative ways to refer to
4265# parts of the toolchain.
4266
4267
4268# Do some additional checks on the detected tools.
4269
4270
4271# Setup the JTReg Regression Test Harness.
4272
4273
4274#
4275# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4276# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4277#
4278# This code is free software; you can redistribute it and/or modify it
4279# under the terms of the GNU General Public License version 2 only, as
4280# published by the Free Software Foundation.  Oracle designates this
4281# particular file as subject to the "Classpath" exception as provided
4282# by Oracle in the LICENSE file that accompanied this code.
4283#
4284# This code is distributed in the hope that it will be useful, but WITHOUT
4285# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4286# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4287# version 2 for more details (a copy is included in the LICENSE file that
4288# accompanied this code).
4289#
4290# You should have received a copy of the GNU General Public License version
4291# 2 along with this work; if not, write to the Free Software Foundation,
4292# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4293#
4294# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4295# or visit www.oracle.com if you need additional information or have any
4296# questions.
4297#
4298
4299
4300
4301
4302
4303
4304
4305# Check if the VS env variables were setup prior to running configure.
4306# If not, then find vcvarsall.bat and run it automatically, and integrate
4307# the set env variables into the spec file.
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318# This line needs to be here, verbatim, after all includes and the dummy hook
4319# definitions. It is replaced with custom functionality when building
4320# custom sources.
4321#CUSTOM_AUTOCONF_INCLUDE
4322
4323# Do not change or remove the following line, it is needed for consistency checks:
4324DATE_WHEN_GENERATED=1409306485
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  # Specify jvm options for anything that is run with the Boot JDK.
26326  # Not all JVM:s accept the same arguments on the command line.
26327  #
26328
26329# Check whether --with-boot-jdk-jvmargs was given.
26330if test "${with_boot_jdk_jvmargs+set}" = set; then :
26331  withval=$with_boot_jdk_jvmargs;
26332fi
26333
26334
26335  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
26336$as_echo_n "checking flags for boot jdk java command ... " >&6; }
26337
26338  # Disable special log output when a debug build is used as Boot JDK...
26339
26340  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
26341  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
26342  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
26343  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26344  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26345  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26346    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
26347    JVM_ARG_OK=true
26348  else
26349    $ECHO "Arg failed:" >&5
26350    $ECHO "$OUTPUT" >&5
26351    JVM_ARG_OK=false
26352  fi
26353
26354
26355  # Apply user provided options.
26356
26357  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
26358  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
26359  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
26360  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26361  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26362  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26363    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
26364    JVM_ARG_OK=true
26365  else
26366    $ECHO "Arg failed:" >&5
26367    $ECHO "$OUTPUT" >&5
26368    JVM_ARG_OK=false
26369  fi
26370
26371
26372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
26373$as_echo "$boot_jdk_jvmargs" >&6; }
26374
26375  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
26376  JAVA_FLAGS=$boot_jdk_jvmargs
26377
26378
26379
26380  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
26381$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
26382
26383  # Starting amount of heap memory.
26384
26385  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
26386  $ECHO "Command: $JAVA -Xms64M -version" >&5
26387  OUTPUT=`$JAVA -Xms64M -version 2>&1`
26388  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26389  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26390  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26391    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
26392    JVM_ARG_OK=true
26393  else
26394    $ECHO "Arg failed:" >&5
26395    $ECHO "$OUTPUT" >&5
26396    JVM_ARG_OK=false
26397  fi
26398
26399
26400  # Maximum amount of heap memory.
26401  # Maximum stack size.
26402  if test "x$BUILD_NUM_BITS" = x32; then
26403    JVM_MAX_HEAP=1100M
26404    STACK_SIZE=768
26405  else
26406    # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
26407    # pointers are used. Apparently, we need to increase the heap and stack
26408    # space for the jvm. More specifically, when running javac to build huge
26409    # jdk batch
26410    JVM_MAX_HEAP=1600M
26411    STACK_SIZE=1536
26412  fi
26413
26414  $ECHO "Check if jvm arg is ok: -Xmx$JVM_MAX_HEAP" >&5
26415  $ECHO "Command: $JAVA -Xmx$JVM_MAX_HEAP -version" >&5
26416  OUTPUT=`$JAVA -Xmx$JVM_MAX_HEAP -version 2>&1`
26417  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26418  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26419  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26420    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx$JVM_MAX_HEAP"
26421    JVM_ARG_OK=true
26422  else
26423    $ECHO "Arg failed:" >&5
26424    $ECHO "$OUTPUT" >&5
26425    JVM_ARG_OK=false
26426  fi
26427
26428
26429  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
26430  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
26431  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
26432  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26433  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26434  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26435    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
26436    JVM_ARG_OK=true
26437  else
26438    $ECHO "Arg failed:" >&5
26439    $ECHO "$OUTPUT" >&5
26440    JVM_ARG_OK=false
26441  fi
26442
26443
26444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
26445$as_echo "$boot_jdk_jvmargs_big" >&6; }
26446
26447  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
26448
26449
26450
26451  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
26452$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
26453
26454  # Use serial gc for small short lived tools if possible
26455
26456  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
26457  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
26458  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
26459  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26460  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26461  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26462    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
26463    JVM_ARG_OK=true
26464  else
26465    $ECHO "Arg failed:" >&5
26466    $ECHO "$OUTPUT" >&5
26467    JVM_ARG_OK=false
26468  fi
26469
26470
26471  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
26472  $ECHO "Command: $JAVA -Xms32M -version" >&5
26473  OUTPUT=`$JAVA -Xms32M -version 2>&1`
26474  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26475  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26476  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26477    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
26478    JVM_ARG_OK=true
26479  else
26480    $ECHO "Arg failed:" >&5
26481    $ECHO "$OUTPUT" >&5
26482    JVM_ARG_OK=false
26483  fi
26484
26485
26486  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
26487  $ECHO "Command: $JAVA -Xmx512M -version" >&5
26488  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
26489  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26490  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26491  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26492    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
26493    JVM_ARG_OK=true
26494  else
26495    $ECHO "Arg failed:" >&5
26496    $ECHO "$OUTPUT" >&5
26497    JVM_ARG_OK=false
26498  fi
26499
26500
26501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
26502$as_echo "$boot_jdk_jvmargs_small" >&6; }
26503
26504  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
26505
26506
26507  JAVA_TOOL_FLAGS_SMALL=""
26508  for f in $JAVA_FLAGS_SMALL; do
26509    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
26510  done
26511
26512
26513
26514###############################################################################
26515#
26516# Configure the sources to use. We can add or override individual directories.
26517#
26518###############################################################################
26519
26520
26521  # Where are the sources. Any of these can be overridden
26522  # using --with-override-corba and the likes.
26523  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
26524  CORBA_TOPDIR="$SRC_ROOT/corba"
26525  JAXP_TOPDIR="$SRC_ROOT/jaxp"
26526  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
26527  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
26528  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
26529  JDK_TOPDIR="$SRC_ROOT/jdk"
26530
26531
26532
26533
26534
26535
26536
26537
26538
26539
26540  ###############################################################################
26541  #
26542  # Pickup additional source for a component from outside of the source root
26543  # or override source for a component.
26544  #
26545
26546# Check whether --with-add-source-root was given.
26547if test "${with_add_source_root+set}" = set; then :
26548  withval=$with_add_source_root;
26549fi
26550
26551
26552
26553# Check whether --with-override-source-root was given.
26554if test "${with_override_source_root+set}" = set; then :
26555  withval=$with_override_source_root;
26556fi
26557
26558
26559
26560# Check whether --with-adds-and-overrides was given.
26561if test "${with_adds_and_overrides+set}" = set; then :
26562  withval=$with_adds_and_overrides;
26563fi
26564
26565
26566  if test "x$with_adds_and_overrides" != x; then
26567    with_add_source_root="$with_adds_and_overrides/adds"
26568    with_override_source_root="$with_adds_and_overrides/overrides"
26569  fi
26570
26571  if test "x$with_add_source_root" != x; then
26572    if ! test -d $with_add_source_root; then
26573      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
26574    fi
26575    CURDIR="$PWD"
26576    cd "$with_add_source_root"
26577    ADD_SRC_ROOT="`pwd`"
26578    cd "$CURDIR"
26579    # Verify that the addon source root does not have any root makefiles.
26580    # If it does, then it is usually an error, prevent this.
26581    if test -f $with_add_source_root/langtools/make/Makefile; then
26582      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
26583    fi
26584    if test -f $with_add_source_root/corba/make/Makefile; then
26585      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
26586    fi
26587    if test -f $with_add_source_root/jaxp/make/Makefile; then
26588      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
26589    fi
26590    if test -f $with_add_source_root/jaxws/make/Makefile; then
26591      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
26592    fi
26593    if test -f $with_add_source_root/hotspot/make/Makefile; then
26594      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
26595    fi
26596    if test -f $with_add_source_root/nashorn/make/Makefile; then
26597      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
26598    fi
26599    if test -f $with_add_source_root/jdk/make/Makefile; then
26600      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
26601    fi
26602  fi
26603
26604
26605  if test "x$with_override_source_root" != x; then
26606    if ! test -d $with_override_source_root; then
26607      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
26608    fi
26609    CURDIR="$PWD"
26610    cd "$with_override_source_root"
26611    OVERRIDE_SRC_ROOT="`pwd`"
26612    cd "$CURDIR"
26613    if test -f $with_override_source_root/langtools/make/Makefile; then
26614      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
26615    fi
26616    if test -f $with_override_source_root/corba/make/Makefile; then
26617      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
26618    fi
26619    if test -f $with_override_source_root/jaxp/make/Makefile; then
26620      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
26621    fi
26622    if test -f $with_override_source_root/jaxws/make/Makefile; then
26623      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
26624    fi
26625    if test -f $with_override_source_root/hotspot/make/Makefile; then
26626      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
26627    fi
26628    if test -f $with_override_source_root/nashorn/make/Makefile; then
26629      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
26630    fi
26631    if test -f $with_override_source_root/jdk/make/Makefile; then
26632      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
26633    fi
26634  fi
26635
26636
26637  ###############################################################################
26638  #
26639  # Override a repo completely, this is used for example when you have 3 small
26640  # development sandboxes of the langtools sources and want to avoid having 3 full
26641  # OpenJDK sources checked out on disk.
26642  #
26643  # Assuming that the 3 langtools sandboxes are located here:
26644  # /home/fredrik/sandbox1/langtools
26645  # /home/fredrik/sandbox2/langtools
26646  # /home/fredrik/sandbox3/langtools
26647  #
26648  # From the source root you create build subdirs manually:
26649  #     mkdir -p build1 build2 build3
26650  # in each build directory run:
26651  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
26652  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
26653  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
26654  #
26655
26656
26657# Check whether --with-override-langtools was given.
26658if test "${with_override_langtools+set}" = set; then :
26659  withval=$with_override_langtools;
26660fi
26661
26662
26663
26664# Check whether --with-override-corba was given.
26665if test "${with_override_corba+set}" = set; then :
26666  withval=$with_override_corba;
26667fi
26668
26669
26670
26671# Check whether --with-override-jaxp was given.
26672if test "${with_override_jaxp+set}" = set; then :
26673  withval=$with_override_jaxp;
26674fi
26675
26676
26677
26678# Check whether --with-override-jaxws was given.
26679if test "${with_override_jaxws+set}" = set; then :
26680  withval=$with_override_jaxws;
26681fi
26682
26683
26684
26685# Check whether --with-override-hotspot was given.
26686if test "${with_override_hotspot+set}" = set; then :
26687  withval=$with_override_hotspot;
26688fi
26689
26690
26691
26692# Check whether --with-override-nashorn was given.
26693if test "${with_override_nashorn+set}" = set; then :
26694  withval=$with_override_nashorn;
26695fi
26696
26697
26698
26699# Check whether --with-override-jdk was given.
26700if test "${with_override_jdk+set}" = set; then :
26701  withval=$with_override_jdk;
26702fi
26703
26704
26705  if test "x$with_override_langtools" != x; then
26706    CURDIR="$PWD"
26707    cd "$with_override_langtools"
26708    LANGTOOLS_TOPDIR="`pwd`"
26709    cd "$CURDIR"
26710    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
26711      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
26712    fi
26713    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
26714$as_echo_n "checking if langtools should be overridden... " >&6; }
26715    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
26716$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
26717  fi
26718  if test "x$with_override_corba" != x; then
26719    CURDIR="$PWD"
26720    cd "$with_override_corba"
26721    CORBA_TOPDIR="`pwd`"
26722    cd "$CURDIR"
26723    if ! test -f $CORBA_TOPDIR/make/Makefile; then
26724      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26725    fi
26726    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26727$as_echo_n "checking if corba should be overridden... " >&6; }
26728    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26729$as_echo "yes with $CORBA_TOPDIR" >&6; }
26730  fi
26731  if test "x$with_override_jaxp" != x; then
26732    CURDIR="$PWD"
26733    cd "$with_override_jaxp"
26734    JAXP_TOPDIR="`pwd`"
26735    cd "$CURDIR"
26736    if ! test -f $JAXP_TOPDIR/make/Makefile; then
26737      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26738    fi
26739    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26740$as_echo_n "checking if jaxp should be overridden... " >&6; }
26741    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26742$as_echo "yes with $JAXP_TOPDIR" >&6; }
26743  fi
26744  if test "x$with_override_jaxws" != x; then
26745    CURDIR="$PWD"
26746    cd "$with_override_jaxws"
26747    JAXWS_TOPDIR="`pwd`"
26748    cd "$CURDIR"
26749    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26750      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26751    fi
26752    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26753$as_echo_n "checking if jaxws should be overridden... " >&6; }
26754    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26755$as_echo "yes with $JAXWS_TOPDIR" >&6; }
26756  fi
26757  if test "x$with_override_hotspot" != x; then
26758    CURDIR="$PWD"
26759    cd "$with_override_hotspot"
26760    HOTSPOT_TOPDIR="`pwd`"
26761    cd "$CURDIR"
26762    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26763      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26764    fi
26765    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26766$as_echo_n "checking if hotspot should be overridden... " >&6; }
26767    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26768$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26769  fi
26770  if test "x$with_override_nashorn" != x; then
26771    CURDIR="$PWD"
26772    cd "$with_override_nashorn"
26773    NASHORN_TOPDIR="`pwd`"
26774    cd "$CURDIR"
26775    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26776      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26777    fi
26778    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26779$as_echo_n "checking if nashorn should be overridden... " >&6; }
26780    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26781$as_echo "yes with $NASHORN_TOPDIR" >&6; }
26782  fi
26783  if test "x$with_override_jdk" != x; then
26784    CURDIR="$PWD"
26785    cd "$with_override_jdk"
26786    JDK_TOPDIR="`pwd`"
26787    cd "$CURDIR"
26788    if ! test -f $JDK_TOPDIR/make/Makefile; then
26789      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26790    fi
26791    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26792$as_echo_n "checking if JDK should be overridden... " >&6; }
26793    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26794$as_echo "yes with $JDK_TOPDIR" >&6; }
26795  fi
26796
26797
26798  BUILD_OUTPUT="$OUTPUT_ROOT"
26799
26800
26801  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26802  BUILD_HOTSPOT=true
26803
26804
26805
26806# Check whether --with-import-hotspot was given.
26807if test "${with_import_hotspot+set}" = set; then :
26808  withval=$with_import_hotspot;
26809fi
26810
26811  if test "x$with_import_hotspot" != x; then
26812    CURDIR="$PWD"
26813    cd "$with_import_hotspot"
26814    HOTSPOT_DIST="`pwd`"
26815    cd "$CURDIR"
26816    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26817      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26818    fi
26819    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26820$as_echo_n "checking if hotspot should be imported... " >&6; }
26821    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26822$as_echo "yes from $HOTSPOT_DIST" >&6; }
26823    BUILD_HOTSPOT=false
26824  fi
26825
26826  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26827
26828
26829###############################################################################
26830#
26831# Setup the toolchain (compilers etc), i.e. tools used to compile and process
26832# native code.
26833#
26834###############################################################################
26835
26836# First determine the toolchain type (compiler family)
26837
26838
26839# Check whether --with-toolchain-type was given.
26840if test "${with_toolchain_type+set}" = set; then :
26841  withval=$with_toolchain_type;
26842fi
26843
26844
26845  # Use indirect variable referencing
26846  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
26847  VALID_TOOLCHAINS=${!toolchain_var_name}
26848
26849  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26850    if test -n "$XCODEBUILD"; then
26851      # On Mac OS X, default toolchain to clang after Xcode 5
26852      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
26853      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
26854      if test $? -ne 0; then
26855        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
26856      fi
26857      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
26858          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
26859          $CUT -f 1 -d .`
26860      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
26861$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
26862      if test $XCODE_MAJOR_VERSION -ge 5; then
26863          DEFAULT_TOOLCHAIN="clang"
26864      else
26865          DEFAULT_TOOLCHAIN="gcc"
26866      fi
26867    else
26868      # If Xcode is not installed, but the command line tools are
26869      # then we can't run xcodebuild. On these systems we should
26870      # default to clang
26871      DEFAULT_TOOLCHAIN="clang"
26872    fi
26873  else
26874    # First toolchain type in the list is the default
26875    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
26876  fi
26877
26878  if test "x$with_toolchain_type" = xlist; then
26879    # List all toolchains
26880    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
26881$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
26882    for toolchain in $VALID_TOOLCHAINS; do
26883      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
26884      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26885      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
26886    done
26887
26888    exit 0
26889  elif test "x$with_toolchain_type" != x; then
26890    # User override; check that it is valid
26891    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
26892      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
26893$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
26894      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
26895$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
26896      as_fn_error $? "Cannot continue." "$LINENO" 5
26897    fi
26898    TOOLCHAIN_TYPE=$with_toolchain_type
26899  else
26900    # No flag given, use default
26901    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
26902  fi
26903
26904
26905  TOOLCHAIN_CC_BINARY_clang="clang"
26906  TOOLCHAIN_CC_BINARY_gcc="gcc"
26907  TOOLCHAIN_CC_BINARY_microsoft="cl"
26908  TOOLCHAIN_CC_BINARY_solstudio="cc"
26909  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
26910
26911  TOOLCHAIN_CXX_BINARY_clang="clang++"
26912  TOOLCHAIN_CXX_BINARY_gcc="g++"
26913  TOOLCHAIN_CXX_BINARY_microsoft="cl"
26914  TOOLCHAIN_CXX_BINARY_solstudio="CC"
26915  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
26916
26917  # Use indirect variable referencing
26918  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
26919  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26920  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
26921  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
26922  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
26923  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
26924
26925
26926  # Define filename patterns
26927  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26928    LIBRARY_PREFIX=
26929    SHARED_LIBRARY_SUFFIX='.dll'
26930    STATIC_LIBRARY_SUFFIX='.lib'
26931    SHARED_LIBRARY='$1.dll'
26932    STATIC_LIBRARY='$1.lib'
26933    OBJ_SUFFIX='.obj'
26934    EXE_SUFFIX='.exe'
26935  else
26936    LIBRARY_PREFIX=lib
26937    SHARED_LIBRARY_SUFFIX='.so'
26938    STATIC_LIBRARY_SUFFIX='.a'
26939    SHARED_LIBRARY='lib$1.so'
26940    STATIC_LIBRARY='lib$1.a'
26941    OBJ_SUFFIX='.o'
26942    EXE_SUFFIX=''
26943    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26944      SHARED_LIBRARY='lib$1.dylib'
26945      SHARED_LIBRARY_SUFFIX='.dylib'
26946    fi
26947  fi
26948
26949
26950
26951
26952
26953
26954
26955
26956
26957
26958  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
26959    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
26960$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
26961  else
26962    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
26963$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
26964  fi
26965
26966
26967# Then detect the actual binaries needed
26968
26969  # FIXME: Is this needed?
26970  ac_ext=cpp
26971ac_cpp='$CXXCPP $CPPFLAGS'
26972ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26973ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26974ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26975
26976
26977  # Store the CFLAGS etc passed to the configure script.
26978  ORG_CFLAGS="$CFLAGS"
26979  ORG_CXXFLAGS="$CXXFLAGS"
26980  ORG_OBJCFLAGS="$OBJCFLAGS"
26981
26982  # On Windows, we need to detect the visual studio installation first.
26983  # This will change the PATH, but we need to keep that new PATH even
26984  # after toolchain detection is done, since the compiler (on x86) uses
26985  # it for DLL resolution in runtime.
26986  if test "x$OPENJDK_BUILD_OS" = "xwindows" && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
26987
26988  # Store path to cygwin link.exe to help excluding it when searching for
26989  # VS linker. This must be done before changing the PATH when looking for VS.
26990  # Extract the first word of "link", so it can be a program name with args.
26991set dummy link; ac_word=$2
26992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26993$as_echo_n "checking for $ac_word... " >&6; }
26994if ${ac_cv_path_CYGWIN_LINK+:} false; then :
26995  $as_echo_n "(cached) " >&6
26996else
26997  case $CYGWIN_LINK in
26998  [\\/]* | ?:[\\/]*)
26999  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
27000  ;;
27001  *)
27002  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27003for as_dir in $PATH
27004do
27005  IFS=$as_save_IFS
27006  test -z "$as_dir" && as_dir=.
27007    for ac_exec_ext in '' $ac_executable_extensions; do
27008  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27009    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
27010    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27011    break 2
27012  fi
27013done
27014  done
27015IFS=$as_save_IFS
27016
27017  ;;
27018esac
27019fi
27020CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
27021if test -n "$CYGWIN_LINK"; then
27022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
27023$as_echo "$CYGWIN_LINK" >&6; }
27024else
27025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27026$as_echo "no" >&6; }
27027fi
27028
27029
27030  if test "x$CYGWIN_LINK" != x; then
27031    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
27032$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
27033    "$CYGWIN_LINK" --version > /dev/null
27034    if test $? -eq 0 ; then
27035      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
27036$as_echo "yes" >&6; }
27037    else
27038      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27039$as_echo "no" >&6; }
27040      # This might be the VS linker. Don't exclude it later on.
27041      CYGWIN_LINK=""
27042    fi
27043  fi
27044
27045  # First-hand choice is to locate and run the vsvars bat file.
27046
27047  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27048    VCVARSFILE="vc/bin/vcvars32.bat"
27049  else
27050    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27051  fi
27052
27053  VS_ENV_CMD=""
27054  VS_ENV_ARGS=""
27055  if test "x$with_toolsdir" != x; then
27056
27057  if test "x$VS_ENV_CMD" = x; then
27058    VS100BASE="$with_toolsdir/../.."
27059    METHOD="--with-tools-dir"
27060
27061  windows_path="$VS100BASE"
27062  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27063    unix_path=`$CYGPATH -u "$windows_path"`
27064    VS100BASE="$unix_path"
27065  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27066    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27067    VS100BASE="$unix_path"
27068  fi
27069
27070    if test -d "$VS100BASE"; then
27071      if test -f "$VS100BASE/$VCVARSFILE"; then
27072        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27073$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27074        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
27075      else
27076        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27077$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27078        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27079$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27080      fi
27081    fi
27082  fi
27083
27084  fi
27085
27086  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
27087    # Having specified an argument which is incorrect will produce an instant failure;
27088    # we should not go on looking
27089    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
27090$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
27091    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
27092$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
27093    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
27094  fi
27095
27096  if test "x$VS100COMNTOOLS" != x; then
27097
27098  if test "x$VS_ENV_CMD" = x; then
27099    VS100BASE="$VS100COMNTOOLS/../.."
27100    METHOD="VS100COMNTOOLS variable"
27101
27102  windows_path="$VS100BASE"
27103  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27104    unix_path=`$CYGPATH -u "$windows_path"`
27105    VS100BASE="$unix_path"
27106  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27107    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27108    VS100BASE="$unix_path"
27109  fi
27110
27111    if test -d "$VS100BASE"; then
27112      if test -f "$VS100BASE/$VCVARSFILE"; then
27113        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27114$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27115        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
27116      else
27117        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27118$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27119        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27120$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27121      fi
27122    fi
27123  fi
27124
27125  fi
27126  if test "x$PROGRAMFILES" != x; then
27127
27128  if test "x$VS_ENV_CMD" = x; then
27129    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
27130    METHOD="well-known name"
27131
27132  windows_path="$VS100BASE"
27133  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27134    unix_path=`$CYGPATH -u "$windows_path"`
27135    VS100BASE="$unix_path"
27136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27137    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27138    VS100BASE="$unix_path"
27139  fi
27140
27141    if test -d "$VS100BASE"; then
27142      if test -f "$VS100BASE/$VCVARSFILE"; then
27143        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27144$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27145        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
27146      else
27147        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27148$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27149        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27150$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27151      fi
27152    fi
27153  fi
27154
27155  fi
27156
27157  if test "x$VS_ENV_CMD" = x; then
27158    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
27159    METHOD="well-known name"
27160
27161  windows_path="$VS100BASE"
27162  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27163    unix_path=`$CYGPATH -u "$windows_path"`
27164    VS100BASE="$unix_path"
27165  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27166    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27167    VS100BASE="$unix_path"
27168  fi
27169
27170    if test -d "$VS100BASE"; then
27171      if test -f "$VS100BASE/$VCVARSFILE"; then
27172        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27173$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27174        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
27175      else
27176        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27177$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27178        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27179$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27180      fi
27181    fi
27182  fi
27183
27184
27185  if test "x$VS_ENV_CMD" = x; then
27186    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
27187    METHOD="well-known name"
27188
27189  windows_path="$VS100BASE"
27190  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27191    unix_path=`$CYGPATH -u "$windows_path"`
27192    VS100BASE="$unix_path"
27193  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27194    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27195    VS100BASE="$unix_path"
27196  fi
27197
27198    if test -d "$VS100BASE"; then
27199      if test -f "$VS100BASE/$VCVARSFILE"; then
27200        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27201$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27202        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
27203      else
27204        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27205$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27206        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27207$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27208      fi
27209    fi
27210  fi
27211
27212
27213  if test "x$ProgramW6432" != x; then
27214
27215  if test "x$VS_ENV_CMD" = x; then
27216    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
27217    METHOD="well-known name"
27218
27219  windows_path="$WIN_SDK_BASE"
27220  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27221    unix_path=`$CYGPATH -u "$windows_path"`
27222    WIN_SDK_BASE="$unix_path"
27223  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27224    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27225    WIN_SDK_BASE="$unix_path"
27226  fi
27227
27228    if test -d "$WIN_SDK_BASE"; then
27229      # There have been cases of partial or broken SDK installations. A missing
27230      # lib dir is not going to work.
27231      if test ! -d "$WIN_SDK_BASE/../lib"; then
27232        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27233$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27234        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27235$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27236      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27237        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27238$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27239        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27240        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27241          VS_ENV_ARGS="/x86"
27242        else
27243          VS_ENV_ARGS="/x64"
27244        fi
27245      else
27246        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27247$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27248        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27249$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27250      fi
27251    fi
27252  fi
27253
27254  fi
27255  if test "x$PROGRAMW6432" != x; then
27256
27257  if test "x$VS_ENV_CMD" = x; then
27258    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
27259    METHOD="well-known name"
27260
27261  windows_path="$WIN_SDK_BASE"
27262  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27263    unix_path=`$CYGPATH -u "$windows_path"`
27264    WIN_SDK_BASE="$unix_path"
27265  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27266    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27267    WIN_SDK_BASE="$unix_path"
27268  fi
27269
27270    if test -d "$WIN_SDK_BASE"; then
27271      # There have been cases of partial or broken SDK installations. A missing
27272      # lib dir is not going to work.
27273      if test ! -d "$WIN_SDK_BASE/../lib"; then
27274        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27275$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27276        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27277$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27278      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27279        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27280$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27281        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27282        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27283          VS_ENV_ARGS="/x86"
27284        else
27285          VS_ENV_ARGS="/x64"
27286        fi
27287      else
27288        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27289$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27290        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27291$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27292      fi
27293    fi
27294  fi
27295
27296  fi
27297  if test "x$PROGRAMFILES" != x; then
27298
27299  if test "x$VS_ENV_CMD" = x; then
27300    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
27301    METHOD="well-known name"
27302
27303  windows_path="$WIN_SDK_BASE"
27304  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27305    unix_path=`$CYGPATH -u "$windows_path"`
27306    WIN_SDK_BASE="$unix_path"
27307  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27308    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27309    WIN_SDK_BASE="$unix_path"
27310  fi
27311
27312    if test -d "$WIN_SDK_BASE"; then
27313      # There have been cases of partial or broken SDK installations. A missing
27314      # lib dir is not going to work.
27315      if test ! -d "$WIN_SDK_BASE/../lib"; then
27316        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27317$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27318        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27319$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27320      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27321        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27322$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27323        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27324        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27325          VS_ENV_ARGS="/x86"
27326        else
27327          VS_ENV_ARGS="/x64"
27328        fi
27329      else
27330        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27331$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27332        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27333$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27334      fi
27335    fi
27336  fi
27337
27338  fi
27339
27340  if test "x$VS_ENV_CMD" = x; then
27341    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
27342    METHOD="well-known name"
27343
27344  windows_path="$WIN_SDK_BASE"
27345  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27346    unix_path=`$CYGPATH -u "$windows_path"`
27347    WIN_SDK_BASE="$unix_path"
27348  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27349    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27350    WIN_SDK_BASE="$unix_path"
27351  fi
27352
27353    if test -d "$WIN_SDK_BASE"; then
27354      # There have been cases of partial or broken SDK installations. A missing
27355      # lib dir is not going to work.
27356      if test ! -d "$WIN_SDK_BASE/../lib"; then
27357        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27358$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27359        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27360$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27361      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27362        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27363$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27364        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27365        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27366          VS_ENV_ARGS="/x86"
27367        else
27368          VS_ENV_ARGS="/x64"
27369        fi
27370      else
27371        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27372$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27373        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27374$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27375      fi
27376    fi
27377  fi
27378
27379
27380  if test "x$VS_ENV_CMD" = x; then
27381    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
27382    METHOD="well-known name"
27383
27384  windows_path="$WIN_SDK_BASE"
27385  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27386    unix_path=`$CYGPATH -u "$windows_path"`
27387    WIN_SDK_BASE="$unix_path"
27388  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27389    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27390    WIN_SDK_BASE="$unix_path"
27391  fi
27392
27393    if test -d "$WIN_SDK_BASE"; then
27394      # There have been cases of partial or broken SDK installations. A missing
27395      # lib dir is not going to work.
27396      if test ! -d "$WIN_SDK_BASE/../lib"; then
27397        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27398$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27399        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27400$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27401      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27402        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27403$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27404        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27405        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27406          VS_ENV_ARGS="/x86"
27407        else
27408          VS_ENV_ARGS="/x64"
27409        fi
27410      else
27411        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27412$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27413        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27414$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27415      fi
27416    fi
27417  fi
27418
27419
27420  if test "x$VS_ENV_CMD" != x; then
27421    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
27422
27423  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27424
27425  # First separate the path from the arguments. This will split at the first
27426  # space.
27427  complete="$VS_ENV_CMD"
27428  path="${complete%% *}"
27429  tmp="$complete EOL"
27430  arguments="${tmp#* }"
27431
27432  # Input might be given as Windows format, start by converting to
27433  # unix format.
27434  new_path=`$CYGPATH -u "$path"`
27435
27436  # Now try to locate executable using which
27437  new_path=`$WHICH "$new_path" 2> /dev/null`
27438  # bat and cmd files are not always considered executable in cygwin causing which
27439  # to not find them
27440  if test "x$new_path" = x \
27441      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27442      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27443    new_path=`$CYGPATH -u "$path"`
27444  fi
27445  if test "x$new_path" = x; then
27446    # Oops. Which didn't find the executable.
27447    # The splitting of arguments from the executable at a space might have been incorrect,
27448    # since paths with space are more likely in Windows. Give it another try with the whole
27449    # argument.
27450    path="$complete"
27451    arguments="EOL"
27452    new_path=`$CYGPATH -u "$path"`
27453    new_path=`$WHICH "$new_path" 2> /dev/null`
27454    # bat and cmd files are not always considered executable in cygwin causing which
27455    # to not find them
27456    if test "x$new_path" = x \
27457        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27458        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27459      new_path=`$CYGPATH -u "$path"`
27460    fi
27461    if test "x$new_path" = x; then
27462      # It's still not found. Now this is an unrecoverable error.
27463      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27464$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27465      has_space=`$ECHO "$complete" | $GREP " "`
27466      if test "x$has_space" != x; then
27467        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27468$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27469      fi
27470      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27471    fi
27472  fi
27473
27474  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27475  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27476  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27477  # "foo.exe" is OK but "foo" is an error.
27478  #
27479  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27480  # It is also a way to make sure we got the proper file name for the real test later on.
27481  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27482  if test "x$test_shortpath" = x; then
27483    # Short path failed, file does not exist as specified.
27484    # Try adding .exe or .cmd
27485    if test -f "${new_path}.exe"; then
27486      input_to_shortpath="${new_path}.exe"
27487    elif test -f "${new_path}.cmd"; then
27488      input_to_shortpath="${new_path}.cmd"
27489    else
27490      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
27491$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
27492      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27493$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27494      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27495    fi
27496  else
27497    input_to_shortpath="$new_path"
27498  fi
27499
27500  # Call helper function which possibly converts this using DOS-style short mode.
27501  # If so, the updated path is stored in $new_path.
27502  new_path="$input_to_shortpath"
27503
27504  input_path="$input_to_shortpath"
27505  # Check if we need to convert this using DOS-style short mode. If the path
27506  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27507  # take no chances and rewrite it.
27508  # Note: m4 eats our [], so we need to use [ and ] instead.
27509  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27510  if test "x$has_forbidden_chars" != x; then
27511    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27512    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27513    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27514    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27515      # Going to short mode and back again did indeed matter. Since short mode is
27516      # case insensitive, let's make it lowercase to improve readability.
27517      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27518      # Now convert it back to Unix-stile (cygpath)
27519      input_path=`$CYGPATH -u "$shortmode_path"`
27520      new_path="$input_path"
27521    fi
27522  fi
27523
27524  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27525  if test "x$test_cygdrive_prefix" = x; then
27526    # As a simple fix, exclude /usr/bin since it's not a real path.
27527    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27528      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27529      # a path prefixed by /cygdrive for fixpath to work.
27530      new_path="$CYGWIN_ROOT_PATH$input_path"
27531    fi
27532  fi
27533
27534  # remove trailing .exe if any
27535  new_path="${new_path/%.exe/}"
27536
27537  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27538
27539  # First separate the path from the arguments. This will split at the first
27540  # space.
27541  complete="$VS_ENV_CMD"
27542  path="${complete%% *}"
27543  tmp="$complete EOL"
27544  arguments="${tmp#* }"
27545
27546  # Input might be given as Windows format, start by converting to
27547  # unix format.
27548  new_path="$path"
27549
27550  windows_path="$new_path"
27551  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27552    unix_path=`$CYGPATH -u "$windows_path"`
27553    new_path="$unix_path"
27554  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27555    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27556    new_path="$unix_path"
27557  fi
27558
27559
27560  # Now try to locate executable using which
27561  new_path=`$WHICH "$new_path" 2> /dev/null`
27562
27563  if test "x$new_path" = x; then
27564    # Oops. Which didn't find the executable.
27565    # The splitting of arguments from the executable at a space might have been incorrect,
27566    # since paths with space are more likely in Windows. Give it another try with the whole
27567    # argument.
27568    path="$complete"
27569    arguments="EOL"
27570    new_path="$path"
27571
27572  windows_path="$new_path"
27573  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27574    unix_path=`$CYGPATH -u "$windows_path"`
27575    new_path="$unix_path"
27576  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27577    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27578    new_path="$unix_path"
27579  fi
27580
27581
27582    new_path=`$WHICH "$new_path" 2> /dev/null`
27583    # bat and cmd files are not always considered executable in MSYS causing which
27584    # to not find them
27585    if test "x$new_path" = x \
27586        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27587        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27588      new_path="$path"
27589
27590  windows_path="$new_path"
27591  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27592    unix_path=`$CYGPATH -u "$windows_path"`
27593    new_path="$unix_path"
27594  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27595    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27596    new_path="$unix_path"
27597  fi
27598
27599    fi
27600
27601    if test "x$new_path" = x; then
27602      # It's still not found. Now this is an unrecoverable error.
27603      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27604$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27605      has_space=`$ECHO "$complete" | $GREP " "`
27606      if test "x$has_space" != x; then
27607        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27608$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27609      fi
27610      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27611    fi
27612  fi
27613
27614  # Now new_path has a complete unix path to the binary
27615  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27616    # Keep paths in /bin as-is, but remove trailing .exe if any
27617    new_path="${new_path/%.exe/}"
27618    # Do not save /bin paths to all_fixpath_prefixes!
27619  else
27620    # Not in mixed or Windows style, start by that.
27621    new_path=`cmd //c echo $new_path`
27622
27623  input_path="$new_path"
27624  # Check if we need to convert this using DOS-style short mode. If the path
27625  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27626  # take no chances and rewrite it.
27627  # Note: m4 eats our [], so we need to use [ and ] instead.
27628  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27629  if test "x$has_forbidden_chars" != x; then
27630    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27631    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27632  fi
27633
27634    # Output is in $new_path
27635
27636  windows_path="$new_path"
27637  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27638    unix_path=`$CYGPATH -u "$windows_path"`
27639    new_path="$unix_path"
27640  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27641    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27642    new_path="$unix_path"
27643  fi
27644
27645    # remove trailing .exe if any
27646    new_path="${new_path/%.exe/}"
27647
27648    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27649    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27650  fi
27651
27652  else
27653    # We're on a posix platform. Hooray! :)
27654    # First separate the path from the arguments. This will split at the first
27655    # space.
27656    complete="$VS_ENV_CMD"
27657    path="${complete%% *}"
27658    tmp="$complete EOL"
27659    arguments="${tmp#* }"
27660
27661    # Cannot rely on the command "which" here since it doesn't always work.
27662    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27663    if test -z "$is_absolute_path"; then
27664      # Path to executable is not absolute. Find it.
27665      IFS_save="$IFS"
27666      IFS=:
27667      for p in $PATH; do
27668        if test -f "$p/$path" && test -x "$p/$path"; then
27669          new_path="$p/$path"
27670          break
27671        fi
27672      done
27673      IFS="$IFS_save"
27674    else
27675      # This is an absolute path, we can use it without further modifications.
27676      new_path="$path"
27677    fi
27678
27679    if test "x$new_path" = x; then
27680      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27681$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27682      has_space=`$ECHO "$complete" | $GREP " "`
27683      if test "x$has_space" != x; then
27684        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27685$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27686      fi
27687      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27688    fi
27689  fi
27690
27691  # Now join together the path and the arguments once again
27692  if test "x$arguments" != xEOL; then
27693    new_complete="$new_path ${arguments% *}"
27694  else
27695    new_complete="$new_path"
27696  fi
27697
27698  if test "x$complete" != "x$new_complete"; then
27699    VS_ENV_CMD="$new_complete"
27700    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
27701$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
27702  fi
27703
27704
27705    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
27706    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
27707$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
27708
27709    # We need to create a couple of temporary files.
27710    VS_ENV_TMP_DIR="$OUTPUT_ROOT/vs-env"
27711    $MKDIR -p $VS_ENV_TMP_DIR
27712
27713    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
27714    # Instead create a shell script which will set the relevant variables when run.
27715    WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
27716
27717  unix_path="$WINPATH_VS_ENV_CMD"
27718  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27719    windows_path=`$CYGPATH -m "$unix_path"`
27720    WINPATH_VS_ENV_CMD="$windows_path"
27721  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27722    windows_path=`cmd //c echo $unix_path`
27723    WINPATH_VS_ENV_CMD="$windows_path"
27724  fi
27725
27726    WINPATH_BASH="$BASH"
27727
27728  unix_path="$WINPATH_BASH"
27729  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27730    windows_path=`$CYGPATH -m "$unix_path"`
27731    WINPATH_BASH="$windows_path"
27732  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27733    windows_path=`cmd //c echo $unix_path`
27734    WINPATH_BASH="$windows_path"
27735  fi
27736
27737
27738    # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
27739    # script (executable by bash) that will setup the important variables.
27740    EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
27741    $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
27742    # This will end up something like:
27743    # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
27744    $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
27745    # These will end up something like:
27746    # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
27747    # The trailing space for everyone except PATH is no typo, but is needed due
27748    # to trailing \ in the Windows paths. These will be stripped later.
27749    $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27750    $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27751    $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27752    $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27753    $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27754    $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27755
27756    # Now execute the newly created bat file.
27757    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
27758    # Change directory so we don't need to mess with Windows paths in redirects.
27759    cd $VS_ENV_TMP_DIR
27760    cmd /c extract-vs-env.bat | $CAT
27761    cd $CURDIR
27762
27763    if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
27764      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
27765$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
27766      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27767$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27768      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27769$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27770      as_fn_error $? "Cannot continue" "$LINENO" 5
27771    fi
27772
27773    # Now set all paths and other env variables. This will allow the rest of
27774    # the configure script to find and run the compiler in the proper way.
27775    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
27776$as_echo "$as_me: Setting extracted environment variables" >&6;}
27777    . $VS_ENV_TMP_DIR/set-vs-env.sh
27778    # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
27779    # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
27780  else
27781    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
27782    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
27783$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
27784  fi
27785
27786  # At this point, we should have correct variables in the environment, or we can't continue.
27787  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
27788$as_echo_n "checking for Visual Studio variables... " >&6; }
27789
27790  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
27791    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
27792      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
27793$as_echo "present but broken" >&6; }
27794      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
27795    else
27796      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27797$as_echo "ok" >&6; }
27798      # Remove any trailing "\" and " " from the variables.
27799      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED 's/\\\\* *$//'`
27800      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\* *$//'`
27801      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
27802      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
27803      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
27804      # Remove any paths containing # (typically F#) as that messes up make. This
27805      # is needed if visual studio was installed with F# support.
27806      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
27807
27808
27809
27810
27811    fi
27812  else
27813    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
27814$as_echo "not found" >&6; }
27815
27816    if test "x$VS_ENV_CMD" = x; then
27817      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
27818$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
27819      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
27820$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
27821    else
27822      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
27823$as_echo "$as_me: Running the extraction script failed." >&6;}
27824    fi
27825    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27826$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27827    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27828$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27829    as_fn_error $? "Cannot continue" "$LINENO" 5
27830  fi
27831
27832    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
27833    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
27834    PATH="$VS_PATH"
27835    # The microsoft toolchain also requires INCLUDE and LIB to be set.
27836    export INCLUDE="$VS_INCLUDE"
27837    export LIB="$VS_LIB"
27838  fi
27839
27840  # autoconf magic only relies on PATH, so update it if tools dir is specified
27841  OLD_PATH="$PATH"
27842
27843  # For solaris we really need solaris tools, and not the GNU equivalent.
27844  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
27845  # so add that to path before starting to probe.
27846  # FIXME: This was originally only done for AS,NM,GNM,STRIP,MCS,OBJCOPY,OBJDUMP.
27847  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
27848    PATH="/usr/ccs/bin:$PATH"
27849  fi
27850
27851  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
27852  # override all other locations.
27853  if test "x$TOOLCHAIN_PATH" != x; then
27854    PATH=$TOOLCHAIN_PATH:$PATH
27855  fi
27856
27857
27858  #
27859  # Setup the compilers (CC and CXX)
27860  #
27861
27862  COMPILER_NAME=C
27863  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
27864
27865  if test "x$CC" != x; then
27866    # User has supplied compiler name already, always let that override.
27867    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
27868$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
27869    if test "x`basename $CC`" = "x$CC"; then
27870      # A command without a complete path is provided, search $PATH.
27871
27872      for ac_prog in $CC
27873do
27874  # Extract the first word of "$ac_prog", so it can be a program name with args.
27875set dummy $ac_prog; ac_word=$2
27876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27877$as_echo_n "checking for $ac_word... " >&6; }
27878if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27879  $as_echo_n "(cached) " >&6
27880else
27881  case $POTENTIAL_CC in
27882  [\\/]* | ?:[\\/]*)
27883  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27884  ;;
27885  *)
27886  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27887for as_dir in $PATH
27888do
27889  IFS=$as_save_IFS
27890  test -z "$as_dir" && as_dir=.
27891    for ac_exec_ext in '' $ac_executable_extensions; do
27892  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27893    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27894    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27895    break 2
27896  fi
27897done
27898  done
27899IFS=$as_save_IFS
27900
27901  ;;
27902esac
27903fi
27904POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27905if test -n "$POTENTIAL_CC"; then
27906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27907$as_echo "$POTENTIAL_CC" >&6; }
27908else
27909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27910$as_echo "no" >&6; }
27911fi
27912
27913
27914  test -n "$POTENTIAL_CC" && break
27915done
27916
27917      if test "x$POTENTIAL_CC" != x; then
27918        CC=$POTENTIAL_CC
27919      else
27920        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
27921      fi
27922    else
27923      # Otherwise it might already be a complete path
27924      if test ! -x "$CC"; then
27925        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
27926      fi
27927    fi
27928  else
27929    # No user supplied value. Locate compiler ourselves.
27930
27931    # If we are cross compiling, assume cross compilation tools follows the
27932    # cross compilation standard where they are prefixed with the autoconf
27933    # standard name for the target. For example the binary
27934    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
27935    # If we are not cross compiling, then the default compiler name will be
27936    # used.
27937
27938    CC=
27939    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
27940    # before checking the rest of the PATH.
27941    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
27942    # step, this should not be necessary.
27943    if test -n "$TOOLCHAIN_PATH"; then
27944      PATH_save="$PATH"
27945      PATH="$TOOLCHAIN_PATH"
27946      for ac_prog in $SEARCH_LIST
27947do
27948  # Extract the first word of "$ac_prog", so it can be a program name with args.
27949set dummy $ac_prog; ac_word=$2
27950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27951$as_echo_n "checking for $ac_word... " >&6; }
27952if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
27953  $as_echo_n "(cached) " >&6
27954else
27955  case $TOOLCHAIN_PATH_CC in
27956  [\\/]* | ?:[\\/]*)
27957  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
27958  ;;
27959  *)
27960  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27961for as_dir in $PATH
27962do
27963  IFS=$as_save_IFS
27964  test -z "$as_dir" && as_dir=.
27965    for ac_exec_ext in '' $ac_executable_extensions; do
27966  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27967    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
27968    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27969    break 2
27970  fi
27971done
27972  done
27973IFS=$as_save_IFS
27974
27975  ;;
27976esac
27977fi
27978TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
27979if test -n "$TOOLCHAIN_PATH_CC"; then
27980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
27981$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
27982else
27983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27984$as_echo "no" >&6; }
27985fi
27986
27987
27988  test -n "$TOOLCHAIN_PATH_CC" && break
27989done
27990
27991      CC=$TOOLCHAIN_PATH_CC
27992      PATH="$PATH_save"
27993    fi
27994
27995    # AC_PATH_PROGS can't be run multiple times with the same variable,
27996    # so create a new name for this run.
27997    if test "x$CC" = x; then
27998      for ac_prog in $SEARCH_LIST
27999do
28000  # Extract the first word of "$ac_prog", so it can be a program name with args.
28001set dummy $ac_prog; ac_word=$2
28002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28003$as_echo_n "checking for $ac_word... " >&6; }
28004if ${ac_cv_path_POTENTIAL_CC+:} false; then :
28005  $as_echo_n "(cached) " >&6
28006else
28007  case $POTENTIAL_CC in
28008  [\\/]* | ?:[\\/]*)
28009  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
28010  ;;
28011  *)
28012  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28013for as_dir in $PATH
28014do
28015  IFS=$as_save_IFS
28016  test -z "$as_dir" && as_dir=.
28017    for ac_exec_ext in '' $ac_executable_extensions; do
28018  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28019    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
28020    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28021    break 2
28022  fi
28023done
28024  done
28025IFS=$as_save_IFS
28026
28027  ;;
28028esac
28029fi
28030POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
28031if test -n "$POTENTIAL_CC"; then
28032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
28033$as_echo "$POTENTIAL_CC" >&6; }
28034else
28035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28036$as_echo "no" >&6; }
28037fi
28038
28039
28040  test -n "$POTENTIAL_CC" && break
28041done
28042
28043      CC=$POTENTIAL_CC
28044    fi
28045
28046    if test "x$CC" = x; then
28047
28048  # Print a helpful message on how to acquire the necessary build dependency.
28049  # devkit is the help tag: freetype, cups, pulse, alsa etc
28050  MISSING_DEPENDENCY=devkit
28051
28052  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28053    cygwin_help $MISSING_DEPENDENCY
28054  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28055    msys_help $MISSING_DEPENDENCY
28056  else
28057    PKGHANDLER_COMMAND=
28058
28059    case $PKGHANDLER in
28060      apt-get)
28061        apt_help     $MISSING_DEPENDENCY ;;
28062      yum)
28063        yum_help     $MISSING_DEPENDENCY ;;
28064      port)
28065        port_help    $MISSING_DEPENDENCY ;;
28066      pkgutil)
28067        pkgutil_help $MISSING_DEPENDENCY ;;
28068      pkgadd)
28069        pkgadd_help  $MISSING_DEPENDENCY ;;
28070    esac
28071
28072    if test "x$PKGHANDLER_COMMAND" != x; then
28073      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28074    fi
28075  fi
28076
28077      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
28078    fi
28079  fi
28080
28081  # Now we have a compiler binary in CC. Make sure it's okay.
28082
28083  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28084
28085  # First separate the path from the arguments. This will split at the first
28086  # space.
28087  complete="$CC"
28088  path="${complete%% *}"
28089  tmp="$complete EOL"
28090  arguments="${tmp#* }"
28091
28092  # Input might be given as Windows format, start by converting to
28093  # unix format.
28094  new_path=`$CYGPATH -u "$path"`
28095
28096  # Now try to locate executable using which
28097  new_path=`$WHICH "$new_path" 2> /dev/null`
28098  # bat and cmd files are not always considered executable in cygwin causing which
28099  # to not find them
28100  if test "x$new_path" = x \
28101      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28102      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28103    new_path=`$CYGPATH -u "$path"`
28104  fi
28105  if test "x$new_path" = x; then
28106    # Oops. Which didn't find the executable.
28107    # The splitting of arguments from the executable at a space might have been incorrect,
28108    # since paths with space are more likely in Windows. Give it another try with the whole
28109    # argument.
28110    path="$complete"
28111    arguments="EOL"
28112    new_path=`$CYGPATH -u "$path"`
28113    new_path=`$WHICH "$new_path" 2> /dev/null`
28114    # bat and cmd files are not always considered executable in cygwin causing which
28115    # to not find them
28116    if test "x$new_path" = x \
28117        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28118        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28119      new_path=`$CYGPATH -u "$path"`
28120    fi
28121    if test "x$new_path" = x; then
28122      # It's still not found. Now this is an unrecoverable error.
28123      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28124$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28125      has_space=`$ECHO "$complete" | $GREP " "`
28126      if test "x$has_space" != x; then
28127        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28128$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28129      fi
28130      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28131    fi
28132  fi
28133
28134  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28135  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28136  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28137  # "foo.exe" is OK but "foo" is an error.
28138  #
28139  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28140  # It is also a way to make sure we got the proper file name for the real test later on.
28141  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28142  if test "x$test_shortpath" = x; then
28143    # Short path failed, file does not exist as specified.
28144    # Try adding .exe or .cmd
28145    if test -f "${new_path}.exe"; then
28146      input_to_shortpath="${new_path}.exe"
28147    elif test -f "${new_path}.cmd"; then
28148      input_to_shortpath="${new_path}.cmd"
28149    else
28150      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
28151$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
28152      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28153$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28154      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28155    fi
28156  else
28157    input_to_shortpath="$new_path"
28158  fi
28159
28160  # Call helper function which possibly converts this using DOS-style short mode.
28161  # If so, the updated path is stored in $new_path.
28162  new_path="$input_to_shortpath"
28163
28164  input_path="$input_to_shortpath"
28165  # Check if we need to convert this using DOS-style short mode. If the path
28166  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28167  # take no chances and rewrite it.
28168  # Note: m4 eats our [], so we need to use [ and ] instead.
28169  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28170  if test "x$has_forbidden_chars" != x; then
28171    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28172    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28173    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28174    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28175      # Going to short mode and back again did indeed matter. Since short mode is
28176      # case insensitive, let's make it lowercase to improve readability.
28177      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28178      # Now convert it back to Unix-stile (cygpath)
28179      input_path=`$CYGPATH -u "$shortmode_path"`
28180      new_path="$input_path"
28181    fi
28182  fi
28183
28184  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28185  if test "x$test_cygdrive_prefix" = x; then
28186    # As a simple fix, exclude /usr/bin since it's not a real path.
28187    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28188      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28189      # a path prefixed by /cygdrive for fixpath to work.
28190      new_path="$CYGWIN_ROOT_PATH$input_path"
28191    fi
28192  fi
28193
28194  # remove trailing .exe if any
28195  new_path="${new_path/%.exe/}"
28196
28197  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28198
28199  # First separate the path from the arguments. This will split at the first
28200  # space.
28201  complete="$CC"
28202  path="${complete%% *}"
28203  tmp="$complete EOL"
28204  arguments="${tmp#* }"
28205
28206  # Input might be given as Windows format, start by converting to
28207  # unix format.
28208  new_path="$path"
28209
28210  windows_path="$new_path"
28211  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28212    unix_path=`$CYGPATH -u "$windows_path"`
28213    new_path="$unix_path"
28214  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28215    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28216    new_path="$unix_path"
28217  fi
28218
28219
28220  # Now try to locate executable using which
28221  new_path=`$WHICH "$new_path" 2> /dev/null`
28222
28223  if test "x$new_path" = x; then
28224    # Oops. Which didn't find the executable.
28225    # The splitting of arguments from the executable at a space might have been incorrect,
28226    # since paths with space are more likely in Windows. Give it another try with the whole
28227    # argument.
28228    path="$complete"
28229    arguments="EOL"
28230    new_path="$path"
28231
28232  windows_path="$new_path"
28233  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28234    unix_path=`$CYGPATH -u "$windows_path"`
28235    new_path="$unix_path"
28236  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28237    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28238    new_path="$unix_path"
28239  fi
28240
28241
28242    new_path=`$WHICH "$new_path" 2> /dev/null`
28243    # bat and cmd files are not always considered executable in MSYS causing which
28244    # to not find them
28245    if test "x$new_path" = x \
28246        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28247        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28248      new_path="$path"
28249
28250  windows_path="$new_path"
28251  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28252    unix_path=`$CYGPATH -u "$windows_path"`
28253    new_path="$unix_path"
28254  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28255    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28256    new_path="$unix_path"
28257  fi
28258
28259    fi
28260
28261    if test "x$new_path" = x; then
28262      # It's still not found. Now this is an unrecoverable error.
28263      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28264$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28265      has_space=`$ECHO "$complete" | $GREP " "`
28266      if test "x$has_space" != x; then
28267        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28268$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28269      fi
28270      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28271    fi
28272  fi
28273
28274  # Now new_path has a complete unix path to the binary
28275  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28276    # Keep paths in /bin as-is, but remove trailing .exe if any
28277    new_path="${new_path/%.exe/}"
28278    # Do not save /bin paths to all_fixpath_prefixes!
28279  else
28280    # Not in mixed or Windows style, start by that.
28281    new_path=`cmd //c echo $new_path`
28282
28283  input_path="$new_path"
28284  # Check if we need to convert this using DOS-style short mode. If the path
28285  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28286  # take no chances and rewrite it.
28287  # Note: m4 eats our [], so we need to use [ and ] instead.
28288  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28289  if test "x$has_forbidden_chars" != x; then
28290    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28291    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28292  fi
28293
28294    # Output is in $new_path
28295
28296  windows_path="$new_path"
28297  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28298    unix_path=`$CYGPATH -u "$windows_path"`
28299    new_path="$unix_path"
28300  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28301    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28302    new_path="$unix_path"
28303  fi
28304
28305    # remove trailing .exe if any
28306    new_path="${new_path/%.exe/}"
28307
28308    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28309    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28310  fi
28311
28312  else
28313    # We're on a posix platform. Hooray! :)
28314    # First separate the path from the arguments. This will split at the first
28315    # space.
28316    complete="$CC"
28317    path="${complete%% *}"
28318    tmp="$complete EOL"
28319    arguments="${tmp#* }"
28320
28321    # Cannot rely on the command "which" here since it doesn't always work.
28322    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28323    if test -z "$is_absolute_path"; then
28324      # Path to executable is not absolute. Find it.
28325      IFS_save="$IFS"
28326      IFS=:
28327      for p in $PATH; do
28328        if test -f "$p/$path" && test -x "$p/$path"; then
28329          new_path="$p/$path"
28330          break
28331        fi
28332      done
28333      IFS="$IFS_save"
28334    else
28335      # This is an absolute path, we can use it without further modifications.
28336      new_path="$path"
28337    fi
28338
28339    if test "x$new_path" = x; then
28340      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28341$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28342      has_space=`$ECHO "$complete" | $GREP " "`
28343      if test "x$has_space" != x; then
28344        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28345$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28346      fi
28347      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28348    fi
28349  fi
28350
28351  # Now join together the path and the arguments once again
28352  if test "x$arguments" != xEOL; then
28353    new_complete="$new_path ${arguments% *}"
28354  else
28355    new_complete="$new_path"
28356  fi
28357
28358  if test "x$complete" != "x$new_complete"; then
28359    CC="$new_complete"
28360    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
28361$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
28362  fi
28363
28364  TEST_COMPILER="$CC"
28365  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
28366  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
28367  if test "x$OPENJDK_BUILD_OS" != xaix; then
28368    # FIXME: This test should not be needed anymore; we don't do that for any platform.
28369    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
28370$as_echo_n "checking resolved symbolic links for CC... " >&6; }
28371
28372  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28373    # Follow a chain of symbolic links. Use readlink
28374    # where it exists, else fall back to horribly
28375    # complicated shell code.
28376    if test "x$READLINK_TESTED" != yes; then
28377      # On MacOSX there is a readlink tool with a different
28378      # purpose than the GNU readlink tool. Check the found readlink.
28379      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28380      if test "x$ISGNU" = x; then
28381        # A readlink that we do not know how to use.
28382        # Are there other non-GNU readlinks out there?
28383        READLINK_TESTED=yes
28384        READLINK=
28385      fi
28386    fi
28387
28388    if test "x$READLINK" != x; then
28389      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
28390    else
28391      # Save the current directory for restoring afterwards
28392      STARTDIR=$PWD
28393      COUNTER=0
28394      sym_link_dir=`$DIRNAME $TEST_COMPILER`
28395      sym_link_file=`$BASENAME $TEST_COMPILER`
28396      cd $sym_link_dir
28397      # Use -P flag to resolve symlinks in directories.
28398      cd `$THEPWDCMD -P`
28399      sym_link_dir=`$THEPWDCMD -P`
28400      # Resolve file symlinks
28401      while test $COUNTER -lt 20; do
28402        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28403        if test "x$ISLINK" == x; then
28404          # This is not a symbolic link! We are done!
28405          break
28406        fi
28407        # Again resolve directory symlinks since the target of the just found
28408        # link could be in a different directory
28409        cd `$DIRNAME $ISLINK`
28410        sym_link_dir=`$THEPWDCMD -P`
28411        sym_link_file=`$BASENAME $ISLINK`
28412        let COUNTER=COUNTER+1
28413      done
28414      cd $STARTDIR
28415      TEST_COMPILER=$sym_link_dir/$sym_link_file
28416    fi
28417  fi
28418
28419    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
28420$as_echo "$TEST_COMPILER" >&6; }
28421  fi
28422  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
28423$as_echo_n "checking if CC is disguised ccache... " >&6; }
28424
28425  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
28426  if test "x$COMPILER_BASENAME" = "xccache"; then
28427    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
28428$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
28429    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
28430    # We want to control ccache invocation ourselves, so ignore this cc and try
28431    # searching again.
28432
28433    # Remove the path to the fake ccache cc from the PATH
28434    RETRY_COMPILER_SAVED_PATH="$PATH"
28435    COMPILER_DIRNAME=`$DIRNAME $CC`
28436    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
28437
28438    # Try again looking for our compiler
28439    if test -n "$ac_tool_prefix"; then
28440  for ac_prog in $TOOLCHAIN_CC_BINARY
28441  do
28442    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28443set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28445$as_echo_n "checking for $ac_word... " >&6; }
28446if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
28447  $as_echo_n "(cached) " >&6
28448else
28449  if test -n "$PROPER_COMPILER_CC"; then
28450  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
28451else
28452as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28453for as_dir in $PATH
28454do
28455  IFS=$as_save_IFS
28456  test -z "$as_dir" && as_dir=.
28457    for ac_exec_ext in '' $ac_executable_extensions; do
28458  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28459    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
28460    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28461    break 2
28462  fi
28463done
28464  done
28465IFS=$as_save_IFS
28466
28467fi
28468fi
28469PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
28470if test -n "$PROPER_COMPILER_CC"; then
28471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28472$as_echo "$PROPER_COMPILER_CC" >&6; }
28473else
28474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28475$as_echo "no" >&6; }
28476fi
28477
28478
28479    test -n "$PROPER_COMPILER_CC" && break
28480  done
28481fi
28482if test -z "$PROPER_COMPILER_CC"; then
28483  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
28484  for ac_prog in $TOOLCHAIN_CC_BINARY
28485do
28486  # Extract the first word of "$ac_prog", so it can be a program name with args.
28487set dummy $ac_prog; ac_word=$2
28488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28489$as_echo_n "checking for $ac_word... " >&6; }
28490if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
28491  $as_echo_n "(cached) " >&6
28492else
28493  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28494  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
28495else
28496as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28497for as_dir in $PATH
28498do
28499  IFS=$as_save_IFS
28500  test -z "$as_dir" && as_dir=.
28501    for ac_exec_ext in '' $ac_executable_extensions; do
28502  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28503    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
28504    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28505    break 2
28506  fi
28507done
28508  done
28509IFS=$as_save_IFS
28510
28511fi
28512fi
28513ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
28514if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
28516$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
28517else
28518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28519$as_echo "no" >&6; }
28520fi
28521
28522
28523  test -n "$ac_ct_PROPER_COMPILER_CC" && break
28524done
28525
28526  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
28527    PROPER_COMPILER_CC=""
28528  else
28529    case $cross_compiling:$ac_tool_warned in
28530yes:)
28531{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28532$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28533ac_tool_warned=yes ;;
28534esac
28535    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
28536  fi
28537fi
28538
28539
28540  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28541
28542  # First separate the path from the arguments. This will split at the first
28543  # space.
28544  complete="$PROPER_COMPILER_CC"
28545  path="${complete%% *}"
28546  tmp="$complete EOL"
28547  arguments="${tmp#* }"
28548
28549  # Input might be given as Windows format, start by converting to
28550  # unix format.
28551  new_path=`$CYGPATH -u "$path"`
28552
28553  # Now try to locate executable using which
28554  new_path=`$WHICH "$new_path" 2> /dev/null`
28555  # bat and cmd files are not always considered executable in cygwin causing which
28556  # to not find them
28557  if test "x$new_path" = x \
28558      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28559      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28560    new_path=`$CYGPATH -u "$path"`
28561  fi
28562  if test "x$new_path" = x; then
28563    # Oops. Which didn't find the executable.
28564    # The splitting of arguments from the executable at a space might have been incorrect,
28565    # since paths with space are more likely in Windows. Give it another try with the whole
28566    # argument.
28567    path="$complete"
28568    arguments="EOL"
28569    new_path=`$CYGPATH -u "$path"`
28570    new_path=`$WHICH "$new_path" 2> /dev/null`
28571    # bat and cmd files are not always considered executable in cygwin causing which
28572    # to not find them
28573    if test "x$new_path" = x \
28574        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28575        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28576      new_path=`$CYGPATH -u "$path"`
28577    fi
28578    if test "x$new_path" = x; then
28579      # It's still not found. Now this is an unrecoverable error.
28580      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28581$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28582      has_space=`$ECHO "$complete" | $GREP " "`
28583      if test "x$has_space" != x; then
28584        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28585$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28586      fi
28587      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28588    fi
28589  fi
28590
28591  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28592  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28593  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28594  # "foo.exe" is OK but "foo" is an error.
28595  #
28596  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28597  # It is also a way to make sure we got the proper file name for the real test later on.
28598  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28599  if test "x$test_shortpath" = x; then
28600    # Short path failed, file does not exist as specified.
28601    # Try adding .exe or .cmd
28602    if test -f "${new_path}.exe"; then
28603      input_to_shortpath="${new_path}.exe"
28604    elif test -f "${new_path}.cmd"; then
28605      input_to_shortpath="${new_path}.cmd"
28606    else
28607      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
28608$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
28609      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28610$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28611      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28612    fi
28613  else
28614    input_to_shortpath="$new_path"
28615  fi
28616
28617  # Call helper function which possibly converts this using DOS-style short mode.
28618  # If so, the updated path is stored in $new_path.
28619  new_path="$input_to_shortpath"
28620
28621  input_path="$input_to_shortpath"
28622  # Check if we need to convert this using DOS-style short mode. If the path
28623  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28624  # take no chances and rewrite it.
28625  # Note: m4 eats our [], so we need to use [ and ] instead.
28626  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28627  if test "x$has_forbidden_chars" != x; then
28628    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28629    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28630    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28631    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28632      # Going to short mode and back again did indeed matter. Since short mode is
28633      # case insensitive, let's make it lowercase to improve readability.
28634      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28635      # Now convert it back to Unix-stile (cygpath)
28636      input_path=`$CYGPATH -u "$shortmode_path"`
28637      new_path="$input_path"
28638    fi
28639  fi
28640
28641  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28642  if test "x$test_cygdrive_prefix" = x; then
28643    # As a simple fix, exclude /usr/bin since it's not a real path.
28644    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28645      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28646      # a path prefixed by /cygdrive for fixpath to work.
28647      new_path="$CYGWIN_ROOT_PATH$input_path"
28648    fi
28649  fi
28650
28651  # remove trailing .exe if any
28652  new_path="${new_path/%.exe/}"
28653
28654  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28655
28656  # First separate the path from the arguments. This will split at the first
28657  # space.
28658  complete="$PROPER_COMPILER_CC"
28659  path="${complete%% *}"
28660  tmp="$complete EOL"
28661  arguments="${tmp#* }"
28662
28663  # Input might be given as Windows format, start by converting to
28664  # unix format.
28665  new_path="$path"
28666
28667  windows_path="$new_path"
28668  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28669    unix_path=`$CYGPATH -u "$windows_path"`
28670    new_path="$unix_path"
28671  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28672    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28673    new_path="$unix_path"
28674  fi
28675
28676
28677  # Now try to locate executable using which
28678  new_path=`$WHICH "$new_path" 2> /dev/null`
28679
28680  if test "x$new_path" = x; then
28681    # Oops. Which didn't find the executable.
28682    # The splitting of arguments from the executable at a space might have been incorrect,
28683    # since paths with space are more likely in Windows. Give it another try with the whole
28684    # argument.
28685    path="$complete"
28686    arguments="EOL"
28687    new_path="$path"
28688
28689  windows_path="$new_path"
28690  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28691    unix_path=`$CYGPATH -u "$windows_path"`
28692    new_path="$unix_path"
28693  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28694    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28695    new_path="$unix_path"
28696  fi
28697
28698
28699    new_path=`$WHICH "$new_path" 2> /dev/null`
28700    # bat and cmd files are not always considered executable in MSYS causing which
28701    # to not find them
28702    if test "x$new_path" = x \
28703        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28704        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28705      new_path="$path"
28706
28707  windows_path="$new_path"
28708  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28709    unix_path=`$CYGPATH -u "$windows_path"`
28710    new_path="$unix_path"
28711  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28712    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28713    new_path="$unix_path"
28714  fi
28715
28716    fi
28717
28718    if test "x$new_path" = x; then
28719      # It's still not found. Now this is an unrecoverable error.
28720      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28721$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28722      has_space=`$ECHO "$complete" | $GREP " "`
28723      if test "x$has_space" != x; then
28724        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28725$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28726      fi
28727      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28728    fi
28729  fi
28730
28731  # Now new_path has a complete unix path to the binary
28732  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28733    # Keep paths in /bin as-is, but remove trailing .exe if any
28734    new_path="${new_path/%.exe/}"
28735    # Do not save /bin paths to all_fixpath_prefixes!
28736  else
28737    # Not in mixed or Windows style, start by that.
28738    new_path=`cmd //c echo $new_path`
28739
28740  input_path="$new_path"
28741  # Check if we need to convert this using DOS-style short mode. If the path
28742  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28743  # take no chances and rewrite it.
28744  # Note: m4 eats our [], so we need to use [ and ] instead.
28745  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28746  if test "x$has_forbidden_chars" != x; then
28747    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28748    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28749  fi
28750
28751    # Output is in $new_path
28752
28753  windows_path="$new_path"
28754  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28755    unix_path=`$CYGPATH -u "$windows_path"`
28756    new_path="$unix_path"
28757  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28758    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28759    new_path="$unix_path"
28760  fi
28761
28762    # remove trailing .exe if any
28763    new_path="${new_path/%.exe/}"
28764
28765    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28766    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28767  fi
28768
28769  else
28770    # We're on a posix platform. Hooray! :)
28771    # First separate the path from the arguments. This will split at the first
28772    # space.
28773    complete="$PROPER_COMPILER_CC"
28774    path="${complete%% *}"
28775    tmp="$complete EOL"
28776    arguments="${tmp#* }"
28777
28778    # Cannot rely on the command "which" here since it doesn't always work.
28779    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28780    if test -z "$is_absolute_path"; then
28781      # Path to executable is not absolute. Find it.
28782      IFS_save="$IFS"
28783      IFS=:
28784      for p in $PATH; do
28785        if test -f "$p/$path" && test -x "$p/$path"; then
28786          new_path="$p/$path"
28787          break
28788        fi
28789      done
28790      IFS="$IFS_save"
28791    else
28792      # This is an absolute path, we can use it without further modifications.
28793      new_path="$path"
28794    fi
28795
28796    if test "x$new_path" = x; then
28797      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28798$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28799      has_space=`$ECHO "$complete" | $GREP " "`
28800      if test "x$has_space" != x; then
28801        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28802$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28803      fi
28804      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28805    fi
28806  fi
28807
28808  # Now join together the path and the arguments once again
28809  if test "x$arguments" != xEOL; then
28810    new_complete="$new_path ${arguments% *}"
28811  else
28812    new_complete="$new_path"
28813  fi
28814
28815  if test "x$complete" != "x$new_complete"; then
28816    PROPER_COMPILER_CC="$new_complete"
28817    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
28818$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
28819  fi
28820
28821    PATH="$RETRY_COMPILER_SAVED_PATH"
28822
28823    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
28824$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
28825
28826  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28827    # Follow a chain of symbolic links. Use readlink
28828    # where it exists, else fall back to horribly
28829    # complicated shell code.
28830    if test "x$READLINK_TESTED" != yes; then
28831      # On MacOSX there is a readlink tool with a different
28832      # purpose than the GNU readlink tool. Check the found readlink.
28833      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28834      if test "x$ISGNU" = x; then
28835        # A readlink that we do not know how to use.
28836        # Are there other non-GNU readlinks out there?
28837        READLINK_TESTED=yes
28838        READLINK=
28839      fi
28840    fi
28841
28842    if test "x$READLINK" != x; then
28843      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
28844    else
28845      # Save the current directory for restoring afterwards
28846      STARTDIR=$PWD
28847      COUNTER=0
28848      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
28849      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
28850      cd $sym_link_dir
28851      # Use -P flag to resolve symlinks in directories.
28852      cd `$THEPWDCMD -P`
28853      sym_link_dir=`$THEPWDCMD -P`
28854      # Resolve file symlinks
28855      while test $COUNTER -lt 20; do
28856        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28857        if test "x$ISLINK" == x; then
28858          # This is not a symbolic link! We are done!
28859          break
28860        fi
28861        # Again resolve directory symlinks since the target of the just found
28862        # link could be in a different directory
28863        cd `$DIRNAME $ISLINK`
28864        sym_link_dir=`$THEPWDCMD -P`
28865        sym_link_file=`$BASENAME $ISLINK`
28866        let COUNTER=COUNTER+1
28867      done
28868      cd $STARTDIR
28869      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
28870    fi
28871  fi
28872
28873    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28874$as_echo "$PROPER_COMPILER_CC" >&6; }
28875    CC="$PROPER_COMPILER_CC"
28876  else
28877    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
28878$as_echo "no, keeping CC" >&6; }
28879  fi
28880
28881
28882  COMPILER=$CC
28883  COMPILER_NAME=$COMPILER_NAME
28884
28885  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
28886    # cc -V output typically looks like
28887    #     cc: Sun C 5.12 Linux_i386 2011/11/16
28888    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
28889    # Check that this is likely to be the Solaris Studio cc.
28890    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
28891    if test $? -ne 0; then
28892      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28893      { $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
28894$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28895      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28896$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28897      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28898$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28899      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28900    fi
28901    # Remove usage instructions (if present), and
28902    # collapse compiler output into a single line
28903    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28904        $SED -e 's/ *[Uu]sage:.*//'`
28905    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28906        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
28907  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
28908    # xlc -qversion output typically looks like
28909    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
28910    #     Version: 11.01.0000.0015
28911    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
28912    # Check that this is likely to be the IBM XL C compiler.
28913    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
28914    if test $? -ne 0; then
28915      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28916      { $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
28917$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28918      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28919$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28920      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28921$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28922      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28923    fi
28924    # Collapse compiler output into a single line
28925    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28926    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28927        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
28928  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
28929    # There is no specific version flag, but all output starts with a version string.
28930    # First line typically looks something like:
28931    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
28932    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
28933    # Check that this is likely to be Microsoft CL.EXE.
28934    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
28935    if test $? -ne 0; then
28936      { $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
28937$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28938      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28939$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28940      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28941    fi
28942    # Collapse compiler output into a single line
28943    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28944    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28945        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
28946  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
28947    # gcc --version output typically looks like
28948    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
28949    #     Copyright (C) 2013 Free Software Foundation, Inc.
28950    #     This is free software; see the source for copying conditions.  There is NO
28951    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
28952    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28953    # Check that this is likely to be GCC.
28954    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
28955    if test $? -ne 0; then
28956      { $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
28957$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28958      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
28959$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
28960      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28961    fi
28962    # Remove Copyright and legalese from version string, and
28963    # collapse into a single line
28964    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28965        $SED -e 's/ *Copyright .*//'`
28966    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28967        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
28968  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
28969    # clang --version output typically looks like
28970    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
28971    #    clang version 3.3 (tags/RELEASE_33/final)
28972    # or
28973    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
28974    #    Target: x86_64-pc-linux-gnu
28975    #    Thread model: posix
28976    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28977    # Check that this is likely to be clang
28978    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
28979    if test $? -ne 0; then
28980      { $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
28981$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28982      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28983$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28984      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28985    fi
28986    # Collapse compiler output into a single line
28987    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28988    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28989        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
28990  else
28991      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
28992  fi
28993  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
28994  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
28995  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
28996  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
28997
28998  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
28999$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
29000
29001
29002  # Now that we have resolved CC ourself, let autoconf have its go at it
29003  ac_ext=c
29004ac_cpp='$CPP $CPPFLAGS'
29005ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29006ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29007ac_compiler_gnu=$ac_cv_c_compiler_gnu
29008if test -n "$ac_tool_prefix"; then
29009  for ac_prog in $CC
29010  do
29011    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29012set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29014$as_echo_n "checking for $ac_word... " >&6; }
29015if ${ac_cv_prog_CC+:} false; then :
29016  $as_echo_n "(cached) " >&6
29017else
29018  if test -n "$CC"; then
29019  ac_cv_prog_CC="$CC" # Let the user override the test.
29020else
29021as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29022for as_dir in $PATH
29023do
29024  IFS=$as_save_IFS
29025  test -z "$as_dir" && as_dir=.
29026    for ac_exec_ext in '' $ac_executable_extensions; do
29027  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29028    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
29029    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29030    break 2
29031  fi
29032done
29033  done
29034IFS=$as_save_IFS
29035
29036fi
29037fi
29038CC=$ac_cv_prog_CC
29039if test -n "$CC"; then
29040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
29041$as_echo "$CC" >&6; }
29042else
29043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29044$as_echo "no" >&6; }
29045fi
29046
29047
29048    test -n "$CC" && break
29049  done
29050fi
29051if test -z "$CC"; then
29052  ac_ct_CC=$CC
29053  for ac_prog in $CC
29054do
29055  # Extract the first word of "$ac_prog", so it can be a program name with args.
29056set dummy $ac_prog; ac_word=$2
29057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29058$as_echo_n "checking for $ac_word... " >&6; }
29059if ${ac_cv_prog_ac_ct_CC+:} false; then :
29060  $as_echo_n "(cached) " >&6
29061else
29062  if test -n "$ac_ct_CC"; then
29063  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
29064else
29065as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29066for as_dir in $PATH
29067do
29068  IFS=$as_save_IFS
29069  test -z "$as_dir" && as_dir=.
29070    for ac_exec_ext in '' $ac_executable_extensions; do
29071  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29072    ac_cv_prog_ac_ct_CC="$ac_prog"
29073    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29074    break 2
29075  fi
29076done
29077  done
29078IFS=$as_save_IFS
29079
29080fi
29081fi
29082ac_ct_CC=$ac_cv_prog_ac_ct_CC
29083if test -n "$ac_ct_CC"; then
29084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
29085$as_echo "$ac_ct_CC" >&6; }
29086else
29087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29088$as_echo "no" >&6; }
29089fi
29090
29091
29092  test -n "$ac_ct_CC" && break
29093done
29094
29095  if test "x$ac_ct_CC" = x; then
29096    CC=""
29097  else
29098    case $cross_compiling:$ac_tool_warned in
29099yes:)
29100{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29101$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29102ac_tool_warned=yes ;;
29103esac
29104    CC=$ac_ct_CC
29105  fi
29106fi
29107
29108
29109test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29110$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29111as_fn_error $? "no acceptable C compiler found in \$PATH
29112See \`config.log' for more details" "$LINENO" 5; }
29113
29114# Provide some information about the compiler.
29115$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
29116set X $ac_compile
29117ac_compiler=$2
29118for ac_option in --version -v -V -qversion; do
29119  { { ac_try="$ac_compiler $ac_option >&5"
29120case "(($ac_try" in
29121  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29122  *) ac_try_echo=$ac_try;;
29123esac
29124eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29125$as_echo "$ac_try_echo"; } >&5
29126  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
29127  ac_status=$?
29128  if test -s conftest.err; then
29129    sed '10a\
29130... rest of stderr output deleted ...
29131         10q' conftest.err >conftest.er1
29132    cat conftest.er1 >&5
29133  fi
29134  rm -f conftest.er1 conftest.err
29135  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29136  test $ac_status = 0; }
29137done
29138
29139cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29140/* end confdefs.h.  */
29141
29142int
29143main ()
29144{
29145
29146  ;
29147  return 0;
29148}
29149_ACEOF
29150ac_clean_files_save=$ac_clean_files
29151ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
29152# Try to create an executable without -o first, disregard a.out.
29153# It will help us diagnose broken compilers, and finding out an intuition
29154# of exeext.
29155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
29156$as_echo_n "checking whether the C compiler works... " >&6; }
29157ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
29158
29159# The possible output files:
29160ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
29161
29162ac_rmfiles=
29163for ac_file in $ac_files
29164do
29165  case $ac_file in
29166    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29167    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
29168  esac
29169done
29170rm -f $ac_rmfiles
29171
29172if { { ac_try="$ac_link_default"
29173case "(($ac_try" in
29174  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29175  *) ac_try_echo=$ac_try;;
29176esac
29177eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29178$as_echo "$ac_try_echo"; } >&5
29179  (eval "$ac_link_default") 2>&5
29180  ac_status=$?
29181  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29182  test $ac_status = 0; }; then :
29183  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
29184# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
29185# in a Makefile.  We should not override ac_cv_exeext if it was cached,
29186# so that the user can short-circuit this test for compilers unknown to
29187# Autoconf.
29188for ac_file in $ac_files ''
29189do
29190  test -f "$ac_file" || continue
29191  case $ac_file in
29192    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
29193	;;
29194    [ab].out )
29195	# We found the default executable, but exeext='' is most
29196	# certainly right.
29197	break;;
29198    *.* )
29199	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
29200	then :; else
29201	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29202	fi
29203	# We set ac_cv_exeext here because the later test for it is not
29204	# safe: cross compilers may not add the suffix if given an `-o'
29205	# argument, so we may need to know it at that point already.
29206	# Even if this section looks crufty: it has the advantage of
29207	# actually working.
29208	break;;
29209    * )
29210	break;;
29211  esac
29212done
29213test "$ac_cv_exeext" = no && ac_cv_exeext=
29214
29215else
29216  ac_file=''
29217fi
29218if test -z "$ac_file"; then :
29219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29220$as_echo "no" >&6; }
29221$as_echo "$as_me: failed program was:" >&5
29222sed 's/^/| /' conftest.$ac_ext >&5
29223
29224{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29225$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29226as_fn_error 77 "C compiler cannot create executables
29227See \`config.log' for more details" "$LINENO" 5; }
29228else
29229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29230$as_echo "yes" >&6; }
29231fi
29232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
29233$as_echo_n "checking for C compiler default output file name... " >&6; }
29234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
29235$as_echo "$ac_file" >&6; }
29236ac_exeext=$ac_cv_exeext
29237
29238rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
29239ac_clean_files=$ac_clean_files_save
29240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
29241$as_echo_n "checking for suffix of executables... " >&6; }
29242if { { ac_try="$ac_link"
29243case "(($ac_try" in
29244  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29245  *) ac_try_echo=$ac_try;;
29246esac
29247eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29248$as_echo "$ac_try_echo"; } >&5
29249  (eval "$ac_link") 2>&5
29250  ac_status=$?
29251  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29252  test $ac_status = 0; }; then :
29253  # If both `conftest.exe' and `conftest' are `present' (well, observable)
29254# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
29255# work properly (i.e., refer to `conftest.exe'), while it won't with
29256# `rm'.
29257for ac_file in conftest.exe conftest conftest.*; do
29258  test -f "$ac_file" || continue
29259  case $ac_file in
29260    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29261    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29262	  break;;
29263    * ) break;;
29264  esac
29265done
29266else
29267  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29268$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29269as_fn_error $? "cannot compute suffix of executables: cannot compile and link
29270See \`config.log' for more details" "$LINENO" 5; }
29271fi
29272rm -f conftest conftest$ac_cv_exeext
29273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
29274$as_echo "$ac_cv_exeext" >&6; }
29275
29276rm -f conftest.$ac_ext
29277EXEEXT=$ac_cv_exeext
29278ac_exeext=$EXEEXT
29279cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29280/* end confdefs.h.  */
29281#include <stdio.h>
29282int
29283main ()
29284{
29285FILE *f = fopen ("conftest.out", "w");
29286 return ferror (f) || fclose (f) != 0;
29287
29288  ;
29289  return 0;
29290}
29291_ACEOF
29292ac_clean_files="$ac_clean_files conftest.out"
29293# Check that the compiler produces executables we can run.  If not, either
29294# the compiler is broken, or we cross compile.
29295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
29296$as_echo_n "checking whether we are cross compiling... " >&6; }
29297if test "$cross_compiling" != yes; then
29298  { { ac_try="$ac_link"
29299case "(($ac_try" in
29300  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29301  *) ac_try_echo=$ac_try;;
29302esac
29303eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29304$as_echo "$ac_try_echo"; } >&5
29305  (eval "$ac_link") 2>&5
29306  ac_status=$?
29307  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29308  test $ac_status = 0; }
29309  if { ac_try='./conftest$ac_cv_exeext'
29310  { { case "(($ac_try" in
29311  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29312  *) ac_try_echo=$ac_try;;
29313esac
29314eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29315$as_echo "$ac_try_echo"; } >&5
29316  (eval "$ac_try") 2>&5
29317  ac_status=$?
29318  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29319  test $ac_status = 0; }; }; then
29320    cross_compiling=no
29321  else
29322    if test "$cross_compiling" = maybe; then
29323	cross_compiling=yes
29324    else
29325	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29326$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29327as_fn_error $? "cannot run C compiled programs.
29328If you meant to cross compile, use \`--host'.
29329See \`config.log' for more details" "$LINENO" 5; }
29330    fi
29331  fi
29332fi
29333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
29334$as_echo "$cross_compiling" >&6; }
29335
29336rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
29337ac_clean_files=$ac_clean_files_save
29338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
29339$as_echo_n "checking for suffix of object files... " >&6; }
29340if ${ac_cv_objext+:} false; then :
29341  $as_echo_n "(cached) " >&6
29342else
29343  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29344/* end confdefs.h.  */
29345
29346int
29347main ()
29348{
29349
29350  ;
29351  return 0;
29352}
29353_ACEOF
29354rm -f conftest.o conftest.obj
29355if { { ac_try="$ac_compile"
29356case "(($ac_try" in
29357  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29358  *) ac_try_echo=$ac_try;;
29359esac
29360eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29361$as_echo "$ac_try_echo"; } >&5
29362  (eval "$ac_compile") 2>&5
29363  ac_status=$?
29364  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29365  test $ac_status = 0; }; then :
29366  for ac_file in conftest.o conftest.obj conftest.*; do
29367  test -f "$ac_file" || continue;
29368  case $ac_file in
29369    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
29370    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
29371       break;;
29372  esac
29373done
29374else
29375  $as_echo "$as_me: failed program was:" >&5
29376sed 's/^/| /' conftest.$ac_ext >&5
29377
29378{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29379$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29380as_fn_error $? "cannot compute suffix of object files: cannot compile
29381See \`config.log' for more details" "$LINENO" 5; }
29382fi
29383rm -f conftest.$ac_cv_objext conftest.$ac_ext
29384fi
29385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
29386$as_echo "$ac_cv_objext" >&6; }
29387OBJEXT=$ac_cv_objext
29388ac_objext=$OBJEXT
29389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
29390$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
29391if ${ac_cv_c_compiler_gnu+:} false; then :
29392  $as_echo_n "(cached) " >&6
29393else
29394  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29395/* end confdefs.h.  */
29396
29397int
29398main ()
29399{
29400#ifndef __GNUC__
29401       choke me
29402#endif
29403
29404  ;
29405  return 0;
29406}
29407_ACEOF
29408if ac_fn_c_try_compile "$LINENO"; then :
29409  ac_compiler_gnu=yes
29410else
29411  ac_compiler_gnu=no
29412fi
29413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29414ac_cv_c_compiler_gnu=$ac_compiler_gnu
29415
29416fi
29417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
29418$as_echo "$ac_cv_c_compiler_gnu" >&6; }
29419if test $ac_compiler_gnu = yes; then
29420  GCC=yes
29421else
29422  GCC=
29423fi
29424ac_test_CFLAGS=${CFLAGS+set}
29425ac_save_CFLAGS=$CFLAGS
29426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
29427$as_echo_n "checking whether $CC accepts -g... " >&6; }
29428if ${ac_cv_prog_cc_g+:} false; then :
29429  $as_echo_n "(cached) " >&6
29430else
29431  ac_save_c_werror_flag=$ac_c_werror_flag
29432   ac_c_werror_flag=yes
29433   ac_cv_prog_cc_g=no
29434   CFLAGS="-g"
29435   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29436/* end confdefs.h.  */
29437
29438int
29439main ()
29440{
29441
29442  ;
29443  return 0;
29444}
29445_ACEOF
29446if ac_fn_c_try_compile "$LINENO"; then :
29447  ac_cv_prog_cc_g=yes
29448else
29449  CFLAGS=""
29450      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29451/* end confdefs.h.  */
29452
29453int
29454main ()
29455{
29456
29457  ;
29458  return 0;
29459}
29460_ACEOF
29461if ac_fn_c_try_compile "$LINENO"; then :
29462
29463else
29464  ac_c_werror_flag=$ac_save_c_werror_flag
29465	 CFLAGS="-g"
29466	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29467/* end confdefs.h.  */
29468
29469int
29470main ()
29471{
29472
29473  ;
29474  return 0;
29475}
29476_ACEOF
29477if ac_fn_c_try_compile "$LINENO"; then :
29478  ac_cv_prog_cc_g=yes
29479fi
29480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29481fi
29482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29483fi
29484rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29485   ac_c_werror_flag=$ac_save_c_werror_flag
29486fi
29487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
29488$as_echo "$ac_cv_prog_cc_g" >&6; }
29489if test "$ac_test_CFLAGS" = set; then
29490  CFLAGS=$ac_save_CFLAGS
29491elif test $ac_cv_prog_cc_g = yes; then
29492  if test "$GCC" = yes; then
29493    CFLAGS="-g -O2"
29494  else
29495    CFLAGS="-g"
29496  fi
29497else
29498  if test "$GCC" = yes; then
29499    CFLAGS="-O2"
29500  else
29501    CFLAGS=
29502  fi
29503fi
29504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
29505$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
29506if ${ac_cv_prog_cc_c89+:} false; then :
29507  $as_echo_n "(cached) " >&6
29508else
29509  ac_cv_prog_cc_c89=no
29510ac_save_CC=$CC
29511cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29512/* end confdefs.h.  */
29513#include <stdarg.h>
29514#include <stdio.h>
29515struct stat;
29516/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
29517struct buf { int x; };
29518FILE * (*rcsopen) (struct buf *, struct stat *, int);
29519static char *e (p, i)
29520     char **p;
29521     int i;
29522{
29523  return p[i];
29524}
29525static char *f (char * (*g) (char **, int), char **p, ...)
29526{
29527  char *s;
29528  va_list v;
29529  va_start (v,p);
29530  s = g (p, va_arg (v,int));
29531  va_end (v);
29532  return s;
29533}
29534
29535/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
29536   function prototypes and stuff, but not '\xHH' hex character constants.
29537   These don't provoke an error unfortunately, instead are silently treated
29538   as 'x'.  The following induces an error, until -std is added to get
29539   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
29540   array size at least.  It's necessary to write '\x00'==0 to get something
29541   that's true only with -std.  */
29542int osf4_cc_array ['\x00' == 0 ? 1 : -1];
29543
29544/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
29545   inside strings and character constants.  */
29546#define FOO(x) 'x'
29547int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
29548
29549int test (int i, double x);
29550struct s1 {int (*f) (int a);};
29551struct s2 {int (*f) (double a);};
29552int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
29553int argc;
29554char **argv;
29555int
29556main ()
29557{
29558return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
29559  ;
29560  return 0;
29561}
29562_ACEOF
29563for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
29564	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
29565do
29566  CC="$ac_save_CC $ac_arg"
29567  if ac_fn_c_try_compile "$LINENO"; then :
29568  ac_cv_prog_cc_c89=$ac_arg
29569fi
29570rm -f core conftest.err conftest.$ac_objext
29571  test "x$ac_cv_prog_cc_c89" != "xno" && break
29572done
29573rm -f conftest.$ac_ext
29574CC=$ac_save_CC
29575
29576fi
29577# AC_CACHE_VAL
29578case "x$ac_cv_prog_cc_c89" in
29579  x)
29580    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
29581$as_echo "none needed" >&6; } ;;
29582  xno)
29583    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
29584$as_echo "unsupported" >&6; } ;;
29585  *)
29586    CC="$CC $ac_cv_prog_cc_c89"
29587    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
29588$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
29589esac
29590if test "x$ac_cv_prog_cc_c89" != xno; then :
29591
29592fi
29593
29594ac_ext=cpp
29595ac_cpp='$CXXCPP $CPPFLAGS'
29596ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29597ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29598ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29599
29600
29601
29602  COMPILER_NAME=C++
29603  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
29604
29605  if test "x$CXX" != x; then
29606    # User has supplied compiler name already, always let that override.
29607    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
29608$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
29609    if test "x`basename $CXX`" = "x$CXX"; then
29610      # A command without a complete path is provided, search $PATH.
29611
29612      for ac_prog in $CXX
29613do
29614  # Extract the first word of "$ac_prog", so it can be a program name with args.
29615set dummy $ac_prog; ac_word=$2
29616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29617$as_echo_n "checking for $ac_word... " >&6; }
29618if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29619  $as_echo_n "(cached) " >&6
29620else
29621  case $POTENTIAL_CXX in
29622  [\\/]* | ?:[\\/]*)
29623  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29624  ;;
29625  *)
29626  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29627for as_dir in $PATH
29628do
29629  IFS=$as_save_IFS
29630  test -z "$as_dir" && as_dir=.
29631    for ac_exec_ext in '' $ac_executable_extensions; do
29632  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29633    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29634    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29635    break 2
29636  fi
29637done
29638  done
29639IFS=$as_save_IFS
29640
29641  ;;
29642esac
29643fi
29644POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29645if test -n "$POTENTIAL_CXX"; then
29646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29647$as_echo "$POTENTIAL_CXX" >&6; }
29648else
29649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29650$as_echo "no" >&6; }
29651fi
29652
29653
29654  test -n "$POTENTIAL_CXX" && break
29655done
29656
29657      if test "x$POTENTIAL_CXX" != x; then
29658        CXX=$POTENTIAL_CXX
29659      else
29660        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
29661      fi
29662    else
29663      # Otherwise it might already be a complete path
29664      if test ! -x "$CXX"; then
29665        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
29666      fi
29667    fi
29668  else
29669    # No user supplied value. Locate compiler ourselves.
29670
29671    # If we are cross compiling, assume cross compilation tools follows the
29672    # cross compilation standard where they are prefixed with the autoconf
29673    # standard name for the target. For example the binary
29674    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
29675    # If we are not cross compiling, then the default compiler name will be
29676    # used.
29677
29678    CXX=
29679    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
29680    # before checking the rest of the PATH.
29681    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
29682    # step, this should not be necessary.
29683    if test -n "$TOOLCHAIN_PATH"; then
29684      PATH_save="$PATH"
29685      PATH="$TOOLCHAIN_PATH"
29686      for ac_prog in $SEARCH_LIST
29687do
29688  # Extract the first word of "$ac_prog", so it can be a program name with args.
29689set dummy $ac_prog; ac_word=$2
29690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29691$as_echo_n "checking for $ac_word... " >&6; }
29692if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
29693  $as_echo_n "(cached) " >&6
29694else
29695  case $TOOLCHAIN_PATH_CXX in
29696  [\\/]* | ?:[\\/]*)
29697  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
29698  ;;
29699  *)
29700  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29701for as_dir in $PATH
29702do
29703  IFS=$as_save_IFS
29704  test -z "$as_dir" && as_dir=.
29705    for ac_exec_ext in '' $ac_executable_extensions; do
29706  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29707    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
29708    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29709    break 2
29710  fi
29711done
29712  done
29713IFS=$as_save_IFS
29714
29715  ;;
29716esac
29717fi
29718TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
29719if test -n "$TOOLCHAIN_PATH_CXX"; then
29720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
29721$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
29722else
29723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29724$as_echo "no" >&6; }
29725fi
29726
29727
29728  test -n "$TOOLCHAIN_PATH_CXX" && break
29729done
29730
29731      CXX=$TOOLCHAIN_PATH_CXX
29732      PATH="$PATH_save"
29733    fi
29734
29735    # AC_PATH_PROGS can't be run multiple times with the same variable,
29736    # so create a new name for this run.
29737    if test "x$CXX" = x; then
29738      for ac_prog in $SEARCH_LIST
29739do
29740  # Extract the first word of "$ac_prog", so it can be a program name with args.
29741set dummy $ac_prog; ac_word=$2
29742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29743$as_echo_n "checking for $ac_word... " >&6; }
29744if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29745  $as_echo_n "(cached) " >&6
29746else
29747  case $POTENTIAL_CXX in
29748  [\\/]* | ?:[\\/]*)
29749  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29750  ;;
29751  *)
29752  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29753for as_dir in $PATH
29754do
29755  IFS=$as_save_IFS
29756  test -z "$as_dir" && as_dir=.
29757    for ac_exec_ext in '' $ac_executable_extensions; do
29758  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29759    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29760    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29761    break 2
29762  fi
29763done
29764  done
29765IFS=$as_save_IFS
29766
29767  ;;
29768esac
29769fi
29770POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29771if test -n "$POTENTIAL_CXX"; then
29772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29773$as_echo "$POTENTIAL_CXX" >&6; }
29774else
29775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29776$as_echo "no" >&6; }
29777fi
29778
29779
29780  test -n "$POTENTIAL_CXX" && break
29781done
29782
29783      CXX=$POTENTIAL_CXX
29784    fi
29785
29786    if test "x$CXX" = x; then
29787
29788  # Print a helpful message on how to acquire the necessary build dependency.
29789  # devkit is the help tag: freetype, cups, pulse, alsa etc
29790  MISSING_DEPENDENCY=devkit
29791
29792  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29793    cygwin_help $MISSING_DEPENDENCY
29794  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29795    msys_help $MISSING_DEPENDENCY
29796  else
29797    PKGHANDLER_COMMAND=
29798
29799    case $PKGHANDLER in
29800      apt-get)
29801        apt_help     $MISSING_DEPENDENCY ;;
29802      yum)
29803        yum_help     $MISSING_DEPENDENCY ;;
29804      port)
29805        port_help    $MISSING_DEPENDENCY ;;
29806      pkgutil)
29807        pkgutil_help $MISSING_DEPENDENCY ;;
29808      pkgadd)
29809        pkgadd_help  $MISSING_DEPENDENCY ;;
29810    esac
29811
29812    if test "x$PKGHANDLER_COMMAND" != x; then
29813      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29814    fi
29815  fi
29816
29817      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
29818    fi
29819  fi
29820
29821  # Now we have a compiler binary in CXX. Make sure it's okay.
29822
29823  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29824
29825  # First separate the path from the arguments. This will split at the first
29826  # space.
29827  complete="$CXX"
29828  path="${complete%% *}"
29829  tmp="$complete EOL"
29830  arguments="${tmp#* }"
29831
29832  # Input might be given as Windows format, start by converting to
29833  # unix format.
29834  new_path=`$CYGPATH -u "$path"`
29835
29836  # Now try to locate executable using which
29837  new_path=`$WHICH "$new_path" 2> /dev/null`
29838  # bat and cmd files are not always considered executable in cygwin causing which
29839  # to not find them
29840  if test "x$new_path" = x \
29841      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29842      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29843    new_path=`$CYGPATH -u "$path"`
29844  fi
29845  if test "x$new_path" = x; then
29846    # Oops. Which didn't find the executable.
29847    # The splitting of arguments from the executable at a space might have been incorrect,
29848    # since paths with space are more likely in Windows. Give it another try with the whole
29849    # argument.
29850    path="$complete"
29851    arguments="EOL"
29852    new_path=`$CYGPATH -u "$path"`
29853    new_path=`$WHICH "$new_path" 2> /dev/null`
29854    # bat and cmd files are not always considered executable in cygwin causing which
29855    # to not find them
29856    if test "x$new_path" = x \
29857        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29858        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29859      new_path=`$CYGPATH -u "$path"`
29860    fi
29861    if test "x$new_path" = x; then
29862      # It's still not found. Now this is an unrecoverable error.
29863      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29864$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29865      has_space=`$ECHO "$complete" | $GREP " "`
29866      if test "x$has_space" != x; then
29867        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29868$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29869      fi
29870      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29871    fi
29872  fi
29873
29874  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29875  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29876  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29877  # "foo.exe" is OK but "foo" is an error.
29878  #
29879  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29880  # It is also a way to make sure we got the proper file name for the real test later on.
29881  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29882  if test "x$test_shortpath" = x; then
29883    # Short path failed, file does not exist as specified.
29884    # Try adding .exe or .cmd
29885    if test -f "${new_path}.exe"; then
29886      input_to_shortpath="${new_path}.exe"
29887    elif test -f "${new_path}.cmd"; then
29888      input_to_shortpath="${new_path}.cmd"
29889    else
29890      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
29891$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
29892      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29893$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29894      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29895    fi
29896  else
29897    input_to_shortpath="$new_path"
29898  fi
29899
29900  # Call helper function which possibly converts this using DOS-style short mode.
29901  # If so, the updated path is stored in $new_path.
29902  new_path="$input_to_shortpath"
29903
29904  input_path="$input_to_shortpath"
29905  # Check if we need to convert this using DOS-style short mode. If the path
29906  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29907  # take no chances and rewrite it.
29908  # Note: m4 eats our [], so we need to use [ and ] instead.
29909  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29910  if test "x$has_forbidden_chars" != x; then
29911    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29912    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29913    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29914    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29915      # Going to short mode and back again did indeed matter. Since short mode is
29916      # case insensitive, let's make it lowercase to improve readability.
29917      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29918      # Now convert it back to Unix-stile (cygpath)
29919      input_path=`$CYGPATH -u "$shortmode_path"`
29920      new_path="$input_path"
29921    fi
29922  fi
29923
29924  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29925  if test "x$test_cygdrive_prefix" = x; then
29926    # As a simple fix, exclude /usr/bin since it's not a real path.
29927    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29928      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29929      # a path prefixed by /cygdrive for fixpath to work.
29930      new_path="$CYGWIN_ROOT_PATH$input_path"
29931    fi
29932  fi
29933
29934  # remove trailing .exe if any
29935  new_path="${new_path/%.exe/}"
29936
29937  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29938
29939  # First separate the path from the arguments. This will split at the first
29940  # space.
29941  complete="$CXX"
29942  path="${complete%% *}"
29943  tmp="$complete EOL"
29944  arguments="${tmp#* }"
29945
29946  # Input might be given as Windows format, start by converting to
29947  # unix format.
29948  new_path="$path"
29949
29950  windows_path="$new_path"
29951  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29952    unix_path=`$CYGPATH -u "$windows_path"`
29953    new_path="$unix_path"
29954  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29955    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29956    new_path="$unix_path"
29957  fi
29958
29959
29960  # Now try to locate executable using which
29961  new_path=`$WHICH "$new_path" 2> /dev/null`
29962
29963  if test "x$new_path" = x; then
29964    # Oops. Which didn't find the executable.
29965    # The splitting of arguments from the executable at a space might have been incorrect,
29966    # since paths with space are more likely in Windows. Give it another try with the whole
29967    # argument.
29968    path="$complete"
29969    arguments="EOL"
29970    new_path="$path"
29971
29972  windows_path="$new_path"
29973  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29974    unix_path=`$CYGPATH -u "$windows_path"`
29975    new_path="$unix_path"
29976  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29977    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29978    new_path="$unix_path"
29979  fi
29980
29981
29982    new_path=`$WHICH "$new_path" 2> /dev/null`
29983    # bat and cmd files are not always considered executable in MSYS causing which
29984    # to not find them
29985    if test "x$new_path" = x \
29986        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29987        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29988      new_path="$path"
29989
29990  windows_path="$new_path"
29991  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29992    unix_path=`$CYGPATH -u "$windows_path"`
29993    new_path="$unix_path"
29994  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29995    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29996    new_path="$unix_path"
29997  fi
29998
29999    fi
30000
30001    if test "x$new_path" = x; then
30002      # It's still not found. Now this is an unrecoverable error.
30003      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30004$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30005      has_space=`$ECHO "$complete" | $GREP " "`
30006      if test "x$has_space" != x; then
30007        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30008$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30009      fi
30010      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30011    fi
30012  fi
30013
30014  # Now new_path has a complete unix path to the binary
30015  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30016    # Keep paths in /bin as-is, but remove trailing .exe if any
30017    new_path="${new_path/%.exe/}"
30018    # Do not save /bin paths to all_fixpath_prefixes!
30019  else
30020    # Not in mixed or Windows style, start by that.
30021    new_path=`cmd //c echo $new_path`
30022
30023  input_path="$new_path"
30024  # Check if we need to convert this using DOS-style short mode. If the path
30025  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30026  # take no chances and rewrite it.
30027  # Note: m4 eats our [], so we need to use [ and ] instead.
30028  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30029  if test "x$has_forbidden_chars" != x; then
30030    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30031    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30032  fi
30033
30034    # Output is in $new_path
30035
30036  windows_path="$new_path"
30037  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30038    unix_path=`$CYGPATH -u "$windows_path"`
30039    new_path="$unix_path"
30040  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30041    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30042    new_path="$unix_path"
30043  fi
30044
30045    # remove trailing .exe if any
30046    new_path="${new_path/%.exe/}"
30047
30048    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30049    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30050  fi
30051
30052  else
30053    # We're on a posix platform. Hooray! :)
30054    # First separate the path from the arguments. This will split at the first
30055    # space.
30056    complete="$CXX"
30057    path="${complete%% *}"
30058    tmp="$complete EOL"
30059    arguments="${tmp#* }"
30060
30061    # Cannot rely on the command "which" here since it doesn't always work.
30062    is_absolute_path=`$ECHO "$path" | $GREP ^/`
30063    if test -z "$is_absolute_path"; then
30064      # Path to executable is not absolute. Find it.
30065      IFS_save="$IFS"
30066      IFS=:
30067      for p in $PATH; do
30068        if test -f "$p/$path" && test -x "$p/$path"; then
30069          new_path="$p/$path"
30070          break
30071        fi
30072      done
30073      IFS="$IFS_save"
30074    else
30075      # This is an absolute path, we can use it without further modifications.
30076      new_path="$path"
30077    fi
30078
30079    if test "x$new_path" = x; then
30080      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30081$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30082      has_space=`$ECHO "$complete" | $GREP " "`
30083      if test "x$has_space" != x; then
30084        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30085$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30086      fi
30087      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30088    fi
30089  fi
30090
30091  # Now join together the path and the arguments once again
30092  if test "x$arguments" != xEOL; then
30093    new_complete="$new_path ${arguments% *}"
30094  else
30095    new_complete="$new_path"
30096  fi
30097
30098  if test "x$complete" != "x$new_complete"; then
30099    CXX="$new_complete"
30100    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
30101$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
30102  fi
30103
30104  TEST_COMPILER="$CXX"
30105  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
30106  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
30107  if test "x$OPENJDK_BUILD_OS" != xaix; then
30108    # FIXME: This test should not be needed anymore; we don't do that for any platform.
30109    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
30110$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
30111
30112  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30113    # Follow a chain of symbolic links. Use readlink
30114    # where it exists, else fall back to horribly
30115    # complicated shell code.
30116    if test "x$READLINK_TESTED" != yes; then
30117      # On MacOSX there is a readlink tool with a different
30118      # purpose than the GNU readlink tool. Check the found readlink.
30119      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30120      if test "x$ISGNU" = x; then
30121        # A readlink that we do not know how to use.
30122        # Are there other non-GNU readlinks out there?
30123        READLINK_TESTED=yes
30124        READLINK=
30125      fi
30126    fi
30127
30128    if test "x$READLINK" != x; then
30129      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
30130    else
30131      # Save the current directory for restoring afterwards
30132      STARTDIR=$PWD
30133      COUNTER=0
30134      sym_link_dir=`$DIRNAME $TEST_COMPILER`
30135      sym_link_file=`$BASENAME $TEST_COMPILER`
30136      cd $sym_link_dir
30137      # Use -P flag to resolve symlinks in directories.
30138      cd `$THEPWDCMD -P`
30139      sym_link_dir=`$THEPWDCMD -P`
30140      # Resolve file symlinks
30141      while test $COUNTER -lt 20; do
30142        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30143        if test "x$ISLINK" == x; then
30144          # This is not a symbolic link! We are done!
30145          break
30146        fi
30147        # Again resolve directory symlinks since the target of the just found
30148        # link could be in a different directory
30149        cd `$DIRNAME $ISLINK`
30150        sym_link_dir=`$THEPWDCMD -P`
30151        sym_link_file=`$BASENAME $ISLINK`
30152        let COUNTER=COUNTER+1
30153      done
30154      cd $STARTDIR
30155      TEST_COMPILER=$sym_link_dir/$sym_link_file
30156    fi
30157  fi
30158
30159    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
30160$as_echo "$TEST_COMPILER" >&6; }
30161  fi
30162  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
30163$as_echo_n "checking if CXX is disguised ccache... " >&6; }
30164
30165  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
30166  if test "x$COMPILER_BASENAME" = "xccache"; then
30167    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
30168$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
30169    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
30170    # We want to control ccache invocation ourselves, so ignore this cc and try
30171    # searching again.
30172
30173    # Remove the path to the fake ccache cc from the PATH
30174    RETRY_COMPILER_SAVED_PATH="$PATH"
30175    COMPILER_DIRNAME=`$DIRNAME $CXX`
30176    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
30177
30178    # Try again looking for our compiler
30179    if test -n "$ac_tool_prefix"; then
30180  for ac_prog in $TOOLCHAIN_CXX_BINARY
30181  do
30182    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30183set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30185$as_echo_n "checking for $ac_word... " >&6; }
30186if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
30187  $as_echo_n "(cached) " >&6
30188else
30189  if test -n "$PROPER_COMPILER_CXX"; then
30190  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
30191else
30192as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30193for as_dir in $PATH
30194do
30195  IFS=$as_save_IFS
30196  test -z "$as_dir" && as_dir=.
30197    for ac_exec_ext in '' $ac_executable_extensions; do
30198  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30199    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
30200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30201    break 2
30202  fi
30203done
30204  done
30205IFS=$as_save_IFS
30206
30207fi
30208fi
30209PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
30210if test -n "$PROPER_COMPILER_CXX"; then
30211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30212$as_echo "$PROPER_COMPILER_CXX" >&6; }
30213else
30214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30215$as_echo "no" >&6; }
30216fi
30217
30218
30219    test -n "$PROPER_COMPILER_CXX" && break
30220  done
30221fi
30222if test -z "$PROPER_COMPILER_CXX"; then
30223  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
30224  for ac_prog in $TOOLCHAIN_CXX_BINARY
30225do
30226  # Extract the first word of "$ac_prog", so it can be a program name with args.
30227set dummy $ac_prog; ac_word=$2
30228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30229$as_echo_n "checking for $ac_word... " >&6; }
30230if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
30231  $as_echo_n "(cached) " >&6
30232else
30233  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30234  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
30235else
30236as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30237for as_dir in $PATH
30238do
30239  IFS=$as_save_IFS
30240  test -z "$as_dir" && as_dir=.
30241    for ac_exec_ext in '' $ac_executable_extensions; do
30242  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30243    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
30244    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30245    break 2
30246  fi
30247done
30248  done
30249IFS=$as_save_IFS
30250
30251fi
30252fi
30253ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
30254if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
30256$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
30257else
30258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30259$as_echo "no" >&6; }
30260fi
30261
30262
30263  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
30264done
30265
30266  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
30267    PROPER_COMPILER_CXX=""
30268  else
30269    case $cross_compiling:$ac_tool_warned in
30270yes:)
30271{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30272$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30273ac_tool_warned=yes ;;
30274esac
30275    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
30276  fi
30277fi
30278
30279
30280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30281
30282  # First separate the path from the arguments. This will split at the first
30283  # space.
30284  complete="$PROPER_COMPILER_CXX"
30285  path="${complete%% *}"
30286  tmp="$complete EOL"
30287  arguments="${tmp#* }"
30288
30289  # Input might be given as Windows format, start by converting to
30290  # unix format.
30291  new_path=`$CYGPATH -u "$path"`
30292
30293  # Now try to locate executable using which
30294  new_path=`$WHICH "$new_path" 2> /dev/null`
30295  # bat and cmd files are not always considered executable in cygwin causing which
30296  # to not find them
30297  if test "x$new_path" = x \
30298      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30299      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30300    new_path=`$CYGPATH -u "$path"`
30301  fi
30302  if test "x$new_path" = x; then
30303    # Oops. Which didn't find the executable.
30304    # The splitting of arguments from the executable at a space might have been incorrect,
30305    # since paths with space are more likely in Windows. Give it another try with the whole
30306    # argument.
30307    path="$complete"
30308    arguments="EOL"
30309    new_path=`$CYGPATH -u "$path"`
30310    new_path=`$WHICH "$new_path" 2> /dev/null`
30311    # bat and cmd files are not always considered executable in cygwin causing which
30312    # to not find them
30313    if test "x$new_path" = x \
30314        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30315        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30316      new_path=`$CYGPATH -u "$path"`
30317    fi
30318    if test "x$new_path" = x; then
30319      # It's still not found. Now this is an unrecoverable error.
30320      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30321$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30322      has_space=`$ECHO "$complete" | $GREP " "`
30323      if test "x$has_space" != x; then
30324        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30325$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30326      fi
30327      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30328    fi
30329  fi
30330
30331  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30332  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30333  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30334  # "foo.exe" is OK but "foo" is an error.
30335  #
30336  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30337  # It is also a way to make sure we got the proper file name for the real test later on.
30338  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30339  if test "x$test_shortpath" = x; then
30340    # Short path failed, file does not exist as specified.
30341    # Try adding .exe or .cmd
30342    if test -f "${new_path}.exe"; then
30343      input_to_shortpath="${new_path}.exe"
30344    elif test -f "${new_path}.cmd"; then
30345      input_to_shortpath="${new_path}.cmd"
30346    else
30347      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
30348$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
30349      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30350$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30351      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30352    fi
30353  else
30354    input_to_shortpath="$new_path"
30355  fi
30356
30357  # Call helper function which possibly converts this using DOS-style short mode.
30358  # If so, the updated path is stored in $new_path.
30359  new_path="$input_to_shortpath"
30360
30361  input_path="$input_to_shortpath"
30362  # Check if we need to convert this using DOS-style short mode. If the path
30363  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30364  # take no chances and rewrite it.
30365  # Note: m4 eats our [], so we need to use [ and ] instead.
30366  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30367  if test "x$has_forbidden_chars" != x; then
30368    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30369    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30370    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30371    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30372      # Going to short mode and back again did indeed matter. Since short mode is
30373      # case insensitive, let's make it lowercase to improve readability.
30374      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30375      # Now convert it back to Unix-stile (cygpath)
30376      input_path=`$CYGPATH -u "$shortmode_path"`
30377      new_path="$input_path"
30378    fi
30379  fi
30380
30381  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30382  if test "x$test_cygdrive_prefix" = x; then
30383    # As a simple fix, exclude /usr/bin since it's not a real path.
30384    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30385      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30386      # a path prefixed by /cygdrive for fixpath to work.
30387      new_path="$CYGWIN_ROOT_PATH$input_path"
30388    fi
30389  fi
30390
30391  # remove trailing .exe if any
30392  new_path="${new_path/%.exe/}"
30393
30394  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30395
30396  # First separate the path from the arguments. This will split at the first
30397  # space.
30398  complete="$PROPER_COMPILER_CXX"
30399  path="${complete%% *}"
30400  tmp="$complete EOL"
30401  arguments="${tmp#* }"
30402
30403  # Input might be given as Windows format, start by converting to
30404  # unix format.
30405  new_path="$path"
30406
30407  windows_path="$new_path"
30408  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30409    unix_path=`$CYGPATH -u "$windows_path"`
30410    new_path="$unix_path"
30411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30412    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30413    new_path="$unix_path"
30414  fi
30415
30416
30417  # Now try to locate executable using which
30418  new_path=`$WHICH "$new_path" 2> /dev/null`
30419
30420  if test "x$new_path" = x; then
30421    # Oops. Which didn't find the executable.
30422    # The splitting of arguments from the executable at a space might have been incorrect,
30423    # since paths with space are more likely in Windows. Give it another try with the whole
30424    # argument.
30425    path="$complete"
30426    arguments="EOL"
30427    new_path="$path"
30428
30429  windows_path="$new_path"
30430  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30431    unix_path=`$CYGPATH -u "$windows_path"`
30432    new_path="$unix_path"
30433  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30434    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30435    new_path="$unix_path"
30436  fi
30437
30438
30439    new_path=`$WHICH "$new_path" 2> /dev/null`
30440    # bat and cmd files are not always considered executable in MSYS causing which
30441    # to not find them
30442    if test "x$new_path" = x \
30443        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30444        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30445      new_path="$path"
30446
30447  windows_path="$new_path"
30448  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30449    unix_path=`$CYGPATH -u "$windows_path"`
30450    new_path="$unix_path"
30451  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30452    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30453    new_path="$unix_path"
30454  fi
30455
30456    fi
30457
30458    if test "x$new_path" = x; then
30459      # It's still not found. Now this is an unrecoverable error.
30460      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30461$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30462      has_space=`$ECHO "$complete" | $GREP " "`
30463      if test "x$has_space" != x; then
30464        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30465$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30466      fi
30467      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30468    fi
30469  fi
30470
30471  # Now new_path has a complete unix path to the binary
30472  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30473    # Keep paths in /bin as-is, but remove trailing .exe if any
30474    new_path="${new_path/%.exe/}"
30475    # Do not save /bin paths to all_fixpath_prefixes!
30476  else
30477    # Not in mixed or Windows style, start by that.
30478    new_path=`cmd //c echo $new_path`
30479
30480  input_path="$new_path"
30481  # Check if we need to convert this using DOS-style short mode. If the path
30482  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30483  # take no chances and rewrite it.
30484  # Note: m4 eats our [], so we need to use [ and ] instead.
30485  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30486  if test "x$has_forbidden_chars" != x; then
30487    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30488    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30489  fi
30490
30491    # Output is in $new_path
30492
30493  windows_path="$new_path"
30494  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30495    unix_path=`$CYGPATH -u "$windows_path"`
30496    new_path="$unix_path"
30497  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30498    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30499    new_path="$unix_path"
30500  fi
30501
30502    # remove trailing .exe if any
30503    new_path="${new_path/%.exe/}"
30504
30505    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30506    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30507  fi
30508
30509  else
30510    # We're on a posix platform. Hooray! :)
30511    # First separate the path from the arguments. This will split at the first
30512    # space.
30513    complete="$PROPER_COMPILER_CXX"
30514    path="${complete%% *}"
30515    tmp="$complete EOL"
30516    arguments="${tmp#* }"
30517
30518    # Cannot rely on the command "which" here since it doesn't always work.
30519    is_absolute_path=`$ECHO "$path" | $GREP ^/`
30520    if test -z "$is_absolute_path"; then
30521      # Path to executable is not absolute. Find it.
30522      IFS_save="$IFS"
30523      IFS=:
30524      for p in $PATH; do
30525        if test -f "$p/$path" && test -x "$p/$path"; then
30526          new_path="$p/$path"
30527          break
30528        fi
30529      done
30530      IFS="$IFS_save"
30531    else
30532      # This is an absolute path, we can use it without further modifications.
30533      new_path="$path"
30534    fi
30535
30536    if test "x$new_path" = x; then
30537      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30538$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30539      has_space=`$ECHO "$complete" | $GREP " "`
30540      if test "x$has_space" != x; then
30541        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30542$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30543      fi
30544      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30545    fi
30546  fi
30547
30548  # Now join together the path and the arguments once again
30549  if test "x$arguments" != xEOL; then
30550    new_complete="$new_path ${arguments% *}"
30551  else
30552    new_complete="$new_path"
30553  fi
30554
30555  if test "x$complete" != "x$new_complete"; then
30556    PROPER_COMPILER_CXX="$new_complete"
30557    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
30558$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
30559  fi
30560
30561    PATH="$RETRY_COMPILER_SAVED_PATH"
30562
30563    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
30564$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
30565
30566  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30567    # Follow a chain of symbolic links. Use readlink
30568    # where it exists, else fall back to horribly
30569    # complicated shell code.
30570    if test "x$READLINK_TESTED" != yes; then
30571      # On MacOSX there is a readlink tool with a different
30572      # purpose than the GNU readlink tool. Check the found readlink.
30573      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30574      if test "x$ISGNU" = x; then
30575        # A readlink that we do not know how to use.
30576        # Are there other non-GNU readlinks out there?
30577        READLINK_TESTED=yes
30578        READLINK=
30579      fi
30580    fi
30581
30582    if test "x$READLINK" != x; then
30583      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
30584    else
30585      # Save the current directory for restoring afterwards
30586      STARTDIR=$PWD
30587      COUNTER=0
30588      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
30589      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
30590      cd $sym_link_dir
30591      # Use -P flag to resolve symlinks in directories.
30592      cd `$THEPWDCMD -P`
30593      sym_link_dir=`$THEPWDCMD -P`
30594      # Resolve file symlinks
30595      while test $COUNTER -lt 20; do
30596        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30597        if test "x$ISLINK" == x; then
30598          # This is not a symbolic link! We are done!
30599          break
30600        fi
30601        # Again resolve directory symlinks since the target of the just found
30602        # link could be in a different directory
30603        cd `$DIRNAME $ISLINK`
30604        sym_link_dir=`$THEPWDCMD -P`
30605        sym_link_file=`$BASENAME $ISLINK`
30606        let COUNTER=COUNTER+1
30607      done
30608      cd $STARTDIR
30609      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
30610    fi
30611  fi
30612
30613    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30614$as_echo "$PROPER_COMPILER_CXX" >&6; }
30615    CXX="$PROPER_COMPILER_CXX"
30616  else
30617    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
30618$as_echo "no, keeping CXX" >&6; }
30619  fi
30620
30621
30622  COMPILER=$CXX
30623  COMPILER_NAME=$COMPILER_NAME
30624
30625  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30626    # cc -V output typically looks like
30627    #     cc: Sun C 5.12 Linux_i386 2011/11/16
30628    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
30629    # Check that this is likely to be the Solaris Studio cc.
30630    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
30631    if test $? -ne 0; then
30632      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30633      { $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
30634$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30635      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30636$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30637      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30638$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30639      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30640    fi
30641    # Remove usage instructions (if present), and
30642    # collapse compiler output into a single line
30643    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30644        $SED -e 's/ *[Uu]sage:.*//'`
30645    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30646        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
30647  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
30648    # xlc -qversion output typically looks like
30649    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
30650    #     Version: 11.01.0000.0015
30651    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
30652    # Check that this is likely to be the IBM XL C compiler.
30653    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
30654    if test $? -ne 0; then
30655      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30656      { $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
30657$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30658      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30659$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30660      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30661$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30662      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30663    fi
30664    # Collapse compiler output into a single line
30665    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30666    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30667        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
30668  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
30669    # There is no specific version flag, but all output starts with a version string.
30670    # First line typically looks something like:
30671    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
30672    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
30673    # Check that this is likely to be Microsoft CL.EXE.
30674    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
30675    if test $? -ne 0; then
30676      { $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
30677$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30678      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30679$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30680      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30681    fi
30682    # Collapse compiler output into a single line
30683    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30684    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30685        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
30686  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
30687    # gcc --version output typically looks like
30688    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
30689    #     Copyright (C) 2013 Free Software Foundation, Inc.
30690    #     This is free software; see the source for copying conditions.  There is NO
30691    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
30692    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30693    # Check that this is likely to be GCC.
30694    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
30695    if test $? -ne 0; then
30696      { $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
30697$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30698      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
30699$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
30700      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30701    fi
30702    # Remove Copyright and legalese from version string, and
30703    # collapse into a single line
30704    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30705        $SED -e 's/ *Copyright .*//'`
30706    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30707        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
30708  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
30709    # clang --version output typically looks like
30710    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
30711    #    clang version 3.3 (tags/RELEASE_33/final)
30712    # or
30713    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
30714    #    Target: x86_64-pc-linux-gnu
30715    #    Thread model: posix
30716    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30717    # Check that this is likely to be clang
30718    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
30719    if test $? -ne 0; then
30720      { $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
30721$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30722      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30723$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30724      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30725    fi
30726    # Collapse compiler output into a single line
30727    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30728    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30729        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
30730  else
30731      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
30732  fi
30733  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
30734  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
30735  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
30736  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
30737
30738  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
30739$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
30740
30741
30742  # Now that we have resolved CXX ourself, let autoconf have its go at it
30743  ac_ext=cpp
30744ac_cpp='$CXXCPP $CPPFLAGS'
30745ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30746ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30747ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30748if test -z "$CXX"; then
30749  if test -n "$CCC"; then
30750    CXX=$CCC
30751  else
30752    if test -n "$ac_tool_prefix"; then
30753  for ac_prog in $CXX
30754  do
30755    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30756set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30758$as_echo_n "checking for $ac_word... " >&6; }
30759if ${ac_cv_prog_CXX+:} false; then :
30760  $as_echo_n "(cached) " >&6
30761else
30762  if test -n "$CXX"; then
30763  ac_cv_prog_CXX="$CXX" # Let the user override the test.
30764else
30765as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30766for as_dir in $PATH
30767do
30768  IFS=$as_save_IFS
30769  test -z "$as_dir" && as_dir=.
30770    for ac_exec_ext in '' $ac_executable_extensions; do
30771  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30772    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
30773    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30774    break 2
30775  fi
30776done
30777  done
30778IFS=$as_save_IFS
30779
30780fi
30781fi
30782CXX=$ac_cv_prog_CXX
30783if test -n "$CXX"; then
30784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
30785$as_echo "$CXX" >&6; }
30786else
30787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30788$as_echo "no" >&6; }
30789fi
30790
30791
30792    test -n "$CXX" && break
30793  done
30794fi
30795if test -z "$CXX"; then
30796  ac_ct_CXX=$CXX
30797  for ac_prog in $CXX
30798do
30799  # Extract the first word of "$ac_prog", so it can be a program name with args.
30800set dummy $ac_prog; ac_word=$2
30801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30802$as_echo_n "checking for $ac_word... " >&6; }
30803if ${ac_cv_prog_ac_ct_CXX+:} false; then :
30804  $as_echo_n "(cached) " >&6
30805else
30806  if test -n "$ac_ct_CXX"; then
30807  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
30808else
30809as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30810for as_dir in $PATH
30811do
30812  IFS=$as_save_IFS
30813  test -z "$as_dir" && as_dir=.
30814    for ac_exec_ext in '' $ac_executable_extensions; do
30815  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30816    ac_cv_prog_ac_ct_CXX="$ac_prog"
30817    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30818    break 2
30819  fi
30820done
30821  done
30822IFS=$as_save_IFS
30823
30824fi
30825fi
30826ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
30827if test -n "$ac_ct_CXX"; then
30828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
30829$as_echo "$ac_ct_CXX" >&6; }
30830else
30831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30832$as_echo "no" >&6; }
30833fi
30834
30835
30836  test -n "$ac_ct_CXX" && break
30837done
30838
30839  if test "x$ac_ct_CXX" = x; then
30840    CXX="g++"
30841  else
30842    case $cross_compiling:$ac_tool_warned in
30843yes:)
30844{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30845$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30846ac_tool_warned=yes ;;
30847esac
30848    CXX=$ac_ct_CXX
30849  fi
30850fi
30851
30852  fi
30853fi
30854# Provide some information about the compiler.
30855$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
30856set X $ac_compile
30857ac_compiler=$2
30858for ac_option in --version -v -V -qversion; do
30859  { { ac_try="$ac_compiler $ac_option >&5"
30860case "(($ac_try" in
30861  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30862  *) ac_try_echo=$ac_try;;
30863esac
30864eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30865$as_echo "$ac_try_echo"; } >&5
30866  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
30867  ac_status=$?
30868  if test -s conftest.err; then
30869    sed '10a\
30870... rest of stderr output deleted ...
30871         10q' conftest.err >conftest.er1
30872    cat conftest.er1 >&5
30873  fi
30874  rm -f conftest.er1 conftest.err
30875  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30876  test $ac_status = 0; }
30877done
30878
30879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
30880$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
30881if ${ac_cv_cxx_compiler_gnu+:} false; then :
30882  $as_echo_n "(cached) " >&6
30883else
30884  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30885/* end confdefs.h.  */
30886
30887int
30888main ()
30889{
30890#ifndef __GNUC__
30891       choke me
30892#endif
30893
30894  ;
30895  return 0;
30896}
30897_ACEOF
30898if ac_fn_cxx_try_compile "$LINENO"; then :
30899  ac_compiler_gnu=yes
30900else
30901  ac_compiler_gnu=no
30902fi
30903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30904ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
30905
30906fi
30907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
30908$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
30909if test $ac_compiler_gnu = yes; then
30910  GXX=yes
30911else
30912  GXX=
30913fi
30914ac_test_CXXFLAGS=${CXXFLAGS+set}
30915ac_save_CXXFLAGS=$CXXFLAGS
30916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
30917$as_echo_n "checking whether $CXX accepts -g... " >&6; }
30918if ${ac_cv_prog_cxx_g+:} false; then :
30919  $as_echo_n "(cached) " >&6
30920else
30921  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
30922   ac_cxx_werror_flag=yes
30923   ac_cv_prog_cxx_g=no
30924   CXXFLAGS="-g"
30925   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30926/* end confdefs.h.  */
30927
30928int
30929main ()
30930{
30931
30932  ;
30933  return 0;
30934}
30935_ACEOF
30936if ac_fn_cxx_try_compile "$LINENO"; then :
30937  ac_cv_prog_cxx_g=yes
30938else
30939  CXXFLAGS=""
30940      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30941/* end confdefs.h.  */
30942
30943int
30944main ()
30945{
30946
30947  ;
30948  return 0;
30949}
30950_ACEOF
30951if ac_fn_cxx_try_compile "$LINENO"; then :
30952
30953else
30954  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30955	 CXXFLAGS="-g"
30956	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30957/* end confdefs.h.  */
30958
30959int
30960main ()
30961{
30962
30963  ;
30964  return 0;
30965}
30966_ACEOF
30967if ac_fn_cxx_try_compile "$LINENO"; then :
30968  ac_cv_prog_cxx_g=yes
30969fi
30970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30971fi
30972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30973fi
30974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30975   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30976fi
30977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
30978$as_echo "$ac_cv_prog_cxx_g" >&6; }
30979if test "$ac_test_CXXFLAGS" = set; then
30980  CXXFLAGS=$ac_save_CXXFLAGS
30981elif test $ac_cv_prog_cxx_g = yes; then
30982  if test "$GXX" = yes; then
30983    CXXFLAGS="-g -O2"
30984  else
30985    CXXFLAGS="-g"
30986  fi
30987else
30988  if test "$GXX" = yes; then
30989    CXXFLAGS="-O2"
30990  else
30991    CXXFLAGS=
30992  fi
30993fi
30994ac_ext=cpp
30995ac_cpp='$CXXCPP $CPPFLAGS'
30996ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30997ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30998ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30999
31000
31001  #
31002  # Setup the preprocessor (CPP and CXXCPP)
31003  #
31004  ac_ext=c
31005ac_cpp='$CPP $CPPFLAGS'
31006ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31007ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31008ac_compiler_gnu=$ac_cv_c_compiler_gnu
31009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
31010$as_echo_n "checking how to run the C preprocessor... " >&6; }
31011# On Suns, sometimes $CPP names a directory.
31012if test -n "$CPP" && test -d "$CPP"; then
31013  CPP=
31014fi
31015if test -z "$CPP"; then
31016  if ${ac_cv_prog_CPP+:} false; then :
31017  $as_echo_n "(cached) " >&6
31018else
31019      # Double quotes because CPP needs to be expanded
31020    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
31021    do
31022      ac_preproc_ok=false
31023for ac_c_preproc_warn_flag in '' yes
31024do
31025  # Use a header file that comes with gcc, so configuring glibc
31026  # with a fresh cross-compiler works.
31027  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31028  # <limits.h> exists even on freestanding compilers.
31029  # On the NeXT, cc -E runs the code through the compiler's parser,
31030  # not just through cpp. "Syntax error" is here to catch this case.
31031  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31032/* end confdefs.h.  */
31033#ifdef __STDC__
31034# include <limits.h>
31035#else
31036# include <assert.h>
31037#endif
31038		     Syntax error
31039_ACEOF
31040if ac_fn_c_try_cpp "$LINENO"; then :
31041
31042else
31043  # Broken: fails on valid input.
31044continue
31045fi
31046rm -f conftest.err conftest.i conftest.$ac_ext
31047
31048  # OK, works on sane cases.  Now check whether nonexistent headers
31049  # can be detected and how.
31050  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31051/* end confdefs.h.  */
31052#include <ac_nonexistent.h>
31053_ACEOF
31054if ac_fn_c_try_cpp "$LINENO"; then :
31055  # Broken: success on invalid input.
31056continue
31057else
31058  # Passes both tests.
31059ac_preproc_ok=:
31060break
31061fi
31062rm -f conftest.err conftest.i conftest.$ac_ext
31063
31064done
31065# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31066rm -f conftest.i conftest.err conftest.$ac_ext
31067if $ac_preproc_ok; then :
31068  break
31069fi
31070
31071    done
31072    ac_cv_prog_CPP=$CPP
31073
31074fi
31075  CPP=$ac_cv_prog_CPP
31076else
31077  ac_cv_prog_CPP=$CPP
31078fi
31079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
31080$as_echo "$CPP" >&6; }
31081ac_preproc_ok=false
31082for ac_c_preproc_warn_flag in '' yes
31083do
31084  # Use a header file that comes with gcc, so configuring glibc
31085  # with a fresh cross-compiler works.
31086  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31087  # <limits.h> exists even on freestanding compilers.
31088  # On the NeXT, cc -E runs the code through the compiler's parser,
31089  # not just through cpp. "Syntax error" is here to catch this case.
31090  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31091/* end confdefs.h.  */
31092#ifdef __STDC__
31093# include <limits.h>
31094#else
31095# include <assert.h>
31096#endif
31097		     Syntax error
31098_ACEOF
31099if ac_fn_c_try_cpp "$LINENO"; then :
31100
31101else
31102  # Broken: fails on valid input.
31103continue
31104fi
31105rm -f conftest.err conftest.i conftest.$ac_ext
31106
31107  # OK, works on sane cases.  Now check whether nonexistent headers
31108  # can be detected and how.
31109  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31110/* end confdefs.h.  */
31111#include <ac_nonexistent.h>
31112_ACEOF
31113if ac_fn_c_try_cpp "$LINENO"; then :
31114  # Broken: success on invalid input.
31115continue
31116else
31117  # Passes both tests.
31118ac_preproc_ok=:
31119break
31120fi
31121rm -f conftest.err conftest.i conftest.$ac_ext
31122
31123done
31124# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31125rm -f conftest.i conftest.err conftest.$ac_ext
31126if $ac_preproc_ok; then :
31127
31128else
31129  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31130$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31131as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
31132See \`config.log' for more details" "$LINENO" 5; }
31133fi
31134
31135ac_ext=cpp
31136ac_cpp='$CXXCPP $CPPFLAGS'
31137ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31138ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31139ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31140
31141
31142  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31143
31144  # First separate the path from the arguments. This will split at the first
31145  # space.
31146  complete="$CPP"
31147  path="${complete%% *}"
31148  tmp="$complete EOL"
31149  arguments="${tmp#* }"
31150
31151  # Input might be given as Windows format, start by converting to
31152  # unix format.
31153  new_path=`$CYGPATH -u "$path"`
31154
31155  # Now try to locate executable using which
31156  new_path=`$WHICH "$new_path" 2> /dev/null`
31157  # bat and cmd files are not always considered executable in cygwin causing which
31158  # to not find them
31159  if test "x$new_path" = x \
31160      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31161      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31162    new_path=`$CYGPATH -u "$path"`
31163  fi
31164  if test "x$new_path" = x; then
31165    # Oops. Which didn't find the executable.
31166    # The splitting of arguments from the executable at a space might have been incorrect,
31167    # since paths with space are more likely in Windows. Give it another try with the whole
31168    # argument.
31169    path="$complete"
31170    arguments="EOL"
31171    new_path=`$CYGPATH -u "$path"`
31172    new_path=`$WHICH "$new_path" 2> /dev/null`
31173    # bat and cmd files are not always considered executable in cygwin causing which
31174    # to not find them
31175    if test "x$new_path" = x \
31176        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31177        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31178      new_path=`$CYGPATH -u "$path"`
31179    fi
31180    if test "x$new_path" = x; then
31181      # It's still not found. Now this is an unrecoverable error.
31182      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31183$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31184      has_space=`$ECHO "$complete" | $GREP " "`
31185      if test "x$has_space" != x; then
31186        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31187$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31188      fi
31189      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31190    fi
31191  fi
31192
31193  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31194  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31195  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31196  # "foo.exe" is OK but "foo" is an error.
31197  #
31198  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31199  # It is also a way to make sure we got the proper file name for the real test later on.
31200  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31201  if test "x$test_shortpath" = x; then
31202    # Short path failed, file does not exist as specified.
31203    # Try adding .exe or .cmd
31204    if test -f "${new_path}.exe"; then
31205      input_to_shortpath="${new_path}.exe"
31206    elif test -f "${new_path}.cmd"; then
31207      input_to_shortpath="${new_path}.cmd"
31208    else
31209      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
31210$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
31211      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31212$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31213      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31214    fi
31215  else
31216    input_to_shortpath="$new_path"
31217  fi
31218
31219  # Call helper function which possibly converts this using DOS-style short mode.
31220  # If so, the updated path is stored in $new_path.
31221  new_path="$input_to_shortpath"
31222
31223  input_path="$input_to_shortpath"
31224  # Check if we need to convert this using DOS-style short mode. If the path
31225  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31226  # take no chances and rewrite it.
31227  # Note: m4 eats our [], so we need to use [ and ] instead.
31228  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31229  if test "x$has_forbidden_chars" != x; then
31230    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31231    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31232    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31233    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31234      # Going to short mode and back again did indeed matter. Since short mode is
31235      # case insensitive, let's make it lowercase to improve readability.
31236      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31237      # Now convert it back to Unix-stile (cygpath)
31238      input_path=`$CYGPATH -u "$shortmode_path"`
31239      new_path="$input_path"
31240    fi
31241  fi
31242
31243  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31244  if test "x$test_cygdrive_prefix" = x; then
31245    # As a simple fix, exclude /usr/bin since it's not a real path.
31246    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31247      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31248      # a path prefixed by /cygdrive for fixpath to work.
31249      new_path="$CYGWIN_ROOT_PATH$input_path"
31250    fi
31251  fi
31252
31253  # remove trailing .exe if any
31254  new_path="${new_path/%.exe/}"
31255
31256  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31257
31258  # First separate the path from the arguments. This will split at the first
31259  # space.
31260  complete="$CPP"
31261  path="${complete%% *}"
31262  tmp="$complete EOL"
31263  arguments="${tmp#* }"
31264
31265  # Input might be given as Windows format, start by converting to
31266  # unix format.
31267  new_path="$path"
31268
31269  windows_path="$new_path"
31270  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31271    unix_path=`$CYGPATH -u "$windows_path"`
31272    new_path="$unix_path"
31273  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31274    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31275    new_path="$unix_path"
31276  fi
31277
31278
31279  # Now try to locate executable using which
31280  new_path=`$WHICH "$new_path" 2> /dev/null`
31281
31282  if test "x$new_path" = x; then
31283    # Oops. Which didn't find the executable.
31284    # The splitting of arguments from the executable at a space might have been incorrect,
31285    # since paths with space are more likely in Windows. Give it another try with the whole
31286    # argument.
31287    path="$complete"
31288    arguments="EOL"
31289    new_path="$path"
31290
31291  windows_path="$new_path"
31292  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31293    unix_path=`$CYGPATH -u "$windows_path"`
31294    new_path="$unix_path"
31295  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31296    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31297    new_path="$unix_path"
31298  fi
31299
31300
31301    new_path=`$WHICH "$new_path" 2> /dev/null`
31302    # bat and cmd files are not always considered executable in MSYS causing which
31303    # to not find them
31304    if test "x$new_path" = x \
31305        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31306        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31307      new_path="$path"
31308
31309  windows_path="$new_path"
31310  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31311    unix_path=`$CYGPATH -u "$windows_path"`
31312    new_path="$unix_path"
31313  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31314    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31315    new_path="$unix_path"
31316  fi
31317
31318    fi
31319
31320    if test "x$new_path" = x; then
31321      # It's still not found. Now this is an unrecoverable error.
31322      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31323$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31324      has_space=`$ECHO "$complete" | $GREP " "`
31325      if test "x$has_space" != x; then
31326        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31327$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31328      fi
31329      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31330    fi
31331  fi
31332
31333  # Now new_path has a complete unix path to the binary
31334  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31335    # Keep paths in /bin as-is, but remove trailing .exe if any
31336    new_path="${new_path/%.exe/}"
31337    # Do not save /bin paths to all_fixpath_prefixes!
31338  else
31339    # Not in mixed or Windows style, start by that.
31340    new_path=`cmd //c echo $new_path`
31341
31342  input_path="$new_path"
31343  # Check if we need to convert this using DOS-style short mode. If the path
31344  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31345  # take no chances and rewrite it.
31346  # Note: m4 eats our [], so we need to use [ and ] instead.
31347  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31348  if test "x$has_forbidden_chars" != x; then
31349    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31350    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31351  fi
31352
31353    # Output is in $new_path
31354
31355  windows_path="$new_path"
31356  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31357    unix_path=`$CYGPATH -u "$windows_path"`
31358    new_path="$unix_path"
31359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31360    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31361    new_path="$unix_path"
31362  fi
31363
31364    # remove trailing .exe if any
31365    new_path="${new_path/%.exe/}"
31366
31367    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31368    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31369  fi
31370
31371  else
31372    # We're on a posix platform. Hooray! :)
31373    # First separate the path from the arguments. This will split at the first
31374    # space.
31375    complete="$CPP"
31376    path="${complete%% *}"
31377    tmp="$complete EOL"
31378    arguments="${tmp#* }"
31379
31380    # Cannot rely on the command "which" here since it doesn't always work.
31381    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31382    if test -z "$is_absolute_path"; then
31383      # Path to executable is not absolute. Find it.
31384      IFS_save="$IFS"
31385      IFS=:
31386      for p in $PATH; do
31387        if test -f "$p/$path" && test -x "$p/$path"; then
31388          new_path="$p/$path"
31389          break
31390        fi
31391      done
31392      IFS="$IFS_save"
31393    else
31394      # This is an absolute path, we can use it without further modifications.
31395      new_path="$path"
31396    fi
31397
31398    if test "x$new_path" = x; then
31399      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31400$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31401      has_space=`$ECHO "$complete" | $GREP " "`
31402      if test "x$has_space" != x; then
31403        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31404$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31405      fi
31406      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31407    fi
31408  fi
31409
31410  # Now join together the path and the arguments once again
31411  if test "x$arguments" != xEOL; then
31412    new_complete="$new_path ${arguments% *}"
31413  else
31414    new_complete="$new_path"
31415  fi
31416
31417  if test "x$complete" != "x$new_complete"; then
31418    CPP="$new_complete"
31419    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
31420$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
31421  fi
31422
31423  ac_ext=cpp
31424ac_cpp='$CXXCPP $CPPFLAGS'
31425ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31426ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31427ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
31429$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
31430if test -z "$CXXCPP"; then
31431  if ${ac_cv_prog_CXXCPP+:} false; then :
31432  $as_echo_n "(cached) " >&6
31433else
31434      # Double quotes because CXXCPP needs to be expanded
31435    for CXXCPP in "$CXX -E" "/lib/cpp"
31436    do
31437      ac_preproc_ok=false
31438for ac_cxx_preproc_warn_flag in '' yes
31439do
31440  # Use a header file that comes with gcc, so configuring glibc
31441  # with a fresh cross-compiler works.
31442  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31443  # <limits.h> exists even on freestanding compilers.
31444  # On the NeXT, cc -E runs the code through the compiler's parser,
31445  # not just through cpp. "Syntax error" is here to catch this case.
31446  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31447/* end confdefs.h.  */
31448#ifdef __STDC__
31449# include <limits.h>
31450#else
31451# include <assert.h>
31452#endif
31453		     Syntax error
31454_ACEOF
31455if ac_fn_cxx_try_cpp "$LINENO"; then :
31456
31457else
31458  # Broken: fails on valid input.
31459continue
31460fi
31461rm -f conftest.err conftest.i conftest.$ac_ext
31462
31463  # OK, works on sane cases.  Now check whether nonexistent headers
31464  # can be detected and how.
31465  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31466/* end confdefs.h.  */
31467#include <ac_nonexistent.h>
31468_ACEOF
31469if ac_fn_cxx_try_cpp "$LINENO"; then :
31470  # Broken: success on invalid input.
31471continue
31472else
31473  # Passes both tests.
31474ac_preproc_ok=:
31475break
31476fi
31477rm -f conftest.err conftest.i conftest.$ac_ext
31478
31479done
31480# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31481rm -f conftest.i conftest.err conftest.$ac_ext
31482if $ac_preproc_ok; then :
31483  break
31484fi
31485
31486    done
31487    ac_cv_prog_CXXCPP=$CXXCPP
31488
31489fi
31490  CXXCPP=$ac_cv_prog_CXXCPP
31491else
31492  ac_cv_prog_CXXCPP=$CXXCPP
31493fi
31494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
31495$as_echo "$CXXCPP" >&6; }
31496ac_preproc_ok=false
31497for ac_cxx_preproc_warn_flag in '' yes
31498do
31499  # Use a header file that comes with gcc, so configuring glibc
31500  # with a fresh cross-compiler works.
31501  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31502  # <limits.h> exists even on freestanding compilers.
31503  # On the NeXT, cc -E runs the code through the compiler's parser,
31504  # not just through cpp. "Syntax error" is here to catch this case.
31505  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31506/* end confdefs.h.  */
31507#ifdef __STDC__
31508# include <limits.h>
31509#else
31510# include <assert.h>
31511#endif
31512		     Syntax error
31513_ACEOF
31514if ac_fn_cxx_try_cpp "$LINENO"; then :
31515
31516else
31517  # Broken: fails on valid input.
31518continue
31519fi
31520rm -f conftest.err conftest.i conftest.$ac_ext
31521
31522  # OK, works on sane cases.  Now check whether nonexistent headers
31523  # can be detected and how.
31524  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31525/* end confdefs.h.  */
31526#include <ac_nonexistent.h>
31527_ACEOF
31528if ac_fn_cxx_try_cpp "$LINENO"; then :
31529  # Broken: success on invalid input.
31530continue
31531else
31532  # Passes both tests.
31533ac_preproc_ok=:
31534break
31535fi
31536rm -f conftest.err conftest.i conftest.$ac_ext
31537
31538done
31539# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31540rm -f conftest.i conftest.err conftest.$ac_ext
31541if $ac_preproc_ok; then :
31542
31543else
31544  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31545$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31546as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
31547See \`config.log' for more details" "$LINENO" 5; }
31548fi
31549
31550ac_ext=cpp
31551ac_cpp='$CXXCPP $CPPFLAGS'
31552ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31553ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31554ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31555
31556
31557  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31558
31559  # First separate the path from the arguments. This will split at the first
31560  # space.
31561  complete="$CXXCPP"
31562  path="${complete%% *}"
31563  tmp="$complete EOL"
31564  arguments="${tmp#* }"
31565
31566  # Input might be given as Windows format, start by converting to
31567  # unix format.
31568  new_path=`$CYGPATH -u "$path"`
31569
31570  # Now try to locate executable using which
31571  new_path=`$WHICH "$new_path" 2> /dev/null`
31572  # bat and cmd files are not always considered executable in cygwin causing which
31573  # to not find them
31574  if test "x$new_path" = x \
31575      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31576      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31577    new_path=`$CYGPATH -u "$path"`
31578  fi
31579  if test "x$new_path" = x; then
31580    # Oops. Which didn't find the executable.
31581    # The splitting of arguments from the executable at a space might have been incorrect,
31582    # since paths with space are more likely in Windows. Give it another try with the whole
31583    # argument.
31584    path="$complete"
31585    arguments="EOL"
31586    new_path=`$CYGPATH -u "$path"`
31587    new_path=`$WHICH "$new_path" 2> /dev/null`
31588    # bat and cmd files are not always considered executable in cygwin causing which
31589    # to not find them
31590    if test "x$new_path" = x \
31591        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31592        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31593      new_path=`$CYGPATH -u "$path"`
31594    fi
31595    if test "x$new_path" = x; then
31596      # It's still not found. Now this is an unrecoverable error.
31597      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31598$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31599      has_space=`$ECHO "$complete" | $GREP " "`
31600      if test "x$has_space" != x; then
31601        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31602$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31603      fi
31604      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31605    fi
31606  fi
31607
31608  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31609  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31610  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31611  # "foo.exe" is OK but "foo" is an error.
31612  #
31613  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31614  # It is also a way to make sure we got the proper file name for the real test later on.
31615  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31616  if test "x$test_shortpath" = x; then
31617    # Short path failed, file does not exist as specified.
31618    # Try adding .exe or .cmd
31619    if test -f "${new_path}.exe"; then
31620      input_to_shortpath="${new_path}.exe"
31621    elif test -f "${new_path}.cmd"; then
31622      input_to_shortpath="${new_path}.cmd"
31623    else
31624      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
31625$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
31626      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31627$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31628      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31629    fi
31630  else
31631    input_to_shortpath="$new_path"
31632  fi
31633
31634  # Call helper function which possibly converts this using DOS-style short mode.
31635  # If so, the updated path is stored in $new_path.
31636  new_path="$input_to_shortpath"
31637
31638  input_path="$input_to_shortpath"
31639  # Check if we need to convert this using DOS-style short mode. If the path
31640  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31641  # take no chances and rewrite it.
31642  # Note: m4 eats our [], so we need to use [ and ] instead.
31643  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31644  if test "x$has_forbidden_chars" != x; then
31645    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31646    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31647    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31648    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31649      # Going to short mode and back again did indeed matter. Since short mode is
31650      # case insensitive, let's make it lowercase to improve readability.
31651      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31652      # Now convert it back to Unix-stile (cygpath)
31653      input_path=`$CYGPATH -u "$shortmode_path"`
31654      new_path="$input_path"
31655    fi
31656  fi
31657
31658  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31659  if test "x$test_cygdrive_prefix" = x; then
31660    # As a simple fix, exclude /usr/bin since it's not a real path.
31661    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31662      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31663      # a path prefixed by /cygdrive for fixpath to work.
31664      new_path="$CYGWIN_ROOT_PATH$input_path"
31665    fi
31666  fi
31667
31668  # remove trailing .exe if any
31669  new_path="${new_path/%.exe/}"
31670
31671  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31672
31673  # First separate the path from the arguments. This will split at the first
31674  # space.
31675  complete="$CXXCPP"
31676  path="${complete%% *}"
31677  tmp="$complete EOL"
31678  arguments="${tmp#* }"
31679
31680  # Input might be given as Windows format, start by converting to
31681  # unix format.
31682  new_path="$path"
31683
31684  windows_path="$new_path"
31685  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31686    unix_path=`$CYGPATH -u "$windows_path"`
31687    new_path="$unix_path"
31688  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31689    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31690    new_path="$unix_path"
31691  fi
31692
31693
31694  # Now try to locate executable using which
31695  new_path=`$WHICH "$new_path" 2> /dev/null`
31696
31697  if test "x$new_path" = x; then
31698    # Oops. Which didn't find the executable.
31699    # The splitting of arguments from the executable at a space might have been incorrect,
31700    # since paths with space are more likely in Windows. Give it another try with the whole
31701    # argument.
31702    path="$complete"
31703    arguments="EOL"
31704    new_path="$path"
31705
31706  windows_path="$new_path"
31707  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31708    unix_path=`$CYGPATH -u "$windows_path"`
31709    new_path="$unix_path"
31710  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31711    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31712    new_path="$unix_path"
31713  fi
31714
31715
31716    new_path=`$WHICH "$new_path" 2> /dev/null`
31717    # bat and cmd files are not always considered executable in MSYS causing which
31718    # to not find them
31719    if test "x$new_path" = x \
31720        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31721        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31722      new_path="$path"
31723
31724  windows_path="$new_path"
31725  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31726    unix_path=`$CYGPATH -u "$windows_path"`
31727    new_path="$unix_path"
31728  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31729    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31730    new_path="$unix_path"
31731  fi
31732
31733    fi
31734
31735    if test "x$new_path" = x; then
31736      # It's still not found. Now this is an unrecoverable error.
31737      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31738$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31739      has_space=`$ECHO "$complete" | $GREP " "`
31740      if test "x$has_space" != x; then
31741        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31742$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31743      fi
31744      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31745    fi
31746  fi
31747
31748  # Now new_path has a complete unix path to the binary
31749  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31750    # Keep paths in /bin as-is, but remove trailing .exe if any
31751    new_path="${new_path/%.exe/}"
31752    # Do not save /bin paths to all_fixpath_prefixes!
31753  else
31754    # Not in mixed or Windows style, start by that.
31755    new_path=`cmd //c echo $new_path`
31756
31757  input_path="$new_path"
31758  # Check if we need to convert this using DOS-style short mode. If the path
31759  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31760  # take no chances and rewrite it.
31761  # Note: m4 eats our [], so we need to use [ and ] instead.
31762  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31763  if test "x$has_forbidden_chars" != x; then
31764    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31765    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31766  fi
31767
31768    # Output is in $new_path
31769
31770  windows_path="$new_path"
31771  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31772    unix_path=`$CYGPATH -u "$windows_path"`
31773    new_path="$unix_path"
31774  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31775    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31776    new_path="$unix_path"
31777  fi
31778
31779    # remove trailing .exe if any
31780    new_path="${new_path/%.exe/}"
31781
31782    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31783    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31784  fi
31785
31786  else
31787    # We're on a posix platform. Hooray! :)
31788    # First separate the path from the arguments. This will split at the first
31789    # space.
31790    complete="$CXXCPP"
31791    path="${complete%% *}"
31792    tmp="$complete EOL"
31793    arguments="${tmp#* }"
31794
31795    # Cannot rely on the command "which" here since it doesn't always work.
31796    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31797    if test -z "$is_absolute_path"; then
31798      # Path to executable is not absolute. Find it.
31799      IFS_save="$IFS"
31800      IFS=:
31801      for p in $PATH; do
31802        if test -f "$p/$path" && test -x "$p/$path"; then
31803          new_path="$p/$path"
31804          break
31805        fi
31806      done
31807      IFS="$IFS_save"
31808    else
31809      # This is an absolute path, we can use it without further modifications.
31810      new_path="$path"
31811    fi
31812
31813    if test "x$new_path" = x; then
31814      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31815$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31816      has_space=`$ECHO "$complete" | $GREP " "`
31817      if test "x$has_space" != x; then
31818        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31819$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31820      fi
31821      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31822    fi
31823  fi
31824
31825  # Now join together the path and the arguments once again
31826  if test "x$arguments" != xEOL; then
31827    new_complete="$new_path ${arguments% *}"
31828  else
31829    new_complete="$new_path"
31830  fi
31831
31832  if test "x$complete" != "x$new_complete"; then
31833    CXXCPP="$new_complete"
31834    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
31835$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
31836  fi
31837
31838
31839  #
31840  # Setup the linker (LD)
31841  #
31842  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31843    # In the Microsoft toolchain we have a separate LD command "link".
31844    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
31845    # a cygwin program for something completely different.
31846    # Extract the first word of "link", so it can be a program name with args.
31847set dummy link; ac_word=$2
31848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31849$as_echo_n "checking for $ac_word... " >&6; }
31850if ${ac_cv_prog_LD+:} false; then :
31851  $as_echo_n "(cached) " >&6
31852else
31853  if test -n "$LD"; then
31854  ac_cv_prog_LD="$LD" # Let the user override the test.
31855else
31856  ac_prog_rejected=no
31857as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31858for as_dir in $PATH
31859do
31860  IFS=$as_save_IFS
31861  test -z "$as_dir" && as_dir=.
31862    for ac_exec_ext in '' $ac_executable_extensions; do
31863  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31864    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
31865       ac_prog_rejected=yes
31866       continue
31867     fi
31868    ac_cv_prog_LD="link"
31869    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31870    break 2
31871  fi
31872done
31873  done
31874IFS=$as_save_IFS
31875
31876if test $ac_prog_rejected = yes; then
31877  # We found a bogon in the path, so make sure we never use it.
31878  set dummy $ac_cv_prog_LD
31879  shift
31880  if test $# != 0; then
31881    # We chose a different compiler from the bogus one.
31882    # However, it has the same basename, so the bogon will be chosen
31883    # first if we set LD to just the basename; use the full file name.
31884    shift
31885    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
31886  fi
31887fi
31888fi
31889fi
31890LD=$ac_cv_prog_LD
31891if test -n "$LD"; then
31892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
31893$as_echo "$LD" >&6; }
31894else
31895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31896$as_echo "no" >&6; }
31897fi
31898
31899
31900
31901  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31902
31903  # First separate the path from the arguments. This will split at the first
31904  # space.
31905  complete="$LD"
31906  path="${complete%% *}"
31907  tmp="$complete EOL"
31908  arguments="${tmp#* }"
31909
31910  # Input might be given as Windows format, start by converting to
31911  # unix format.
31912  new_path=`$CYGPATH -u "$path"`
31913
31914  # Now try to locate executable using which
31915  new_path=`$WHICH "$new_path" 2> /dev/null`
31916  # bat and cmd files are not always considered executable in cygwin causing which
31917  # to not find them
31918  if test "x$new_path" = x \
31919      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31920      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31921    new_path=`$CYGPATH -u "$path"`
31922  fi
31923  if test "x$new_path" = x; then
31924    # Oops. Which didn't find the executable.
31925    # The splitting of arguments from the executable at a space might have been incorrect,
31926    # since paths with space are more likely in Windows. Give it another try with the whole
31927    # argument.
31928    path="$complete"
31929    arguments="EOL"
31930    new_path=`$CYGPATH -u "$path"`
31931    new_path=`$WHICH "$new_path" 2> /dev/null`
31932    # bat and cmd files are not always considered executable in cygwin causing which
31933    # to not find them
31934    if test "x$new_path" = x \
31935        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31936        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31937      new_path=`$CYGPATH -u "$path"`
31938    fi
31939    if test "x$new_path" = x; then
31940      # It's still not found. Now this is an unrecoverable error.
31941      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31942$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31943      has_space=`$ECHO "$complete" | $GREP " "`
31944      if test "x$has_space" != x; then
31945        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31946$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31947      fi
31948      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31949    fi
31950  fi
31951
31952  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31953  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31954  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31955  # "foo.exe" is OK but "foo" is an error.
31956  #
31957  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31958  # It is also a way to make sure we got the proper file name for the real test later on.
31959  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31960  if test "x$test_shortpath" = x; then
31961    # Short path failed, file does not exist as specified.
31962    # Try adding .exe or .cmd
31963    if test -f "${new_path}.exe"; then
31964      input_to_shortpath="${new_path}.exe"
31965    elif test -f "${new_path}.cmd"; then
31966      input_to_shortpath="${new_path}.cmd"
31967    else
31968      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
31969$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
31970      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31971$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31972      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31973    fi
31974  else
31975    input_to_shortpath="$new_path"
31976  fi
31977
31978  # Call helper function which possibly converts this using DOS-style short mode.
31979  # If so, the updated path is stored in $new_path.
31980  new_path="$input_to_shortpath"
31981
31982  input_path="$input_to_shortpath"
31983  # Check if we need to convert this using DOS-style short mode. If the path
31984  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31985  # take no chances and rewrite it.
31986  # Note: m4 eats our [], so we need to use [ and ] instead.
31987  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31988  if test "x$has_forbidden_chars" != x; then
31989    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31990    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31991    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31992    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31993      # Going to short mode and back again did indeed matter. Since short mode is
31994      # case insensitive, let's make it lowercase to improve readability.
31995      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31996      # Now convert it back to Unix-stile (cygpath)
31997      input_path=`$CYGPATH -u "$shortmode_path"`
31998      new_path="$input_path"
31999    fi
32000  fi
32001
32002  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32003  if test "x$test_cygdrive_prefix" = x; then
32004    # As a simple fix, exclude /usr/bin since it's not a real path.
32005    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32006      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32007      # a path prefixed by /cygdrive for fixpath to work.
32008      new_path="$CYGWIN_ROOT_PATH$input_path"
32009    fi
32010  fi
32011
32012  # remove trailing .exe if any
32013  new_path="${new_path/%.exe/}"
32014
32015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32016
32017  # First separate the path from the arguments. This will split at the first
32018  # space.
32019  complete="$LD"
32020  path="${complete%% *}"
32021  tmp="$complete EOL"
32022  arguments="${tmp#* }"
32023
32024  # Input might be given as Windows format, start by converting to
32025  # unix format.
32026  new_path="$path"
32027
32028  windows_path="$new_path"
32029  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32030    unix_path=`$CYGPATH -u "$windows_path"`
32031    new_path="$unix_path"
32032  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32033    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32034    new_path="$unix_path"
32035  fi
32036
32037
32038  # Now try to locate executable using which
32039  new_path=`$WHICH "$new_path" 2> /dev/null`
32040
32041  if test "x$new_path" = x; then
32042    # Oops. Which didn't find the executable.
32043    # The splitting of arguments from the executable at a space might have been incorrect,
32044    # since paths with space are more likely in Windows. Give it another try with the whole
32045    # argument.
32046    path="$complete"
32047    arguments="EOL"
32048    new_path="$path"
32049
32050  windows_path="$new_path"
32051  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32052    unix_path=`$CYGPATH -u "$windows_path"`
32053    new_path="$unix_path"
32054  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32055    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32056    new_path="$unix_path"
32057  fi
32058
32059
32060    new_path=`$WHICH "$new_path" 2> /dev/null`
32061    # bat and cmd files are not always considered executable in MSYS causing which
32062    # to not find them
32063    if test "x$new_path" = x \
32064        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32065        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32066      new_path="$path"
32067
32068  windows_path="$new_path"
32069  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32070    unix_path=`$CYGPATH -u "$windows_path"`
32071    new_path="$unix_path"
32072  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32073    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32074    new_path="$unix_path"
32075  fi
32076
32077    fi
32078
32079    if test "x$new_path" = x; then
32080      # It's still not found. Now this is an unrecoverable error.
32081      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32082$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32083      has_space=`$ECHO "$complete" | $GREP " "`
32084      if test "x$has_space" != x; then
32085        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32086$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32087      fi
32088      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32089    fi
32090  fi
32091
32092  # Now new_path has a complete unix path to the binary
32093  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32094    # Keep paths in /bin as-is, but remove trailing .exe if any
32095    new_path="${new_path/%.exe/}"
32096    # Do not save /bin paths to all_fixpath_prefixes!
32097  else
32098    # Not in mixed or Windows style, start by that.
32099    new_path=`cmd //c echo $new_path`
32100
32101  input_path="$new_path"
32102  # Check if we need to convert this using DOS-style short mode. If the path
32103  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32104  # take no chances and rewrite it.
32105  # Note: m4 eats our [], so we need to use [ and ] instead.
32106  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32107  if test "x$has_forbidden_chars" != x; then
32108    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32109    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32110  fi
32111
32112    # Output is in $new_path
32113
32114  windows_path="$new_path"
32115  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32116    unix_path=`$CYGPATH -u "$windows_path"`
32117    new_path="$unix_path"
32118  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32119    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32120    new_path="$unix_path"
32121  fi
32122
32123    # remove trailing .exe if any
32124    new_path="${new_path/%.exe/}"
32125
32126    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32127    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32128  fi
32129
32130  else
32131    # We're on a posix platform. Hooray! :)
32132    # First separate the path from the arguments. This will split at the first
32133    # space.
32134    complete="$LD"
32135    path="${complete%% *}"
32136    tmp="$complete EOL"
32137    arguments="${tmp#* }"
32138
32139    # Cannot rely on the command "which" here since it doesn't always work.
32140    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32141    if test -z "$is_absolute_path"; then
32142      # Path to executable is not absolute. Find it.
32143      IFS_save="$IFS"
32144      IFS=:
32145      for p in $PATH; do
32146        if test -f "$p/$path" && test -x "$p/$path"; then
32147          new_path="$p/$path"
32148          break
32149        fi
32150      done
32151      IFS="$IFS_save"
32152    else
32153      # This is an absolute path, we can use it without further modifications.
32154      new_path="$path"
32155    fi
32156
32157    if test "x$new_path" = x; then
32158      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32159$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32160      has_space=`$ECHO "$complete" | $GREP " "`
32161      if test "x$has_space" != x; then
32162        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32163$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32164      fi
32165      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32166    fi
32167  fi
32168
32169  # Now join together the path and the arguments once again
32170  if test "x$arguments" != xEOL; then
32171    new_complete="$new_path ${arguments% *}"
32172  else
32173    new_complete="$new_path"
32174  fi
32175
32176  if test "x$complete" != "x$new_complete"; then
32177    LD="$new_complete"
32178    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
32179$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
32180  fi
32181
32182    # Verify that we indeed succeeded with this trick.
32183    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
32184$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
32185    "$LD" --version > /dev/null
32186    if test $? -eq 0 ; then
32187      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32188$as_echo "no" >&6; }
32189      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
32190    else
32191      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32192$as_echo "yes" >&6; }
32193    fi
32194    LDCXX="$LD"
32195  else
32196    # All other toolchains use the compiler to link.
32197    LD="$CC"
32198    LDCXX="$CXX"
32199  fi
32200
32201  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
32202
32203
32204  #
32205  # Setup the assembler (AS)
32206  #
32207  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
32208    # FIXME: should this really be solaris, or solstudio?
32209
32210
32211  # Publish this variable in the help.
32212
32213
32214  if test "x$AS" = x; then
32215    # The variable is not set by user, try to locate tool using the code snippet
32216    for ac_prog in as
32217do
32218  # Extract the first word of "$ac_prog", so it can be a program name with args.
32219set dummy $ac_prog; ac_word=$2
32220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32221$as_echo_n "checking for $ac_word... " >&6; }
32222if ${ac_cv_path_AS+:} false; then :
32223  $as_echo_n "(cached) " >&6
32224else
32225  case $AS in
32226  [\\/]* | ?:[\\/]*)
32227  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32228  ;;
32229  *)
32230  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32231for as_dir in $PATH
32232do
32233  IFS=$as_save_IFS
32234  test -z "$as_dir" && as_dir=.
32235    for ac_exec_ext in '' $ac_executable_extensions; do
32236  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32237    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32238    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32239    break 2
32240  fi
32241done
32242  done
32243IFS=$as_save_IFS
32244
32245  ;;
32246esac
32247fi
32248AS=$ac_cv_path_AS
32249if test -n "$AS"; then
32250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32251$as_echo "$AS" >&6; }
32252else
32253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32254$as_echo "no" >&6; }
32255fi
32256
32257
32258  test -n "$AS" && break
32259done
32260
32261  else
32262    # The variable is set, but is it from the command line or the environment?
32263
32264    # Try to remove the string !AS! from our list.
32265    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
32266    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32267      # If it failed, the variable was not from the command line. Ignore it,
32268      # but warn the user (except for BASH, which is always set by the calling BASH).
32269      if test "xAS" != xBASH; then
32270        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
32271$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
32272      fi
32273      # Try to locate tool using the code snippet
32274      for ac_prog in as
32275do
32276  # Extract the first word of "$ac_prog", so it can be a program name with args.
32277set dummy $ac_prog; ac_word=$2
32278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32279$as_echo_n "checking for $ac_word... " >&6; }
32280if ${ac_cv_path_AS+:} false; then :
32281  $as_echo_n "(cached) " >&6
32282else
32283  case $AS in
32284  [\\/]* | ?:[\\/]*)
32285  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32286  ;;
32287  *)
32288  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32289for as_dir in $PATH
32290do
32291  IFS=$as_save_IFS
32292  test -z "$as_dir" && as_dir=.
32293    for ac_exec_ext in '' $ac_executable_extensions; do
32294  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32295    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32296    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32297    break 2
32298  fi
32299done
32300  done
32301IFS=$as_save_IFS
32302
32303  ;;
32304esac
32305fi
32306AS=$ac_cv_path_AS
32307if test -n "$AS"; then
32308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32309$as_echo "$AS" >&6; }
32310else
32311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32312$as_echo "no" >&6; }
32313fi
32314
32315
32316  test -n "$AS" && break
32317done
32318
32319    else
32320      # If it succeeded, then it was overridden by the user. We will use it
32321      # for the tool.
32322
32323      # First remove it from the list of overridden variables, so we can test
32324      # for unknown variables in the end.
32325      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32326
32327      # Check if the provided tool contains a complete path.
32328      tool_specified="$AS"
32329      tool_basename="${tool_specified##*/}"
32330      if test "x$tool_basename" = "x$tool_specified"; then
32331        # A command without a complete path is provided, search $PATH.
32332        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
32333$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
32334        # Extract the first word of "$tool_basename", so it can be a program name with args.
32335set dummy $tool_basename; ac_word=$2
32336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32337$as_echo_n "checking for $ac_word... " >&6; }
32338if ${ac_cv_path_AS+:} false; then :
32339  $as_echo_n "(cached) " >&6
32340else
32341  case $AS in
32342  [\\/]* | ?:[\\/]*)
32343  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32344  ;;
32345  *)
32346  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32347for as_dir in $PATH
32348do
32349  IFS=$as_save_IFS
32350  test -z "$as_dir" && as_dir=.
32351    for ac_exec_ext in '' $ac_executable_extensions; do
32352  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32353    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32354    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32355    break 2
32356  fi
32357done
32358  done
32359IFS=$as_save_IFS
32360
32361  ;;
32362esac
32363fi
32364AS=$ac_cv_path_AS
32365if test -n "$AS"; then
32366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32367$as_echo "$AS" >&6; }
32368else
32369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32370$as_echo "no" >&6; }
32371fi
32372
32373
32374        if test "x$AS" = x; then
32375          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32376        fi
32377      else
32378        # Otherwise we believe it is a complete path. Use it as it is.
32379        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
32380$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
32381        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
32382$as_echo_n "checking for AS... " >&6; }
32383        if test ! -x "$tool_specified"; then
32384          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32385$as_echo "not found" >&6; }
32386          as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
32387        fi
32388        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32389$as_echo "$tool_specified" >&6; }
32390      fi
32391    fi
32392  fi
32393
32394
32395
32396  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32397
32398  # First separate the path from the arguments. This will split at the first
32399  # space.
32400  complete="$AS"
32401  path="${complete%% *}"
32402  tmp="$complete EOL"
32403  arguments="${tmp#* }"
32404
32405  # Input might be given as Windows format, start by converting to
32406  # unix format.
32407  new_path=`$CYGPATH -u "$path"`
32408
32409  # Now try to locate executable using which
32410  new_path=`$WHICH "$new_path" 2> /dev/null`
32411  # bat and cmd files are not always considered executable in cygwin causing which
32412  # to not find them
32413  if test "x$new_path" = x \
32414      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32415      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32416    new_path=`$CYGPATH -u "$path"`
32417  fi
32418  if test "x$new_path" = x; then
32419    # Oops. Which didn't find the executable.
32420    # The splitting of arguments from the executable at a space might have been incorrect,
32421    # since paths with space are more likely in Windows. Give it another try with the whole
32422    # argument.
32423    path="$complete"
32424    arguments="EOL"
32425    new_path=`$CYGPATH -u "$path"`
32426    new_path=`$WHICH "$new_path" 2> /dev/null`
32427    # bat and cmd files are not always considered executable in cygwin causing which
32428    # to not find them
32429    if test "x$new_path" = x \
32430        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32431        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32432      new_path=`$CYGPATH -u "$path"`
32433    fi
32434    if test "x$new_path" = x; then
32435      # It's still not found. Now this is an unrecoverable error.
32436      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32437$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32438      has_space=`$ECHO "$complete" | $GREP " "`
32439      if test "x$has_space" != x; then
32440        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32441$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32442      fi
32443      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32444    fi
32445  fi
32446
32447  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32448  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32449  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32450  # "foo.exe" is OK but "foo" is an error.
32451  #
32452  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32453  # It is also a way to make sure we got the proper file name for the real test later on.
32454  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32455  if test "x$test_shortpath" = x; then
32456    # Short path failed, file does not exist as specified.
32457    # Try adding .exe or .cmd
32458    if test -f "${new_path}.exe"; then
32459      input_to_shortpath="${new_path}.exe"
32460    elif test -f "${new_path}.cmd"; then
32461      input_to_shortpath="${new_path}.cmd"
32462    else
32463      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
32464$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
32465      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32466$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32467      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32468    fi
32469  else
32470    input_to_shortpath="$new_path"
32471  fi
32472
32473  # Call helper function which possibly converts this using DOS-style short mode.
32474  # If so, the updated path is stored in $new_path.
32475  new_path="$input_to_shortpath"
32476
32477  input_path="$input_to_shortpath"
32478  # Check if we need to convert this using DOS-style short mode. If the path
32479  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32480  # take no chances and rewrite it.
32481  # Note: m4 eats our [], so we need to use [ and ] instead.
32482  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32483  if test "x$has_forbidden_chars" != x; then
32484    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32485    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32486    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32487    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32488      # Going to short mode and back again did indeed matter. Since short mode is
32489      # case insensitive, let's make it lowercase to improve readability.
32490      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32491      # Now convert it back to Unix-stile (cygpath)
32492      input_path=`$CYGPATH -u "$shortmode_path"`
32493      new_path="$input_path"
32494    fi
32495  fi
32496
32497  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32498  if test "x$test_cygdrive_prefix" = x; then
32499    # As a simple fix, exclude /usr/bin since it's not a real path.
32500    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32501      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32502      # a path prefixed by /cygdrive for fixpath to work.
32503      new_path="$CYGWIN_ROOT_PATH$input_path"
32504    fi
32505  fi
32506
32507  # remove trailing .exe if any
32508  new_path="${new_path/%.exe/}"
32509
32510  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32511
32512  # First separate the path from the arguments. This will split at the first
32513  # space.
32514  complete="$AS"
32515  path="${complete%% *}"
32516  tmp="$complete EOL"
32517  arguments="${tmp#* }"
32518
32519  # Input might be given as Windows format, start by converting to
32520  # unix format.
32521  new_path="$path"
32522
32523  windows_path="$new_path"
32524  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32525    unix_path=`$CYGPATH -u "$windows_path"`
32526    new_path="$unix_path"
32527  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32528    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32529    new_path="$unix_path"
32530  fi
32531
32532
32533  # Now try to locate executable using which
32534  new_path=`$WHICH "$new_path" 2> /dev/null`
32535
32536  if test "x$new_path" = x; then
32537    # Oops. Which didn't find the executable.
32538    # The splitting of arguments from the executable at a space might have been incorrect,
32539    # since paths with space are more likely in Windows. Give it another try with the whole
32540    # argument.
32541    path="$complete"
32542    arguments="EOL"
32543    new_path="$path"
32544
32545  windows_path="$new_path"
32546  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32547    unix_path=`$CYGPATH -u "$windows_path"`
32548    new_path="$unix_path"
32549  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32550    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32551    new_path="$unix_path"
32552  fi
32553
32554
32555    new_path=`$WHICH "$new_path" 2> /dev/null`
32556    # bat and cmd files are not always considered executable in MSYS causing which
32557    # to not find them
32558    if test "x$new_path" = x \
32559        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32560        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32561      new_path="$path"
32562
32563  windows_path="$new_path"
32564  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32565    unix_path=`$CYGPATH -u "$windows_path"`
32566    new_path="$unix_path"
32567  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32568    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32569    new_path="$unix_path"
32570  fi
32571
32572    fi
32573
32574    if test "x$new_path" = x; then
32575      # It's still not found. Now this is an unrecoverable error.
32576      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32577$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32578      has_space=`$ECHO "$complete" | $GREP " "`
32579      if test "x$has_space" != x; then
32580        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32581$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32582      fi
32583      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32584    fi
32585  fi
32586
32587  # Now new_path has a complete unix path to the binary
32588  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32589    # Keep paths in /bin as-is, but remove trailing .exe if any
32590    new_path="${new_path/%.exe/}"
32591    # Do not save /bin paths to all_fixpath_prefixes!
32592  else
32593    # Not in mixed or Windows style, start by that.
32594    new_path=`cmd //c echo $new_path`
32595
32596  input_path="$new_path"
32597  # Check if we need to convert this using DOS-style short mode. If the path
32598  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32599  # take no chances and rewrite it.
32600  # Note: m4 eats our [], so we need to use [ and ] instead.
32601  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32602  if test "x$has_forbidden_chars" != x; then
32603    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32604    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32605  fi
32606
32607    # Output is in $new_path
32608
32609  windows_path="$new_path"
32610  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32611    unix_path=`$CYGPATH -u "$windows_path"`
32612    new_path="$unix_path"
32613  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32614    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32615    new_path="$unix_path"
32616  fi
32617
32618    # remove trailing .exe if any
32619    new_path="${new_path/%.exe/}"
32620
32621    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32622    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32623  fi
32624
32625  else
32626    # We're on a posix platform. Hooray! :)
32627    # First separate the path from the arguments. This will split at the first
32628    # space.
32629    complete="$AS"
32630    path="${complete%% *}"
32631    tmp="$complete EOL"
32632    arguments="${tmp#* }"
32633
32634    # Cannot rely on the command "which" here since it doesn't always work.
32635    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32636    if test -z "$is_absolute_path"; then
32637      # Path to executable is not absolute. Find it.
32638      IFS_save="$IFS"
32639      IFS=:
32640      for p in $PATH; do
32641        if test -f "$p/$path" && test -x "$p/$path"; then
32642          new_path="$p/$path"
32643          break
32644        fi
32645      done
32646      IFS="$IFS_save"
32647    else
32648      # This is an absolute path, we can use it without further modifications.
32649      new_path="$path"
32650    fi
32651
32652    if test "x$new_path" = x; then
32653      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32654$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32655      has_space=`$ECHO "$complete" | $GREP " "`
32656      if test "x$has_space" != x; then
32657        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32658$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32659      fi
32660      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32661    fi
32662  fi
32663
32664  # Now join together the path and the arguments once again
32665  if test "x$arguments" != xEOL; then
32666    new_complete="$new_path ${arguments% *}"
32667  else
32668    new_complete="$new_path"
32669  fi
32670
32671  if test "x$complete" != "x$new_complete"; then
32672    AS="$new_complete"
32673    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
32674$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
32675  fi
32676
32677  else
32678    # FIXME: is this correct for microsoft?
32679    AS="$CC -c"
32680  fi
32681
32682
32683  #
32684  # Setup the archiver (AR)
32685  #
32686  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32687    # The corresponding ar tool is lib.exe (used to create static libraries)
32688    # Extract the first word of "lib", so it can be a program name with args.
32689set dummy lib; ac_word=$2
32690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32691$as_echo_n "checking for $ac_word... " >&6; }
32692if ${ac_cv_prog_AR+:} false; then :
32693  $as_echo_n "(cached) " >&6
32694else
32695  if test -n "$AR"; then
32696  ac_cv_prog_AR="$AR" # Let the user override the test.
32697else
32698as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32699for as_dir in $PATH
32700do
32701  IFS=$as_save_IFS
32702  test -z "$as_dir" && as_dir=.
32703    for ac_exec_ext in '' $ac_executable_extensions; do
32704  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32705    ac_cv_prog_AR="lib"
32706    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32707    break 2
32708  fi
32709done
32710  done
32711IFS=$as_save_IFS
32712
32713fi
32714fi
32715AR=$ac_cv_prog_AR
32716if test -n "$AR"; then
32717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32718$as_echo "$AR" >&6; }
32719else
32720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32721$as_echo "no" >&6; }
32722fi
32723
32724
32725  else
32726
32727
32728  # Publish this variable in the help.
32729
32730
32731  if test "x$AR" = x; then
32732    # The variable is not set by user, try to locate tool using the code snippet
32733    if test -n "$ac_tool_prefix"; then
32734  for ac_prog in ar
32735  do
32736    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32737set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32739$as_echo_n "checking for $ac_word... " >&6; }
32740if ${ac_cv_prog_AR+:} false; then :
32741  $as_echo_n "(cached) " >&6
32742else
32743  if test -n "$AR"; then
32744  ac_cv_prog_AR="$AR" # Let the user override the test.
32745else
32746as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32747for as_dir in $PATH
32748do
32749  IFS=$as_save_IFS
32750  test -z "$as_dir" && as_dir=.
32751    for ac_exec_ext in '' $ac_executable_extensions; do
32752  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32753    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32754    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32755    break 2
32756  fi
32757done
32758  done
32759IFS=$as_save_IFS
32760
32761fi
32762fi
32763AR=$ac_cv_prog_AR
32764if test -n "$AR"; then
32765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32766$as_echo "$AR" >&6; }
32767else
32768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32769$as_echo "no" >&6; }
32770fi
32771
32772
32773    test -n "$AR" && break
32774  done
32775fi
32776if test -z "$AR"; then
32777  ac_ct_AR=$AR
32778  for ac_prog in ar
32779do
32780  # Extract the first word of "$ac_prog", so it can be a program name with args.
32781set dummy $ac_prog; ac_word=$2
32782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32783$as_echo_n "checking for $ac_word... " >&6; }
32784if ${ac_cv_prog_ac_ct_AR+:} false; then :
32785  $as_echo_n "(cached) " >&6
32786else
32787  if test -n "$ac_ct_AR"; then
32788  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32789else
32790as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32791for as_dir in $PATH
32792do
32793  IFS=$as_save_IFS
32794  test -z "$as_dir" && as_dir=.
32795    for ac_exec_ext in '' $ac_executable_extensions; do
32796  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32797    ac_cv_prog_ac_ct_AR="$ac_prog"
32798    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32799    break 2
32800  fi
32801done
32802  done
32803IFS=$as_save_IFS
32804
32805fi
32806fi
32807ac_ct_AR=$ac_cv_prog_ac_ct_AR
32808if test -n "$ac_ct_AR"; then
32809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32810$as_echo "$ac_ct_AR" >&6; }
32811else
32812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32813$as_echo "no" >&6; }
32814fi
32815
32816
32817  test -n "$ac_ct_AR" && break
32818done
32819
32820  if test "x$ac_ct_AR" = x; then
32821    AR=""
32822  else
32823    case $cross_compiling:$ac_tool_warned in
32824yes:)
32825{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32826$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32827ac_tool_warned=yes ;;
32828esac
32829    AR=$ac_ct_AR
32830  fi
32831fi
32832
32833  else
32834    # The variable is set, but is it from the command line or the environment?
32835
32836    # Try to remove the string !AR! from our list.
32837    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
32838    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32839      # If it failed, the variable was not from the command line. Ignore it,
32840      # but warn the user (except for BASH, which is always set by the calling BASH).
32841      if test "xAR" != xBASH; then
32842        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
32843$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
32844      fi
32845      # Try to locate tool using the code snippet
32846      if test -n "$ac_tool_prefix"; then
32847  for ac_prog in ar
32848  do
32849    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32850set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32852$as_echo_n "checking for $ac_word... " >&6; }
32853if ${ac_cv_prog_AR+:} false; then :
32854  $as_echo_n "(cached) " >&6
32855else
32856  if test -n "$AR"; then
32857  ac_cv_prog_AR="$AR" # Let the user override the test.
32858else
32859as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32860for as_dir in $PATH
32861do
32862  IFS=$as_save_IFS
32863  test -z "$as_dir" && as_dir=.
32864    for ac_exec_ext in '' $ac_executable_extensions; do
32865  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32866    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32867    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32868    break 2
32869  fi
32870done
32871  done
32872IFS=$as_save_IFS
32873
32874fi
32875fi
32876AR=$ac_cv_prog_AR
32877if test -n "$AR"; then
32878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32879$as_echo "$AR" >&6; }
32880else
32881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32882$as_echo "no" >&6; }
32883fi
32884
32885
32886    test -n "$AR" && break
32887  done
32888fi
32889if test -z "$AR"; then
32890  ac_ct_AR=$AR
32891  for ac_prog in ar
32892do
32893  # Extract the first word of "$ac_prog", so it can be a program name with args.
32894set dummy $ac_prog; ac_word=$2
32895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32896$as_echo_n "checking for $ac_word... " >&6; }
32897if ${ac_cv_prog_ac_ct_AR+:} false; then :
32898  $as_echo_n "(cached) " >&6
32899else
32900  if test -n "$ac_ct_AR"; then
32901  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32902else
32903as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32904for as_dir in $PATH
32905do
32906  IFS=$as_save_IFS
32907  test -z "$as_dir" && as_dir=.
32908    for ac_exec_ext in '' $ac_executable_extensions; do
32909  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32910    ac_cv_prog_ac_ct_AR="$ac_prog"
32911    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32912    break 2
32913  fi
32914done
32915  done
32916IFS=$as_save_IFS
32917
32918fi
32919fi
32920ac_ct_AR=$ac_cv_prog_ac_ct_AR
32921if test -n "$ac_ct_AR"; then
32922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32923$as_echo "$ac_ct_AR" >&6; }
32924else
32925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32926$as_echo "no" >&6; }
32927fi
32928
32929
32930  test -n "$ac_ct_AR" && break
32931done
32932
32933  if test "x$ac_ct_AR" = x; then
32934    AR=""
32935  else
32936    case $cross_compiling:$ac_tool_warned in
32937yes:)
32938{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32939$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32940ac_tool_warned=yes ;;
32941esac
32942    AR=$ac_ct_AR
32943  fi
32944fi
32945
32946    else
32947      # If it succeeded, then it was overridden by the user. We will use it
32948      # for the tool.
32949
32950      # First remove it from the list of overridden variables, so we can test
32951      # for unknown variables in the end.
32952      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32953
32954      # Check if the provided tool contains a complete path.
32955      tool_specified="$AR"
32956      tool_basename="${tool_specified##*/}"
32957      if test "x$tool_basename" = "x$tool_specified"; then
32958        # A command without a complete path is provided, search $PATH.
32959        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
32960$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
32961        # Extract the first word of "$tool_basename", so it can be a program name with args.
32962set dummy $tool_basename; ac_word=$2
32963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32964$as_echo_n "checking for $ac_word... " >&6; }
32965if ${ac_cv_path_AR+:} false; then :
32966  $as_echo_n "(cached) " >&6
32967else
32968  case $AR in
32969  [\\/]* | ?:[\\/]*)
32970  ac_cv_path_AR="$AR" # Let the user override the test with a path.
32971  ;;
32972  *)
32973  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32974for as_dir in $PATH
32975do
32976  IFS=$as_save_IFS
32977  test -z "$as_dir" && as_dir=.
32978    for ac_exec_ext in '' $ac_executable_extensions; do
32979  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32980    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
32981    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32982    break 2
32983  fi
32984done
32985  done
32986IFS=$as_save_IFS
32987
32988  ;;
32989esac
32990fi
32991AR=$ac_cv_path_AR
32992if test -n "$AR"; then
32993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32994$as_echo "$AR" >&6; }
32995else
32996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32997$as_echo "no" >&6; }
32998fi
32999
33000
33001        if test "x$AR" = x; then
33002          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33003        fi
33004      else
33005        # Otherwise we believe it is a complete path. Use it as it is.
33006        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
33007$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
33008        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
33009$as_echo_n "checking for AR... " >&6; }
33010        if test ! -x "$tool_specified"; then
33011          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33012$as_echo "not found" >&6; }
33013          as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
33014        fi
33015        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33016$as_echo "$tool_specified" >&6; }
33017      fi
33018    fi
33019  fi
33020
33021
33022  fi
33023
33024  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33025
33026  # First separate the path from the arguments. This will split at the first
33027  # space.
33028  complete="$AR"
33029  path="${complete%% *}"
33030  tmp="$complete EOL"
33031  arguments="${tmp#* }"
33032
33033  # Input might be given as Windows format, start by converting to
33034  # unix format.
33035  new_path=`$CYGPATH -u "$path"`
33036
33037  # Now try to locate executable using which
33038  new_path=`$WHICH "$new_path" 2> /dev/null`
33039  # bat and cmd files are not always considered executable in cygwin causing which
33040  # to not find them
33041  if test "x$new_path" = x \
33042      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33043      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33044    new_path=`$CYGPATH -u "$path"`
33045  fi
33046  if test "x$new_path" = x; then
33047    # Oops. Which didn't find the executable.
33048    # The splitting of arguments from the executable at a space might have been incorrect,
33049    # since paths with space are more likely in Windows. Give it another try with the whole
33050    # argument.
33051    path="$complete"
33052    arguments="EOL"
33053    new_path=`$CYGPATH -u "$path"`
33054    new_path=`$WHICH "$new_path" 2> /dev/null`
33055    # bat and cmd files are not always considered executable in cygwin causing which
33056    # to not find them
33057    if test "x$new_path" = x \
33058        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33059        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33060      new_path=`$CYGPATH -u "$path"`
33061    fi
33062    if test "x$new_path" = x; then
33063      # It's still not found. Now this is an unrecoverable error.
33064      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33065$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33066      has_space=`$ECHO "$complete" | $GREP " "`
33067      if test "x$has_space" != x; then
33068        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33069$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33070      fi
33071      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33072    fi
33073  fi
33074
33075  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33076  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33077  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33078  # "foo.exe" is OK but "foo" is an error.
33079  #
33080  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33081  # It is also a way to make sure we got the proper file name for the real test later on.
33082  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33083  if test "x$test_shortpath" = x; then
33084    # Short path failed, file does not exist as specified.
33085    # Try adding .exe or .cmd
33086    if test -f "${new_path}.exe"; then
33087      input_to_shortpath="${new_path}.exe"
33088    elif test -f "${new_path}.cmd"; then
33089      input_to_shortpath="${new_path}.cmd"
33090    else
33091      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
33092$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
33093      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33094$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33095      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33096    fi
33097  else
33098    input_to_shortpath="$new_path"
33099  fi
33100
33101  # Call helper function which possibly converts this using DOS-style short mode.
33102  # If so, the updated path is stored in $new_path.
33103  new_path="$input_to_shortpath"
33104
33105  input_path="$input_to_shortpath"
33106  # Check if we need to convert this using DOS-style short mode. If the path
33107  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33108  # take no chances and rewrite it.
33109  # Note: m4 eats our [], so we need to use [ and ] instead.
33110  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33111  if test "x$has_forbidden_chars" != x; then
33112    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33113    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33114    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33115    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33116      # Going to short mode and back again did indeed matter. Since short mode is
33117      # case insensitive, let's make it lowercase to improve readability.
33118      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33119      # Now convert it back to Unix-stile (cygpath)
33120      input_path=`$CYGPATH -u "$shortmode_path"`
33121      new_path="$input_path"
33122    fi
33123  fi
33124
33125  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33126  if test "x$test_cygdrive_prefix" = x; then
33127    # As a simple fix, exclude /usr/bin since it's not a real path.
33128    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33129      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33130      # a path prefixed by /cygdrive for fixpath to work.
33131      new_path="$CYGWIN_ROOT_PATH$input_path"
33132    fi
33133  fi
33134
33135  # remove trailing .exe if any
33136  new_path="${new_path/%.exe/}"
33137
33138  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33139
33140  # First separate the path from the arguments. This will split at the first
33141  # space.
33142  complete="$AR"
33143  path="${complete%% *}"
33144  tmp="$complete EOL"
33145  arguments="${tmp#* }"
33146
33147  # Input might be given as Windows format, start by converting to
33148  # unix format.
33149  new_path="$path"
33150
33151  windows_path="$new_path"
33152  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33153    unix_path=`$CYGPATH -u "$windows_path"`
33154    new_path="$unix_path"
33155  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33156    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33157    new_path="$unix_path"
33158  fi
33159
33160
33161  # Now try to locate executable using which
33162  new_path=`$WHICH "$new_path" 2> /dev/null`
33163
33164  if test "x$new_path" = x; then
33165    # Oops. Which didn't find the executable.
33166    # The splitting of arguments from the executable at a space might have been incorrect,
33167    # since paths with space are more likely in Windows. Give it another try with the whole
33168    # argument.
33169    path="$complete"
33170    arguments="EOL"
33171    new_path="$path"
33172
33173  windows_path="$new_path"
33174  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33175    unix_path=`$CYGPATH -u "$windows_path"`
33176    new_path="$unix_path"
33177  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33178    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33179    new_path="$unix_path"
33180  fi
33181
33182
33183    new_path=`$WHICH "$new_path" 2> /dev/null`
33184    # bat and cmd files are not always considered executable in MSYS causing which
33185    # to not find them
33186    if test "x$new_path" = x \
33187        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33188        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33189      new_path="$path"
33190
33191  windows_path="$new_path"
33192  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33193    unix_path=`$CYGPATH -u "$windows_path"`
33194    new_path="$unix_path"
33195  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33196    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33197    new_path="$unix_path"
33198  fi
33199
33200    fi
33201
33202    if test "x$new_path" = x; then
33203      # It's still not found. Now this is an unrecoverable error.
33204      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33205$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33206      has_space=`$ECHO "$complete" | $GREP " "`
33207      if test "x$has_space" != x; then
33208        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33209$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33210      fi
33211      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33212    fi
33213  fi
33214
33215  # Now new_path has a complete unix path to the binary
33216  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33217    # Keep paths in /bin as-is, but remove trailing .exe if any
33218    new_path="${new_path/%.exe/}"
33219    # Do not save /bin paths to all_fixpath_prefixes!
33220  else
33221    # Not in mixed or Windows style, start by that.
33222    new_path=`cmd //c echo $new_path`
33223
33224  input_path="$new_path"
33225  # Check if we need to convert this using DOS-style short mode. If the path
33226  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33227  # take no chances and rewrite it.
33228  # Note: m4 eats our [], so we need to use [ and ] instead.
33229  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33230  if test "x$has_forbidden_chars" != x; then
33231    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33232    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33233  fi
33234
33235    # Output is in $new_path
33236
33237  windows_path="$new_path"
33238  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33239    unix_path=`$CYGPATH -u "$windows_path"`
33240    new_path="$unix_path"
33241  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33242    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33243    new_path="$unix_path"
33244  fi
33245
33246    # remove trailing .exe if any
33247    new_path="${new_path/%.exe/}"
33248
33249    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33250    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33251  fi
33252
33253  else
33254    # We're on a posix platform. Hooray! :)
33255    # First separate the path from the arguments. This will split at the first
33256    # space.
33257    complete="$AR"
33258    path="${complete%% *}"
33259    tmp="$complete EOL"
33260    arguments="${tmp#* }"
33261
33262    # Cannot rely on the command "which" here since it doesn't always work.
33263    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33264    if test -z "$is_absolute_path"; then
33265      # Path to executable is not absolute. Find it.
33266      IFS_save="$IFS"
33267      IFS=:
33268      for p in $PATH; do
33269        if test -f "$p/$path" && test -x "$p/$path"; then
33270          new_path="$p/$path"
33271          break
33272        fi
33273      done
33274      IFS="$IFS_save"
33275    else
33276      # This is an absolute path, we can use it without further modifications.
33277      new_path="$path"
33278    fi
33279
33280    if test "x$new_path" = x; then
33281      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33282$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33283      has_space=`$ECHO "$complete" | $GREP " "`
33284      if test "x$has_space" != x; then
33285        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33286$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33287      fi
33288      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33289    fi
33290  fi
33291
33292  # Now join together the path and the arguments once again
33293  if test "x$arguments" != xEOL; then
33294    new_complete="$new_path ${arguments% *}"
33295  else
33296    new_complete="$new_path"
33297  fi
33298
33299  if test "x$complete" != "x$new_complete"; then
33300    AR="$new_complete"
33301    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
33302$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
33303  fi
33304
33305
33306
33307  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
33308    ac_ext=m
33309ac_cpp='$OBJCPP $CPPFLAGS'
33310ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33311ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33312ac_compiler_gnu=$ac_cv_objc_compiler_gnu
33313if test -n "$ac_tool_prefix"; then
33314  for ac_prog in gcc objcc objc cc CC
33315  do
33316    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33317set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33319$as_echo_n "checking for $ac_word... " >&6; }
33320if ${ac_cv_prog_OBJC+:} false; then :
33321  $as_echo_n "(cached) " >&6
33322else
33323  if test -n "$OBJC"; then
33324  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
33325else
33326as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33327for as_dir in $PATH
33328do
33329  IFS=$as_save_IFS
33330  test -z "$as_dir" && as_dir=.
33331    for ac_exec_ext in '' $ac_executable_extensions; do
33332  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33333    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
33334    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33335    break 2
33336  fi
33337done
33338  done
33339IFS=$as_save_IFS
33340
33341fi
33342fi
33343OBJC=$ac_cv_prog_OBJC
33344if test -n "$OBJC"; then
33345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
33346$as_echo "$OBJC" >&6; }
33347else
33348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33349$as_echo "no" >&6; }
33350fi
33351
33352
33353    test -n "$OBJC" && break
33354  done
33355fi
33356if test -z "$OBJC"; then
33357  ac_ct_OBJC=$OBJC
33358  for ac_prog in gcc objcc objc cc CC
33359do
33360  # Extract the first word of "$ac_prog", so it can be a program name with args.
33361set dummy $ac_prog; ac_word=$2
33362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33363$as_echo_n "checking for $ac_word... " >&6; }
33364if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
33365  $as_echo_n "(cached) " >&6
33366else
33367  if test -n "$ac_ct_OBJC"; then
33368  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
33369else
33370as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33371for as_dir in $PATH
33372do
33373  IFS=$as_save_IFS
33374  test -z "$as_dir" && as_dir=.
33375    for ac_exec_ext in '' $ac_executable_extensions; do
33376  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33377    ac_cv_prog_ac_ct_OBJC="$ac_prog"
33378    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33379    break 2
33380  fi
33381done
33382  done
33383IFS=$as_save_IFS
33384
33385fi
33386fi
33387ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
33388if test -n "$ac_ct_OBJC"; then
33389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
33390$as_echo "$ac_ct_OBJC" >&6; }
33391else
33392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33393$as_echo "no" >&6; }
33394fi
33395
33396
33397  test -n "$ac_ct_OBJC" && break
33398done
33399
33400  if test "x$ac_ct_OBJC" = x; then
33401    OBJC="gcc"
33402  else
33403    case $cross_compiling:$ac_tool_warned in
33404yes:)
33405{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33406$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33407ac_tool_warned=yes ;;
33408esac
33409    OBJC=$ac_ct_OBJC
33410  fi
33411fi
33412
33413# Provide some information about the compiler.
33414$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
33415set X $ac_compile
33416ac_compiler=$2
33417for ac_option in --version -v -V -qversion; do
33418  { { ac_try="$ac_compiler $ac_option >&5"
33419case "(($ac_try" in
33420  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33421  *) ac_try_echo=$ac_try;;
33422esac
33423eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33424$as_echo "$ac_try_echo"; } >&5
33425  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33426  ac_status=$?
33427  if test -s conftest.err; then
33428    sed '10a\
33429... rest of stderr output deleted ...
33430         10q' conftest.err >conftest.er1
33431    cat conftest.er1 >&5
33432  fi
33433  rm -f conftest.er1 conftest.err
33434  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33435  test $ac_status = 0; }
33436done
33437
33438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
33439$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
33440if ${ac_cv_objc_compiler_gnu+:} false; then :
33441  $as_echo_n "(cached) " >&6
33442else
33443  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33444/* end confdefs.h.  */
33445
33446int
33447main ()
33448{
33449#ifndef __GNUC__
33450       choke me
33451#endif
33452
33453  ;
33454  return 0;
33455}
33456_ACEOF
33457if ac_fn_objc_try_compile "$LINENO"; then :
33458  ac_compiler_gnu=yes
33459else
33460  ac_compiler_gnu=no
33461fi
33462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33463ac_cv_objc_compiler_gnu=$ac_compiler_gnu
33464
33465fi
33466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
33467$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
33468if test $ac_compiler_gnu = yes; then
33469  GOBJC=yes
33470else
33471  GOBJC=
33472fi
33473ac_test_OBJCFLAGS=${OBJCFLAGS+set}
33474ac_save_OBJCFLAGS=$OBJCFLAGS
33475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
33476$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
33477if ${ac_cv_prog_objc_g+:} false; then :
33478  $as_echo_n "(cached) " >&6
33479else
33480  ac_save_objc_werror_flag=$ac_objc_werror_flag
33481   ac_objc_werror_flag=yes
33482   ac_cv_prog_objc_g=no
33483   OBJCFLAGS="-g"
33484   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33485/* end confdefs.h.  */
33486
33487int
33488main ()
33489{
33490
33491  ;
33492  return 0;
33493}
33494_ACEOF
33495if ac_fn_objc_try_compile "$LINENO"; then :
33496  ac_cv_prog_objc_g=yes
33497else
33498  OBJCFLAGS=""
33499      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33500/* end confdefs.h.  */
33501
33502int
33503main ()
33504{
33505
33506  ;
33507  return 0;
33508}
33509_ACEOF
33510if ac_fn_objc_try_compile "$LINENO"; then :
33511
33512else
33513  ac_objc_werror_flag=$ac_save_objc_werror_flag
33514	 OBJCFLAGS="-g"
33515	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33516/* end confdefs.h.  */
33517
33518int
33519main ()
33520{
33521
33522  ;
33523  return 0;
33524}
33525_ACEOF
33526if ac_fn_objc_try_compile "$LINENO"; then :
33527  ac_cv_prog_objc_g=yes
33528fi
33529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33530fi
33531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33532fi
33533rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33534   ac_objc_werror_flag=$ac_save_objc_werror_flag
33535fi
33536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
33537$as_echo "$ac_cv_prog_objc_g" >&6; }
33538if test "$ac_test_OBJCFLAGS" = set; then
33539  OBJCFLAGS=$ac_save_OBJCFLAGS
33540elif test $ac_cv_prog_objc_g = yes; then
33541  if test "$GOBJC" = yes; then
33542    OBJCFLAGS="-g -O2"
33543  else
33544    OBJCFLAGS="-g"
33545  fi
33546else
33547  if test "$GOBJC" = yes; then
33548    OBJCFLAGS="-O2"
33549  else
33550    OBJCFLAGS=
33551  fi
33552fi
33553ac_ext=cpp
33554ac_cpp='$CXXCPP $CPPFLAGS'
33555ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33556ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33557ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33558
33559
33560  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33561
33562  # First separate the path from the arguments. This will split at the first
33563  # space.
33564  complete="$OBJC"
33565  path="${complete%% *}"
33566  tmp="$complete EOL"
33567  arguments="${tmp#* }"
33568
33569  # Input might be given as Windows format, start by converting to
33570  # unix format.
33571  new_path=`$CYGPATH -u "$path"`
33572
33573  # Now try to locate executable using which
33574  new_path=`$WHICH "$new_path" 2> /dev/null`
33575  # bat and cmd files are not always considered executable in cygwin causing which
33576  # to not find them
33577  if test "x$new_path" = x \
33578      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33579      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33580    new_path=`$CYGPATH -u "$path"`
33581  fi
33582  if test "x$new_path" = x; then
33583    # Oops. Which didn't find the executable.
33584    # The splitting of arguments from the executable at a space might have been incorrect,
33585    # since paths with space are more likely in Windows. Give it another try with the whole
33586    # argument.
33587    path="$complete"
33588    arguments="EOL"
33589    new_path=`$CYGPATH -u "$path"`
33590    new_path=`$WHICH "$new_path" 2> /dev/null`
33591    # bat and cmd files are not always considered executable in cygwin causing which
33592    # to not find them
33593    if test "x$new_path" = x \
33594        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33595        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33596      new_path=`$CYGPATH -u "$path"`
33597    fi
33598    if test "x$new_path" = x; then
33599      # It's still not found. Now this is an unrecoverable error.
33600      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33601$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33602      has_space=`$ECHO "$complete" | $GREP " "`
33603      if test "x$has_space" != x; then
33604        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33605$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33606      fi
33607      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33608    fi
33609  fi
33610
33611  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33612  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33613  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33614  # "foo.exe" is OK but "foo" is an error.
33615  #
33616  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33617  # It is also a way to make sure we got the proper file name for the real test later on.
33618  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33619  if test "x$test_shortpath" = x; then
33620    # Short path failed, file does not exist as specified.
33621    # Try adding .exe or .cmd
33622    if test -f "${new_path}.exe"; then
33623      input_to_shortpath="${new_path}.exe"
33624    elif test -f "${new_path}.cmd"; then
33625      input_to_shortpath="${new_path}.cmd"
33626    else
33627      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
33628$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
33629      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33630$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33631      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33632    fi
33633  else
33634    input_to_shortpath="$new_path"
33635  fi
33636
33637  # Call helper function which possibly converts this using DOS-style short mode.
33638  # If so, the updated path is stored in $new_path.
33639  new_path="$input_to_shortpath"
33640
33641  input_path="$input_to_shortpath"
33642  # Check if we need to convert this using DOS-style short mode. If the path
33643  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33644  # take no chances and rewrite it.
33645  # Note: m4 eats our [], so we need to use [ and ] instead.
33646  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33647  if test "x$has_forbidden_chars" != x; then
33648    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33649    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33650    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33651    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33652      # Going to short mode and back again did indeed matter. Since short mode is
33653      # case insensitive, let's make it lowercase to improve readability.
33654      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33655      # Now convert it back to Unix-stile (cygpath)
33656      input_path=`$CYGPATH -u "$shortmode_path"`
33657      new_path="$input_path"
33658    fi
33659  fi
33660
33661  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33662  if test "x$test_cygdrive_prefix" = x; then
33663    # As a simple fix, exclude /usr/bin since it's not a real path.
33664    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33665      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33666      # a path prefixed by /cygdrive for fixpath to work.
33667      new_path="$CYGWIN_ROOT_PATH$input_path"
33668    fi
33669  fi
33670
33671  # remove trailing .exe if any
33672  new_path="${new_path/%.exe/}"
33673
33674  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33675
33676  # First separate the path from the arguments. This will split at the first
33677  # space.
33678  complete="$OBJC"
33679  path="${complete%% *}"
33680  tmp="$complete EOL"
33681  arguments="${tmp#* }"
33682
33683  # Input might be given as Windows format, start by converting to
33684  # unix format.
33685  new_path="$path"
33686
33687  windows_path="$new_path"
33688  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33689    unix_path=`$CYGPATH -u "$windows_path"`
33690    new_path="$unix_path"
33691  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33692    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33693    new_path="$unix_path"
33694  fi
33695
33696
33697  # Now try to locate executable using which
33698  new_path=`$WHICH "$new_path" 2> /dev/null`
33699
33700  if test "x$new_path" = x; then
33701    # Oops. Which didn't find the executable.
33702    # The splitting of arguments from the executable at a space might have been incorrect,
33703    # since paths with space are more likely in Windows. Give it another try with the whole
33704    # argument.
33705    path="$complete"
33706    arguments="EOL"
33707    new_path="$path"
33708
33709  windows_path="$new_path"
33710  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33711    unix_path=`$CYGPATH -u "$windows_path"`
33712    new_path="$unix_path"
33713  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33714    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33715    new_path="$unix_path"
33716  fi
33717
33718
33719    new_path=`$WHICH "$new_path" 2> /dev/null`
33720    # bat and cmd files are not always considered executable in MSYS causing which
33721    # to not find them
33722    if test "x$new_path" = x \
33723        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33724        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33725      new_path="$path"
33726
33727  windows_path="$new_path"
33728  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33729    unix_path=`$CYGPATH -u "$windows_path"`
33730    new_path="$unix_path"
33731  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33732    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33733    new_path="$unix_path"
33734  fi
33735
33736    fi
33737
33738    if test "x$new_path" = x; then
33739      # It's still not found. Now this is an unrecoverable error.
33740      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33741$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33742      has_space=`$ECHO "$complete" | $GREP " "`
33743      if test "x$has_space" != x; then
33744        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33745$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33746      fi
33747      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33748    fi
33749  fi
33750
33751  # Now new_path has a complete unix path to the binary
33752  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33753    # Keep paths in /bin as-is, but remove trailing .exe if any
33754    new_path="${new_path/%.exe/}"
33755    # Do not save /bin paths to all_fixpath_prefixes!
33756  else
33757    # Not in mixed or Windows style, start by that.
33758    new_path=`cmd //c echo $new_path`
33759
33760  input_path="$new_path"
33761  # Check if we need to convert this using DOS-style short mode. If the path
33762  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33763  # take no chances and rewrite it.
33764  # Note: m4 eats our [], so we need to use [ and ] instead.
33765  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33766  if test "x$has_forbidden_chars" != x; then
33767    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33768    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33769  fi
33770
33771    # Output is in $new_path
33772
33773  windows_path="$new_path"
33774  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33775    unix_path=`$CYGPATH -u "$windows_path"`
33776    new_path="$unix_path"
33777  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33778    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33779    new_path="$unix_path"
33780  fi
33781
33782    # remove trailing .exe if any
33783    new_path="${new_path/%.exe/}"
33784
33785    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33786    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33787  fi
33788
33789  else
33790    # We're on a posix platform. Hooray! :)
33791    # First separate the path from the arguments. This will split at the first
33792    # space.
33793    complete="$OBJC"
33794    path="${complete%% *}"
33795    tmp="$complete EOL"
33796    arguments="${tmp#* }"
33797
33798    # Cannot rely on the command "which" here since it doesn't always work.
33799    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33800    if test -z "$is_absolute_path"; then
33801      # Path to executable is not absolute. Find it.
33802      IFS_save="$IFS"
33803      IFS=:
33804      for p in $PATH; do
33805        if test -f "$p/$path" && test -x "$p/$path"; then
33806          new_path="$p/$path"
33807          break
33808        fi
33809      done
33810      IFS="$IFS_save"
33811    else
33812      # This is an absolute path, we can use it without further modifications.
33813      new_path="$path"
33814    fi
33815
33816    if test "x$new_path" = x; then
33817      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33818$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33819      has_space=`$ECHO "$complete" | $GREP " "`
33820      if test "x$has_space" != x; then
33821        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33822$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33823      fi
33824      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33825    fi
33826  fi
33827
33828  # Now join together the path and the arguments once again
33829  if test "x$arguments" != xEOL; then
33830    new_complete="$new_path ${arguments% *}"
33831  else
33832    new_complete="$new_path"
33833  fi
33834
33835  if test "x$complete" != "x$new_complete"; then
33836    OBJC="$new_complete"
33837    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
33838$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
33839  fi
33840
33841
33842
33843  # Publish this variable in the help.
33844
33845
33846  if test "x$LIPO" = x; then
33847    # The variable is not set by user, try to locate tool using the code snippet
33848    for ac_prog in lipo
33849do
33850  # Extract the first word of "$ac_prog", so it can be a program name with args.
33851set dummy $ac_prog; ac_word=$2
33852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33853$as_echo_n "checking for $ac_word... " >&6; }
33854if ${ac_cv_path_LIPO+:} false; then :
33855  $as_echo_n "(cached) " >&6
33856else
33857  case $LIPO in
33858  [\\/]* | ?:[\\/]*)
33859  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33860  ;;
33861  *)
33862  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33863for as_dir in $PATH
33864do
33865  IFS=$as_save_IFS
33866  test -z "$as_dir" && as_dir=.
33867    for ac_exec_ext in '' $ac_executable_extensions; do
33868  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33869    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33870    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33871    break 2
33872  fi
33873done
33874  done
33875IFS=$as_save_IFS
33876
33877  ;;
33878esac
33879fi
33880LIPO=$ac_cv_path_LIPO
33881if test -n "$LIPO"; then
33882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33883$as_echo "$LIPO" >&6; }
33884else
33885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33886$as_echo "no" >&6; }
33887fi
33888
33889
33890  test -n "$LIPO" && break
33891done
33892
33893  else
33894    # The variable is set, but is it from the command line or the environment?
33895
33896    # Try to remove the string !LIPO! from our list.
33897    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
33898    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33899      # If it failed, the variable was not from the command line. Ignore it,
33900      # but warn the user (except for BASH, which is always set by the calling BASH).
33901      if test "xLIPO" != xBASH; then
33902        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
33903$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
33904      fi
33905      # Try to locate tool using the code snippet
33906      for ac_prog in lipo
33907do
33908  # Extract the first word of "$ac_prog", so it can be a program name with args.
33909set dummy $ac_prog; ac_word=$2
33910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33911$as_echo_n "checking for $ac_word... " >&6; }
33912if ${ac_cv_path_LIPO+:} false; then :
33913  $as_echo_n "(cached) " >&6
33914else
33915  case $LIPO in
33916  [\\/]* | ?:[\\/]*)
33917  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33918  ;;
33919  *)
33920  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33921for as_dir in $PATH
33922do
33923  IFS=$as_save_IFS
33924  test -z "$as_dir" && as_dir=.
33925    for ac_exec_ext in '' $ac_executable_extensions; do
33926  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33927    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33928    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33929    break 2
33930  fi
33931done
33932  done
33933IFS=$as_save_IFS
33934
33935  ;;
33936esac
33937fi
33938LIPO=$ac_cv_path_LIPO
33939if test -n "$LIPO"; then
33940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33941$as_echo "$LIPO" >&6; }
33942else
33943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33944$as_echo "no" >&6; }
33945fi
33946
33947
33948  test -n "$LIPO" && break
33949done
33950
33951    else
33952      # If it succeeded, then it was overridden by the user. We will use it
33953      # for the tool.
33954
33955      # First remove it from the list of overridden variables, so we can test
33956      # for unknown variables in the end.
33957      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33958
33959      # Check if the provided tool contains a complete path.
33960      tool_specified="$LIPO"
33961      tool_basename="${tool_specified##*/}"
33962      if test "x$tool_basename" = "x$tool_specified"; then
33963        # A command without a complete path is provided, search $PATH.
33964        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
33965$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
33966        # Extract the first word of "$tool_basename", so it can be a program name with args.
33967set dummy $tool_basename; ac_word=$2
33968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33969$as_echo_n "checking for $ac_word... " >&6; }
33970if ${ac_cv_path_LIPO+:} false; then :
33971  $as_echo_n "(cached) " >&6
33972else
33973  case $LIPO in
33974  [\\/]* | ?:[\\/]*)
33975  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33976  ;;
33977  *)
33978  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33979for as_dir in $PATH
33980do
33981  IFS=$as_save_IFS
33982  test -z "$as_dir" && as_dir=.
33983    for ac_exec_ext in '' $ac_executable_extensions; do
33984  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33985    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33986    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33987    break 2
33988  fi
33989done
33990  done
33991IFS=$as_save_IFS
33992
33993  ;;
33994esac
33995fi
33996LIPO=$ac_cv_path_LIPO
33997if test -n "$LIPO"; then
33998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33999$as_echo "$LIPO" >&6; }
34000else
34001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34002$as_echo "no" >&6; }
34003fi
34004
34005
34006        if test "x$LIPO" = x; then
34007          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
34008        fi
34009      else
34010        # Otherwise we believe it is a complete path. Use it as it is.
34011        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
34012$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
34013        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
34014$as_echo_n "checking for LIPO... " >&6; }
34015        if test ! -x "$tool_specified"; then
34016          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
34017$as_echo "not found" >&6; }
34018          as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
34019        fi
34020        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
34021$as_echo "$tool_specified" >&6; }
34022      fi
34023    fi
34024  fi
34025
34026
34027
34028  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34029
34030  # First separate the path from the arguments. This will split at the first
34031  # space.
34032  complete="$LIPO"
34033  path="${complete%% *}"
34034  tmp="$complete EOL"
34035  arguments="${tmp#* }"
34036
34037  # Input might be given as Windows format, start by converting to
34038  # unix format.
34039  new_path=`$CYGPATH -u "$path"`
34040
34041  # Now try to locate executable using which
34042  new_path=`$WHICH "$new_path" 2> /dev/null`
34043  # bat and cmd files are not always considered executable in cygwin causing which
34044  # to not find them
34045  if test "x$new_path" = x \
34046      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34047      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34048    new_path=`$CYGPATH -u "$path"`
34049  fi
34050  if test "x$new_path" = x; then
34051    # Oops. Which didn't find the executable.
34052    # The splitting of arguments from the executable at a space might have been incorrect,
34053    # since paths with space are more likely in Windows. Give it another try with the whole
34054    # argument.
34055    path="$complete"
34056    arguments="EOL"
34057    new_path=`$CYGPATH -u "$path"`
34058    new_path=`$WHICH "$new_path" 2> /dev/null`
34059    # bat and cmd files are not always considered executable in cygwin causing which
34060    # to not find them
34061    if test "x$new_path" = x \
34062        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34063        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34064      new_path=`$CYGPATH -u "$path"`
34065    fi
34066    if test "x$new_path" = x; then
34067      # It's still not found. Now this is an unrecoverable error.
34068      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34069$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34070      has_space=`$ECHO "$complete" | $GREP " "`
34071      if test "x$has_space" != x; then
34072        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34073$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34074      fi
34075      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34076    fi
34077  fi
34078
34079  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34080  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34081  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34082  # "foo.exe" is OK but "foo" is an error.
34083  #
34084  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34085  # It is also a way to make sure we got the proper file name for the real test later on.
34086  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34087  if test "x$test_shortpath" = x; then
34088    # Short path failed, file does not exist as specified.
34089    # Try adding .exe or .cmd
34090    if test -f "${new_path}.exe"; then
34091      input_to_shortpath="${new_path}.exe"
34092    elif test -f "${new_path}.cmd"; then
34093      input_to_shortpath="${new_path}.cmd"
34094    else
34095      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
34096$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
34097      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34098$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34099      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34100    fi
34101  else
34102    input_to_shortpath="$new_path"
34103  fi
34104
34105  # Call helper function which possibly converts this using DOS-style short mode.
34106  # If so, the updated path is stored in $new_path.
34107  new_path="$input_to_shortpath"
34108
34109  input_path="$input_to_shortpath"
34110  # Check if we need to convert this using DOS-style short mode. If the path
34111  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34112  # take no chances and rewrite it.
34113  # Note: m4 eats our [], so we need to use [ and ] instead.
34114  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34115  if test "x$has_forbidden_chars" != x; then
34116    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34117    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34118    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34119    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34120      # Going to short mode and back again did indeed matter. Since short mode is
34121      # case insensitive, let's make it lowercase to improve readability.
34122      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34123      # Now convert it back to Unix-stile (cygpath)
34124      input_path=`$CYGPATH -u "$shortmode_path"`
34125      new_path="$input_path"
34126    fi
34127  fi
34128
34129  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34130  if test "x$test_cygdrive_prefix" = x; then
34131    # As a simple fix, exclude /usr/bin since it's not a real path.
34132    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34133      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34134      # a path prefixed by /cygdrive for fixpath to work.
34135      new_path="$CYGWIN_ROOT_PATH$input_path"
34136    fi
34137  fi
34138
34139  # remove trailing .exe if any
34140  new_path="${new_path/%.exe/}"
34141
34142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34143
34144  # First separate the path from the arguments. This will split at the first
34145  # space.
34146  complete="$LIPO"
34147  path="${complete%% *}"
34148  tmp="$complete EOL"
34149  arguments="${tmp#* }"
34150
34151  # Input might be given as Windows format, start by converting to
34152  # unix format.
34153  new_path="$path"
34154
34155  windows_path="$new_path"
34156  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34157    unix_path=`$CYGPATH -u "$windows_path"`
34158    new_path="$unix_path"
34159  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34160    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34161    new_path="$unix_path"
34162  fi
34163
34164
34165  # Now try to locate executable using which
34166  new_path=`$WHICH "$new_path" 2> /dev/null`
34167
34168  if test "x$new_path" = x; then
34169    # Oops. Which didn't find the executable.
34170    # The splitting of arguments from the executable at a space might have been incorrect,
34171    # since paths with space are more likely in Windows. Give it another try with the whole
34172    # argument.
34173    path="$complete"
34174    arguments="EOL"
34175    new_path="$path"
34176
34177  windows_path="$new_path"
34178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34179    unix_path=`$CYGPATH -u "$windows_path"`
34180    new_path="$unix_path"
34181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34182    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34183    new_path="$unix_path"
34184  fi
34185
34186
34187    new_path=`$WHICH "$new_path" 2> /dev/null`
34188    # bat and cmd files are not always considered executable in MSYS causing which
34189    # to not find them
34190    if test "x$new_path" = x \
34191        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34192        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34193      new_path="$path"
34194
34195  windows_path="$new_path"
34196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34197    unix_path=`$CYGPATH -u "$windows_path"`
34198    new_path="$unix_path"
34199  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34200    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34201    new_path="$unix_path"
34202  fi
34203
34204    fi
34205
34206    if test "x$new_path" = x; then
34207      # It's still not found. Now this is an unrecoverable error.
34208      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34209$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34210      has_space=`$ECHO "$complete" | $GREP " "`
34211      if test "x$has_space" != x; then
34212        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34213$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34214      fi
34215      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34216    fi
34217  fi
34218
34219  # Now new_path has a complete unix path to the binary
34220  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34221    # Keep paths in /bin as-is, but remove trailing .exe if any
34222    new_path="${new_path/%.exe/}"
34223    # Do not save /bin paths to all_fixpath_prefixes!
34224  else
34225    # Not in mixed or Windows style, start by that.
34226    new_path=`cmd //c echo $new_path`
34227
34228  input_path="$new_path"
34229  # Check if we need to convert this using DOS-style short mode. If the path
34230  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34231  # take no chances and rewrite it.
34232  # Note: m4 eats our [], so we need to use [ and ] instead.
34233  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34234  if test "x$has_forbidden_chars" != x; then
34235    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34236    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34237  fi
34238
34239    # Output is in $new_path
34240
34241  windows_path="$new_path"
34242  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34243    unix_path=`$CYGPATH -u "$windows_path"`
34244    new_path="$unix_path"
34245  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34246    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34247    new_path="$unix_path"
34248  fi
34249
34250    # remove trailing .exe if any
34251    new_path="${new_path/%.exe/}"
34252
34253    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34254    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34255  fi
34256
34257  else
34258    # We're on a posix platform. Hooray! :)
34259    # First separate the path from the arguments. This will split at the first
34260    # space.
34261    complete="$LIPO"
34262    path="${complete%% *}"
34263    tmp="$complete EOL"
34264    arguments="${tmp#* }"
34265
34266    # Cannot rely on the command "which" here since it doesn't always work.
34267    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34268    if test -z "$is_absolute_path"; then
34269      # Path to executable is not absolute. Find it.
34270      IFS_save="$IFS"
34271      IFS=:
34272      for p in $PATH; do
34273        if test -f "$p/$path" && test -x "$p/$path"; then
34274          new_path="$p/$path"
34275          break
34276        fi
34277      done
34278      IFS="$IFS_save"
34279    else
34280      # This is an absolute path, we can use it without further modifications.
34281      new_path="$path"
34282    fi
34283
34284    if test "x$new_path" = x; then
34285      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34286$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34287      has_space=`$ECHO "$complete" | $GREP " "`
34288      if test "x$has_space" != x; then
34289        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34290$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34291      fi
34292      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34293    fi
34294  fi
34295
34296  # Now join together the path and the arguments once again
34297  if test "x$arguments" != xEOL; then
34298    new_complete="$new_path ${arguments% *}"
34299  else
34300    new_complete="$new_path"
34301  fi
34302
34303  if test "x$complete" != "x$new_complete"; then
34304    LIPO="$new_complete"
34305    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
34306$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
34307  fi
34308
34309  else
34310    OBJC=
34311  fi
34312
34313  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34314    # Extract the first word of "mt", so it can be a program name with args.
34315set dummy mt; ac_word=$2
34316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34317$as_echo_n "checking for $ac_word... " >&6; }
34318if ${ac_cv_prog_MT+:} false; then :
34319  $as_echo_n "(cached) " >&6
34320else
34321  if test -n "$MT"; then
34322  ac_cv_prog_MT="$MT" # Let the user override the test.
34323else
34324  ac_prog_rejected=no
34325as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34326for as_dir in $PATH
34327do
34328  IFS=$as_save_IFS
34329  test -z "$as_dir" && as_dir=.
34330    for ac_exec_ext in '' $ac_executable_extensions; do
34331  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34332    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
34333       ac_prog_rejected=yes
34334       continue
34335     fi
34336    ac_cv_prog_MT="mt"
34337    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34338    break 2
34339  fi
34340done
34341  done
34342IFS=$as_save_IFS
34343
34344if test $ac_prog_rejected = yes; then
34345  # We found a bogon in the path, so make sure we never use it.
34346  set dummy $ac_cv_prog_MT
34347  shift
34348  if test $# != 0; then
34349    # We chose a different compiler from the bogus one.
34350    # However, it has the same basename, so the bogon will be chosen
34351    # first if we set MT to just the basename; use the full file name.
34352    shift
34353    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
34354  fi
34355fi
34356fi
34357fi
34358MT=$ac_cv_prog_MT
34359if test -n "$MT"; then
34360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
34361$as_echo "$MT" >&6; }
34362else
34363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34364$as_echo "no" >&6; }
34365fi
34366
34367
34368
34369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34370
34371  # First separate the path from the arguments. This will split at the first
34372  # space.
34373  complete="$MT"
34374  path="${complete%% *}"
34375  tmp="$complete EOL"
34376  arguments="${tmp#* }"
34377
34378  # Input might be given as Windows format, start by converting to
34379  # unix format.
34380  new_path=`$CYGPATH -u "$path"`
34381
34382  # Now try to locate executable using which
34383  new_path=`$WHICH "$new_path" 2> /dev/null`
34384  # bat and cmd files are not always considered executable in cygwin causing which
34385  # to not find them
34386  if test "x$new_path" = x \
34387      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34388      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34389    new_path=`$CYGPATH -u "$path"`
34390  fi
34391  if test "x$new_path" = x; then
34392    # Oops. Which didn't find the executable.
34393    # The splitting of arguments from the executable at a space might have been incorrect,
34394    # since paths with space are more likely in Windows. Give it another try with the whole
34395    # argument.
34396    path="$complete"
34397    arguments="EOL"
34398    new_path=`$CYGPATH -u "$path"`
34399    new_path=`$WHICH "$new_path" 2> /dev/null`
34400    # bat and cmd files are not always considered executable in cygwin causing which
34401    # to not find them
34402    if test "x$new_path" = x \
34403        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34404        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34405      new_path=`$CYGPATH -u "$path"`
34406    fi
34407    if test "x$new_path" = x; then
34408      # It's still not found. Now this is an unrecoverable error.
34409      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34410$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34411      has_space=`$ECHO "$complete" | $GREP " "`
34412      if test "x$has_space" != x; then
34413        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34414$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34415      fi
34416      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34417    fi
34418  fi
34419
34420  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34421  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34422  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34423  # "foo.exe" is OK but "foo" is an error.
34424  #
34425  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34426  # It is also a way to make sure we got the proper file name for the real test later on.
34427  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34428  if test "x$test_shortpath" = x; then
34429    # Short path failed, file does not exist as specified.
34430    # Try adding .exe or .cmd
34431    if test -f "${new_path}.exe"; then
34432      input_to_shortpath="${new_path}.exe"
34433    elif test -f "${new_path}.cmd"; then
34434      input_to_shortpath="${new_path}.cmd"
34435    else
34436      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
34437$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
34438      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34439$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34440      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34441    fi
34442  else
34443    input_to_shortpath="$new_path"
34444  fi
34445
34446  # Call helper function which possibly converts this using DOS-style short mode.
34447  # If so, the updated path is stored in $new_path.
34448  new_path="$input_to_shortpath"
34449
34450  input_path="$input_to_shortpath"
34451  # Check if we need to convert this using DOS-style short mode. If the path
34452  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34453  # take no chances and rewrite it.
34454  # Note: m4 eats our [], so we need to use [ and ] instead.
34455  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34456  if test "x$has_forbidden_chars" != x; then
34457    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34458    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34459    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34460    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34461      # Going to short mode and back again did indeed matter. Since short mode is
34462      # case insensitive, let's make it lowercase to improve readability.
34463      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34464      # Now convert it back to Unix-stile (cygpath)
34465      input_path=`$CYGPATH -u "$shortmode_path"`
34466      new_path="$input_path"
34467    fi
34468  fi
34469
34470  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34471  if test "x$test_cygdrive_prefix" = x; then
34472    # As a simple fix, exclude /usr/bin since it's not a real path.
34473    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34474      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34475      # a path prefixed by /cygdrive for fixpath to work.
34476      new_path="$CYGWIN_ROOT_PATH$input_path"
34477    fi
34478  fi
34479
34480  # remove trailing .exe if any
34481  new_path="${new_path/%.exe/}"
34482
34483  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34484
34485  # First separate the path from the arguments. This will split at the first
34486  # space.
34487  complete="$MT"
34488  path="${complete%% *}"
34489  tmp="$complete EOL"
34490  arguments="${tmp#* }"
34491
34492  # Input might be given as Windows format, start by converting to
34493  # unix format.
34494  new_path="$path"
34495
34496  windows_path="$new_path"
34497  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34498    unix_path=`$CYGPATH -u "$windows_path"`
34499    new_path="$unix_path"
34500  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34501    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34502    new_path="$unix_path"
34503  fi
34504
34505
34506  # Now try to locate executable using which
34507  new_path=`$WHICH "$new_path" 2> /dev/null`
34508
34509  if test "x$new_path" = x; then
34510    # Oops. Which didn't find the executable.
34511    # The splitting of arguments from the executable at a space might have been incorrect,
34512    # since paths with space are more likely in Windows. Give it another try with the whole
34513    # argument.
34514    path="$complete"
34515    arguments="EOL"
34516    new_path="$path"
34517
34518  windows_path="$new_path"
34519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34520    unix_path=`$CYGPATH -u "$windows_path"`
34521    new_path="$unix_path"
34522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34523    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34524    new_path="$unix_path"
34525  fi
34526
34527
34528    new_path=`$WHICH "$new_path" 2> /dev/null`
34529    # bat and cmd files are not always considered executable in MSYS causing which
34530    # to not find them
34531    if test "x$new_path" = x \
34532        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34533        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34534      new_path="$path"
34535
34536  windows_path="$new_path"
34537  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34538    unix_path=`$CYGPATH -u "$windows_path"`
34539    new_path="$unix_path"
34540  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34541    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34542    new_path="$unix_path"
34543  fi
34544
34545    fi
34546
34547    if test "x$new_path" = x; then
34548      # It's still not found. Now this is an unrecoverable error.
34549      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34550$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34551      has_space=`$ECHO "$complete" | $GREP " "`
34552      if test "x$has_space" != x; then
34553        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34554$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34555      fi
34556      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34557    fi
34558  fi
34559
34560  # Now new_path has a complete unix path to the binary
34561  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34562    # Keep paths in /bin as-is, but remove trailing .exe if any
34563    new_path="${new_path/%.exe/}"
34564    # Do not save /bin paths to all_fixpath_prefixes!
34565  else
34566    # Not in mixed or Windows style, start by that.
34567    new_path=`cmd //c echo $new_path`
34568
34569  input_path="$new_path"
34570  # Check if we need to convert this using DOS-style short mode. If the path
34571  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34572  # take no chances and rewrite it.
34573  # Note: m4 eats our [], so we need to use [ and ] instead.
34574  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34575  if test "x$has_forbidden_chars" != x; then
34576    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34577    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34578  fi
34579
34580    # Output is in $new_path
34581
34582  windows_path="$new_path"
34583  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34584    unix_path=`$CYGPATH -u "$windows_path"`
34585    new_path="$unix_path"
34586  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34587    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34588    new_path="$unix_path"
34589  fi
34590
34591    # remove trailing .exe if any
34592    new_path="${new_path/%.exe/}"
34593
34594    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34595    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34596  fi
34597
34598  else
34599    # We're on a posix platform. Hooray! :)
34600    # First separate the path from the arguments. This will split at the first
34601    # space.
34602    complete="$MT"
34603    path="${complete%% *}"
34604    tmp="$complete EOL"
34605    arguments="${tmp#* }"
34606
34607    # Cannot rely on the command "which" here since it doesn't always work.
34608    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34609    if test -z "$is_absolute_path"; then
34610      # Path to executable is not absolute. Find it.
34611      IFS_save="$IFS"
34612      IFS=:
34613      for p in $PATH; do
34614        if test -f "$p/$path" && test -x "$p/$path"; then
34615          new_path="$p/$path"
34616          break
34617        fi
34618      done
34619      IFS="$IFS_save"
34620    else
34621      # This is an absolute path, we can use it without further modifications.
34622      new_path="$path"
34623    fi
34624
34625    if test "x$new_path" = x; then
34626      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34627$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34628      has_space=`$ECHO "$complete" | $GREP " "`
34629      if test "x$has_space" != x; then
34630        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34631$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34632      fi
34633      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34634    fi
34635  fi
34636
34637  # Now join together the path and the arguments once again
34638  if test "x$arguments" != xEOL; then
34639    new_complete="$new_path ${arguments% *}"
34640  else
34641    new_complete="$new_path"
34642  fi
34643
34644  if test "x$complete" != "x$new_complete"; then
34645    MT="$new_complete"
34646    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
34647$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
34648  fi
34649
34650    # Setup the resource compiler (RC)
34651    # Extract the first word of "rc", so it can be a program name with args.
34652set dummy rc; ac_word=$2
34653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34654$as_echo_n "checking for $ac_word... " >&6; }
34655if ${ac_cv_prog_RC+:} false; then :
34656  $as_echo_n "(cached) " >&6
34657else
34658  if test -n "$RC"; then
34659  ac_cv_prog_RC="$RC" # Let the user override the test.
34660else
34661  ac_prog_rejected=no
34662as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34663for as_dir in $PATH
34664do
34665  IFS=$as_save_IFS
34666  test -z "$as_dir" && as_dir=.
34667    for ac_exec_ext in '' $ac_executable_extensions; do
34668  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34669    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
34670       ac_prog_rejected=yes
34671       continue
34672     fi
34673    ac_cv_prog_RC="rc"
34674    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34675    break 2
34676  fi
34677done
34678  done
34679IFS=$as_save_IFS
34680
34681if test $ac_prog_rejected = yes; then
34682  # We found a bogon in the path, so make sure we never use it.
34683  set dummy $ac_cv_prog_RC
34684  shift
34685  if test $# != 0; then
34686    # We chose a different compiler from the bogus one.
34687    # However, it has the same basename, so the bogon will be chosen
34688    # first if we set RC to just the basename; use the full file name.
34689    shift
34690    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
34691  fi
34692fi
34693fi
34694fi
34695RC=$ac_cv_prog_RC
34696if test -n "$RC"; then
34697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34698$as_echo "$RC" >&6; }
34699else
34700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34701$as_echo "no" >&6; }
34702fi
34703
34704
34705
34706  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34707
34708  # First separate the path from the arguments. This will split at the first
34709  # space.
34710  complete="$RC"
34711  path="${complete%% *}"
34712  tmp="$complete EOL"
34713  arguments="${tmp#* }"
34714
34715  # Input might be given as Windows format, start by converting to
34716  # unix format.
34717  new_path=`$CYGPATH -u "$path"`
34718
34719  # Now try to locate executable using which
34720  new_path=`$WHICH "$new_path" 2> /dev/null`
34721  # bat and cmd files are not always considered executable in cygwin causing which
34722  # to not find them
34723  if test "x$new_path" = x \
34724      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34725      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34726    new_path=`$CYGPATH -u "$path"`
34727  fi
34728  if test "x$new_path" = x; then
34729    # Oops. Which didn't find the executable.
34730    # The splitting of arguments from the executable at a space might have been incorrect,
34731    # since paths with space are more likely in Windows. Give it another try with the whole
34732    # argument.
34733    path="$complete"
34734    arguments="EOL"
34735    new_path=`$CYGPATH -u "$path"`
34736    new_path=`$WHICH "$new_path" 2> /dev/null`
34737    # bat and cmd files are not always considered executable in cygwin causing which
34738    # to not find them
34739    if test "x$new_path" = x \
34740        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34741        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34742      new_path=`$CYGPATH -u "$path"`
34743    fi
34744    if test "x$new_path" = x; then
34745      # It's still not found. Now this is an unrecoverable error.
34746      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34747$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34748      has_space=`$ECHO "$complete" | $GREP " "`
34749      if test "x$has_space" != x; then
34750        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34751$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34752      fi
34753      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34754    fi
34755  fi
34756
34757  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34758  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34759  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34760  # "foo.exe" is OK but "foo" is an error.
34761  #
34762  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34763  # It is also a way to make sure we got the proper file name for the real test later on.
34764  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34765  if test "x$test_shortpath" = x; then
34766    # Short path failed, file does not exist as specified.
34767    # Try adding .exe or .cmd
34768    if test -f "${new_path}.exe"; then
34769      input_to_shortpath="${new_path}.exe"
34770    elif test -f "${new_path}.cmd"; then
34771      input_to_shortpath="${new_path}.cmd"
34772    else
34773      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
34774$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
34775      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34776$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34777      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34778    fi
34779  else
34780    input_to_shortpath="$new_path"
34781  fi
34782
34783  # Call helper function which possibly converts this using DOS-style short mode.
34784  # If so, the updated path is stored in $new_path.
34785  new_path="$input_to_shortpath"
34786
34787  input_path="$input_to_shortpath"
34788  # Check if we need to convert this using DOS-style short mode. If the path
34789  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34790  # take no chances and rewrite it.
34791  # Note: m4 eats our [], so we need to use [ and ] instead.
34792  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34793  if test "x$has_forbidden_chars" != x; then
34794    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34795    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34796    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34797    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34798      # Going to short mode and back again did indeed matter. Since short mode is
34799      # case insensitive, let's make it lowercase to improve readability.
34800      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34801      # Now convert it back to Unix-stile (cygpath)
34802      input_path=`$CYGPATH -u "$shortmode_path"`
34803      new_path="$input_path"
34804    fi
34805  fi
34806
34807  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34808  if test "x$test_cygdrive_prefix" = x; then
34809    # As a simple fix, exclude /usr/bin since it's not a real path.
34810    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34811      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34812      # a path prefixed by /cygdrive for fixpath to work.
34813      new_path="$CYGWIN_ROOT_PATH$input_path"
34814    fi
34815  fi
34816
34817  # remove trailing .exe if any
34818  new_path="${new_path/%.exe/}"
34819
34820  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34821
34822  # First separate the path from the arguments. This will split at the first
34823  # space.
34824  complete="$RC"
34825  path="${complete%% *}"
34826  tmp="$complete EOL"
34827  arguments="${tmp#* }"
34828
34829  # Input might be given as Windows format, start by converting to
34830  # unix format.
34831  new_path="$path"
34832
34833  windows_path="$new_path"
34834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34835    unix_path=`$CYGPATH -u "$windows_path"`
34836    new_path="$unix_path"
34837  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34838    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34839    new_path="$unix_path"
34840  fi
34841
34842
34843  # Now try to locate executable using which
34844  new_path=`$WHICH "$new_path" 2> /dev/null`
34845
34846  if test "x$new_path" = x; then
34847    # Oops. Which didn't find the executable.
34848    # The splitting of arguments from the executable at a space might have been incorrect,
34849    # since paths with space are more likely in Windows. Give it another try with the whole
34850    # argument.
34851    path="$complete"
34852    arguments="EOL"
34853    new_path="$path"
34854
34855  windows_path="$new_path"
34856  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34857    unix_path=`$CYGPATH -u "$windows_path"`
34858    new_path="$unix_path"
34859  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34860    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34861    new_path="$unix_path"
34862  fi
34863
34864
34865    new_path=`$WHICH "$new_path" 2> /dev/null`
34866    # bat and cmd files are not always considered executable in MSYS causing which
34867    # to not find them
34868    if test "x$new_path" = x \
34869        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34870        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34871      new_path="$path"
34872
34873  windows_path="$new_path"
34874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34875    unix_path=`$CYGPATH -u "$windows_path"`
34876    new_path="$unix_path"
34877  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34878    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34879    new_path="$unix_path"
34880  fi
34881
34882    fi
34883
34884    if test "x$new_path" = x; then
34885      # It's still not found. Now this is an unrecoverable error.
34886      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34887$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34888      has_space=`$ECHO "$complete" | $GREP " "`
34889      if test "x$has_space" != x; then
34890        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34891$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34892      fi
34893      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34894    fi
34895  fi
34896
34897  # Now new_path has a complete unix path to the binary
34898  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34899    # Keep paths in /bin as-is, but remove trailing .exe if any
34900    new_path="${new_path/%.exe/}"
34901    # Do not save /bin paths to all_fixpath_prefixes!
34902  else
34903    # Not in mixed or Windows style, start by that.
34904    new_path=`cmd //c echo $new_path`
34905
34906  input_path="$new_path"
34907  # Check if we need to convert this using DOS-style short mode. If the path
34908  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34909  # take no chances and rewrite it.
34910  # Note: m4 eats our [], so we need to use [ and ] instead.
34911  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34912  if test "x$has_forbidden_chars" != x; then
34913    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34914    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34915  fi
34916
34917    # Output is in $new_path
34918
34919  windows_path="$new_path"
34920  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34921    unix_path=`$CYGPATH -u "$windows_path"`
34922    new_path="$unix_path"
34923  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34924    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34925    new_path="$unix_path"
34926  fi
34927
34928    # remove trailing .exe if any
34929    new_path="${new_path/%.exe/}"
34930
34931    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34932    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34933  fi
34934
34935  else
34936    # We're on a posix platform. Hooray! :)
34937    # First separate the path from the arguments. This will split at the first
34938    # space.
34939    complete="$RC"
34940    path="${complete%% *}"
34941    tmp="$complete EOL"
34942    arguments="${tmp#* }"
34943
34944    # Cannot rely on the command "which" here since it doesn't always work.
34945    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34946    if test -z "$is_absolute_path"; then
34947      # Path to executable is not absolute. Find it.
34948      IFS_save="$IFS"
34949      IFS=:
34950      for p in $PATH; do
34951        if test -f "$p/$path" && test -x "$p/$path"; then
34952          new_path="$p/$path"
34953          break
34954        fi
34955      done
34956      IFS="$IFS_save"
34957    else
34958      # This is an absolute path, we can use it without further modifications.
34959      new_path="$path"
34960    fi
34961
34962    if test "x$new_path" = x; then
34963      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34964$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34965      has_space=`$ECHO "$complete" | $GREP " "`
34966      if test "x$has_space" != x; then
34967        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34968$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34969      fi
34970      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34971    fi
34972  fi
34973
34974  # Now join together the path and the arguments once again
34975  if test "x$arguments" != xEOL; then
34976    new_complete="$new_path ${arguments% *}"
34977  else
34978    new_complete="$new_path"
34979  fi
34980
34981  if test "x$complete" != "x$new_complete"; then
34982    RC="$new_complete"
34983    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
34984$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
34985  fi
34986
34987    # Extract the first word of "dumpbin", so it can be a program name with args.
34988set dummy dumpbin; ac_word=$2
34989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34990$as_echo_n "checking for $ac_word... " >&6; }
34991if ${ac_cv_prog_DUMPBIN+:} false; then :
34992  $as_echo_n "(cached) " >&6
34993else
34994  if test -n "$DUMPBIN"; then
34995  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
34996else
34997as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34998for as_dir in $PATH
34999do
35000  IFS=$as_save_IFS
35001  test -z "$as_dir" && as_dir=.
35002    for ac_exec_ext in '' $ac_executable_extensions; do
35003  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35004    ac_cv_prog_DUMPBIN="dumpbin"
35005    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35006    break 2
35007  fi
35008done
35009  done
35010IFS=$as_save_IFS
35011
35012fi
35013fi
35014DUMPBIN=$ac_cv_prog_DUMPBIN
35015if test -n "$DUMPBIN"; then
35016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
35017$as_echo "$DUMPBIN" >&6; }
35018else
35019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35020$as_echo "no" >&6; }
35021fi
35022
35023
35024
35025  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35026
35027  # First separate the path from the arguments. This will split at the first
35028  # space.
35029  complete="$DUMPBIN"
35030  path="${complete%% *}"
35031  tmp="$complete EOL"
35032  arguments="${tmp#* }"
35033
35034  # Input might be given as Windows format, start by converting to
35035  # unix format.
35036  new_path=`$CYGPATH -u "$path"`
35037
35038  # Now try to locate executable using which
35039  new_path=`$WHICH "$new_path" 2> /dev/null`
35040  # bat and cmd files are not always considered executable in cygwin causing which
35041  # to not find them
35042  if test "x$new_path" = x \
35043      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35044      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35045    new_path=`$CYGPATH -u "$path"`
35046  fi
35047  if test "x$new_path" = x; then
35048    # Oops. Which didn't find the executable.
35049    # The splitting of arguments from the executable at a space might have been incorrect,
35050    # since paths with space are more likely in Windows. Give it another try with the whole
35051    # argument.
35052    path="$complete"
35053    arguments="EOL"
35054    new_path=`$CYGPATH -u "$path"`
35055    new_path=`$WHICH "$new_path" 2> /dev/null`
35056    # bat and cmd files are not always considered executable in cygwin causing which
35057    # to not find them
35058    if test "x$new_path" = x \
35059        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35060        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35061      new_path=`$CYGPATH -u "$path"`
35062    fi
35063    if test "x$new_path" = x; then
35064      # It's still not found. Now this is an unrecoverable error.
35065      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35066$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35067      has_space=`$ECHO "$complete" | $GREP " "`
35068      if test "x$has_space" != x; then
35069        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35070$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35071      fi
35072      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35073    fi
35074  fi
35075
35076  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35077  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35078  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35079  # "foo.exe" is OK but "foo" is an error.
35080  #
35081  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35082  # It is also a way to make sure we got the proper file name for the real test later on.
35083  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35084  if test "x$test_shortpath" = x; then
35085    # Short path failed, file does not exist as specified.
35086    # Try adding .exe or .cmd
35087    if test -f "${new_path}.exe"; then
35088      input_to_shortpath="${new_path}.exe"
35089    elif test -f "${new_path}.cmd"; then
35090      input_to_shortpath="${new_path}.cmd"
35091    else
35092      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
35093$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
35094      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35095$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35096      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35097    fi
35098  else
35099    input_to_shortpath="$new_path"
35100  fi
35101
35102  # Call helper function which possibly converts this using DOS-style short mode.
35103  # If so, the updated path is stored in $new_path.
35104  new_path="$input_to_shortpath"
35105
35106  input_path="$input_to_shortpath"
35107  # Check if we need to convert this using DOS-style short mode. If the path
35108  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35109  # take no chances and rewrite it.
35110  # Note: m4 eats our [], so we need to use [ and ] instead.
35111  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35112  if test "x$has_forbidden_chars" != x; then
35113    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35114    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35115    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35116    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35117      # Going to short mode and back again did indeed matter. Since short mode is
35118      # case insensitive, let's make it lowercase to improve readability.
35119      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35120      # Now convert it back to Unix-stile (cygpath)
35121      input_path=`$CYGPATH -u "$shortmode_path"`
35122      new_path="$input_path"
35123    fi
35124  fi
35125
35126  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35127  if test "x$test_cygdrive_prefix" = x; then
35128    # As a simple fix, exclude /usr/bin since it's not a real path.
35129    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35130      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35131      # a path prefixed by /cygdrive for fixpath to work.
35132      new_path="$CYGWIN_ROOT_PATH$input_path"
35133    fi
35134  fi
35135
35136  # remove trailing .exe if any
35137  new_path="${new_path/%.exe/}"
35138
35139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35140
35141  # First separate the path from the arguments. This will split at the first
35142  # space.
35143  complete="$DUMPBIN"
35144  path="${complete%% *}"
35145  tmp="$complete EOL"
35146  arguments="${tmp#* }"
35147
35148  # Input might be given as Windows format, start by converting to
35149  # unix format.
35150  new_path="$path"
35151
35152  windows_path="$new_path"
35153  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35154    unix_path=`$CYGPATH -u "$windows_path"`
35155    new_path="$unix_path"
35156  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35157    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35158    new_path="$unix_path"
35159  fi
35160
35161
35162  # Now try to locate executable using which
35163  new_path=`$WHICH "$new_path" 2> /dev/null`
35164
35165  if test "x$new_path" = x; then
35166    # Oops. Which didn't find the executable.
35167    # The splitting of arguments from the executable at a space might have been incorrect,
35168    # since paths with space are more likely in Windows. Give it another try with the whole
35169    # argument.
35170    path="$complete"
35171    arguments="EOL"
35172    new_path="$path"
35173
35174  windows_path="$new_path"
35175  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35176    unix_path=`$CYGPATH -u "$windows_path"`
35177    new_path="$unix_path"
35178  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35179    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35180    new_path="$unix_path"
35181  fi
35182
35183
35184    new_path=`$WHICH "$new_path" 2> /dev/null`
35185    # bat and cmd files are not always considered executable in MSYS causing which
35186    # to not find them
35187    if test "x$new_path" = x \
35188        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35189        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35190      new_path="$path"
35191
35192  windows_path="$new_path"
35193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35194    unix_path=`$CYGPATH -u "$windows_path"`
35195    new_path="$unix_path"
35196  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35197    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35198    new_path="$unix_path"
35199  fi
35200
35201    fi
35202
35203    if test "x$new_path" = x; then
35204      # It's still not found. Now this is an unrecoverable error.
35205      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35206$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35207      has_space=`$ECHO "$complete" | $GREP " "`
35208      if test "x$has_space" != x; then
35209        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35210$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35211      fi
35212      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35213    fi
35214  fi
35215
35216  # Now new_path has a complete unix path to the binary
35217  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35218    # Keep paths in /bin as-is, but remove trailing .exe if any
35219    new_path="${new_path/%.exe/}"
35220    # Do not save /bin paths to all_fixpath_prefixes!
35221  else
35222    # Not in mixed or Windows style, start by that.
35223    new_path=`cmd //c echo $new_path`
35224
35225  input_path="$new_path"
35226  # Check if we need to convert this using DOS-style short mode. If the path
35227  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35228  # take no chances and rewrite it.
35229  # Note: m4 eats our [], so we need to use [ and ] instead.
35230  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35231  if test "x$has_forbidden_chars" != x; then
35232    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35233    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35234  fi
35235
35236    # Output is in $new_path
35237
35238  windows_path="$new_path"
35239  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35240    unix_path=`$CYGPATH -u "$windows_path"`
35241    new_path="$unix_path"
35242  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35243    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35244    new_path="$unix_path"
35245  fi
35246
35247    # remove trailing .exe if any
35248    new_path="${new_path/%.exe/}"
35249
35250    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35251    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35252  fi
35253
35254  else
35255    # We're on a posix platform. Hooray! :)
35256    # First separate the path from the arguments. This will split at the first
35257    # space.
35258    complete="$DUMPBIN"
35259    path="${complete%% *}"
35260    tmp="$complete EOL"
35261    arguments="${tmp#* }"
35262
35263    # Cannot rely on the command "which" here since it doesn't always work.
35264    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35265    if test -z "$is_absolute_path"; then
35266      # Path to executable is not absolute. Find it.
35267      IFS_save="$IFS"
35268      IFS=:
35269      for p in $PATH; do
35270        if test -f "$p/$path" && test -x "$p/$path"; then
35271          new_path="$p/$path"
35272          break
35273        fi
35274      done
35275      IFS="$IFS_save"
35276    else
35277      # This is an absolute path, we can use it without further modifications.
35278      new_path="$path"
35279    fi
35280
35281    if test "x$new_path" = x; then
35282      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35283$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35284      has_space=`$ECHO "$complete" | $GREP " "`
35285      if test "x$has_space" != x; then
35286        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35287$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35288      fi
35289      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35290    fi
35291  fi
35292
35293  # Now join together the path and the arguments once again
35294  if test "x$arguments" != xEOL; then
35295    new_complete="$new_path ${arguments% *}"
35296  else
35297    new_complete="$new_path"
35298  fi
35299
35300  if test "x$complete" != "x$new_complete"; then
35301    DUMPBIN="$new_complete"
35302    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
35303$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
35304  fi
35305
35306  fi
35307
35308  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35309
35310
35311  # Publish this variable in the help.
35312
35313
35314  if test "x$STRIP" = x; then
35315    # The variable is not set by user, try to locate tool using the code snippet
35316    for ac_prog in strip
35317do
35318  # Extract the first word of "$ac_prog", so it can be a program name with args.
35319set dummy $ac_prog; ac_word=$2
35320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35321$as_echo_n "checking for $ac_word... " >&6; }
35322if ${ac_cv_path_STRIP+:} false; then :
35323  $as_echo_n "(cached) " >&6
35324else
35325  case $STRIP in
35326  [\\/]* | ?:[\\/]*)
35327  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35328  ;;
35329  *)
35330  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35331for as_dir in $PATH
35332do
35333  IFS=$as_save_IFS
35334  test -z "$as_dir" && as_dir=.
35335    for ac_exec_ext in '' $ac_executable_extensions; do
35336  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35337    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35338    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35339    break 2
35340  fi
35341done
35342  done
35343IFS=$as_save_IFS
35344
35345  ;;
35346esac
35347fi
35348STRIP=$ac_cv_path_STRIP
35349if test -n "$STRIP"; then
35350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35351$as_echo "$STRIP" >&6; }
35352else
35353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35354$as_echo "no" >&6; }
35355fi
35356
35357
35358  test -n "$STRIP" && break
35359done
35360
35361  else
35362    # The variable is set, but is it from the command line or the environment?
35363
35364    # Try to remove the string !STRIP! from our list.
35365    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
35366    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35367      # If it failed, the variable was not from the command line. Ignore it,
35368      # but warn the user (except for BASH, which is always set by the calling BASH).
35369      if test "xSTRIP" != xBASH; then
35370        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
35371$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
35372      fi
35373      # Try to locate tool using the code snippet
35374      for ac_prog in strip
35375do
35376  # Extract the first word of "$ac_prog", so it can be a program name with args.
35377set dummy $ac_prog; ac_word=$2
35378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35379$as_echo_n "checking for $ac_word... " >&6; }
35380if ${ac_cv_path_STRIP+:} false; then :
35381  $as_echo_n "(cached) " >&6
35382else
35383  case $STRIP in
35384  [\\/]* | ?:[\\/]*)
35385  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35386  ;;
35387  *)
35388  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35389for as_dir in $PATH
35390do
35391  IFS=$as_save_IFS
35392  test -z "$as_dir" && as_dir=.
35393    for ac_exec_ext in '' $ac_executable_extensions; do
35394  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35395    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35396    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35397    break 2
35398  fi
35399done
35400  done
35401IFS=$as_save_IFS
35402
35403  ;;
35404esac
35405fi
35406STRIP=$ac_cv_path_STRIP
35407if test -n "$STRIP"; then
35408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35409$as_echo "$STRIP" >&6; }
35410else
35411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35412$as_echo "no" >&6; }
35413fi
35414
35415
35416  test -n "$STRIP" && break
35417done
35418
35419    else
35420      # If it succeeded, then it was overridden by the user. We will use it
35421      # for the tool.
35422
35423      # First remove it from the list of overridden variables, so we can test
35424      # for unknown variables in the end.
35425      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35426
35427      # Check if the provided tool contains a complete path.
35428      tool_specified="$STRIP"
35429      tool_basename="${tool_specified##*/}"
35430      if test "x$tool_basename" = "x$tool_specified"; then
35431        # A command without a complete path is provided, search $PATH.
35432        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
35433$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
35434        # Extract the first word of "$tool_basename", so it can be a program name with args.
35435set dummy $tool_basename; ac_word=$2
35436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35437$as_echo_n "checking for $ac_word... " >&6; }
35438if ${ac_cv_path_STRIP+:} false; then :
35439  $as_echo_n "(cached) " >&6
35440else
35441  case $STRIP in
35442  [\\/]* | ?:[\\/]*)
35443  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35444  ;;
35445  *)
35446  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35447for as_dir in $PATH
35448do
35449  IFS=$as_save_IFS
35450  test -z "$as_dir" && as_dir=.
35451    for ac_exec_ext in '' $ac_executable_extensions; do
35452  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35453    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35454    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35455    break 2
35456  fi
35457done
35458  done
35459IFS=$as_save_IFS
35460
35461  ;;
35462esac
35463fi
35464STRIP=$ac_cv_path_STRIP
35465if test -n "$STRIP"; then
35466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35467$as_echo "$STRIP" >&6; }
35468else
35469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35470$as_echo "no" >&6; }
35471fi
35472
35473
35474        if test "x$STRIP" = x; then
35475          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35476        fi
35477      else
35478        # Otherwise we believe it is a complete path. Use it as it is.
35479        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
35480$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
35481        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
35482$as_echo_n "checking for STRIP... " >&6; }
35483        if test ! -x "$tool_specified"; then
35484          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35485$as_echo "not found" >&6; }
35486          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
35487        fi
35488        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35489$as_echo "$tool_specified" >&6; }
35490      fi
35491    fi
35492  fi
35493
35494
35495
35496  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35497
35498  # First separate the path from the arguments. This will split at the first
35499  # space.
35500  complete="$STRIP"
35501  path="${complete%% *}"
35502  tmp="$complete EOL"
35503  arguments="${tmp#* }"
35504
35505  # Input might be given as Windows format, start by converting to
35506  # unix format.
35507  new_path=`$CYGPATH -u "$path"`
35508
35509  # Now try to locate executable using which
35510  new_path=`$WHICH "$new_path" 2> /dev/null`
35511  # bat and cmd files are not always considered executable in cygwin causing which
35512  # to not find them
35513  if test "x$new_path" = x \
35514      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35515      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35516    new_path=`$CYGPATH -u "$path"`
35517  fi
35518  if test "x$new_path" = x; then
35519    # Oops. Which didn't find the executable.
35520    # The splitting of arguments from the executable at a space might have been incorrect,
35521    # since paths with space are more likely in Windows. Give it another try with the whole
35522    # argument.
35523    path="$complete"
35524    arguments="EOL"
35525    new_path=`$CYGPATH -u "$path"`
35526    new_path=`$WHICH "$new_path" 2> /dev/null`
35527    # bat and cmd files are not always considered executable in cygwin causing which
35528    # to not find them
35529    if test "x$new_path" = x \
35530        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35531        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35532      new_path=`$CYGPATH -u "$path"`
35533    fi
35534    if test "x$new_path" = x; then
35535      # It's still not found. Now this is an unrecoverable error.
35536      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35537$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35538      has_space=`$ECHO "$complete" | $GREP " "`
35539      if test "x$has_space" != x; then
35540        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35541$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35542      fi
35543      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35544    fi
35545  fi
35546
35547  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35548  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35549  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35550  # "foo.exe" is OK but "foo" is an error.
35551  #
35552  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35553  # It is also a way to make sure we got the proper file name for the real test later on.
35554  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35555  if test "x$test_shortpath" = x; then
35556    # Short path failed, file does not exist as specified.
35557    # Try adding .exe or .cmd
35558    if test -f "${new_path}.exe"; then
35559      input_to_shortpath="${new_path}.exe"
35560    elif test -f "${new_path}.cmd"; then
35561      input_to_shortpath="${new_path}.cmd"
35562    else
35563      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
35564$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
35565      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35566$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35567      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35568    fi
35569  else
35570    input_to_shortpath="$new_path"
35571  fi
35572
35573  # Call helper function which possibly converts this using DOS-style short mode.
35574  # If so, the updated path is stored in $new_path.
35575  new_path="$input_to_shortpath"
35576
35577  input_path="$input_to_shortpath"
35578  # Check if we need to convert this using DOS-style short mode. If the path
35579  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35580  # take no chances and rewrite it.
35581  # Note: m4 eats our [], so we need to use [ and ] instead.
35582  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35583  if test "x$has_forbidden_chars" != x; then
35584    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35585    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35586    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35587    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35588      # Going to short mode and back again did indeed matter. Since short mode is
35589      # case insensitive, let's make it lowercase to improve readability.
35590      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35591      # Now convert it back to Unix-stile (cygpath)
35592      input_path=`$CYGPATH -u "$shortmode_path"`
35593      new_path="$input_path"
35594    fi
35595  fi
35596
35597  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35598  if test "x$test_cygdrive_prefix" = x; then
35599    # As a simple fix, exclude /usr/bin since it's not a real path.
35600    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35601      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35602      # a path prefixed by /cygdrive for fixpath to work.
35603      new_path="$CYGWIN_ROOT_PATH$input_path"
35604    fi
35605  fi
35606
35607  # remove trailing .exe if any
35608  new_path="${new_path/%.exe/}"
35609
35610  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35611
35612  # First separate the path from the arguments. This will split at the first
35613  # space.
35614  complete="$STRIP"
35615  path="${complete%% *}"
35616  tmp="$complete EOL"
35617  arguments="${tmp#* }"
35618
35619  # Input might be given as Windows format, start by converting to
35620  # unix format.
35621  new_path="$path"
35622
35623  windows_path="$new_path"
35624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35625    unix_path=`$CYGPATH -u "$windows_path"`
35626    new_path="$unix_path"
35627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35628    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35629    new_path="$unix_path"
35630  fi
35631
35632
35633  # Now try to locate executable using which
35634  new_path=`$WHICH "$new_path" 2> /dev/null`
35635
35636  if test "x$new_path" = x; then
35637    # Oops. Which didn't find the executable.
35638    # The splitting of arguments from the executable at a space might have been incorrect,
35639    # since paths with space are more likely in Windows. Give it another try with the whole
35640    # argument.
35641    path="$complete"
35642    arguments="EOL"
35643    new_path="$path"
35644
35645  windows_path="$new_path"
35646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35647    unix_path=`$CYGPATH -u "$windows_path"`
35648    new_path="$unix_path"
35649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35650    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35651    new_path="$unix_path"
35652  fi
35653
35654
35655    new_path=`$WHICH "$new_path" 2> /dev/null`
35656    # bat and cmd files are not always considered executable in MSYS causing which
35657    # to not find them
35658    if test "x$new_path" = x \
35659        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35660        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35661      new_path="$path"
35662
35663  windows_path="$new_path"
35664  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35665    unix_path=`$CYGPATH -u "$windows_path"`
35666    new_path="$unix_path"
35667  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35668    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35669    new_path="$unix_path"
35670  fi
35671
35672    fi
35673
35674    if test "x$new_path" = x; then
35675      # It's still not found. Now this is an unrecoverable error.
35676      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35677$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35678      has_space=`$ECHO "$complete" | $GREP " "`
35679      if test "x$has_space" != x; then
35680        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35681$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35682      fi
35683      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35684    fi
35685  fi
35686
35687  # Now new_path has a complete unix path to the binary
35688  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35689    # Keep paths in /bin as-is, but remove trailing .exe if any
35690    new_path="${new_path/%.exe/}"
35691    # Do not save /bin paths to all_fixpath_prefixes!
35692  else
35693    # Not in mixed or Windows style, start by that.
35694    new_path=`cmd //c echo $new_path`
35695
35696  input_path="$new_path"
35697  # Check if we need to convert this using DOS-style short mode. If the path
35698  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35699  # take no chances and rewrite it.
35700  # Note: m4 eats our [], so we need to use [ and ] instead.
35701  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35702  if test "x$has_forbidden_chars" != x; then
35703    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35704    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35705  fi
35706
35707    # Output is in $new_path
35708
35709  windows_path="$new_path"
35710  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35711    unix_path=`$CYGPATH -u "$windows_path"`
35712    new_path="$unix_path"
35713  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35714    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35715    new_path="$unix_path"
35716  fi
35717
35718    # remove trailing .exe if any
35719    new_path="${new_path/%.exe/}"
35720
35721    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35722    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35723  fi
35724
35725  else
35726    # We're on a posix platform. Hooray! :)
35727    # First separate the path from the arguments. This will split at the first
35728    # space.
35729    complete="$STRIP"
35730    path="${complete%% *}"
35731    tmp="$complete EOL"
35732    arguments="${tmp#* }"
35733
35734    # Cannot rely on the command "which" here since it doesn't always work.
35735    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35736    if test -z "$is_absolute_path"; then
35737      # Path to executable is not absolute. Find it.
35738      IFS_save="$IFS"
35739      IFS=:
35740      for p in $PATH; do
35741        if test -f "$p/$path" && test -x "$p/$path"; then
35742          new_path="$p/$path"
35743          break
35744        fi
35745      done
35746      IFS="$IFS_save"
35747    else
35748      # This is an absolute path, we can use it without further modifications.
35749      new_path="$path"
35750    fi
35751
35752    if test "x$new_path" = x; then
35753      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35754$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35755      has_space=`$ECHO "$complete" | $GREP " "`
35756      if test "x$has_space" != x; then
35757        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35758$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35759      fi
35760      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35761    fi
35762  fi
35763
35764  # Now join together the path and the arguments once again
35765  if test "x$arguments" != xEOL; then
35766    new_complete="$new_path ${arguments% *}"
35767  else
35768    new_complete="$new_path"
35769  fi
35770
35771  if test "x$complete" != "x$new_complete"; then
35772    STRIP="$new_complete"
35773    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
35774$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
35775  fi
35776
35777
35778
35779  # Publish this variable in the help.
35780
35781
35782  if test "x$NM" = x; then
35783    # The variable is not set by user, try to locate tool using the code snippet
35784    for ac_prog in nm
35785do
35786  # Extract the first word of "$ac_prog", so it can be a program name with args.
35787set dummy $ac_prog; ac_word=$2
35788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35789$as_echo_n "checking for $ac_word... " >&6; }
35790if ${ac_cv_path_NM+:} false; then :
35791  $as_echo_n "(cached) " >&6
35792else
35793  case $NM in
35794  [\\/]* | ?:[\\/]*)
35795  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35796  ;;
35797  *)
35798  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35799for as_dir in $PATH
35800do
35801  IFS=$as_save_IFS
35802  test -z "$as_dir" && as_dir=.
35803    for ac_exec_ext in '' $ac_executable_extensions; do
35804  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35805    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35806    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35807    break 2
35808  fi
35809done
35810  done
35811IFS=$as_save_IFS
35812
35813  ;;
35814esac
35815fi
35816NM=$ac_cv_path_NM
35817if test -n "$NM"; then
35818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35819$as_echo "$NM" >&6; }
35820else
35821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35822$as_echo "no" >&6; }
35823fi
35824
35825
35826  test -n "$NM" && break
35827done
35828
35829  else
35830    # The variable is set, but is it from the command line or the environment?
35831
35832    # Try to remove the string !NM! from our list.
35833    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
35834    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35835      # If it failed, the variable was not from the command line. Ignore it,
35836      # but warn the user (except for BASH, which is always set by the calling BASH).
35837      if test "xNM" != xBASH; then
35838        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
35839$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
35840      fi
35841      # Try to locate tool using the code snippet
35842      for ac_prog in nm
35843do
35844  # Extract the first word of "$ac_prog", so it can be a program name with args.
35845set dummy $ac_prog; ac_word=$2
35846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35847$as_echo_n "checking for $ac_word... " >&6; }
35848if ${ac_cv_path_NM+:} false; then :
35849  $as_echo_n "(cached) " >&6
35850else
35851  case $NM in
35852  [\\/]* | ?:[\\/]*)
35853  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35854  ;;
35855  *)
35856  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35857for as_dir in $PATH
35858do
35859  IFS=$as_save_IFS
35860  test -z "$as_dir" && as_dir=.
35861    for ac_exec_ext in '' $ac_executable_extensions; do
35862  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35863    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35864    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35865    break 2
35866  fi
35867done
35868  done
35869IFS=$as_save_IFS
35870
35871  ;;
35872esac
35873fi
35874NM=$ac_cv_path_NM
35875if test -n "$NM"; then
35876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35877$as_echo "$NM" >&6; }
35878else
35879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35880$as_echo "no" >&6; }
35881fi
35882
35883
35884  test -n "$NM" && break
35885done
35886
35887    else
35888      # If it succeeded, then it was overridden by the user. We will use it
35889      # for the tool.
35890
35891      # First remove it from the list of overridden variables, so we can test
35892      # for unknown variables in the end.
35893      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35894
35895      # Check if the provided tool contains a complete path.
35896      tool_specified="$NM"
35897      tool_basename="${tool_specified##*/}"
35898      if test "x$tool_basename" = "x$tool_specified"; then
35899        # A command without a complete path is provided, search $PATH.
35900        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
35901$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
35902        # Extract the first word of "$tool_basename", so it can be a program name with args.
35903set dummy $tool_basename; ac_word=$2
35904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35905$as_echo_n "checking for $ac_word... " >&6; }
35906if ${ac_cv_path_NM+:} false; then :
35907  $as_echo_n "(cached) " >&6
35908else
35909  case $NM in
35910  [\\/]* | ?:[\\/]*)
35911  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35912  ;;
35913  *)
35914  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35915for as_dir in $PATH
35916do
35917  IFS=$as_save_IFS
35918  test -z "$as_dir" && as_dir=.
35919    for ac_exec_ext in '' $ac_executable_extensions; do
35920  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35921    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35922    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35923    break 2
35924  fi
35925done
35926  done
35927IFS=$as_save_IFS
35928
35929  ;;
35930esac
35931fi
35932NM=$ac_cv_path_NM
35933if test -n "$NM"; then
35934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35935$as_echo "$NM" >&6; }
35936else
35937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35938$as_echo "no" >&6; }
35939fi
35940
35941
35942        if test "x$NM" = x; then
35943          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35944        fi
35945      else
35946        # Otherwise we believe it is a complete path. Use it as it is.
35947        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
35948$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
35949        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
35950$as_echo_n "checking for NM... " >&6; }
35951        if test ! -x "$tool_specified"; then
35952          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35953$as_echo "not found" >&6; }
35954          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
35955        fi
35956        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35957$as_echo "$tool_specified" >&6; }
35958      fi
35959    fi
35960  fi
35961
35962
35963
35964  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35965
35966  # First separate the path from the arguments. This will split at the first
35967  # space.
35968  complete="$NM"
35969  path="${complete%% *}"
35970  tmp="$complete EOL"
35971  arguments="${tmp#* }"
35972
35973  # Input might be given as Windows format, start by converting to
35974  # unix format.
35975  new_path=`$CYGPATH -u "$path"`
35976
35977  # Now try to locate executable using which
35978  new_path=`$WHICH "$new_path" 2> /dev/null`
35979  # bat and cmd files are not always considered executable in cygwin causing which
35980  # to not find them
35981  if test "x$new_path" = x \
35982      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35983      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35984    new_path=`$CYGPATH -u "$path"`
35985  fi
35986  if test "x$new_path" = x; then
35987    # Oops. Which didn't find the executable.
35988    # The splitting of arguments from the executable at a space might have been incorrect,
35989    # since paths with space are more likely in Windows. Give it another try with the whole
35990    # argument.
35991    path="$complete"
35992    arguments="EOL"
35993    new_path=`$CYGPATH -u "$path"`
35994    new_path=`$WHICH "$new_path" 2> /dev/null`
35995    # bat and cmd files are not always considered executable in cygwin causing which
35996    # to not find them
35997    if test "x$new_path" = x \
35998        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35999        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36000      new_path=`$CYGPATH -u "$path"`
36001    fi
36002    if test "x$new_path" = x; then
36003      # It's still not found. Now this is an unrecoverable error.
36004      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36005$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36006      has_space=`$ECHO "$complete" | $GREP " "`
36007      if test "x$has_space" != x; then
36008        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36009$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36010      fi
36011      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36012    fi
36013  fi
36014
36015  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36016  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36017  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36018  # "foo.exe" is OK but "foo" is an error.
36019  #
36020  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36021  # It is also a way to make sure we got the proper file name for the real test later on.
36022  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36023  if test "x$test_shortpath" = x; then
36024    # Short path failed, file does not exist as specified.
36025    # Try adding .exe or .cmd
36026    if test -f "${new_path}.exe"; then
36027      input_to_shortpath="${new_path}.exe"
36028    elif test -f "${new_path}.cmd"; then
36029      input_to_shortpath="${new_path}.cmd"
36030    else
36031      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
36032$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
36033      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36034$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36035      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36036    fi
36037  else
36038    input_to_shortpath="$new_path"
36039  fi
36040
36041  # Call helper function which possibly converts this using DOS-style short mode.
36042  # If so, the updated path is stored in $new_path.
36043  new_path="$input_to_shortpath"
36044
36045  input_path="$input_to_shortpath"
36046  # Check if we need to convert this using DOS-style short mode. If the path
36047  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36048  # take no chances and rewrite it.
36049  # Note: m4 eats our [], so we need to use [ and ] instead.
36050  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36051  if test "x$has_forbidden_chars" != x; then
36052    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36053    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36054    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36055    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36056      # Going to short mode and back again did indeed matter. Since short mode is
36057      # case insensitive, let's make it lowercase to improve readability.
36058      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36059      # Now convert it back to Unix-stile (cygpath)
36060      input_path=`$CYGPATH -u "$shortmode_path"`
36061      new_path="$input_path"
36062    fi
36063  fi
36064
36065  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36066  if test "x$test_cygdrive_prefix" = x; then
36067    # As a simple fix, exclude /usr/bin since it's not a real path.
36068    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36069      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36070      # a path prefixed by /cygdrive for fixpath to work.
36071      new_path="$CYGWIN_ROOT_PATH$input_path"
36072    fi
36073  fi
36074
36075  # remove trailing .exe if any
36076  new_path="${new_path/%.exe/}"
36077
36078  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36079
36080  # First separate the path from the arguments. This will split at the first
36081  # space.
36082  complete="$NM"
36083  path="${complete%% *}"
36084  tmp="$complete EOL"
36085  arguments="${tmp#* }"
36086
36087  # Input might be given as Windows format, start by converting to
36088  # unix format.
36089  new_path="$path"
36090
36091  windows_path="$new_path"
36092  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36093    unix_path=`$CYGPATH -u "$windows_path"`
36094    new_path="$unix_path"
36095  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36096    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36097    new_path="$unix_path"
36098  fi
36099
36100
36101  # Now try to locate executable using which
36102  new_path=`$WHICH "$new_path" 2> /dev/null`
36103
36104  if test "x$new_path" = x; then
36105    # Oops. Which didn't find the executable.
36106    # The splitting of arguments from the executable at a space might have been incorrect,
36107    # since paths with space are more likely in Windows. Give it another try with the whole
36108    # argument.
36109    path="$complete"
36110    arguments="EOL"
36111    new_path="$path"
36112
36113  windows_path="$new_path"
36114  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36115    unix_path=`$CYGPATH -u "$windows_path"`
36116    new_path="$unix_path"
36117  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36118    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36119    new_path="$unix_path"
36120  fi
36121
36122
36123    new_path=`$WHICH "$new_path" 2> /dev/null`
36124    # bat and cmd files are not always considered executable in MSYS causing which
36125    # to not find them
36126    if test "x$new_path" = x \
36127        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36128        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36129      new_path="$path"
36130
36131  windows_path="$new_path"
36132  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36133    unix_path=`$CYGPATH -u "$windows_path"`
36134    new_path="$unix_path"
36135  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36136    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36137    new_path="$unix_path"
36138  fi
36139
36140    fi
36141
36142    if test "x$new_path" = x; then
36143      # It's still not found. Now this is an unrecoverable error.
36144      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36145$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36146      has_space=`$ECHO "$complete" | $GREP " "`
36147      if test "x$has_space" != x; then
36148        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36149$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36150      fi
36151      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36152    fi
36153  fi
36154
36155  # Now new_path has a complete unix path to the binary
36156  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36157    # Keep paths in /bin as-is, but remove trailing .exe if any
36158    new_path="${new_path/%.exe/}"
36159    # Do not save /bin paths to all_fixpath_prefixes!
36160  else
36161    # Not in mixed or Windows style, start by that.
36162    new_path=`cmd //c echo $new_path`
36163
36164  input_path="$new_path"
36165  # Check if we need to convert this using DOS-style short mode. If the path
36166  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36167  # take no chances and rewrite it.
36168  # Note: m4 eats our [], so we need to use [ and ] instead.
36169  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36170  if test "x$has_forbidden_chars" != x; then
36171    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36172    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36173  fi
36174
36175    # Output is in $new_path
36176
36177  windows_path="$new_path"
36178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36179    unix_path=`$CYGPATH -u "$windows_path"`
36180    new_path="$unix_path"
36181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36182    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36183    new_path="$unix_path"
36184  fi
36185
36186    # remove trailing .exe if any
36187    new_path="${new_path/%.exe/}"
36188
36189    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36190    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36191  fi
36192
36193  else
36194    # We're on a posix platform. Hooray! :)
36195    # First separate the path from the arguments. This will split at the first
36196    # space.
36197    complete="$NM"
36198    path="${complete%% *}"
36199    tmp="$complete EOL"
36200    arguments="${tmp#* }"
36201
36202    # Cannot rely on the command "which" here since it doesn't always work.
36203    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36204    if test -z "$is_absolute_path"; then
36205      # Path to executable is not absolute. Find it.
36206      IFS_save="$IFS"
36207      IFS=:
36208      for p in $PATH; do
36209        if test -f "$p/$path" && test -x "$p/$path"; then
36210          new_path="$p/$path"
36211          break
36212        fi
36213      done
36214      IFS="$IFS_save"
36215    else
36216      # This is an absolute path, we can use it without further modifications.
36217      new_path="$path"
36218    fi
36219
36220    if test "x$new_path" = x; then
36221      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36222$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36223      has_space=`$ECHO "$complete" | $GREP " "`
36224      if test "x$has_space" != x; then
36225        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36226$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36227      fi
36228      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36229    fi
36230  fi
36231
36232  # Now join together the path and the arguments once again
36233  if test "x$arguments" != xEOL; then
36234    new_complete="$new_path ${arguments% *}"
36235  else
36236    new_complete="$new_path"
36237  fi
36238
36239  if test "x$complete" != "x$new_complete"; then
36240    NM="$new_complete"
36241    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
36242$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
36243  fi
36244
36245
36246
36247  # Publish this variable in the help.
36248
36249
36250  if test "x$GNM" = x; then
36251    # The variable is not set by user, try to locate tool using the code snippet
36252    for ac_prog in gnm
36253do
36254  # Extract the first word of "$ac_prog", so it can be a program name with args.
36255set dummy $ac_prog; ac_word=$2
36256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36257$as_echo_n "checking for $ac_word... " >&6; }
36258if ${ac_cv_path_GNM+:} false; then :
36259  $as_echo_n "(cached) " >&6
36260else
36261  case $GNM in
36262  [\\/]* | ?:[\\/]*)
36263  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36264  ;;
36265  *)
36266  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36267for as_dir in $PATH
36268do
36269  IFS=$as_save_IFS
36270  test -z "$as_dir" && as_dir=.
36271    for ac_exec_ext in '' $ac_executable_extensions; do
36272  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36273    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36274    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36275    break 2
36276  fi
36277done
36278  done
36279IFS=$as_save_IFS
36280
36281  ;;
36282esac
36283fi
36284GNM=$ac_cv_path_GNM
36285if test -n "$GNM"; then
36286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36287$as_echo "$GNM" >&6; }
36288else
36289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36290$as_echo "no" >&6; }
36291fi
36292
36293
36294  test -n "$GNM" && break
36295done
36296
36297  else
36298    # The variable is set, but is it from the command line or the environment?
36299
36300    # Try to remove the string !GNM! from our list.
36301    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
36302    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36303      # If it failed, the variable was not from the command line. Ignore it,
36304      # but warn the user (except for BASH, which is always set by the calling BASH).
36305      if test "xGNM" != xBASH; then
36306        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
36307$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
36308      fi
36309      # Try to locate tool using the code snippet
36310      for ac_prog in gnm
36311do
36312  # Extract the first word of "$ac_prog", so it can be a program name with args.
36313set dummy $ac_prog; ac_word=$2
36314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36315$as_echo_n "checking for $ac_word... " >&6; }
36316if ${ac_cv_path_GNM+:} false; then :
36317  $as_echo_n "(cached) " >&6
36318else
36319  case $GNM in
36320  [\\/]* | ?:[\\/]*)
36321  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36322  ;;
36323  *)
36324  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36325for as_dir in $PATH
36326do
36327  IFS=$as_save_IFS
36328  test -z "$as_dir" && as_dir=.
36329    for ac_exec_ext in '' $ac_executable_extensions; do
36330  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36331    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36332    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36333    break 2
36334  fi
36335done
36336  done
36337IFS=$as_save_IFS
36338
36339  ;;
36340esac
36341fi
36342GNM=$ac_cv_path_GNM
36343if test -n "$GNM"; then
36344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36345$as_echo "$GNM" >&6; }
36346else
36347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36348$as_echo "no" >&6; }
36349fi
36350
36351
36352  test -n "$GNM" && break
36353done
36354
36355    else
36356      # If it succeeded, then it was overridden by the user. We will use it
36357      # for the tool.
36358
36359      # First remove it from the list of overridden variables, so we can test
36360      # for unknown variables in the end.
36361      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36362
36363      # Check if the provided tool contains a complete path.
36364      tool_specified="$GNM"
36365      tool_basename="${tool_specified##*/}"
36366      if test "x$tool_basename" = "x$tool_specified"; then
36367        # A command without a complete path is provided, search $PATH.
36368        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
36369$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
36370        # Extract the first word of "$tool_basename", so it can be a program name with args.
36371set dummy $tool_basename; ac_word=$2
36372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36373$as_echo_n "checking for $ac_word... " >&6; }
36374if ${ac_cv_path_GNM+:} false; then :
36375  $as_echo_n "(cached) " >&6
36376else
36377  case $GNM in
36378  [\\/]* | ?:[\\/]*)
36379  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36380  ;;
36381  *)
36382  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36383for as_dir in $PATH
36384do
36385  IFS=$as_save_IFS
36386  test -z "$as_dir" && as_dir=.
36387    for ac_exec_ext in '' $ac_executable_extensions; do
36388  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36389    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36390    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36391    break 2
36392  fi
36393done
36394  done
36395IFS=$as_save_IFS
36396
36397  ;;
36398esac
36399fi
36400GNM=$ac_cv_path_GNM
36401if test -n "$GNM"; then
36402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36403$as_echo "$GNM" >&6; }
36404else
36405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36406$as_echo "no" >&6; }
36407fi
36408
36409
36410        if test "x$GNM" = x; then
36411          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36412        fi
36413      else
36414        # Otherwise we believe it is a complete path. Use it as it is.
36415        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
36416$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
36417        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
36418$as_echo_n "checking for GNM... " >&6; }
36419        if test ! -x "$tool_specified"; then
36420          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36421$as_echo "not found" >&6; }
36422          as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
36423        fi
36424        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36425$as_echo "$tool_specified" >&6; }
36426      fi
36427    fi
36428  fi
36429
36430
36431
36432  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36433
36434  # First separate the path from the arguments. This will split at the first
36435  # space.
36436  complete="$GNM"
36437  path="${complete%% *}"
36438  tmp="$complete EOL"
36439  arguments="${tmp#* }"
36440
36441  # Input might be given as Windows format, start by converting to
36442  # unix format.
36443  new_path=`$CYGPATH -u "$path"`
36444
36445  # Now try to locate executable using which
36446  new_path=`$WHICH "$new_path" 2> /dev/null`
36447  # bat and cmd files are not always considered executable in cygwin causing which
36448  # to not find them
36449  if test "x$new_path" = x \
36450      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36451      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36452    new_path=`$CYGPATH -u "$path"`
36453  fi
36454  if test "x$new_path" = x; then
36455    # Oops. Which didn't find the executable.
36456    # The splitting of arguments from the executable at a space might have been incorrect,
36457    # since paths with space are more likely in Windows. Give it another try with the whole
36458    # argument.
36459    path="$complete"
36460    arguments="EOL"
36461    new_path=`$CYGPATH -u "$path"`
36462    new_path=`$WHICH "$new_path" 2> /dev/null`
36463    # bat and cmd files are not always considered executable in cygwin causing which
36464    # to not find them
36465    if test "x$new_path" = x \
36466        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36467        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36468      new_path=`$CYGPATH -u "$path"`
36469    fi
36470    if test "x$new_path" = x; then
36471      # It's still not found. Now this is an unrecoverable error.
36472      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36473$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36474      has_space=`$ECHO "$complete" | $GREP " "`
36475      if test "x$has_space" != x; then
36476        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36477$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36478      fi
36479      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36480    fi
36481  fi
36482
36483  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36484  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36485  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36486  # "foo.exe" is OK but "foo" is an error.
36487  #
36488  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36489  # It is also a way to make sure we got the proper file name for the real test later on.
36490  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36491  if test "x$test_shortpath" = x; then
36492    # Short path failed, file does not exist as specified.
36493    # Try adding .exe or .cmd
36494    if test -f "${new_path}.exe"; then
36495      input_to_shortpath="${new_path}.exe"
36496    elif test -f "${new_path}.cmd"; then
36497      input_to_shortpath="${new_path}.cmd"
36498    else
36499      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
36500$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
36501      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36502$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36503      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36504    fi
36505  else
36506    input_to_shortpath="$new_path"
36507  fi
36508
36509  # Call helper function which possibly converts this using DOS-style short mode.
36510  # If so, the updated path is stored in $new_path.
36511  new_path="$input_to_shortpath"
36512
36513  input_path="$input_to_shortpath"
36514  # Check if we need to convert this using DOS-style short mode. If the path
36515  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36516  # take no chances and rewrite it.
36517  # Note: m4 eats our [], so we need to use [ and ] instead.
36518  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36519  if test "x$has_forbidden_chars" != x; then
36520    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36521    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36522    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36523    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36524      # Going to short mode and back again did indeed matter. Since short mode is
36525      # case insensitive, let's make it lowercase to improve readability.
36526      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36527      # Now convert it back to Unix-stile (cygpath)
36528      input_path=`$CYGPATH -u "$shortmode_path"`
36529      new_path="$input_path"
36530    fi
36531  fi
36532
36533  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36534  if test "x$test_cygdrive_prefix" = x; then
36535    # As a simple fix, exclude /usr/bin since it's not a real path.
36536    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36537      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36538      # a path prefixed by /cygdrive for fixpath to work.
36539      new_path="$CYGWIN_ROOT_PATH$input_path"
36540    fi
36541  fi
36542
36543  # remove trailing .exe if any
36544  new_path="${new_path/%.exe/}"
36545
36546  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36547
36548  # First separate the path from the arguments. This will split at the first
36549  # space.
36550  complete="$GNM"
36551  path="${complete%% *}"
36552  tmp="$complete EOL"
36553  arguments="${tmp#* }"
36554
36555  # Input might be given as Windows format, start by converting to
36556  # unix format.
36557  new_path="$path"
36558
36559  windows_path="$new_path"
36560  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36561    unix_path=`$CYGPATH -u "$windows_path"`
36562    new_path="$unix_path"
36563  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36564    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36565    new_path="$unix_path"
36566  fi
36567
36568
36569  # Now try to locate executable using which
36570  new_path=`$WHICH "$new_path" 2> /dev/null`
36571
36572  if test "x$new_path" = x; then
36573    # Oops. Which didn't find the executable.
36574    # The splitting of arguments from the executable at a space might have been incorrect,
36575    # since paths with space are more likely in Windows. Give it another try with the whole
36576    # argument.
36577    path="$complete"
36578    arguments="EOL"
36579    new_path="$path"
36580
36581  windows_path="$new_path"
36582  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36583    unix_path=`$CYGPATH -u "$windows_path"`
36584    new_path="$unix_path"
36585  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36586    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36587    new_path="$unix_path"
36588  fi
36589
36590
36591    new_path=`$WHICH "$new_path" 2> /dev/null`
36592    # bat and cmd files are not always considered executable in MSYS causing which
36593    # to not find them
36594    if test "x$new_path" = x \
36595        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36596        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36597      new_path="$path"
36598
36599  windows_path="$new_path"
36600  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36601    unix_path=`$CYGPATH -u "$windows_path"`
36602    new_path="$unix_path"
36603  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36604    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36605    new_path="$unix_path"
36606  fi
36607
36608    fi
36609
36610    if test "x$new_path" = x; then
36611      # It's still not found. Now this is an unrecoverable error.
36612      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36613$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36614      has_space=`$ECHO "$complete" | $GREP " "`
36615      if test "x$has_space" != x; then
36616        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36617$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36618      fi
36619      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36620    fi
36621  fi
36622
36623  # Now new_path has a complete unix path to the binary
36624  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36625    # Keep paths in /bin as-is, but remove trailing .exe if any
36626    new_path="${new_path/%.exe/}"
36627    # Do not save /bin paths to all_fixpath_prefixes!
36628  else
36629    # Not in mixed or Windows style, start by that.
36630    new_path=`cmd //c echo $new_path`
36631
36632  input_path="$new_path"
36633  # Check if we need to convert this using DOS-style short mode. If the path
36634  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36635  # take no chances and rewrite it.
36636  # Note: m4 eats our [], so we need to use [ and ] instead.
36637  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36638  if test "x$has_forbidden_chars" != x; then
36639    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36640    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36641  fi
36642
36643    # Output is in $new_path
36644
36645  windows_path="$new_path"
36646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36647    unix_path=`$CYGPATH -u "$windows_path"`
36648    new_path="$unix_path"
36649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36650    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36651    new_path="$unix_path"
36652  fi
36653
36654    # remove trailing .exe if any
36655    new_path="${new_path/%.exe/}"
36656
36657    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36658    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36659  fi
36660
36661  else
36662    # We're on a posix platform. Hooray! :)
36663    # First separate the path from the arguments. This will split at the first
36664    # space.
36665    complete="$GNM"
36666    path="${complete%% *}"
36667    tmp="$complete EOL"
36668    arguments="${tmp#* }"
36669
36670    # Cannot rely on the command "which" here since it doesn't always work.
36671    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36672    if test -z "$is_absolute_path"; then
36673      # Path to executable is not absolute. Find it.
36674      IFS_save="$IFS"
36675      IFS=:
36676      for p in $PATH; do
36677        if test -f "$p/$path" && test -x "$p/$path"; then
36678          new_path="$p/$path"
36679          break
36680        fi
36681      done
36682      IFS="$IFS_save"
36683    else
36684      # This is an absolute path, we can use it without further modifications.
36685      new_path="$path"
36686    fi
36687
36688    if test "x$new_path" = x; then
36689      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36690$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36691      has_space=`$ECHO "$complete" | $GREP " "`
36692      if test "x$has_space" != x; then
36693        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36694$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36695      fi
36696      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36697    fi
36698  fi
36699
36700  # Now join together the path and the arguments once again
36701  if test "x$arguments" != xEOL; then
36702    new_complete="$new_path ${arguments% *}"
36703  else
36704    new_complete="$new_path"
36705  fi
36706
36707  if test "x$complete" != "x$new_complete"; then
36708    GNM="$new_complete"
36709    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
36710$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
36711  fi
36712
36713
36714
36715
36716  # Publish this variable in the help.
36717
36718
36719  if test "x$MCS" = x; then
36720    # The variable is not set by user, try to locate tool using the code snippet
36721    for ac_prog in mcs
36722do
36723  # Extract the first word of "$ac_prog", so it can be a program name with args.
36724set dummy $ac_prog; ac_word=$2
36725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36726$as_echo_n "checking for $ac_word... " >&6; }
36727if ${ac_cv_path_MCS+:} false; then :
36728  $as_echo_n "(cached) " >&6
36729else
36730  case $MCS in
36731  [\\/]* | ?:[\\/]*)
36732  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36733  ;;
36734  *)
36735  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36736for as_dir in $PATH
36737do
36738  IFS=$as_save_IFS
36739  test -z "$as_dir" && as_dir=.
36740    for ac_exec_ext in '' $ac_executable_extensions; do
36741  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36742    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36743    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36744    break 2
36745  fi
36746done
36747  done
36748IFS=$as_save_IFS
36749
36750  ;;
36751esac
36752fi
36753MCS=$ac_cv_path_MCS
36754if test -n "$MCS"; then
36755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36756$as_echo "$MCS" >&6; }
36757else
36758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36759$as_echo "no" >&6; }
36760fi
36761
36762
36763  test -n "$MCS" && break
36764done
36765
36766  else
36767    # The variable is set, but is it from the command line or the environment?
36768
36769    # Try to remove the string !MCS! from our list.
36770    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MCS!/}
36771    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36772      # If it failed, the variable was not from the command line. Ignore it,
36773      # but warn the user (except for BASH, which is always set by the calling BASH).
36774      if test "xMCS" != xBASH; then
36775        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&5
36776$as_echo "$as_me: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&2;}
36777      fi
36778      # Try to locate tool using the code snippet
36779      for ac_prog in mcs
36780do
36781  # Extract the first word of "$ac_prog", so it can be a program name with args.
36782set dummy $ac_prog; ac_word=$2
36783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36784$as_echo_n "checking for $ac_word... " >&6; }
36785if ${ac_cv_path_MCS+:} false; then :
36786  $as_echo_n "(cached) " >&6
36787else
36788  case $MCS in
36789  [\\/]* | ?:[\\/]*)
36790  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36791  ;;
36792  *)
36793  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36794for as_dir in $PATH
36795do
36796  IFS=$as_save_IFS
36797  test -z "$as_dir" && as_dir=.
36798    for ac_exec_ext in '' $ac_executable_extensions; do
36799  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36800    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36801    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36802    break 2
36803  fi
36804done
36805  done
36806IFS=$as_save_IFS
36807
36808  ;;
36809esac
36810fi
36811MCS=$ac_cv_path_MCS
36812if test -n "$MCS"; then
36813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36814$as_echo "$MCS" >&6; }
36815else
36816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36817$as_echo "no" >&6; }
36818fi
36819
36820
36821  test -n "$MCS" && break
36822done
36823
36824    else
36825      # If it succeeded, then it was overridden by the user. We will use it
36826      # for the tool.
36827
36828      # First remove it from the list of overridden variables, so we can test
36829      # for unknown variables in the end.
36830      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36831
36832      # Check if the provided tool contains a complete path.
36833      tool_specified="$MCS"
36834      tool_basename="${tool_specified##*/}"
36835      if test "x$tool_basename" = "x$tool_specified"; then
36836        # A command without a complete path is provided, search $PATH.
36837        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MCS=$tool_basename" >&5
36838$as_echo "$as_me: Will search for user supplied tool MCS=$tool_basename" >&6;}
36839        # Extract the first word of "$tool_basename", so it can be a program name with args.
36840set dummy $tool_basename; ac_word=$2
36841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36842$as_echo_n "checking for $ac_word... " >&6; }
36843if ${ac_cv_path_MCS+:} false; then :
36844  $as_echo_n "(cached) " >&6
36845else
36846  case $MCS in
36847  [\\/]* | ?:[\\/]*)
36848  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36849  ;;
36850  *)
36851  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36852for as_dir in $PATH
36853do
36854  IFS=$as_save_IFS
36855  test -z "$as_dir" && as_dir=.
36856    for ac_exec_ext in '' $ac_executable_extensions; do
36857  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36858    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36859    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36860    break 2
36861  fi
36862done
36863  done
36864IFS=$as_save_IFS
36865
36866  ;;
36867esac
36868fi
36869MCS=$ac_cv_path_MCS
36870if test -n "$MCS"; then
36871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36872$as_echo "$MCS" >&6; }
36873else
36874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36875$as_echo "no" >&6; }
36876fi
36877
36878
36879        if test "x$MCS" = x; then
36880          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36881        fi
36882      else
36883        # Otherwise we believe it is a complete path. Use it as it is.
36884        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MCS=$tool_specified" >&5
36885$as_echo "$as_me: Will use user supplied tool MCS=$tool_specified" >&6;}
36886        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MCS" >&5
36887$as_echo_n "checking for MCS... " >&6; }
36888        if test ! -x "$tool_specified"; then
36889          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36890$as_echo "not found" >&6; }
36891          as_fn_error $? "User supplied tool MCS=$tool_specified does not exist or is not executable" "$LINENO" 5
36892        fi
36893        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36894$as_echo "$tool_specified" >&6; }
36895      fi
36896    fi
36897  fi
36898
36899
36900
36901  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36902
36903  # First separate the path from the arguments. This will split at the first
36904  # space.
36905  complete="$MCS"
36906  path="${complete%% *}"
36907  tmp="$complete EOL"
36908  arguments="${tmp#* }"
36909
36910  # Input might be given as Windows format, start by converting to
36911  # unix format.
36912  new_path=`$CYGPATH -u "$path"`
36913
36914  # Now try to locate executable using which
36915  new_path=`$WHICH "$new_path" 2> /dev/null`
36916  # bat and cmd files are not always considered executable in cygwin causing which
36917  # to not find them
36918  if test "x$new_path" = x \
36919      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36920      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36921    new_path=`$CYGPATH -u "$path"`
36922  fi
36923  if test "x$new_path" = x; then
36924    # Oops. Which didn't find the executable.
36925    # The splitting of arguments from the executable at a space might have been incorrect,
36926    # since paths with space are more likely in Windows. Give it another try with the whole
36927    # argument.
36928    path="$complete"
36929    arguments="EOL"
36930    new_path=`$CYGPATH -u "$path"`
36931    new_path=`$WHICH "$new_path" 2> /dev/null`
36932    # bat and cmd files are not always considered executable in cygwin causing which
36933    # to not find them
36934    if test "x$new_path" = x \
36935        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36936        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36937      new_path=`$CYGPATH -u "$path"`
36938    fi
36939    if test "x$new_path" = x; then
36940      # It's still not found. Now this is an unrecoverable error.
36941      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36942$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36943      has_space=`$ECHO "$complete" | $GREP " "`
36944      if test "x$has_space" != x; then
36945        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36946$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36947      fi
36948      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36949    fi
36950  fi
36951
36952  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36953  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36954  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36955  # "foo.exe" is OK but "foo" is an error.
36956  #
36957  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36958  # It is also a way to make sure we got the proper file name for the real test later on.
36959  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36960  if test "x$test_shortpath" = x; then
36961    # Short path failed, file does not exist as specified.
36962    # Try adding .exe or .cmd
36963    if test -f "${new_path}.exe"; then
36964      input_to_shortpath="${new_path}.exe"
36965    elif test -f "${new_path}.cmd"; then
36966      input_to_shortpath="${new_path}.cmd"
36967    else
36968      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
36969$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
36970      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36971$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36972      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36973    fi
36974  else
36975    input_to_shortpath="$new_path"
36976  fi
36977
36978  # Call helper function which possibly converts this using DOS-style short mode.
36979  # If so, the updated path is stored in $new_path.
36980  new_path="$input_to_shortpath"
36981
36982  input_path="$input_to_shortpath"
36983  # Check if we need to convert this using DOS-style short mode. If the path
36984  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36985  # take no chances and rewrite it.
36986  # Note: m4 eats our [], so we need to use [ and ] instead.
36987  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36988  if test "x$has_forbidden_chars" != x; then
36989    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36990    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36991    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36992    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36993      # Going to short mode and back again did indeed matter. Since short mode is
36994      # case insensitive, let's make it lowercase to improve readability.
36995      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36996      # Now convert it back to Unix-stile (cygpath)
36997      input_path=`$CYGPATH -u "$shortmode_path"`
36998      new_path="$input_path"
36999    fi
37000  fi
37001
37002  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37003  if test "x$test_cygdrive_prefix" = x; then
37004    # As a simple fix, exclude /usr/bin since it's not a real path.
37005    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37006      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37007      # a path prefixed by /cygdrive for fixpath to work.
37008      new_path="$CYGWIN_ROOT_PATH$input_path"
37009    fi
37010  fi
37011
37012  # remove trailing .exe if any
37013  new_path="${new_path/%.exe/}"
37014
37015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37016
37017  # First separate the path from the arguments. This will split at the first
37018  # space.
37019  complete="$MCS"
37020  path="${complete%% *}"
37021  tmp="$complete EOL"
37022  arguments="${tmp#* }"
37023
37024  # Input might be given as Windows format, start by converting to
37025  # unix format.
37026  new_path="$path"
37027
37028  windows_path="$new_path"
37029  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37030    unix_path=`$CYGPATH -u "$windows_path"`
37031    new_path="$unix_path"
37032  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37033    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37034    new_path="$unix_path"
37035  fi
37036
37037
37038  # Now try to locate executable using which
37039  new_path=`$WHICH "$new_path" 2> /dev/null`
37040
37041  if test "x$new_path" = x; then
37042    # Oops. Which didn't find the executable.
37043    # The splitting of arguments from the executable at a space might have been incorrect,
37044    # since paths with space are more likely in Windows. Give it another try with the whole
37045    # argument.
37046    path="$complete"
37047    arguments="EOL"
37048    new_path="$path"
37049
37050  windows_path="$new_path"
37051  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37052    unix_path=`$CYGPATH -u "$windows_path"`
37053    new_path="$unix_path"
37054  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37055    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37056    new_path="$unix_path"
37057  fi
37058
37059
37060    new_path=`$WHICH "$new_path" 2> /dev/null`
37061    # bat and cmd files are not always considered executable in MSYS causing which
37062    # to not find them
37063    if test "x$new_path" = x \
37064        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37065        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37066      new_path="$path"
37067
37068  windows_path="$new_path"
37069  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37070    unix_path=`$CYGPATH -u "$windows_path"`
37071    new_path="$unix_path"
37072  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37073    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37074    new_path="$unix_path"
37075  fi
37076
37077    fi
37078
37079    if test "x$new_path" = x; then
37080      # It's still not found. Now this is an unrecoverable error.
37081      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
37082$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
37083      has_space=`$ECHO "$complete" | $GREP " "`
37084      if test "x$has_space" != x; then
37085        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37086$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37087      fi
37088      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
37089    fi
37090  fi
37091
37092  # Now new_path has a complete unix path to the binary
37093  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37094    # Keep paths in /bin as-is, but remove trailing .exe if any
37095    new_path="${new_path/%.exe/}"
37096    # Do not save /bin paths to all_fixpath_prefixes!
37097  else
37098    # Not in mixed or Windows style, start by that.
37099    new_path=`cmd //c echo $new_path`
37100
37101  input_path="$new_path"
37102  # Check if we need to convert this using DOS-style short mode. If the path
37103  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37104  # take no chances and rewrite it.
37105  # Note: m4 eats our [], so we need to use [ and ] instead.
37106  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37107  if test "x$has_forbidden_chars" != x; then
37108    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37109    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37110  fi
37111
37112    # Output is in $new_path
37113
37114  windows_path="$new_path"
37115  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37116    unix_path=`$CYGPATH -u "$windows_path"`
37117    new_path="$unix_path"
37118  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37119    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37120    new_path="$unix_path"
37121  fi
37122
37123    # remove trailing .exe if any
37124    new_path="${new_path/%.exe/}"
37125
37126    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37127    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37128  fi
37129
37130  else
37131    # We're on a posix platform. Hooray! :)
37132    # First separate the path from the arguments. This will split at the first
37133    # space.
37134    complete="$MCS"
37135    path="${complete%% *}"
37136    tmp="$complete EOL"
37137    arguments="${tmp#* }"
37138
37139    # Cannot rely on the command "which" here since it doesn't always work.
37140    is_absolute_path=`$ECHO "$path" | $GREP ^/`
37141    if test -z "$is_absolute_path"; then
37142      # Path to executable is not absolute. Find it.
37143      IFS_save="$IFS"
37144      IFS=:
37145      for p in $PATH; do
37146        if test -f "$p/$path" && test -x "$p/$path"; then
37147          new_path="$p/$path"
37148          break
37149        fi
37150      done
37151      IFS="$IFS_save"
37152    else
37153      # This is an absolute path, we can use it without further modifications.
37154      new_path="$path"
37155    fi
37156
37157    if test "x$new_path" = x; then
37158      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
37159$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
37160      has_space=`$ECHO "$complete" | $GREP " "`
37161      if test "x$has_space" != x; then
37162        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37163$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37164      fi
37165      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
37166    fi
37167  fi
37168
37169  # Now join together the path and the arguments once again
37170  if test "x$arguments" != xEOL; then
37171    new_complete="$new_path ${arguments% *}"
37172  else
37173    new_complete="$new_path"
37174  fi
37175
37176  if test "x$complete" != "x$new_complete"; then
37177    MCS="$new_complete"
37178    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
37179$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
37180  fi
37181
37182  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
37183    # FIXME: we should unify this with the solaris case above.
37184
37185
37186  # Publish this variable in the help.
37187
37188
37189  if test "x$STRIP" = x; then
37190    # The variable is not set by user, try to locate tool using the code snippet
37191    if test -n "$ac_tool_prefix"; then
37192  for ac_prog in strip
37193  do
37194    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37195set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37197$as_echo_n "checking for $ac_word... " >&6; }
37198if ${ac_cv_prog_STRIP+:} false; then :
37199  $as_echo_n "(cached) " >&6
37200else
37201  if test -n "$STRIP"; then
37202  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37203else
37204as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37205for as_dir in $PATH
37206do
37207  IFS=$as_save_IFS
37208  test -z "$as_dir" && as_dir=.
37209    for ac_exec_ext in '' $ac_executable_extensions; do
37210  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37211    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37212    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37213    break 2
37214  fi
37215done
37216  done
37217IFS=$as_save_IFS
37218
37219fi
37220fi
37221STRIP=$ac_cv_prog_STRIP
37222if test -n "$STRIP"; then
37223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37224$as_echo "$STRIP" >&6; }
37225else
37226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37227$as_echo "no" >&6; }
37228fi
37229
37230
37231    test -n "$STRIP" && break
37232  done
37233fi
37234if test -z "$STRIP"; then
37235  ac_ct_STRIP=$STRIP
37236  for ac_prog in strip
37237do
37238  # Extract the first word of "$ac_prog", so it can be a program name with args.
37239set dummy $ac_prog; ac_word=$2
37240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37241$as_echo_n "checking for $ac_word... " >&6; }
37242if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37243  $as_echo_n "(cached) " >&6
37244else
37245  if test -n "$ac_ct_STRIP"; then
37246  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37247else
37248as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37249for as_dir in $PATH
37250do
37251  IFS=$as_save_IFS
37252  test -z "$as_dir" && as_dir=.
37253    for ac_exec_ext in '' $ac_executable_extensions; do
37254  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37255    ac_cv_prog_ac_ct_STRIP="$ac_prog"
37256    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37257    break 2
37258  fi
37259done
37260  done
37261IFS=$as_save_IFS
37262
37263fi
37264fi
37265ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37266if test -n "$ac_ct_STRIP"; then
37267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37268$as_echo "$ac_ct_STRIP" >&6; }
37269else
37270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37271$as_echo "no" >&6; }
37272fi
37273
37274
37275  test -n "$ac_ct_STRIP" && break
37276done
37277
37278  if test "x$ac_ct_STRIP" = x; then
37279    STRIP=""
37280  else
37281    case $cross_compiling:$ac_tool_warned in
37282yes:)
37283{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37284$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37285ac_tool_warned=yes ;;
37286esac
37287    STRIP=$ac_ct_STRIP
37288  fi
37289fi
37290
37291  else
37292    # The variable is set, but is it from the command line or the environment?
37293
37294    # Try to remove the string !STRIP! from our list.
37295    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
37296    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37297      # If it failed, the variable was not from the command line. Ignore it,
37298      # but warn the user (except for BASH, which is always set by the calling BASH).
37299      if test "xSTRIP" != xBASH; then
37300        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
37301$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
37302      fi
37303      # Try to locate tool using the code snippet
37304      if test -n "$ac_tool_prefix"; then
37305  for ac_prog in strip
37306  do
37307    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37308set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37310$as_echo_n "checking for $ac_word... " >&6; }
37311if ${ac_cv_prog_STRIP+:} false; then :
37312  $as_echo_n "(cached) " >&6
37313else
37314  if test -n "$STRIP"; then
37315  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37316else
37317as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37318for as_dir in $PATH
37319do
37320  IFS=$as_save_IFS
37321  test -z "$as_dir" && as_dir=.
37322    for ac_exec_ext in '' $ac_executable_extensions; do
37323  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37324    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37325    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37326    break 2
37327  fi
37328done
37329  done
37330IFS=$as_save_IFS
37331
37332fi
37333fi
37334STRIP=$ac_cv_prog_STRIP
37335if test -n "$STRIP"; then
37336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37337$as_echo "$STRIP" >&6; }
37338else
37339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37340$as_echo "no" >&6; }
37341fi
37342
37343
37344    test -n "$STRIP" && break
37345  done
37346fi
37347if test -z "$STRIP"; then
37348  ac_ct_STRIP=$STRIP
37349  for ac_prog in strip
37350do
37351  # Extract the first word of "$ac_prog", so it can be a program name with args.
37352set dummy $ac_prog; ac_word=$2
37353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37354$as_echo_n "checking for $ac_word... " >&6; }
37355if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37356  $as_echo_n "(cached) " >&6
37357else
37358  if test -n "$ac_ct_STRIP"; then
37359  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37360else
37361as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37362for as_dir in $PATH
37363do
37364  IFS=$as_save_IFS
37365  test -z "$as_dir" && as_dir=.
37366    for ac_exec_ext in '' $ac_executable_extensions; do
37367  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37368    ac_cv_prog_ac_ct_STRIP="$ac_prog"
37369    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37370    break 2
37371  fi
37372done
37373  done
37374IFS=$as_save_IFS
37375
37376fi
37377fi
37378ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37379if test -n "$ac_ct_STRIP"; then
37380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37381$as_echo "$ac_ct_STRIP" >&6; }
37382else
37383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37384$as_echo "no" >&6; }
37385fi
37386
37387
37388  test -n "$ac_ct_STRIP" && break
37389done
37390
37391  if test "x$ac_ct_STRIP" = x; then
37392    STRIP=""
37393  else
37394    case $cross_compiling:$ac_tool_warned in
37395yes:)
37396{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37397$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37398ac_tool_warned=yes ;;
37399esac
37400    STRIP=$ac_ct_STRIP
37401  fi
37402fi
37403
37404    else
37405      # If it succeeded, then it was overridden by the user. We will use it
37406      # for the tool.
37407
37408      # First remove it from the list of overridden variables, so we can test
37409      # for unknown variables in the end.
37410      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37411
37412      # Check if the provided tool contains a complete path.
37413      tool_specified="$STRIP"
37414      tool_basename="${tool_specified##*/}"
37415      if test "x$tool_basename" = "x$tool_specified"; then
37416        # A command without a complete path is provided, search $PATH.
37417        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
37418$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
37419        # Extract the first word of "$tool_basename", so it can be a program name with args.
37420set dummy $tool_basename; ac_word=$2
37421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37422$as_echo_n "checking for $ac_word... " >&6; }
37423if ${ac_cv_path_STRIP+:} false; then :
37424  $as_echo_n "(cached) " >&6
37425else
37426  case $STRIP in
37427  [\\/]* | ?:[\\/]*)
37428  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37429  ;;
37430  *)
37431  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37432for as_dir in $PATH
37433do
37434  IFS=$as_save_IFS
37435  test -z "$as_dir" && as_dir=.
37436    for ac_exec_ext in '' $ac_executable_extensions; do
37437  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37438    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37439    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37440    break 2
37441  fi
37442done
37443  done
37444IFS=$as_save_IFS
37445
37446  ;;
37447esac
37448fi
37449STRIP=$ac_cv_path_STRIP
37450if test -n "$STRIP"; then
37451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37452$as_echo "$STRIP" >&6; }
37453else
37454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37455$as_echo "no" >&6; }
37456fi
37457
37458
37459        if test "x$STRIP" = x; then
37460          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37461        fi
37462      else
37463        # Otherwise we believe it is a complete path. Use it as it is.
37464        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
37465$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
37466        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
37467$as_echo_n "checking for STRIP... " >&6; }
37468        if test ! -x "$tool_specified"; then
37469          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37470$as_echo "not found" >&6; }
37471          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
37472        fi
37473        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37474$as_echo "$tool_specified" >&6; }
37475      fi
37476    fi
37477  fi
37478
37479
37480
37481  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37482
37483  # First separate the path from the arguments. This will split at the first
37484  # space.
37485  complete="$STRIP"
37486  path="${complete%% *}"
37487  tmp="$complete EOL"
37488  arguments="${tmp#* }"
37489
37490  # Input might be given as Windows format, start by converting to
37491  # unix format.
37492  new_path=`$CYGPATH -u "$path"`
37493
37494  # Now try to locate executable using which
37495  new_path=`$WHICH "$new_path" 2> /dev/null`
37496  # bat and cmd files are not always considered executable in cygwin causing which
37497  # to not find them
37498  if test "x$new_path" = x \
37499      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37500      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37501    new_path=`$CYGPATH -u "$path"`
37502  fi
37503  if test "x$new_path" = x; then
37504    # Oops. Which didn't find the executable.
37505    # The splitting of arguments from the executable at a space might have been incorrect,
37506    # since paths with space are more likely in Windows. Give it another try with the whole
37507    # argument.
37508    path="$complete"
37509    arguments="EOL"
37510    new_path=`$CYGPATH -u "$path"`
37511    new_path=`$WHICH "$new_path" 2> /dev/null`
37512    # bat and cmd files are not always considered executable in cygwin causing which
37513    # to not find them
37514    if test "x$new_path" = x \
37515        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37516        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37517      new_path=`$CYGPATH -u "$path"`
37518    fi
37519    if test "x$new_path" = x; then
37520      # It's still not found. Now this is an unrecoverable error.
37521      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37522$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37523      has_space=`$ECHO "$complete" | $GREP " "`
37524      if test "x$has_space" != x; then
37525        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37526$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37527      fi
37528      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37529    fi
37530  fi
37531
37532  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37533  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37534  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37535  # "foo.exe" is OK but "foo" is an error.
37536  #
37537  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37538  # It is also a way to make sure we got the proper file name for the real test later on.
37539  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37540  if test "x$test_shortpath" = x; then
37541    # Short path failed, file does not exist as specified.
37542    # Try adding .exe or .cmd
37543    if test -f "${new_path}.exe"; then
37544      input_to_shortpath="${new_path}.exe"
37545    elif test -f "${new_path}.cmd"; then
37546      input_to_shortpath="${new_path}.cmd"
37547    else
37548      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
37549$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
37550      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37551$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37552      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37553    fi
37554  else
37555    input_to_shortpath="$new_path"
37556  fi
37557
37558  # Call helper function which possibly converts this using DOS-style short mode.
37559  # If so, the updated path is stored in $new_path.
37560  new_path="$input_to_shortpath"
37561
37562  input_path="$input_to_shortpath"
37563  # Check if we need to convert this using DOS-style short mode. If the path
37564  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37565  # take no chances and rewrite it.
37566  # Note: m4 eats our [], so we need to use [ and ] instead.
37567  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37568  if test "x$has_forbidden_chars" != x; then
37569    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37570    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37571    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37572    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37573      # Going to short mode and back again did indeed matter. Since short mode is
37574      # case insensitive, let's make it lowercase to improve readability.
37575      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37576      # Now convert it back to Unix-stile (cygpath)
37577      input_path=`$CYGPATH -u "$shortmode_path"`
37578      new_path="$input_path"
37579    fi
37580  fi
37581
37582  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37583  if test "x$test_cygdrive_prefix" = x; then
37584    # As a simple fix, exclude /usr/bin since it's not a real path.
37585    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37586      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37587      # a path prefixed by /cygdrive for fixpath to work.
37588      new_path="$CYGWIN_ROOT_PATH$input_path"
37589    fi
37590  fi
37591
37592  # remove trailing .exe if any
37593  new_path="${new_path/%.exe/}"
37594
37595  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37596
37597  # First separate the path from the arguments. This will split at the first
37598  # space.
37599  complete="$STRIP"
37600  path="${complete%% *}"
37601  tmp="$complete EOL"
37602  arguments="${tmp#* }"
37603
37604  # Input might be given as Windows format, start by converting to
37605  # unix format.
37606  new_path="$path"
37607
37608  windows_path="$new_path"
37609  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37610    unix_path=`$CYGPATH -u "$windows_path"`
37611    new_path="$unix_path"
37612  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37613    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37614    new_path="$unix_path"
37615  fi
37616
37617
37618  # Now try to locate executable using which
37619  new_path=`$WHICH "$new_path" 2> /dev/null`
37620
37621  if test "x$new_path" = x; then
37622    # Oops. Which didn't find the executable.
37623    # The splitting of arguments from the executable at a space might have been incorrect,
37624    # since paths with space are more likely in Windows. Give it another try with the whole
37625    # argument.
37626    path="$complete"
37627    arguments="EOL"
37628    new_path="$path"
37629
37630  windows_path="$new_path"
37631  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37632    unix_path=`$CYGPATH -u "$windows_path"`
37633    new_path="$unix_path"
37634  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37635    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37636    new_path="$unix_path"
37637  fi
37638
37639
37640    new_path=`$WHICH "$new_path" 2> /dev/null`
37641    # bat and cmd files are not always considered executable in MSYS causing which
37642    # to not find them
37643    if test "x$new_path" = x \
37644        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37645        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37646      new_path="$path"
37647
37648  windows_path="$new_path"
37649  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37650    unix_path=`$CYGPATH -u "$windows_path"`
37651    new_path="$unix_path"
37652  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37653    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37654    new_path="$unix_path"
37655  fi
37656
37657    fi
37658
37659    if test "x$new_path" = x; then
37660      # It's still not found. Now this is an unrecoverable error.
37661      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37662$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37663      has_space=`$ECHO "$complete" | $GREP " "`
37664      if test "x$has_space" != x; then
37665        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37666$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37667      fi
37668      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37669    fi
37670  fi
37671
37672  # Now new_path has a complete unix path to the binary
37673  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37674    # Keep paths in /bin as-is, but remove trailing .exe if any
37675    new_path="${new_path/%.exe/}"
37676    # Do not save /bin paths to all_fixpath_prefixes!
37677  else
37678    # Not in mixed or Windows style, start by that.
37679    new_path=`cmd //c echo $new_path`
37680
37681  input_path="$new_path"
37682  # Check if we need to convert this using DOS-style short mode. If the path
37683  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37684  # take no chances and rewrite it.
37685  # Note: m4 eats our [], so we need to use [ and ] instead.
37686  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37687  if test "x$has_forbidden_chars" != x; then
37688    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37689    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37690  fi
37691
37692    # Output is in $new_path
37693
37694  windows_path="$new_path"
37695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37696    unix_path=`$CYGPATH -u "$windows_path"`
37697    new_path="$unix_path"
37698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37699    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37700    new_path="$unix_path"
37701  fi
37702
37703    # remove trailing .exe if any
37704    new_path="${new_path/%.exe/}"
37705
37706    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37707    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37708  fi
37709
37710  else
37711    # We're on a posix platform. Hooray! :)
37712    # First separate the path from the arguments. This will split at the first
37713    # space.
37714    complete="$STRIP"
37715    path="${complete%% *}"
37716    tmp="$complete EOL"
37717    arguments="${tmp#* }"
37718
37719    # Cannot rely on the command "which" here since it doesn't always work.
37720    is_absolute_path=`$ECHO "$path" | $GREP ^/`
37721    if test -z "$is_absolute_path"; then
37722      # Path to executable is not absolute. Find it.
37723      IFS_save="$IFS"
37724      IFS=:
37725      for p in $PATH; do
37726        if test -f "$p/$path" && test -x "$p/$path"; then
37727          new_path="$p/$path"
37728          break
37729        fi
37730      done
37731      IFS="$IFS_save"
37732    else
37733      # This is an absolute path, we can use it without further modifications.
37734      new_path="$path"
37735    fi
37736
37737    if test "x$new_path" = x; then
37738      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37739$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37740      has_space=`$ECHO "$complete" | $GREP " "`
37741      if test "x$has_space" != x; then
37742        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37743$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37744      fi
37745      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37746    fi
37747  fi
37748
37749  # Now join together the path and the arguments once again
37750  if test "x$arguments" != xEOL; then
37751    new_complete="$new_path ${arguments% *}"
37752  else
37753    new_complete="$new_path"
37754  fi
37755
37756  if test "x$complete" != "x$new_complete"; then
37757    STRIP="$new_complete"
37758    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
37759$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
37760  fi
37761
37762
37763
37764  # Publish this variable in the help.
37765
37766
37767  if test "x$NM" = x; then
37768    # The variable is not set by user, try to locate tool using the code snippet
37769    if test -n "$ac_tool_prefix"; then
37770  for ac_prog in nm
37771  do
37772    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37773set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37775$as_echo_n "checking for $ac_word... " >&6; }
37776if ${ac_cv_prog_NM+:} false; then :
37777  $as_echo_n "(cached) " >&6
37778else
37779  if test -n "$NM"; then
37780  ac_cv_prog_NM="$NM" # Let the user override the test.
37781else
37782as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37783for as_dir in $PATH
37784do
37785  IFS=$as_save_IFS
37786  test -z "$as_dir" && as_dir=.
37787    for ac_exec_ext in '' $ac_executable_extensions; do
37788  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37789    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37790    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37791    break 2
37792  fi
37793done
37794  done
37795IFS=$as_save_IFS
37796
37797fi
37798fi
37799NM=$ac_cv_prog_NM
37800if test -n "$NM"; then
37801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37802$as_echo "$NM" >&6; }
37803else
37804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37805$as_echo "no" >&6; }
37806fi
37807
37808
37809    test -n "$NM" && break
37810  done
37811fi
37812if test -z "$NM"; then
37813  ac_ct_NM=$NM
37814  for ac_prog in nm
37815do
37816  # Extract the first word of "$ac_prog", so it can be a program name with args.
37817set dummy $ac_prog; ac_word=$2
37818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37819$as_echo_n "checking for $ac_word... " >&6; }
37820if ${ac_cv_prog_ac_ct_NM+:} false; then :
37821  $as_echo_n "(cached) " >&6
37822else
37823  if test -n "$ac_ct_NM"; then
37824  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37825else
37826as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37827for as_dir in $PATH
37828do
37829  IFS=$as_save_IFS
37830  test -z "$as_dir" && as_dir=.
37831    for ac_exec_ext in '' $ac_executable_extensions; do
37832  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37833    ac_cv_prog_ac_ct_NM="$ac_prog"
37834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37835    break 2
37836  fi
37837done
37838  done
37839IFS=$as_save_IFS
37840
37841fi
37842fi
37843ac_ct_NM=$ac_cv_prog_ac_ct_NM
37844if test -n "$ac_ct_NM"; then
37845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37846$as_echo "$ac_ct_NM" >&6; }
37847else
37848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37849$as_echo "no" >&6; }
37850fi
37851
37852
37853  test -n "$ac_ct_NM" && break
37854done
37855
37856  if test "x$ac_ct_NM" = x; then
37857    NM=""
37858  else
37859    case $cross_compiling:$ac_tool_warned in
37860yes:)
37861{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37862$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37863ac_tool_warned=yes ;;
37864esac
37865    NM=$ac_ct_NM
37866  fi
37867fi
37868
37869  else
37870    # The variable is set, but is it from the command line or the environment?
37871
37872    # Try to remove the string !NM! from our list.
37873    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
37874    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37875      # If it failed, the variable was not from the command line. Ignore it,
37876      # but warn the user (except for BASH, which is always set by the calling BASH).
37877      if test "xNM" != xBASH; then
37878        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
37879$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
37880      fi
37881      # Try to locate tool using the code snippet
37882      if test -n "$ac_tool_prefix"; then
37883  for ac_prog in nm
37884  do
37885    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37886set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37888$as_echo_n "checking for $ac_word... " >&6; }
37889if ${ac_cv_prog_NM+:} false; then :
37890  $as_echo_n "(cached) " >&6
37891else
37892  if test -n "$NM"; then
37893  ac_cv_prog_NM="$NM" # Let the user override the test.
37894else
37895as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37896for as_dir in $PATH
37897do
37898  IFS=$as_save_IFS
37899  test -z "$as_dir" && as_dir=.
37900    for ac_exec_ext in '' $ac_executable_extensions; do
37901  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37902    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37903    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37904    break 2
37905  fi
37906done
37907  done
37908IFS=$as_save_IFS
37909
37910fi
37911fi
37912NM=$ac_cv_prog_NM
37913if test -n "$NM"; then
37914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37915$as_echo "$NM" >&6; }
37916else
37917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37918$as_echo "no" >&6; }
37919fi
37920
37921
37922    test -n "$NM" && break
37923  done
37924fi
37925if test -z "$NM"; then
37926  ac_ct_NM=$NM
37927  for ac_prog in nm
37928do
37929  # Extract the first word of "$ac_prog", so it can be a program name with args.
37930set dummy $ac_prog; ac_word=$2
37931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37932$as_echo_n "checking for $ac_word... " >&6; }
37933if ${ac_cv_prog_ac_ct_NM+:} false; then :
37934  $as_echo_n "(cached) " >&6
37935else
37936  if test -n "$ac_ct_NM"; then
37937  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37938else
37939as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37940for as_dir in $PATH
37941do
37942  IFS=$as_save_IFS
37943  test -z "$as_dir" && as_dir=.
37944    for ac_exec_ext in '' $ac_executable_extensions; do
37945  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37946    ac_cv_prog_ac_ct_NM="$ac_prog"
37947    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37948    break 2
37949  fi
37950done
37951  done
37952IFS=$as_save_IFS
37953
37954fi
37955fi
37956ac_ct_NM=$ac_cv_prog_ac_ct_NM
37957if test -n "$ac_ct_NM"; then
37958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37959$as_echo "$ac_ct_NM" >&6; }
37960else
37961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37962$as_echo "no" >&6; }
37963fi
37964
37965
37966  test -n "$ac_ct_NM" && break
37967done
37968
37969  if test "x$ac_ct_NM" = x; then
37970    NM=""
37971  else
37972    case $cross_compiling:$ac_tool_warned in
37973yes:)
37974{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37975$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37976ac_tool_warned=yes ;;
37977esac
37978    NM=$ac_ct_NM
37979  fi
37980fi
37981
37982    else
37983      # If it succeeded, then it was overridden by the user. We will use it
37984      # for the tool.
37985
37986      # First remove it from the list of overridden variables, so we can test
37987      # for unknown variables in the end.
37988      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37989
37990      # Check if the provided tool contains a complete path.
37991      tool_specified="$NM"
37992      tool_basename="${tool_specified##*/}"
37993      if test "x$tool_basename" = "x$tool_specified"; then
37994        # A command without a complete path is provided, search $PATH.
37995        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
37996$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
37997        # Extract the first word of "$tool_basename", so it can be a program name with args.
37998set dummy $tool_basename; ac_word=$2
37999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38000$as_echo_n "checking for $ac_word... " >&6; }
38001if ${ac_cv_path_NM+:} false; then :
38002  $as_echo_n "(cached) " >&6
38003else
38004  case $NM in
38005  [\\/]* | ?:[\\/]*)
38006  ac_cv_path_NM="$NM" # Let the user override the test with a path.
38007  ;;
38008  *)
38009  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38010for as_dir in $PATH
38011do
38012  IFS=$as_save_IFS
38013  test -z "$as_dir" && as_dir=.
38014    for ac_exec_ext in '' $ac_executable_extensions; do
38015  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38016    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38017    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38018    break 2
38019  fi
38020done
38021  done
38022IFS=$as_save_IFS
38023
38024  ;;
38025esac
38026fi
38027NM=$ac_cv_path_NM
38028if test -n "$NM"; then
38029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38030$as_echo "$NM" >&6; }
38031else
38032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38033$as_echo "no" >&6; }
38034fi
38035
38036
38037        if test "x$NM" = x; then
38038          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38039        fi
38040      else
38041        # Otherwise we believe it is a complete path. Use it as it is.
38042        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
38043$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
38044        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
38045$as_echo_n "checking for NM... " >&6; }
38046        if test ! -x "$tool_specified"; then
38047          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38048$as_echo "not found" >&6; }
38049          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
38050        fi
38051        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38052$as_echo "$tool_specified" >&6; }
38053      fi
38054    fi
38055  fi
38056
38057
38058
38059  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38060
38061  # First separate the path from the arguments. This will split at the first
38062  # space.
38063  complete="$NM"
38064  path="${complete%% *}"
38065  tmp="$complete EOL"
38066  arguments="${tmp#* }"
38067
38068  # Input might be given as Windows format, start by converting to
38069  # unix format.
38070  new_path=`$CYGPATH -u "$path"`
38071
38072  # Now try to locate executable using which
38073  new_path=`$WHICH "$new_path" 2> /dev/null`
38074  # bat and cmd files are not always considered executable in cygwin causing which
38075  # to not find them
38076  if test "x$new_path" = x \
38077      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38078      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38079    new_path=`$CYGPATH -u "$path"`
38080  fi
38081  if test "x$new_path" = x; then
38082    # Oops. Which didn't find the executable.
38083    # The splitting of arguments from the executable at a space might have been incorrect,
38084    # since paths with space are more likely in Windows. Give it another try with the whole
38085    # argument.
38086    path="$complete"
38087    arguments="EOL"
38088    new_path=`$CYGPATH -u "$path"`
38089    new_path=`$WHICH "$new_path" 2> /dev/null`
38090    # bat and cmd files are not always considered executable in cygwin causing which
38091    # to not find them
38092    if test "x$new_path" = x \
38093        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38094        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38095      new_path=`$CYGPATH -u "$path"`
38096    fi
38097    if test "x$new_path" = x; then
38098      # It's still not found. Now this is an unrecoverable error.
38099      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38100$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38101      has_space=`$ECHO "$complete" | $GREP " "`
38102      if test "x$has_space" != x; then
38103        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38104$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38105      fi
38106      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38107    fi
38108  fi
38109
38110  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38111  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38112  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38113  # "foo.exe" is OK but "foo" is an error.
38114  #
38115  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38116  # It is also a way to make sure we got the proper file name for the real test later on.
38117  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38118  if test "x$test_shortpath" = x; then
38119    # Short path failed, file does not exist as specified.
38120    # Try adding .exe or .cmd
38121    if test -f "${new_path}.exe"; then
38122      input_to_shortpath="${new_path}.exe"
38123    elif test -f "${new_path}.cmd"; then
38124      input_to_shortpath="${new_path}.cmd"
38125    else
38126      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
38127$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
38128      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38129$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38130      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38131    fi
38132  else
38133    input_to_shortpath="$new_path"
38134  fi
38135
38136  # Call helper function which possibly converts this using DOS-style short mode.
38137  # If so, the updated path is stored in $new_path.
38138  new_path="$input_to_shortpath"
38139
38140  input_path="$input_to_shortpath"
38141  # Check if we need to convert this using DOS-style short mode. If the path
38142  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38143  # take no chances and rewrite it.
38144  # Note: m4 eats our [], so we need to use [ and ] instead.
38145  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38146  if test "x$has_forbidden_chars" != x; then
38147    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38148    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38149    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38150    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38151      # Going to short mode and back again did indeed matter. Since short mode is
38152      # case insensitive, let's make it lowercase to improve readability.
38153      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38154      # Now convert it back to Unix-stile (cygpath)
38155      input_path=`$CYGPATH -u "$shortmode_path"`
38156      new_path="$input_path"
38157    fi
38158  fi
38159
38160  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38161  if test "x$test_cygdrive_prefix" = x; then
38162    # As a simple fix, exclude /usr/bin since it's not a real path.
38163    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38164      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38165      # a path prefixed by /cygdrive for fixpath to work.
38166      new_path="$CYGWIN_ROOT_PATH$input_path"
38167    fi
38168  fi
38169
38170  # remove trailing .exe if any
38171  new_path="${new_path/%.exe/}"
38172
38173  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38174
38175  # First separate the path from the arguments. This will split at the first
38176  # space.
38177  complete="$NM"
38178  path="${complete%% *}"
38179  tmp="$complete EOL"
38180  arguments="${tmp#* }"
38181
38182  # Input might be given as Windows format, start by converting to
38183  # unix format.
38184  new_path="$path"
38185
38186  windows_path="$new_path"
38187  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38188    unix_path=`$CYGPATH -u "$windows_path"`
38189    new_path="$unix_path"
38190  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38191    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38192    new_path="$unix_path"
38193  fi
38194
38195
38196  # Now try to locate executable using which
38197  new_path=`$WHICH "$new_path" 2> /dev/null`
38198
38199  if test "x$new_path" = x; then
38200    # Oops. Which didn't find the executable.
38201    # The splitting of arguments from the executable at a space might have been incorrect,
38202    # since paths with space are more likely in Windows. Give it another try with the whole
38203    # argument.
38204    path="$complete"
38205    arguments="EOL"
38206    new_path="$path"
38207
38208  windows_path="$new_path"
38209  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38210    unix_path=`$CYGPATH -u "$windows_path"`
38211    new_path="$unix_path"
38212  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38213    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38214    new_path="$unix_path"
38215  fi
38216
38217
38218    new_path=`$WHICH "$new_path" 2> /dev/null`
38219    # bat and cmd files are not always considered executable in MSYS causing which
38220    # to not find them
38221    if test "x$new_path" = x \
38222        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38223        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38224      new_path="$path"
38225
38226  windows_path="$new_path"
38227  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38228    unix_path=`$CYGPATH -u "$windows_path"`
38229    new_path="$unix_path"
38230  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38231    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38232    new_path="$unix_path"
38233  fi
38234
38235    fi
38236
38237    if test "x$new_path" = x; then
38238      # It's still not found. Now this is an unrecoverable error.
38239      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38240$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38241      has_space=`$ECHO "$complete" | $GREP " "`
38242      if test "x$has_space" != x; then
38243        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38244$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38245      fi
38246      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38247    fi
38248  fi
38249
38250  # Now new_path has a complete unix path to the binary
38251  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38252    # Keep paths in /bin as-is, but remove trailing .exe if any
38253    new_path="${new_path/%.exe/}"
38254    # Do not save /bin paths to all_fixpath_prefixes!
38255  else
38256    # Not in mixed or Windows style, start by that.
38257    new_path=`cmd //c echo $new_path`
38258
38259  input_path="$new_path"
38260  # Check if we need to convert this using DOS-style short mode. If the path
38261  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38262  # take no chances and rewrite it.
38263  # Note: m4 eats our [], so we need to use [ and ] instead.
38264  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38265  if test "x$has_forbidden_chars" != x; then
38266    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38267    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38268  fi
38269
38270    # Output is in $new_path
38271
38272  windows_path="$new_path"
38273  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38274    unix_path=`$CYGPATH -u "$windows_path"`
38275    new_path="$unix_path"
38276  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38277    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38278    new_path="$unix_path"
38279  fi
38280
38281    # remove trailing .exe if any
38282    new_path="${new_path/%.exe/}"
38283
38284    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38285    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38286  fi
38287
38288  else
38289    # We're on a posix platform. Hooray! :)
38290    # First separate the path from the arguments. This will split at the first
38291    # space.
38292    complete="$NM"
38293    path="${complete%% *}"
38294    tmp="$complete EOL"
38295    arguments="${tmp#* }"
38296
38297    # Cannot rely on the command "which" here since it doesn't always work.
38298    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38299    if test -z "$is_absolute_path"; then
38300      # Path to executable is not absolute. Find it.
38301      IFS_save="$IFS"
38302      IFS=:
38303      for p in $PATH; do
38304        if test -f "$p/$path" && test -x "$p/$path"; then
38305          new_path="$p/$path"
38306          break
38307        fi
38308      done
38309      IFS="$IFS_save"
38310    else
38311      # This is an absolute path, we can use it without further modifications.
38312      new_path="$path"
38313    fi
38314
38315    if test "x$new_path" = x; then
38316      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38317$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38318      has_space=`$ECHO "$complete" | $GREP " "`
38319      if test "x$has_space" != x; then
38320        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38321$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38322      fi
38323      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38324    fi
38325  fi
38326
38327  # Now join together the path and the arguments once again
38328  if test "x$arguments" != xEOL; then
38329    new_complete="$new_path ${arguments% *}"
38330  else
38331    new_complete="$new_path"
38332  fi
38333
38334  if test "x$complete" != "x$new_complete"; then
38335    NM="$new_complete"
38336    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
38337$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
38338  fi
38339
38340    GNM="$NM"
38341
38342  fi
38343
38344  # objcopy is used for moving debug symbols to separate files when
38345  # full debug symbols are enabled.
38346  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
38347
38348
38349  # Publish this variable in the help.
38350
38351
38352  if test "x$OBJCOPY" = x; then
38353    # The variable is not set by user, try to locate tool using the code snippet
38354    if test -n "$ac_tool_prefix"; then
38355  for ac_prog in gobjcopy objcopy
38356  do
38357    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38358set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38360$as_echo_n "checking for $ac_word... " >&6; }
38361if ${ac_cv_prog_OBJCOPY+:} false; then :
38362  $as_echo_n "(cached) " >&6
38363else
38364  if test -n "$OBJCOPY"; then
38365  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38366else
38367as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38368for as_dir in $PATH
38369do
38370  IFS=$as_save_IFS
38371  test -z "$as_dir" && as_dir=.
38372    for ac_exec_ext in '' $ac_executable_extensions; do
38373  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38374    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38375    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38376    break 2
38377  fi
38378done
38379  done
38380IFS=$as_save_IFS
38381
38382fi
38383fi
38384OBJCOPY=$ac_cv_prog_OBJCOPY
38385if test -n "$OBJCOPY"; then
38386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38387$as_echo "$OBJCOPY" >&6; }
38388else
38389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38390$as_echo "no" >&6; }
38391fi
38392
38393
38394    test -n "$OBJCOPY" && break
38395  done
38396fi
38397if test -z "$OBJCOPY"; then
38398  ac_ct_OBJCOPY=$OBJCOPY
38399  for ac_prog in gobjcopy objcopy
38400do
38401  # Extract the first word of "$ac_prog", so it can be a program name with args.
38402set dummy $ac_prog; ac_word=$2
38403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38404$as_echo_n "checking for $ac_word... " >&6; }
38405if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38406  $as_echo_n "(cached) " >&6
38407else
38408  if test -n "$ac_ct_OBJCOPY"; then
38409  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38410else
38411as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38412for as_dir in $PATH
38413do
38414  IFS=$as_save_IFS
38415  test -z "$as_dir" && as_dir=.
38416    for ac_exec_ext in '' $ac_executable_extensions; do
38417  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38418    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38419    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38420    break 2
38421  fi
38422done
38423  done
38424IFS=$as_save_IFS
38425
38426fi
38427fi
38428ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38429if test -n "$ac_ct_OBJCOPY"; then
38430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38431$as_echo "$ac_ct_OBJCOPY" >&6; }
38432else
38433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38434$as_echo "no" >&6; }
38435fi
38436
38437
38438  test -n "$ac_ct_OBJCOPY" && break
38439done
38440
38441  if test "x$ac_ct_OBJCOPY" = x; then
38442    OBJCOPY=""
38443  else
38444    case $cross_compiling:$ac_tool_warned in
38445yes:)
38446{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38447$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38448ac_tool_warned=yes ;;
38449esac
38450    OBJCOPY=$ac_ct_OBJCOPY
38451  fi
38452fi
38453
38454  else
38455    # The variable is set, but is it from the command line or the environment?
38456
38457    # Try to remove the string !OBJCOPY! from our list.
38458    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
38459    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38460      # If it failed, the variable was not from the command line. Ignore it,
38461      # but warn the user (except for BASH, which is always set by the calling BASH).
38462      if test "xOBJCOPY" != xBASH; then
38463        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
38464$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
38465      fi
38466      # Try to locate tool using the code snippet
38467      if test -n "$ac_tool_prefix"; then
38468  for ac_prog in gobjcopy objcopy
38469  do
38470    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38471set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38473$as_echo_n "checking for $ac_word... " >&6; }
38474if ${ac_cv_prog_OBJCOPY+:} false; then :
38475  $as_echo_n "(cached) " >&6
38476else
38477  if test -n "$OBJCOPY"; then
38478  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38479else
38480as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38481for as_dir in $PATH
38482do
38483  IFS=$as_save_IFS
38484  test -z "$as_dir" && as_dir=.
38485    for ac_exec_ext in '' $ac_executable_extensions; do
38486  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38487    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38488    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38489    break 2
38490  fi
38491done
38492  done
38493IFS=$as_save_IFS
38494
38495fi
38496fi
38497OBJCOPY=$ac_cv_prog_OBJCOPY
38498if test -n "$OBJCOPY"; then
38499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38500$as_echo "$OBJCOPY" >&6; }
38501else
38502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38503$as_echo "no" >&6; }
38504fi
38505
38506
38507    test -n "$OBJCOPY" && break
38508  done
38509fi
38510if test -z "$OBJCOPY"; then
38511  ac_ct_OBJCOPY=$OBJCOPY
38512  for ac_prog in gobjcopy objcopy
38513do
38514  # Extract the first word of "$ac_prog", so it can be a program name with args.
38515set dummy $ac_prog; ac_word=$2
38516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38517$as_echo_n "checking for $ac_word... " >&6; }
38518if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38519  $as_echo_n "(cached) " >&6
38520else
38521  if test -n "$ac_ct_OBJCOPY"; then
38522  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38523else
38524as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38525for as_dir in $PATH
38526do
38527  IFS=$as_save_IFS
38528  test -z "$as_dir" && as_dir=.
38529    for ac_exec_ext in '' $ac_executable_extensions; do
38530  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38531    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38532    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38533    break 2
38534  fi
38535done
38536  done
38537IFS=$as_save_IFS
38538
38539fi
38540fi
38541ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38542if test -n "$ac_ct_OBJCOPY"; then
38543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38544$as_echo "$ac_ct_OBJCOPY" >&6; }
38545else
38546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38547$as_echo "no" >&6; }
38548fi
38549
38550
38551  test -n "$ac_ct_OBJCOPY" && break
38552done
38553
38554  if test "x$ac_ct_OBJCOPY" = x; then
38555    OBJCOPY=""
38556  else
38557    case $cross_compiling:$ac_tool_warned in
38558yes:)
38559{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38560$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38561ac_tool_warned=yes ;;
38562esac
38563    OBJCOPY=$ac_ct_OBJCOPY
38564  fi
38565fi
38566
38567    else
38568      # If it succeeded, then it was overridden by the user. We will use it
38569      # for the tool.
38570
38571      # First remove it from the list of overridden variables, so we can test
38572      # for unknown variables in the end.
38573      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38574
38575      # Check if the provided tool contains a complete path.
38576      tool_specified="$OBJCOPY"
38577      tool_basename="${tool_specified##*/}"
38578      if test "x$tool_basename" = "x$tool_specified"; then
38579        # A command without a complete path is provided, search $PATH.
38580        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
38581$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
38582        # Extract the first word of "$tool_basename", so it can be a program name with args.
38583set dummy $tool_basename; ac_word=$2
38584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38585$as_echo_n "checking for $ac_word... " >&6; }
38586if ${ac_cv_path_OBJCOPY+:} false; then :
38587  $as_echo_n "(cached) " >&6
38588else
38589  case $OBJCOPY in
38590  [\\/]* | ?:[\\/]*)
38591  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
38592  ;;
38593  *)
38594  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38595for as_dir in $PATH
38596do
38597  IFS=$as_save_IFS
38598  test -z "$as_dir" && as_dir=.
38599    for ac_exec_ext in '' $ac_executable_extensions; do
38600  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38601    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
38602    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38603    break 2
38604  fi
38605done
38606  done
38607IFS=$as_save_IFS
38608
38609  ;;
38610esac
38611fi
38612OBJCOPY=$ac_cv_path_OBJCOPY
38613if test -n "$OBJCOPY"; then
38614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38615$as_echo "$OBJCOPY" >&6; }
38616else
38617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38618$as_echo "no" >&6; }
38619fi
38620
38621
38622        if test "x$OBJCOPY" = x; then
38623          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38624        fi
38625      else
38626        # Otherwise we believe it is a complete path. Use it as it is.
38627        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
38628$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
38629        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
38630$as_echo_n "checking for OBJCOPY... " >&6; }
38631        if test ! -x "$tool_specified"; then
38632          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38633$as_echo "not found" >&6; }
38634          as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
38635        fi
38636        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38637$as_echo "$tool_specified" >&6; }
38638      fi
38639    fi
38640  fi
38641
38642
38643    # Only call fixup if objcopy was found.
38644    if test -n "$OBJCOPY"; then
38645
38646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38647
38648  # First separate the path from the arguments. This will split at the first
38649  # space.
38650  complete="$OBJCOPY"
38651  path="${complete%% *}"
38652  tmp="$complete EOL"
38653  arguments="${tmp#* }"
38654
38655  # Input might be given as Windows format, start by converting to
38656  # unix format.
38657  new_path=`$CYGPATH -u "$path"`
38658
38659  # Now try to locate executable using which
38660  new_path=`$WHICH "$new_path" 2> /dev/null`
38661  # bat and cmd files are not always considered executable in cygwin causing which
38662  # to not find them
38663  if test "x$new_path" = x \
38664      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38665      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38666    new_path=`$CYGPATH -u "$path"`
38667  fi
38668  if test "x$new_path" = x; then
38669    # Oops. Which didn't find the executable.
38670    # The splitting of arguments from the executable at a space might have been incorrect,
38671    # since paths with space are more likely in Windows. Give it another try with the whole
38672    # argument.
38673    path="$complete"
38674    arguments="EOL"
38675    new_path=`$CYGPATH -u "$path"`
38676    new_path=`$WHICH "$new_path" 2> /dev/null`
38677    # bat and cmd files are not always considered executable in cygwin causing which
38678    # to not find them
38679    if test "x$new_path" = x \
38680        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38681        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38682      new_path=`$CYGPATH -u "$path"`
38683    fi
38684    if test "x$new_path" = x; then
38685      # It's still not found. Now this is an unrecoverable error.
38686      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38687$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38688      has_space=`$ECHO "$complete" | $GREP " "`
38689      if test "x$has_space" != x; then
38690        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38691$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38692      fi
38693      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38694    fi
38695  fi
38696
38697  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38698  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38699  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38700  # "foo.exe" is OK but "foo" is an error.
38701  #
38702  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38703  # It is also a way to make sure we got the proper file name for the real test later on.
38704  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38705  if test "x$test_shortpath" = x; then
38706    # Short path failed, file does not exist as specified.
38707    # Try adding .exe or .cmd
38708    if test -f "${new_path}.exe"; then
38709      input_to_shortpath="${new_path}.exe"
38710    elif test -f "${new_path}.cmd"; then
38711      input_to_shortpath="${new_path}.cmd"
38712    else
38713      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
38714$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
38715      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38716$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38717      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38718    fi
38719  else
38720    input_to_shortpath="$new_path"
38721  fi
38722
38723  # Call helper function which possibly converts this using DOS-style short mode.
38724  # If so, the updated path is stored in $new_path.
38725  new_path="$input_to_shortpath"
38726
38727  input_path="$input_to_shortpath"
38728  # Check if we need to convert this using DOS-style short mode. If the path
38729  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38730  # take no chances and rewrite it.
38731  # Note: m4 eats our [], so we need to use [ and ] instead.
38732  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38733  if test "x$has_forbidden_chars" != x; then
38734    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38735    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38736    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38737    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38738      # Going to short mode and back again did indeed matter. Since short mode is
38739      # case insensitive, let's make it lowercase to improve readability.
38740      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38741      # Now convert it back to Unix-stile (cygpath)
38742      input_path=`$CYGPATH -u "$shortmode_path"`
38743      new_path="$input_path"
38744    fi
38745  fi
38746
38747  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38748  if test "x$test_cygdrive_prefix" = x; then
38749    # As a simple fix, exclude /usr/bin since it's not a real path.
38750    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38751      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38752      # a path prefixed by /cygdrive for fixpath to work.
38753      new_path="$CYGWIN_ROOT_PATH$input_path"
38754    fi
38755  fi
38756
38757  # remove trailing .exe if any
38758  new_path="${new_path/%.exe/}"
38759
38760  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38761
38762  # First separate the path from the arguments. This will split at the first
38763  # space.
38764  complete="$OBJCOPY"
38765  path="${complete%% *}"
38766  tmp="$complete EOL"
38767  arguments="${tmp#* }"
38768
38769  # Input might be given as Windows format, start by converting to
38770  # unix format.
38771  new_path="$path"
38772
38773  windows_path="$new_path"
38774  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38775    unix_path=`$CYGPATH -u "$windows_path"`
38776    new_path="$unix_path"
38777  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38778    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38779    new_path="$unix_path"
38780  fi
38781
38782
38783  # Now try to locate executable using which
38784  new_path=`$WHICH "$new_path" 2> /dev/null`
38785
38786  if test "x$new_path" = x; then
38787    # Oops. Which didn't find the executable.
38788    # The splitting of arguments from the executable at a space might have been incorrect,
38789    # since paths with space are more likely in Windows. Give it another try with the whole
38790    # argument.
38791    path="$complete"
38792    arguments="EOL"
38793    new_path="$path"
38794
38795  windows_path="$new_path"
38796  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38797    unix_path=`$CYGPATH -u "$windows_path"`
38798    new_path="$unix_path"
38799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38800    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38801    new_path="$unix_path"
38802  fi
38803
38804
38805    new_path=`$WHICH "$new_path" 2> /dev/null`
38806    # bat and cmd files are not always considered executable in MSYS causing which
38807    # to not find them
38808    if test "x$new_path" = x \
38809        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38810        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38811      new_path="$path"
38812
38813  windows_path="$new_path"
38814  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38815    unix_path=`$CYGPATH -u "$windows_path"`
38816    new_path="$unix_path"
38817  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38818    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38819    new_path="$unix_path"
38820  fi
38821
38822    fi
38823
38824    if test "x$new_path" = x; then
38825      # It's still not found. Now this is an unrecoverable error.
38826      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38827$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38828      has_space=`$ECHO "$complete" | $GREP " "`
38829      if test "x$has_space" != x; then
38830        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38831$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38832      fi
38833      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38834    fi
38835  fi
38836
38837  # Now new_path has a complete unix path to the binary
38838  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38839    # Keep paths in /bin as-is, but remove trailing .exe if any
38840    new_path="${new_path/%.exe/}"
38841    # Do not save /bin paths to all_fixpath_prefixes!
38842  else
38843    # Not in mixed or Windows style, start by that.
38844    new_path=`cmd //c echo $new_path`
38845
38846  input_path="$new_path"
38847  # Check if we need to convert this using DOS-style short mode. If the path
38848  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38849  # take no chances and rewrite it.
38850  # Note: m4 eats our [], so we need to use [ and ] instead.
38851  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38852  if test "x$has_forbidden_chars" != x; then
38853    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38854    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38855  fi
38856
38857    # Output is in $new_path
38858
38859  windows_path="$new_path"
38860  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38861    unix_path=`$CYGPATH -u "$windows_path"`
38862    new_path="$unix_path"
38863  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38864    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38865    new_path="$unix_path"
38866  fi
38867
38868    # remove trailing .exe if any
38869    new_path="${new_path/%.exe/}"
38870
38871    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38872    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38873  fi
38874
38875  else
38876    # We're on a posix platform. Hooray! :)
38877    # First separate the path from the arguments. This will split at the first
38878    # space.
38879    complete="$OBJCOPY"
38880    path="${complete%% *}"
38881    tmp="$complete EOL"
38882    arguments="${tmp#* }"
38883
38884    # Cannot rely on the command "which" here since it doesn't always work.
38885    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38886    if test -z "$is_absolute_path"; then
38887      # Path to executable is not absolute. Find it.
38888      IFS_save="$IFS"
38889      IFS=:
38890      for p in $PATH; do
38891        if test -f "$p/$path" && test -x "$p/$path"; then
38892          new_path="$p/$path"
38893          break
38894        fi
38895      done
38896      IFS="$IFS_save"
38897    else
38898      # This is an absolute path, we can use it without further modifications.
38899      new_path="$path"
38900    fi
38901
38902    if test "x$new_path" = x; then
38903      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38904$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38905      has_space=`$ECHO "$complete" | $GREP " "`
38906      if test "x$has_space" != x; then
38907        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38908$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38909      fi
38910      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38911    fi
38912  fi
38913
38914  # Now join together the path and the arguments once again
38915  if test "x$arguments" != xEOL; then
38916    new_complete="$new_path ${arguments% *}"
38917  else
38918    new_complete="$new_path"
38919  fi
38920
38921  if test "x$complete" != "x$new_complete"; then
38922    OBJCOPY="$new_complete"
38923    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38924$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38925  fi
38926
38927    fi
38928  fi
38929
38930
38931
38932  # Publish this variable in the help.
38933
38934
38935  if test "x$OBJDUMP" = x; then
38936    # The variable is not set by user, try to locate tool using the code snippet
38937    if test -n "$ac_tool_prefix"; then
38938  for ac_prog in gobjdump objdump
38939  do
38940    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38941set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38943$as_echo_n "checking for $ac_word... " >&6; }
38944if ${ac_cv_prog_OBJDUMP+:} false; then :
38945  $as_echo_n "(cached) " >&6
38946else
38947  if test -n "$OBJDUMP"; then
38948  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38949else
38950as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38951for as_dir in $PATH
38952do
38953  IFS=$as_save_IFS
38954  test -z "$as_dir" && as_dir=.
38955    for ac_exec_ext in '' $ac_executable_extensions; do
38956  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38957    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38958    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38959    break 2
38960  fi
38961done
38962  done
38963IFS=$as_save_IFS
38964
38965fi
38966fi
38967OBJDUMP=$ac_cv_prog_OBJDUMP
38968if test -n "$OBJDUMP"; then
38969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38970$as_echo "$OBJDUMP" >&6; }
38971else
38972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38973$as_echo "no" >&6; }
38974fi
38975
38976
38977    test -n "$OBJDUMP" && break
38978  done
38979fi
38980if test -z "$OBJDUMP"; then
38981  ac_ct_OBJDUMP=$OBJDUMP
38982  for ac_prog in gobjdump objdump
38983do
38984  # Extract the first word of "$ac_prog", so it can be a program name with args.
38985set dummy $ac_prog; ac_word=$2
38986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38987$as_echo_n "checking for $ac_word... " >&6; }
38988if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38989  $as_echo_n "(cached) " >&6
38990else
38991  if test -n "$ac_ct_OBJDUMP"; then
38992  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38993else
38994as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38995for as_dir in $PATH
38996do
38997  IFS=$as_save_IFS
38998  test -z "$as_dir" && as_dir=.
38999    for ac_exec_ext in '' $ac_executable_extensions; do
39000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39001    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
39002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39003    break 2
39004  fi
39005done
39006  done
39007IFS=$as_save_IFS
39008
39009fi
39010fi
39011ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
39012if test -n "$ac_ct_OBJDUMP"; then
39013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
39014$as_echo "$ac_ct_OBJDUMP" >&6; }
39015else
39016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39017$as_echo "no" >&6; }
39018fi
39019
39020
39021  test -n "$ac_ct_OBJDUMP" && break
39022done
39023
39024  if test "x$ac_ct_OBJDUMP" = x; then
39025    OBJDUMP=""
39026  else
39027    case $cross_compiling:$ac_tool_warned in
39028yes:)
39029{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39030$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39031ac_tool_warned=yes ;;
39032esac
39033    OBJDUMP=$ac_ct_OBJDUMP
39034  fi
39035fi
39036
39037  else
39038    # The variable is set, but is it from the command line or the environment?
39039
39040    # Try to remove the string !OBJDUMP! from our list.
39041    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
39042    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39043      # If it failed, the variable was not from the command line. Ignore it,
39044      # but warn the user (except for BASH, which is always set by the calling BASH).
39045      if test "xOBJDUMP" != xBASH; then
39046        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
39047$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
39048      fi
39049      # Try to locate tool using the code snippet
39050      if test -n "$ac_tool_prefix"; then
39051  for ac_prog in gobjdump objdump
39052  do
39053    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39054set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39056$as_echo_n "checking for $ac_word... " >&6; }
39057if ${ac_cv_prog_OBJDUMP+:} false; then :
39058  $as_echo_n "(cached) " >&6
39059else
39060  if test -n "$OBJDUMP"; then
39061  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
39062else
39063as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39064for as_dir in $PATH
39065do
39066  IFS=$as_save_IFS
39067  test -z "$as_dir" && as_dir=.
39068    for ac_exec_ext in '' $ac_executable_extensions; do
39069  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39070    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
39071    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39072    break 2
39073  fi
39074done
39075  done
39076IFS=$as_save_IFS
39077
39078fi
39079fi
39080OBJDUMP=$ac_cv_prog_OBJDUMP
39081if test -n "$OBJDUMP"; then
39082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
39083$as_echo "$OBJDUMP" >&6; }
39084else
39085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39086$as_echo "no" >&6; }
39087fi
39088
39089
39090    test -n "$OBJDUMP" && break
39091  done
39092fi
39093if test -z "$OBJDUMP"; then
39094  ac_ct_OBJDUMP=$OBJDUMP
39095  for ac_prog in gobjdump objdump
39096do
39097  # Extract the first word of "$ac_prog", so it can be a program name with args.
39098set dummy $ac_prog; ac_word=$2
39099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39100$as_echo_n "checking for $ac_word... " >&6; }
39101if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
39102  $as_echo_n "(cached) " >&6
39103else
39104  if test -n "$ac_ct_OBJDUMP"; then
39105  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
39106else
39107as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39108for as_dir in $PATH
39109do
39110  IFS=$as_save_IFS
39111  test -z "$as_dir" && as_dir=.
39112    for ac_exec_ext in '' $ac_executable_extensions; do
39113  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39114    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
39115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39116    break 2
39117  fi
39118done
39119  done
39120IFS=$as_save_IFS
39121
39122fi
39123fi
39124ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
39125if test -n "$ac_ct_OBJDUMP"; then
39126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
39127$as_echo "$ac_ct_OBJDUMP" >&6; }
39128else
39129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39130$as_echo "no" >&6; }
39131fi
39132
39133
39134  test -n "$ac_ct_OBJDUMP" && break
39135done
39136
39137  if test "x$ac_ct_OBJDUMP" = x; then
39138    OBJDUMP=""
39139  else
39140    case $cross_compiling:$ac_tool_warned in
39141yes:)
39142{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39143$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39144ac_tool_warned=yes ;;
39145esac
39146    OBJDUMP=$ac_ct_OBJDUMP
39147  fi
39148fi
39149
39150    else
39151      # If it succeeded, then it was overridden by the user. We will use it
39152      # for the tool.
39153
39154      # First remove it from the list of overridden variables, so we can test
39155      # for unknown variables in the end.
39156      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39157
39158      # Check if the provided tool contains a complete path.
39159      tool_specified="$OBJDUMP"
39160      tool_basename="${tool_specified##*/}"
39161      if test "x$tool_basename" = "x$tool_specified"; then
39162        # A command without a complete path is provided, search $PATH.
39163        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
39164$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
39165        # Extract the first word of "$tool_basename", so it can be a program name with args.
39166set dummy $tool_basename; ac_word=$2
39167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39168$as_echo_n "checking for $ac_word... " >&6; }
39169if ${ac_cv_path_OBJDUMP+:} false; then :
39170  $as_echo_n "(cached) " >&6
39171else
39172  case $OBJDUMP in
39173  [\\/]* | ?:[\\/]*)
39174  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
39175  ;;
39176  *)
39177  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39178for as_dir in $PATH
39179do
39180  IFS=$as_save_IFS
39181  test -z "$as_dir" && as_dir=.
39182    for ac_exec_ext in '' $ac_executable_extensions; do
39183  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39184    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
39185    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39186    break 2
39187  fi
39188done
39189  done
39190IFS=$as_save_IFS
39191
39192  ;;
39193esac
39194fi
39195OBJDUMP=$ac_cv_path_OBJDUMP
39196if test -n "$OBJDUMP"; then
39197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
39198$as_echo "$OBJDUMP" >&6; }
39199else
39200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39201$as_echo "no" >&6; }
39202fi
39203
39204
39205        if test "x$OBJDUMP" = x; then
39206          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39207        fi
39208      else
39209        # Otherwise we believe it is a complete path. Use it as it is.
39210        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
39211$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
39212        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
39213$as_echo_n "checking for OBJDUMP... " >&6; }
39214        if test ! -x "$tool_specified"; then
39215          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39216$as_echo "not found" >&6; }
39217          as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
39218        fi
39219        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39220$as_echo "$tool_specified" >&6; }
39221      fi
39222    fi
39223  fi
39224
39225
39226  if test "x$OBJDUMP" != x; then
39227    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
39228    # bails if argument is missing.
39229
39230  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39231
39232  # First separate the path from the arguments. This will split at the first
39233  # space.
39234  complete="$OBJDUMP"
39235  path="${complete%% *}"
39236  tmp="$complete EOL"
39237  arguments="${tmp#* }"
39238
39239  # Input might be given as Windows format, start by converting to
39240  # unix format.
39241  new_path=`$CYGPATH -u "$path"`
39242
39243  # Now try to locate executable using which
39244  new_path=`$WHICH "$new_path" 2> /dev/null`
39245  # bat and cmd files are not always considered executable in cygwin causing which
39246  # to not find them
39247  if test "x$new_path" = x \
39248      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39249      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39250    new_path=`$CYGPATH -u "$path"`
39251  fi
39252  if test "x$new_path" = x; then
39253    # Oops. Which didn't find the executable.
39254    # The splitting of arguments from the executable at a space might have been incorrect,
39255    # since paths with space are more likely in Windows. Give it another try with the whole
39256    # argument.
39257    path="$complete"
39258    arguments="EOL"
39259    new_path=`$CYGPATH -u "$path"`
39260    new_path=`$WHICH "$new_path" 2> /dev/null`
39261    # bat and cmd files are not always considered executable in cygwin causing which
39262    # to not find them
39263    if test "x$new_path" = x \
39264        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39265        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39266      new_path=`$CYGPATH -u "$path"`
39267    fi
39268    if test "x$new_path" = x; then
39269      # It's still not found. Now this is an unrecoverable error.
39270      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39271$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39272      has_space=`$ECHO "$complete" | $GREP " "`
39273      if test "x$has_space" != x; then
39274        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39275$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39276      fi
39277      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39278    fi
39279  fi
39280
39281  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39282  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39283  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39284  # "foo.exe" is OK but "foo" is an error.
39285  #
39286  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39287  # It is also a way to make sure we got the proper file name for the real test later on.
39288  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39289  if test "x$test_shortpath" = x; then
39290    # Short path failed, file does not exist as specified.
39291    # Try adding .exe or .cmd
39292    if test -f "${new_path}.exe"; then
39293      input_to_shortpath="${new_path}.exe"
39294    elif test -f "${new_path}.cmd"; then
39295      input_to_shortpath="${new_path}.cmd"
39296    else
39297      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
39298$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
39299      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39300$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39301      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39302    fi
39303  else
39304    input_to_shortpath="$new_path"
39305  fi
39306
39307  # Call helper function which possibly converts this using DOS-style short mode.
39308  # If so, the updated path is stored in $new_path.
39309  new_path="$input_to_shortpath"
39310
39311  input_path="$input_to_shortpath"
39312  # Check if we need to convert this using DOS-style short mode. If the path
39313  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39314  # take no chances and rewrite it.
39315  # Note: m4 eats our [], so we need to use [ and ] instead.
39316  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39317  if test "x$has_forbidden_chars" != x; then
39318    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39319    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39320    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39321    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39322      # Going to short mode and back again did indeed matter. Since short mode is
39323      # case insensitive, let's make it lowercase to improve readability.
39324      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39325      # Now convert it back to Unix-stile (cygpath)
39326      input_path=`$CYGPATH -u "$shortmode_path"`
39327      new_path="$input_path"
39328    fi
39329  fi
39330
39331  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39332  if test "x$test_cygdrive_prefix" = x; then
39333    # As a simple fix, exclude /usr/bin since it's not a real path.
39334    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39335      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39336      # a path prefixed by /cygdrive for fixpath to work.
39337      new_path="$CYGWIN_ROOT_PATH$input_path"
39338    fi
39339  fi
39340
39341  # remove trailing .exe if any
39342  new_path="${new_path/%.exe/}"
39343
39344  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39345
39346  # First separate the path from the arguments. This will split at the first
39347  # space.
39348  complete="$OBJDUMP"
39349  path="${complete%% *}"
39350  tmp="$complete EOL"
39351  arguments="${tmp#* }"
39352
39353  # Input might be given as Windows format, start by converting to
39354  # unix format.
39355  new_path="$path"
39356
39357  windows_path="$new_path"
39358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39359    unix_path=`$CYGPATH -u "$windows_path"`
39360    new_path="$unix_path"
39361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39362    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39363    new_path="$unix_path"
39364  fi
39365
39366
39367  # Now try to locate executable using which
39368  new_path=`$WHICH "$new_path" 2> /dev/null`
39369
39370  if test "x$new_path" = x; then
39371    # Oops. Which didn't find the executable.
39372    # The splitting of arguments from the executable at a space might have been incorrect,
39373    # since paths with space are more likely in Windows. Give it another try with the whole
39374    # argument.
39375    path="$complete"
39376    arguments="EOL"
39377    new_path="$path"
39378
39379  windows_path="$new_path"
39380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39381    unix_path=`$CYGPATH -u "$windows_path"`
39382    new_path="$unix_path"
39383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39384    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39385    new_path="$unix_path"
39386  fi
39387
39388
39389    new_path=`$WHICH "$new_path" 2> /dev/null`
39390    # bat and cmd files are not always considered executable in MSYS causing which
39391    # to not find them
39392    if test "x$new_path" = x \
39393        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39394        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39395      new_path="$path"
39396
39397  windows_path="$new_path"
39398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39399    unix_path=`$CYGPATH -u "$windows_path"`
39400    new_path="$unix_path"
39401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39402    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39403    new_path="$unix_path"
39404  fi
39405
39406    fi
39407
39408    if test "x$new_path" = x; then
39409      # It's still not found. Now this is an unrecoverable error.
39410      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39411$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39412      has_space=`$ECHO "$complete" | $GREP " "`
39413      if test "x$has_space" != x; then
39414        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39415$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39416      fi
39417      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39418    fi
39419  fi
39420
39421  # Now new_path has a complete unix path to the binary
39422  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39423    # Keep paths in /bin as-is, but remove trailing .exe if any
39424    new_path="${new_path/%.exe/}"
39425    # Do not save /bin paths to all_fixpath_prefixes!
39426  else
39427    # Not in mixed or Windows style, start by that.
39428    new_path=`cmd //c echo $new_path`
39429
39430  input_path="$new_path"
39431  # Check if we need to convert this using DOS-style short mode. If the path
39432  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39433  # take no chances and rewrite it.
39434  # Note: m4 eats our [], so we need to use [ and ] instead.
39435  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39436  if test "x$has_forbidden_chars" != x; then
39437    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39438    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39439  fi
39440
39441    # Output is in $new_path
39442
39443  windows_path="$new_path"
39444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39445    unix_path=`$CYGPATH -u "$windows_path"`
39446    new_path="$unix_path"
39447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39448    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39449    new_path="$unix_path"
39450  fi
39451
39452    # remove trailing .exe if any
39453    new_path="${new_path/%.exe/}"
39454
39455    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39456    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39457  fi
39458
39459  else
39460    # We're on a posix platform. Hooray! :)
39461    # First separate the path from the arguments. This will split at the first
39462    # space.
39463    complete="$OBJDUMP"
39464    path="${complete%% *}"
39465    tmp="$complete EOL"
39466    arguments="${tmp#* }"
39467
39468    # Cannot rely on the command "which" here since it doesn't always work.
39469    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39470    if test -z "$is_absolute_path"; then
39471      # Path to executable is not absolute. Find it.
39472      IFS_save="$IFS"
39473      IFS=:
39474      for p in $PATH; do
39475        if test -f "$p/$path" && test -x "$p/$path"; then
39476          new_path="$p/$path"
39477          break
39478        fi
39479      done
39480      IFS="$IFS_save"
39481    else
39482      # This is an absolute path, we can use it without further modifications.
39483      new_path="$path"
39484    fi
39485
39486    if test "x$new_path" = x; then
39487      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39488$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39489      has_space=`$ECHO "$complete" | $GREP " "`
39490      if test "x$has_space" != x; then
39491        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39492$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39493      fi
39494      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39495    fi
39496  fi
39497
39498  # Now join together the path and the arguments once again
39499  if test "x$arguments" != xEOL; then
39500    new_complete="$new_path ${arguments% *}"
39501  else
39502    new_complete="$new_path"
39503  fi
39504
39505  if test "x$complete" != "x$new_complete"; then
39506    OBJDUMP="$new_complete"
39507    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
39508$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
39509  fi
39510
39511  fi
39512
39513
39514  # Restore old path.
39515  PATH="$OLD_PATH"
39516
39517  # Restore the flags to the user specified values.
39518  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
39519  CFLAGS="$ORG_CFLAGS"
39520  CXXFLAGS="$ORG_CXXFLAGS"
39521  OBJCFLAGS="$ORG_OBJCFLAGS"
39522
39523
39524# Finally do some processing after the detection phase
39525
39526  if test "x$COMPILE_TYPE" = "xcross"; then
39527    # Now we need to find a C/C++ compiler that can build executables for the
39528    # build platform. We can't use the AC_PROG_CC macro, since it can only be
39529    # used once. Also, we need to do this without adding a tools dir to the
39530    # path, otherwise we might pick up cross-compilers which don't use standard
39531    # naming.
39532
39533    # FIXME: we should list the discovered compilers as an exclude pattern!
39534    # If we do that, we can do this detection before POST_DETECTION, and still
39535    # find the build compilers in the tools dir, if needed.
39536
39537
39538  # Publish this variable in the help.
39539
39540
39541  if test "x$BUILD_CC" = x; then
39542    # The variable is not set by user, try to locate tool using the code snippet
39543    for ac_prog in cl cc gcc
39544do
39545  # Extract the first word of "$ac_prog", so it can be a program name with args.
39546set dummy $ac_prog; ac_word=$2
39547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39548$as_echo_n "checking for $ac_word... " >&6; }
39549if ${ac_cv_path_BUILD_CC+:} false; then :
39550  $as_echo_n "(cached) " >&6
39551else
39552  case $BUILD_CC in
39553  [\\/]* | ?:[\\/]*)
39554  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39555  ;;
39556  *)
39557  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39558for as_dir in $PATH
39559do
39560  IFS=$as_save_IFS
39561  test -z "$as_dir" && as_dir=.
39562    for ac_exec_ext in '' $ac_executable_extensions; do
39563  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39564    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39565    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39566    break 2
39567  fi
39568done
39569  done
39570IFS=$as_save_IFS
39571
39572  ;;
39573esac
39574fi
39575BUILD_CC=$ac_cv_path_BUILD_CC
39576if test -n "$BUILD_CC"; then
39577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39578$as_echo "$BUILD_CC" >&6; }
39579else
39580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39581$as_echo "no" >&6; }
39582fi
39583
39584
39585  test -n "$BUILD_CC" && break
39586done
39587
39588  else
39589    # The variable is set, but is it from the command line or the environment?
39590
39591    # Try to remove the string !BUILD_CC! from our list.
39592    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
39593    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39594      # If it failed, the variable was not from the command line. Ignore it,
39595      # but warn the user (except for BASH, which is always set by the calling BASH).
39596      if test "xBUILD_CC" != xBASH; then
39597        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
39598$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
39599      fi
39600      # Try to locate tool using the code snippet
39601      for ac_prog in cl cc gcc
39602do
39603  # Extract the first word of "$ac_prog", so it can be a program name with args.
39604set dummy $ac_prog; ac_word=$2
39605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39606$as_echo_n "checking for $ac_word... " >&6; }
39607if ${ac_cv_path_BUILD_CC+:} false; then :
39608  $as_echo_n "(cached) " >&6
39609else
39610  case $BUILD_CC in
39611  [\\/]* | ?:[\\/]*)
39612  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39613  ;;
39614  *)
39615  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39616for as_dir in $PATH
39617do
39618  IFS=$as_save_IFS
39619  test -z "$as_dir" && as_dir=.
39620    for ac_exec_ext in '' $ac_executable_extensions; do
39621  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39622    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39623    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39624    break 2
39625  fi
39626done
39627  done
39628IFS=$as_save_IFS
39629
39630  ;;
39631esac
39632fi
39633BUILD_CC=$ac_cv_path_BUILD_CC
39634if test -n "$BUILD_CC"; then
39635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39636$as_echo "$BUILD_CC" >&6; }
39637else
39638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39639$as_echo "no" >&6; }
39640fi
39641
39642
39643  test -n "$BUILD_CC" && break
39644done
39645
39646    else
39647      # If it succeeded, then it was overridden by the user. We will use it
39648      # for the tool.
39649
39650      # First remove it from the list of overridden variables, so we can test
39651      # for unknown variables in the end.
39652      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39653
39654      # Check if the provided tool contains a complete path.
39655      tool_specified="$BUILD_CC"
39656      tool_basename="${tool_specified##*/}"
39657      if test "x$tool_basename" = "x$tool_specified"; then
39658        # A command without a complete path is provided, search $PATH.
39659        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
39660$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
39661        # Extract the first word of "$tool_basename", so it can be a program name with args.
39662set dummy $tool_basename; ac_word=$2
39663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39664$as_echo_n "checking for $ac_word... " >&6; }
39665if ${ac_cv_path_BUILD_CC+:} false; then :
39666  $as_echo_n "(cached) " >&6
39667else
39668  case $BUILD_CC in
39669  [\\/]* | ?:[\\/]*)
39670  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39671  ;;
39672  *)
39673  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39674for as_dir in $PATH
39675do
39676  IFS=$as_save_IFS
39677  test -z "$as_dir" && as_dir=.
39678    for ac_exec_ext in '' $ac_executable_extensions; do
39679  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39680    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39681    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39682    break 2
39683  fi
39684done
39685  done
39686IFS=$as_save_IFS
39687
39688  ;;
39689esac
39690fi
39691BUILD_CC=$ac_cv_path_BUILD_CC
39692if test -n "$BUILD_CC"; then
39693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39694$as_echo "$BUILD_CC" >&6; }
39695else
39696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39697$as_echo "no" >&6; }
39698fi
39699
39700
39701        if test "x$BUILD_CC" = x; then
39702          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39703        fi
39704      else
39705        # Otherwise we believe it is a complete path. Use it as it is.
39706        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
39707$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
39708        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
39709$as_echo_n "checking for BUILD_CC... " >&6; }
39710        if test ! -x "$tool_specified"; then
39711          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39712$as_echo "not found" >&6; }
39713          as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
39714        fi
39715        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39716$as_echo "$tool_specified" >&6; }
39717      fi
39718    fi
39719  fi
39720
39721
39722
39723  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39724
39725  # First separate the path from the arguments. This will split at the first
39726  # space.
39727  complete="$BUILD_CC"
39728  path="${complete%% *}"
39729  tmp="$complete EOL"
39730  arguments="${tmp#* }"
39731
39732  # Input might be given as Windows format, start by converting to
39733  # unix format.
39734  new_path=`$CYGPATH -u "$path"`
39735
39736  # Now try to locate executable using which
39737  new_path=`$WHICH "$new_path" 2> /dev/null`
39738  # bat and cmd files are not always considered executable in cygwin causing which
39739  # to not find them
39740  if test "x$new_path" = x \
39741      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39742      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39743    new_path=`$CYGPATH -u "$path"`
39744  fi
39745  if test "x$new_path" = x; then
39746    # Oops. Which didn't find the executable.
39747    # The splitting of arguments from the executable at a space might have been incorrect,
39748    # since paths with space are more likely in Windows. Give it another try with the whole
39749    # argument.
39750    path="$complete"
39751    arguments="EOL"
39752    new_path=`$CYGPATH -u "$path"`
39753    new_path=`$WHICH "$new_path" 2> /dev/null`
39754    # bat and cmd files are not always considered executable in cygwin causing which
39755    # to not find them
39756    if test "x$new_path" = x \
39757        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39758        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39759      new_path=`$CYGPATH -u "$path"`
39760    fi
39761    if test "x$new_path" = x; then
39762      # It's still not found. Now this is an unrecoverable error.
39763      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39764$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39765      has_space=`$ECHO "$complete" | $GREP " "`
39766      if test "x$has_space" != x; then
39767        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39768$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39769      fi
39770      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39771    fi
39772  fi
39773
39774  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39775  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39776  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39777  # "foo.exe" is OK but "foo" is an error.
39778  #
39779  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39780  # It is also a way to make sure we got the proper file name for the real test later on.
39781  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39782  if test "x$test_shortpath" = x; then
39783    # Short path failed, file does not exist as specified.
39784    # Try adding .exe or .cmd
39785    if test -f "${new_path}.exe"; then
39786      input_to_shortpath="${new_path}.exe"
39787    elif test -f "${new_path}.cmd"; then
39788      input_to_shortpath="${new_path}.cmd"
39789    else
39790      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
39791$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
39792      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39793$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39794      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39795    fi
39796  else
39797    input_to_shortpath="$new_path"
39798  fi
39799
39800  # Call helper function which possibly converts this using DOS-style short mode.
39801  # If so, the updated path is stored in $new_path.
39802  new_path="$input_to_shortpath"
39803
39804  input_path="$input_to_shortpath"
39805  # Check if we need to convert this using DOS-style short mode. If the path
39806  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39807  # take no chances and rewrite it.
39808  # Note: m4 eats our [], so we need to use [ and ] instead.
39809  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39810  if test "x$has_forbidden_chars" != x; then
39811    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39812    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39813    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39814    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39815      # Going to short mode and back again did indeed matter. Since short mode is
39816      # case insensitive, let's make it lowercase to improve readability.
39817      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39818      # Now convert it back to Unix-stile (cygpath)
39819      input_path=`$CYGPATH -u "$shortmode_path"`
39820      new_path="$input_path"
39821    fi
39822  fi
39823
39824  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39825  if test "x$test_cygdrive_prefix" = x; then
39826    # As a simple fix, exclude /usr/bin since it's not a real path.
39827    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39828      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39829      # a path prefixed by /cygdrive for fixpath to work.
39830      new_path="$CYGWIN_ROOT_PATH$input_path"
39831    fi
39832  fi
39833
39834  # remove trailing .exe if any
39835  new_path="${new_path/%.exe/}"
39836
39837  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39838
39839  # First separate the path from the arguments. This will split at the first
39840  # space.
39841  complete="$BUILD_CC"
39842  path="${complete%% *}"
39843  tmp="$complete EOL"
39844  arguments="${tmp#* }"
39845
39846  # Input might be given as Windows format, start by converting to
39847  # unix format.
39848  new_path="$path"
39849
39850  windows_path="$new_path"
39851  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39852    unix_path=`$CYGPATH -u "$windows_path"`
39853    new_path="$unix_path"
39854  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39855    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39856    new_path="$unix_path"
39857  fi
39858
39859
39860  # Now try to locate executable using which
39861  new_path=`$WHICH "$new_path" 2> /dev/null`
39862
39863  if test "x$new_path" = x; then
39864    # Oops. Which didn't find the executable.
39865    # The splitting of arguments from the executable at a space might have been incorrect,
39866    # since paths with space are more likely in Windows. Give it another try with the whole
39867    # argument.
39868    path="$complete"
39869    arguments="EOL"
39870    new_path="$path"
39871
39872  windows_path="$new_path"
39873  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39874    unix_path=`$CYGPATH -u "$windows_path"`
39875    new_path="$unix_path"
39876  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39877    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39878    new_path="$unix_path"
39879  fi
39880
39881
39882    new_path=`$WHICH "$new_path" 2> /dev/null`
39883    # bat and cmd files are not always considered executable in MSYS causing which
39884    # to not find them
39885    if test "x$new_path" = x \
39886        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39887        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39888      new_path="$path"
39889
39890  windows_path="$new_path"
39891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39892    unix_path=`$CYGPATH -u "$windows_path"`
39893    new_path="$unix_path"
39894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39895    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39896    new_path="$unix_path"
39897  fi
39898
39899    fi
39900
39901    if test "x$new_path" = x; then
39902      # It's still not found. Now this is an unrecoverable error.
39903      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39904$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39905      has_space=`$ECHO "$complete" | $GREP " "`
39906      if test "x$has_space" != x; then
39907        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39908$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39909      fi
39910      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39911    fi
39912  fi
39913
39914  # Now new_path has a complete unix path to the binary
39915  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39916    # Keep paths in /bin as-is, but remove trailing .exe if any
39917    new_path="${new_path/%.exe/}"
39918    # Do not save /bin paths to all_fixpath_prefixes!
39919  else
39920    # Not in mixed or Windows style, start by that.
39921    new_path=`cmd //c echo $new_path`
39922
39923  input_path="$new_path"
39924  # Check if we need to convert this using DOS-style short mode. If the path
39925  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39926  # take no chances and rewrite it.
39927  # Note: m4 eats our [], so we need to use [ and ] instead.
39928  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39929  if test "x$has_forbidden_chars" != x; then
39930    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39931    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39932  fi
39933
39934    # Output is in $new_path
39935
39936  windows_path="$new_path"
39937  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39938    unix_path=`$CYGPATH -u "$windows_path"`
39939    new_path="$unix_path"
39940  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39941    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39942    new_path="$unix_path"
39943  fi
39944
39945    # remove trailing .exe if any
39946    new_path="${new_path/%.exe/}"
39947
39948    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39949    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39950  fi
39951
39952  else
39953    # We're on a posix platform. Hooray! :)
39954    # First separate the path from the arguments. This will split at the first
39955    # space.
39956    complete="$BUILD_CC"
39957    path="${complete%% *}"
39958    tmp="$complete EOL"
39959    arguments="${tmp#* }"
39960
39961    # Cannot rely on the command "which" here since it doesn't always work.
39962    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39963    if test -z "$is_absolute_path"; then
39964      # Path to executable is not absolute. Find it.
39965      IFS_save="$IFS"
39966      IFS=:
39967      for p in $PATH; do
39968        if test -f "$p/$path" && test -x "$p/$path"; then
39969          new_path="$p/$path"
39970          break
39971        fi
39972      done
39973      IFS="$IFS_save"
39974    else
39975      # This is an absolute path, we can use it without further modifications.
39976      new_path="$path"
39977    fi
39978
39979    if test "x$new_path" = x; then
39980      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39981$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39982      has_space=`$ECHO "$complete" | $GREP " "`
39983      if test "x$has_space" != x; then
39984        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39985$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39986      fi
39987      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39988    fi
39989  fi
39990
39991  # Now join together the path and the arguments once again
39992  if test "x$arguments" != xEOL; then
39993    new_complete="$new_path ${arguments% *}"
39994  else
39995    new_complete="$new_path"
39996  fi
39997
39998  if test "x$complete" != "x$new_complete"; then
39999    BUILD_CC="$new_complete"
40000    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
40001$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
40002  fi
40003
40004
40005
40006  # Publish this variable in the help.
40007
40008
40009  if test "x$BUILD_CXX" = x; then
40010    # The variable is not set by user, try to locate tool using the code snippet
40011    for ac_prog in cl CC g++
40012do
40013  # Extract the first word of "$ac_prog", so it can be a program name with args.
40014set dummy $ac_prog; ac_word=$2
40015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40016$as_echo_n "checking for $ac_word... " >&6; }
40017if ${ac_cv_path_BUILD_CXX+:} false; then :
40018  $as_echo_n "(cached) " >&6
40019else
40020  case $BUILD_CXX in
40021  [\\/]* | ?:[\\/]*)
40022  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
40023  ;;
40024  *)
40025  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40026for as_dir in $PATH
40027do
40028  IFS=$as_save_IFS
40029  test -z "$as_dir" && as_dir=.
40030    for ac_exec_ext in '' $ac_executable_extensions; do
40031  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40032    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
40033    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40034    break 2
40035  fi
40036done
40037  done
40038IFS=$as_save_IFS
40039
40040  ;;
40041esac
40042fi
40043BUILD_CXX=$ac_cv_path_BUILD_CXX
40044if test -n "$BUILD_CXX"; then
40045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
40046$as_echo "$BUILD_CXX" >&6; }
40047else
40048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40049$as_echo "no" >&6; }
40050fi
40051
40052
40053  test -n "$BUILD_CXX" && break
40054done
40055
40056  else
40057    # The variable is set, but is it from the command line or the environment?
40058
40059    # Try to remove the string !BUILD_CXX! from our list.
40060    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
40061    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40062      # If it failed, the variable was not from the command line. Ignore it,
40063      # but warn the user (except for BASH, which is always set by the calling BASH).
40064      if test "xBUILD_CXX" != xBASH; then
40065        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
40066$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
40067      fi
40068      # Try to locate tool using the code snippet
40069      for ac_prog in cl CC g++
40070do
40071  # Extract the first word of "$ac_prog", so it can be a program name with args.
40072set dummy $ac_prog; ac_word=$2
40073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40074$as_echo_n "checking for $ac_word... " >&6; }
40075if ${ac_cv_path_BUILD_CXX+:} false; then :
40076  $as_echo_n "(cached) " >&6
40077else
40078  case $BUILD_CXX in
40079  [\\/]* | ?:[\\/]*)
40080  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
40081  ;;
40082  *)
40083  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40084for as_dir in $PATH
40085do
40086  IFS=$as_save_IFS
40087  test -z "$as_dir" && as_dir=.
40088    for ac_exec_ext in '' $ac_executable_extensions; do
40089  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40090    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
40091    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40092    break 2
40093  fi
40094done
40095  done
40096IFS=$as_save_IFS
40097
40098  ;;
40099esac
40100fi
40101BUILD_CXX=$ac_cv_path_BUILD_CXX
40102if test -n "$BUILD_CXX"; then
40103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
40104$as_echo "$BUILD_CXX" >&6; }
40105else
40106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40107$as_echo "no" >&6; }
40108fi
40109
40110
40111  test -n "$BUILD_CXX" && break
40112done
40113
40114    else
40115      # If it succeeded, then it was overridden by the user. We will use it
40116      # for the tool.
40117
40118      # First remove it from the list of overridden variables, so we can test
40119      # for unknown variables in the end.
40120      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40121
40122      # Check if the provided tool contains a complete path.
40123      tool_specified="$BUILD_CXX"
40124      tool_basename="${tool_specified##*/}"
40125      if test "x$tool_basename" = "x$tool_specified"; then
40126        # A command without a complete path is provided, search $PATH.
40127        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
40128$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
40129        # Extract the first word of "$tool_basename", so it can be a program name with args.
40130set dummy $tool_basename; ac_word=$2
40131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40132$as_echo_n "checking for $ac_word... " >&6; }
40133if ${ac_cv_path_BUILD_CXX+:} false; then :
40134  $as_echo_n "(cached) " >&6
40135else
40136  case $BUILD_CXX in
40137  [\\/]* | ?:[\\/]*)
40138  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
40139  ;;
40140  *)
40141  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40142for as_dir in $PATH
40143do
40144  IFS=$as_save_IFS
40145  test -z "$as_dir" && as_dir=.
40146    for ac_exec_ext in '' $ac_executable_extensions; do
40147  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40148    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
40149    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40150    break 2
40151  fi
40152done
40153  done
40154IFS=$as_save_IFS
40155
40156  ;;
40157esac
40158fi
40159BUILD_CXX=$ac_cv_path_BUILD_CXX
40160if test -n "$BUILD_CXX"; then
40161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
40162$as_echo "$BUILD_CXX" >&6; }
40163else
40164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40165$as_echo "no" >&6; }
40166fi
40167
40168
40169        if test "x$BUILD_CXX" = x; then
40170          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40171        fi
40172      else
40173        # Otherwise we believe it is a complete path. Use it as it is.
40174        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
40175$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
40176        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
40177$as_echo_n "checking for BUILD_CXX... " >&6; }
40178        if test ! -x "$tool_specified"; then
40179          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40180$as_echo "not found" >&6; }
40181          as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
40182        fi
40183        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40184$as_echo "$tool_specified" >&6; }
40185      fi
40186    fi
40187  fi
40188
40189
40190
40191  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40192
40193  # First separate the path from the arguments. This will split at the first
40194  # space.
40195  complete="$BUILD_CXX"
40196  path="${complete%% *}"
40197  tmp="$complete EOL"
40198  arguments="${tmp#* }"
40199
40200  # Input might be given as Windows format, start by converting to
40201  # unix format.
40202  new_path=`$CYGPATH -u "$path"`
40203
40204  # Now try to locate executable using which
40205  new_path=`$WHICH "$new_path" 2> /dev/null`
40206  # bat and cmd files are not always considered executable in cygwin causing which
40207  # to not find them
40208  if test "x$new_path" = x \
40209      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40210      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40211    new_path=`$CYGPATH -u "$path"`
40212  fi
40213  if test "x$new_path" = x; then
40214    # Oops. Which didn't find the executable.
40215    # The splitting of arguments from the executable at a space might have been incorrect,
40216    # since paths with space are more likely in Windows. Give it another try with the whole
40217    # argument.
40218    path="$complete"
40219    arguments="EOL"
40220    new_path=`$CYGPATH -u "$path"`
40221    new_path=`$WHICH "$new_path" 2> /dev/null`
40222    # bat and cmd files are not always considered executable in cygwin causing which
40223    # to not find them
40224    if test "x$new_path" = x \
40225        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40226        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40227      new_path=`$CYGPATH -u "$path"`
40228    fi
40229    if test "x$new_path" = x; then
40230      # It's still not found. Now this is an unrecoverable error.
40231      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40232$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40233      has_space=`$ECHO "$complete" | $GREP " "`
40234      if test "x$has_space" != x; then
40235        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40236$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40237      fi
40238      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40239    fi
40240  fi
40241
40242  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40243  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40244  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40245  # "foo.exe" is OK but "foo" is an error.
40246  #
40247  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40248  # It is also a way to make sure we got the proper file name for the real test later on.
40249  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40250  if test "x$test_shortpath" = x; then
40251    # Short path failed, file does not exist as specified.
40252    # Try adding .exe or .cmd
40253    if test -f "${new_path}.exe"; then
40254      input_to_shortpath="${new_path}.exe"
40255    elif test -f "${new_path}.cmd"; then
40256      input_to_shortpath="${new_path}.cmd"
40257    else
40258      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
40259$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
40260      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40261$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40262      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40263    fi
40264  else
40265    input_to_shortpath="$new_path"
40266  fi
40267
40268  # Call helper function which possibly converts this using DOS-style short mode.
40269  # If so, the updated path is stored in $new_path.
40270  new_path="$input_to_shortpath"
40271
40272  input_path="$input_to_shortpath"
40273  # Check if we need to convert this using DOS-style short mode. If the path
40274  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40275  # take no chances and rewrite it.
40276  # Note: m4 eats our [], so we need to use [ and ] instead.
40277  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40278  if test "x$has_forbidden_chars" != x; then
40279    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40280    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40281    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40282    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40283      # Going to short mode and back again did indeed matter. Since short mode is
40284      # case insensitive, let's make it lowercase to improve readability.
40285      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40286      # Now convert it back to Unix-stile (cygpath)
40287      input_path=`$CYGPATH -u "$shortmode_path"`
40288      new_path="$input_path"
40289    fi
40290  fi
40291
40292  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40293  if test "x$test_cygdrive_prefix" = x; then
40294    # As a simple fix, exclude /usr/bin since it's not a real path.
40295    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40296      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40297      # a path prefixed by /cygdrive for fixpath to work.
40298      new_path="$CYGWIN_ROOT_PATH$input_path"
40299    fi
40300  fi
40301
40302  # remove trailing .exe if any
40303  new_path="${new_path/%.exe/}"
40304
40305  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40306
40307  # First separate the path from the arguments. This will split at the first
40308  # space.
40309  complete="$BUILD_CXX"
40310  path="${complete%% *}"
40311  tmp="$complete EOL"
40312  arguments="${tmp#* }"
40313
40314  # Input might be given as Windows format, start by converting to
40315  # unix format.
40316  new_path="$path"
40317
40318  windows_path="$new_path"
40319  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40320    unix_path=`$CYGPATH -u "$windows_path"`
40321    new_path="$unix_path"
40322  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40323    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40324    new_path="$unix_path"
40325  fi
40326
40327
40328  # Now try to locate executable using which
40329  new_path=`$WHICH "$new_path" 2> /dev/null`
40330
40331  if test "x$new_path" = x; then
40332    # Oops. Which didn't find the executable.
40333    # The splitting of arguments from the executable at a space might have been incorrect,
40334    # since paths with space are more likely in Windows. Give it another try with the whole
40335    # argument.
40336    path="$complete"
40337    arguments="EOL"
40338    new_path="$path"
40339
40340  windows_path="$new_path"
40341  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40342    unix_path=`$CYGPATH -u "$windows_path"`
40343    new_path="$unix_path"
40344  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40345    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40346    new_path="$unix_path"
40347  fi
40348
40349
40350    new_path=`$WHICH "$new_path" 2> /dev/null`
40351    # bat and cmd files are not always considered executable in MSYS causing which
40352    # to not find them
40353    if test "x$new_path" = x \
40354        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40355        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40356      new_path="$path"
40357
40358  windows_path="$new_path"
40359  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40360    unix_path=`$CYGPATH -u "$windows_path"`
40361    new_path="$unix_path"
40362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40363    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40364    new_path="$unix_path"
40365  fi
40366
40367    fi
40368
40369    if test "x$new_path" = x; then
40370      # It's still not found. Now this is an unrecoverable error.
40371      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40372$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40373      has_space=`$ECHO "$complete" | $GREP " "`
40374      if test "x$has_space" != x; then
40375        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40376$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40377      fi
40378      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40379    fi
40380  fi
40381
40382  # Now new_path has a complete unix path to the binary
40383  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40384    # Keep paths in /bin as-is, but remove trailing .exe if any
40385    new_path="${new_path/%.exe/}"
40386    # Do not save /bin paths to all_fixpath_prefixes!
40387  else
40388    # Not in mixed or Windows style, start by that.
40389    new_path=`cmd //c echo $new_path`
40390
40391  input_path="$new_path"
40392  # Check if we need to convert this using DOS-style short mode. If the path
40393  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40394  # take no chances and rewrite it.
40395  # Note: m4 eats our [], so we need to use [ and ] instead.
40396  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40397  if test "x$has_forbidden_chars" != x; then
40398    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40399    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40400  fi
40401
40402    # Output is in $new_path
40403
40404  windows_path="$new_path"
40405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40406    unix_path=`$CYGPATH -u "$windows_path"`
40407    new_path="$unix_path"
40408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40409    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40410    new_path="$unix_path"
40411  fi
40412
40413    # remove trailing .exe if any
40414    new_path="${new_path/%.exe/}"
40415
40416    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40417    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40418  fi
40419
40420  else
40421    # We're on a posix platform. Hooray! :)
40422    # First separate the path from the arguments. This will split at the first
40423    # space.
40424    complete="$BUILD_CXX"
40425    path="${complete%% *}"
40426    tmp="$complete EOL"
40427    arguments="${tmp#* }"
40428
40429    # Cannot rely on the command "which" here since it doesn't always work.
40430    is_absolute_path=`$ECHO "$path" | $GREP ^/`
40431    if test -z "$is_absolute_path"; then
40432      # Path to executable is not absolute. Find it.
40433      IFS_save="$IFS"
40434      IFS=:
40435      for p in $PATH; do
40436        if test -f "$p/$path" && test -x "$p/$path"; then
40437          new_path="$p/$path"
40438          break
40439        fi
40440      done
40441      IFS="$IFS_save"
40442    else
40443      # This is an absolute path, we can use it without further modifications.
40444      new_path="$path"
40445    fi
40446
40447    if test "x$new_path" = x; then
40448      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40449$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40450      has_space=`$ECHO "$complete" | $GREP " "`
40451      if test "x$has_space" != x; then
40452        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40453$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40454      fi
40455      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40456    fi
40457  fi
40458
40459  # Now join together the path and the arguments once again
40460  if test "x$arguments" != xEOL; then
40461    new_complete="$new_path ${arguments% *}"
40462  else
40463    new_complete="$new_path"
40464  fi
40465
40466  if test "x$complete" != "x$new_complete"; then
40467    BUILD_CXX="$new_complete"
40468    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
40469$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
40470  fi
40471
40472
40473
40474  # Publish this variable in the help.
40475
40476
40477  if test "x$BUILD_LD" = x; then
40478    # The variable is not set by user, try to locate tool using the code snippet
40479    for ac_prog in ld
40480do
40481  # Extract the first word of "$ac_prog", so it can be a program name with args.
40482set dummy $ac_prog; ac_word=$2
40483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40484$as_echo_n "checking for $ac_word... " >&6; }
40485if ${ac_cv_path_BUILD_LD+:} false; then :
40486  $as_echo_n "(cached) " >&6
40487else
40488  case $BUILD_LD in
40489  [\\/]* | ?:[\\/]*)
40490  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40491  ;;
40492  *)
40493  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40494for as_dir in $PATH
40495do
40496  IFS=$as_save_IFS
40497  test -z "$as_dir" && as_dir=.
40498    for ac_exec_ext in '' $ac_executable_extensions; do
40499  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40500    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40501    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40502    break 2
40503  fi
40504done
40505  done
40506IFS=$as_save_IFS
40507
40508  ;;
40509esac
40510fi
40511BUILD_LD=$ac_cv_path_BUILD_LD
40512if test -n "$BUILD_LD"; then
40513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40514$as_echo "$BUILD_LD" >&6; }
40515else
40516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40517$as_echo "no" >&6; }
40518fi
40519
40520
40521  test -n "$BUILD_LD" && break
40522done
40523
40524  else
40525    # The variable is set, but is it from the command line or the environment?
40526
40527    # Try to remove the string !BUILD_LD! from our list.
40528    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
40529    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40530      # If it failed, the variable was not from the command line. Ignore it,
40531      # but warn the user (except for BASH, which is always set by the calling BASH).
40532      if test "xBUILD_LD" != xBASH; then
40533        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
40534$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
40535      fi
40536      # Try to locate tool using the code snippet
40537      for ac_prog in ld
40538do
40539  # Extract the first word of "$ac_prog", so it can be a program name with args.
40540set dummy $ac_prog; ac_word=$2
40541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40542$as_echo_n "checking for $ac_word... " >&6; }
40543if ${ac_cv_path_BUILD_LD+:} false; then :
40544  $as_echo_n "(cached) " >&6
40545else
40546  case $BUILD_LD in
40547  [\\/]* | ?:[\\/]*)
40548  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40549  ;;
40550  *)
40551  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40552for as_dir in $PATH
40553do
40554  IFS=$as_save_IFS
40555  test -z "$as_dir" && as_dir=.
40556    for ac_exec_ext in '' $ac_executable_extensions; do
40557  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40558    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40559    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40560    break 2
40561  fi
40562done
40563  done
40564IFS=$as_save_IFS
40565
40566  ;;
40567esac
40568fi
40569BUILD_LD=$ac_cv_path_BUILD_LD
40570if test -n "$BUILD_LD"; then
40571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40572$as_echo "$BUILD_LD" >&6; }
40573else
40574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40575$as_echo "no" >&6; }
40576fi
40577
40578
40579  test -n "$BUILD_LD" && break
40580done
40581
40582    else
40583      # If it succeeded, then it was overridden by the user. We will use it
40584      # for the tool.
40585
40586      # First remove it from the list of overridden variables, so we can test
40587      # for unknown variables in the end.
40588      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40589
40590      # Check if the provided tool contains a complete path.
40591      tool_specified="$BUILD_LD"
40592      tool_basename="${tool_specified##*/}"
40593      if test "x$tool_basename" = "x$tool_specified"; then
40594        # A command without a complete path is provided, search $PATH.
40595        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
40596$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
40597        # Extract the first word of "$tool_basename", so it can be a program name with args.
40598set dummy $tool_basename; ac_word=$2
40599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40600$as_echo_n "checking for $ac_word... " >&6; }
40601if ${ac_cv_path_BUILD_LD+:} false; then :
40602  $as_echo_n "(cached) " >&6
40603else
40604  case $BUILD_LD in
40605  [\\/]* | ?:[\\/]*)
40606  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40607  ;;
40608  *)
40609  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40610for as_dir in $PATH
40611do
40612  IFS=$as_save_IFS
40613  test -z "$as_dir" && as_dir=.
40614    for ac_exec_ext in '' $ac_executable_extensions; do
40615  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40616    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40617    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40618    break 2
40619  fi
40620done
40621  done
40622IFS=$as_save_IFS
40623
40624  ;;
40625esac
40626fi
40627BUILD_LD=$ac_cv_path_BUILD_LD
40628if test -n "$BUILD_LD"; then
40629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40630$as_echo "$BUILD_LD" >&6; }
40631else
40632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40633$as_echo "no" >&6; }
40634fi
40635
40636
40637        if test "x$BUILD_LD" = x; then
40638          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40639        fi
40640      else
40641        # Otherwise we believe it is a complete path. Use it as it is.
40642        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
40643$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
40644        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
40645$as_echo_n "checking for BUILD_LD... " >&6; }
40646        if test ! -x "$tool_specified"; then
40647          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40648$as_echo "not found" >&6; }
40649          as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
40650        fi
40651        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40652$as_echo "$tool_specified" >&6; }
40653      fi
40654    fi
40655  fi
40656
40657
40658
40659  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40660
40661  # First separate the path from the arguments. This will split at the first
40662  # space.
40663  complete="$BUILD_LD"
40664  path="${complete%% *}"
40665  tmp="$complete EOL"
40666  arguments="${tmp#* }"
40667
40668  # Input might be given as Windows format, start by converting to
40669  # unix format.
40670  new_path=`$CYGPATH -u "$path"`
40671
40672  # Now try to locate executable using which
40673  new_path=`$WHICH "$new_path" 2> /dev/null`
40674  # bat and cmd files are not always considered executable in cygwin causing which
40675  # to not find them
40676  if test "x$new_path" = x \
40677      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40678      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40679    new_path=`$CYGPATH -u "$path"`
40680  fi
40681  if test "x$new_path" = x; then
40682    # Oops. Which didn't find the executable.
40683    # The splitting of arguments from the executable at a space might have been incorrect,
40684    # since paths with space are more likely in Windows. Give it another try with the whole
40685    # argument.
40686    path="$complete"
40687    arguments="EOL"
40688    new_path=`$CYGPATH -u "$path"`
40689    new_path=`$WHICH "$new_path" 2> /dev/null`
40690    # bat and cmd files are not always considered executable in cygwin causing which
40691    # to not find them
40692    if test "x$new_path" = x \
40693        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40694        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40695      new_path=`$CYGPATH -u "$path"`
40696    fi
40697    if test "x$new_path" = x; then
40698      # It's still not found. Now this is an unrecoverable error.
40699      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40700$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40701      has_space=`$ECHO "$complete" | $GREP " "`
40702      if test "x$has_space" != x; then
40703        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40704$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40705      fi
40706      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40707    fi
40708  fi
40709
40710  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40711  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40712  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40713  # "foo.exe" is OK but "foo" is an error.
40714  #
40715  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40716  # It is also a way to make sure we got the proper file name for the real test later on.
40717  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40718  if test "x$test_shortpath" = x; then
40719    # Short path failed, file does not exist as specified.
40720    # Try adding .exe or .cmd
40721    if test -f "${new_path}.exe"; then
40722      input_to_shortpath="${new_path}.exe"
40723    elif test -f "${new_path}.cmd"; then
40724      input_to_shortpath="${new_path}.cmd"
40725    else
40726      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
40727$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
40728      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40729$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40730      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40731    fi
40732  else
40733    input_to_shortpath="$new_path"
40734  fi
40735
40736  # Call helper function which possibly converts this using DOS-style short mode.
40737  # If so, the updated path is stored in $new_path.
40738  new_path="$input_to_shortpath"
40739
40740  input_path="$input_to_shortpath"
40741  # Check if we need to convert this using DOS-style short mode. If the path
40742  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40743  # take no chances and rewrite it.
40744  # Note: m4 eats our [], so we need to use [ and ] instead.
40745  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40746  if test "x$has_forbidden_chars" != x; then
40747    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40748    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40749    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40750    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40751      # Going to short mode and back again did indeed matter. Since short mode is
40752      # case insensitive, let's make it lowercase to improve readability.
40753      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40754      # Now convert it back to Unix-stile (cygpath)
40755      input_path=`$CYGPATH -u "$shortmode_path"`
40756      new_path="$input_path"
40757    fi
40758  fi
40759
40760  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40761  if test "x$test_cygdrive_prefix" = x; then
40762    # As a simple fix, exclude /usr/bin since it's not a real path.
40763    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40764      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40765      # a path prefixed by /cygdrive for fixpath to work.
40766      new_path="$CYGWIN_ROOT_PATH$input_path"
40767    fi
40768  fi
40769
40770  # remove trailing .exe if any
40771  new_path="${new_path/%.exe/}"
40772
40773  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40774
40775  # First separate the path from the arguments. This will split at the first
40776  # space.
40777  complete="$BUILD_LD"
40778  path="${complete%% *}"
40779  tmp="$complete EOL"
40780  arguments="${tmp#* }"
40781
40782  # Input might be given as Windows format, start by converting to
40783  # unix format.
40784  new_path="$path"
40785
40786  windows_path="$new_path"
40787  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40788    unix_path=`$CYGPATH -u "$windows_path"`
40789    new_path="$unix_path"
40790  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40791    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40792    new_path="$unix_path"
40793  fi
40794
40795
40796  # Now try to locate executable using which
40797  new_path=`$WHICH "$new_path" 2> /dev/null`
40798
40799  if test "x$new_path" = x; then
40800    # Oops. Which didn't find the executable.
40801    # The splitting of arguments from the executable at a space might have been incorrect,
40802    # since paths with space are more likely in Windows. Give it another try with the whole
40803    # argument.
40804    path="$complete"
40805    arguments="EOL"
40806    new_path="$path"
40807
40808  windows_path="$new_path"
40809  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40810    unix_path=`$CYGPATH -u "$windows_path"`
40811    new_path="$unix_path"
40812  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40813    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40814    new_path="$unix_path"
40815  fi
40816
40817
40818    new_path=`$WHICH "$new_path" 2> /dev/null`
40819    # bat and cmd files are not always considered executable in MSYS causing which
40820    # to not find them
40821    if test "x$new_path" = x \
40822        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40823        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40824      new_path="$path"
40825
40826  windows_path="$new_path"
40827  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40828    unix_path=`$CYGPATH -u "$windows_path"`
40829    new_path="$unix_path"
40830  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40831    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40832    new_path="$unix_path"
40833  fi
40834
40835    fi
40836
40837    if test "x$new_path" = x; then
40838      # It's still not found. Now this is an unrecoverable error.
40839      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40840$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40841      has_space=`$ECHO "$complete" | $GREP " "`
40842      if test "x$has_space" != x; then
40843        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40844$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40845      fi
40846      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40847    fi
40848  fi
40849
40850  # Now new_path has a complete unix path to the binary
40851  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40852    # Keep paths in /bin as-is, but remove trailing .exe if any
40853    new_path="${new_path/%.exe/}"
40854    # Do not save /bin paths to all_fixpath_prefixes!
40855  else
40856    # Not in mixed or Windows style, start by that.
40857    new_path=`cmd //c echo $new_path`
40858
40859  input_path="$new_path"
40860  # Check if we need to convert this using DOS-style short mode. If the path
40861  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40862  # take no chances and rewrite it.
40863  # Note: m4 eats our [], so we need to use [ and ] instead.
40864  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40865  if test "x$has_forbidden_chars" != x; then
40866    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40867    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40868  fi
40869
40870    # Output is in $new_path
40871
40872  windows_path="$new_path"
40873  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40874    unix_path=`$CYGPATH -u "$windows_path"`
40875    new_path="$unix_path"
40876  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40877    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40878    new_path="$unix_path"
40879  fi
40880
40881    # remove trailing .exe if any
40882    new_path="${new_path/%.exe/}"
40883
40884    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40885    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40886  fi
40887
40888  else
40889    # We're on a posix platform. Hooray! :)
40890    # First separate the path from the arguments. This will split at the first
40891    # space.
40892    complete="$BUILD_LD"
40893    path="${complete%% *}"
40894    tmp="$complete EOL"
40895    arguments="${tmp#* }"
40896
40897    # Cannot rely on the command "which" here since it doesn't always work.
40898    is_absolute_path=`$ECHO "$path" | $GREP ^/`
40899    if test -z "$is_absolute_path"; then
40900      # Path to executable is not absolute. Find it.
40901      IFS_save="$IFS"
40902      IFS=:
40903      for p in $PATH; do
40904        if test -f "$p/$path" && test -x "$p/$path"; then
40905          new_path="$p/$path"
40906          break
40907        fi
40908      done
40909      IFS="$IFS_save"
40910    else
40911      # This is an absolute path, we can use it without further modifications.
40912      new_path="$path"
40913    fi
40914
40915    if test "x$new_path" = x; then
40916      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40917$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40918      has_space=`$ECHO "$complete" | $GREP " "`
40919      if test "x$has_space" != x; then
40920        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40921$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40922      fi
40923      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40924    fi
40925  fi
40926
40927  # Now join together the path and the arguments once again
40928  if test "x$arguments" != xEOL; then
40929    new_complete="$new_path ${arguments% *}"
40930  else
40931    new_complete="$new_path"
40932  fi
40933
40934  if test "x$complete" != "x$new_complete"; then
40935    BUILD_LD="$new_complete"
40936    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
40937$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
40938  fi
40939
40940  else
40941    # If we are not cross compiling, use the normal target compilers for
40942    # building the build platform executables.
40943    BUILD_CC="$CC"
40944    BUILD_CXX="$CXX"
40945    BUILD_LD="$LD"
40946  fi
40947
40948
40949
40950
40951
40952
40953  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40954    # For hotspot, we need these in Windows mixed path,
40955    # so rewrite them all. Need added .exe suffix.
40956    HOTSPOT_CXX="$CXX.exe"
40957    HOTSPOT_LD="$LD.exe"
40958    HOTSPOT_MT="$MT.exe"
40959    HOTSPOT_RC="$RC.exe"
40960
40961  unix_path="$HOTSPOT_CXX"
40962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40963    windows_path=`$CYGPATH -m "$unix_path"`
40964    HOTSPOT_CXX="$windows_path"
40965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40966    windows_path=`cmd //c echo $unix_path`
40967    HOTSPOT_CXX="$windows_path"
40968  fi
40969
40970
40971  unix_path="$HOTSPOT_LD"
40972  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40973    windows_path=`$CYGPATH -m "$unix_path"`
40974    HOTSPOT_LD="$windows_path"
40975  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40976    windows_path=`cmd //c echo $unix_path`
40977    HOTSPOT_LD="$windows_path"
40978  fi
40979
40980
40981  unix_path="$HOTSPOT_MT"
40982  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40983    windows_path=`$CYGPATH -m "$unix_path"`
40984    HOTSPOT_MT="$windows_path"
40985  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40986    windows_path=`cmd //c echo $unix_path`
40987    HOTSPOT_MT="$windows_path"
40988  fi
40989
40990
40991  unix_path="$HOTSPOT_RC"
40992  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40993    windows_path=`$CYGPATH -m "$unix_path"`
40994    HOTSPOT_RC="$windows_path"
40995  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40996    windows_path=`cmd //c echo $unix_path`
40997    HOTSPOT_RC="$windows_path"
40998  fi
40999
41000
41001
41002  else
41003    HOTSPOT_CXX="$CXX"
41004    HOTSPOT_LD="$LD"
41005  fi
41006
41007
41008
41009  if test  "x$TOOLCHAIN_TYPE" = xclang; then
41010    USE_CLANG=true
41011  fi
41012
41013
41014  # LDEXE is the linker to use, when creating executables. Not really used.
41015  # FIXME: These should just be removed!
41016  LDEXE="$LD"
41017  LDEXECXX="$LDCXX"
41018
41019
41020
41021
41022
41023
41024  # The package path is used only on macosx?
41025  # FIXME: clean this up, and/or move it elsewhere.
41026  PACKAGE_PATH=/opt/local
41027
41028
41029  # Check for extra potential brokenness.
41030  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41031    # On Windows, double-check that we got the right compiler.
41032    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
41033    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
41034    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
41035      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
41036        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
41037      fi
41038    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
41039      if test "x$COMPILER_CPU_TEST" != "xx64"; then
41040        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
41041      fi
41042    fi
41043  fi
41044
41045  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41046    # If this is a --hash-style=gnu system, use --hash-style=both, why?
41047    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
41048    # This is later checked when setting flags.
41049
41050    # "-Og" suppported for GCC 4.8 and later
41051    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
41052
41053  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
41054$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
41055  supports=yes
41056
41057  saved_cflags="$CFLAGS"
41058  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
41059  ac_ext=c
41060ac_cpp='$CPP $CPPFLAGS'
41061ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41062ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41063ac_compiler_gnu=$ac_cv_c_compiler_gnu
41064
41065  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41066/* end confdefs.h.  */
41067int i;
41068_ACEOF
41069if ac_fn_c_try_compile "$LINENO"; then :
41070
41071else
41072  supports=no
41073fi
41074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41075  ac_ext=cpp
41076ac_cpp='$CXXCPP $CPPFLAGS'
41077ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41078ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41079ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41080
41081  CFLAGS="$saved_cflags"
41082
41083  saved_cxxflags="$CXXFLAGS"
41084  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
41085  ac_ext=cpp
41086ac_cpp='$CXXCPP $CPPFLAGS'
41087ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41088ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41089ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41090
41091  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41092/* end confdefs.h.  */
41093int i;
41094_ACEOF
41095if ac_fn_cxx_try_compile "$LINENO"; then :
41096
41097else
41098  supports=no
41099fi
41100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41101  ac_ext=cpp
41102ac_cpp='$CXXCPP $CPPFLAGS'
41103ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41104ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41105ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41106
41107  CXXFLAGS="$saved_cxxflags"
41108
41109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41110$as_echo "$supports" >&6; }
41111  if test "x$supports" = "xyes" ; then
41112    HAS_CFLAG_OPTIMIZE_DEBUG=true
41113  else
41114    HAS_CFLAG_OPTIMIZE_DEBUG=false
41115  fi
41116
41117
41118    # "-fsanitize=undefined" supported for GCC 4.9 and later
41119    CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG="-fsanitize=undefined -fsanitize-recover"
41120
41121  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG\"" >&5
41122$as_echo_n "checking if compiler supports \"$CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG\"... " >&6; }
41123  supports=yes
41124
41125  saved_cflags="$CFLAGS"
41126  CFLAGS="$CFLAGS $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG"
41127  ac_ext=c
41128ac_cpp='$CPP $CPPFLAGS'
41129ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41130ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41131ac_compiler_gnu=$ac_cv_c_compiler_gnu
41132
41133  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41134/* end confdefs.h.  */
41135int i;
41136_ACEOF
41137if ac_fn_c_try_compile "$LINENO"; then :
41138
41139else
41140  supports=no
41141fi
41142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41143  ac_ext=cpp
41144ac_cpp='$CXXCPP $CPPFLAGS'
41145ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41146ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41147ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41148
41149  CFLAGS="$saved_cflags"
41150
41151  saved_cxxflags="$CXXFLAGS"
41152  CXXFLAGS="$CXXFLAG $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG"
41153  ac_ext=cpp
41154ac_cpp='$CXXCPP $CPPFLAGS'
41155ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41156ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41157ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41158
41159  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41160/* end confdefs.h.  */
41161int i;
41162_ACEOF
41163if ac_fn_cxx_try_compile "$LINENO"; then :
41164
41165else
41166  supports=no
41167fi
41168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41169  ac_ext=cpp
41170ac_cpp='$CXXCPP $CPPFLAGS'
41171ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41172ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41173ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41174
41175  CXXFLAGS="$saved_cxxflags"
41176
41177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41178$as_echo "$supports" >&6; }
41179  if test "x$supports" = "xyes" ; then
41180    HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR=true
41181  else
41182    HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR=false
41183  fi
41184
41185
41186    # "-z relro" supported in GNU binutils 2.17 and later
41187    LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
41188
41189  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
41190$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
41191  supports=yes
41192
41193  saved_ldflags="$LDFLAGS"
41194  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
41195  ac_ext=c
41196ac_cpp='$CPP $CPPFLAGS'
41197ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41198ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41199ac_compiler_gnu=$ac_cv_c_compiler_gnu
41200
41201  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41202/* end confdefs.h.  */
41203
41204int
41205main ()
41206{
41207
41208  ;
41209  return 0;
41210}
41211_ACEOF
41212if ac_fn_c_try_link "$LINENO"; then :
41213
41214else
41215  supports=no
41216fi
41217rm -f core conftest.err conftest.$ac_objext \
41218    conftest$ac_exeext conftest.$ac_ext
41219  ac_ext=cpp
41220ac_cpp='$CXXCPP $CPPFLAGS'
41221ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41222ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41223ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41224
41225  LDFLAGS="$saved_ldflags"
41226
41227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41228$as_echo "$supports" >&6; }
41229  if test "x$supports" = "xyes" ; then
41230    HAS_LINKER_RELRO=true
41231  else
41232    HAS_LINKER_RELRO=false
41233  fi
41234
41235
41236    # "-z now" supported in GNU binutils 2.11 and later
41237    LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
41238
41239  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
41240$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
41241  supports=yes
41242
41243  saved_ldflags="$LDFLAGS"
41244  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
41245  ac_ext=c
41246ac_cpp='$CPP $CPPFLAGS'
41247ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41248ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41249ac_compiler_gnu=$ac_cv_c_compiler_gnu
41250
41251  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41252/* end confdefs.h.  */
41253
41254int
41255main ()
41256{
41257
41258  ;
41259  return 0;
41260}
41261_ACEOF
41262if ac_fn_c_try_link "$LINENO"; then :
41263
41264else
41265  supports=no
41266fi
41267rm -f core conftest.err conftest.$ac_objext \
41268    conftest$ac_exeext conftest.$ac_ext
41269  ac_ext=cpp
41270ac_cpp='$CXXCPP $CPPFLAGS'
41271ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41272ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41273ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41274
41275  LDFLAGS="$saved_ldflags"
41276
41277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41278$as_echo "$supports" >&6; }
41279  if test "x$supports" = "xyes" ; then
41280    HAS_LINKER_NOW=true
41281  else
41282    HAS_LINKER_NOW=false
41283  fi
41284
41285  fi
41286
41287  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
41288  # in executable.'
41289  USING_BROKEN_SUSE_LD=no
41290  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
41291    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
41292$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
41293    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
41294    $ECHO "int main() { }" > main.c
41295    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
41296      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41297$as_echo "no" >&6; }
41298      USING_BROKEN_SUSE_LD=no
41299    else
41300      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41301$as_echo "yes" >&6; }
41302      USING_BROKEN_SUSE_LD=yes
41303    fi
41304    rm -rf version-script.map main.c a.out
41305  fi
41306
41307
41308
41309# Setup the JTReg Regression Test Harness.
41310
41311
41312# Check whether --with-jtreg was given.
41313if test "${with_jtreg+set}" = set; then :
41314  withval=$with_jtreg;
41315else
41316  with_jtreg=no
41317fi
41318
41319
41320  if test "x$with_jtreg" = xno; then
41321    # jtreg disabled
41322    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41323$as_echo_n "checking for jtreg... " >&6; }
41324    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41325$as_echo "no" >&6; }
41326  else
41327    if test "x$with_jtreg" != xyes; then
41328      # with path specified.
41329      JT_HOME="$with_jtreg"
41330    fi
41331
41332    if test "x$JT_HOME" != x; then
41333      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41334$as_echo_n "checking for jtreg... " >&6; }
41335
41336      # use JT_HOME enviroment var.
41337
41338  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41339
41340  # Input might be given as Windows format, start by converting to
41341  # unix format.
41342  path="$JT_HOME"
41343  new_path=`$CYGPATH -u "$path"`
41344
41345  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41346  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41347  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41348  # "foo.exe" is OK but "foo" is an error.
41349  #
41350  # This test is therefore slightly more accurate than "test -f" to check for file precense.
41351  # It is also a way to make sure we got the proper file name for the real test later on.
41352  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41353  if test "x$test_shortpath" = x; then
41354    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41355$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41356    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
41357  fi
41358
41359  # Call helper function which possibly converts this using DOS-style short mode.
41360  # If so, the updated path is stored in $new_path.
41361
41362  input_path="$new_path"
41363  # Check if we need to convert this using DOS-style short mode. If the path
41364  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41365  # take no chances and rewrite it.
41366  # Note: m4 eats our [], so we need to use [ and ] instead.
41367  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41368  if test "x$has_forbidden_chars" != x; then
41369    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41370    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41371    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41372    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41373      # Going to short mode and back again did indeed matter. Since short mode is
41374      # case insensitive, let's make it lowercase to improve readability.
41375      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41376      # Now convert it back to Unix-stile (cygpath)
41377      input_path=`$CYGPATH -u "$shortmode_path"`
41378      new_path="$input_path"
41379    fi
41380  fi
41381
41382  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41383  if test "x$test_cygdrive_prefix" = x; then
41384    # As a simple fix, exclude /usr/bin since it's not a real path.
41385    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
41386      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41387      # a path prefixed by /cygdrive for fixpath to work.
41388      new_path="$CYGWIN_ROOT_PATH$input_path"
41389    fi
41390  fi
41391
41392
41393  if test "x$path" != "x$new_path"; then
41394    JT_HOME="$new_path"
41395    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41396$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41397  fi
41398
41399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41400
41401  path="$JT_HOME"
41402  has_colon=`$ECHO $path | $GREP ^.:`
41403  new_path="$path"
41404  if test "x$has_colon" = x; then
41405    # Not in mixed or Windows style, start by that.
41406    new_path=`cmd //c echo $path`
41407  fi
41408
41409
41410  input_path="$new_path"
41411  # Check if we need to convert this using DOS-style short mode. If the path
41412  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41413  # take no chances and rewrite it.
41414  # Note: m4 eats our [], so we need to use [ and ] instead.
41415  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41416  if test "x$has_forbidden_chars" != x; then
41417    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41418    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41419  fi
41420
41421
41422  windows_path="$new_path"
41423  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41424    unix_path=`$CYGPATH -u "$windows_path"`
41425    new_path="$unix_path"
41426  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41427    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41428    new_path="$unix_path"
41429  fi
41430
41431  if test "x$path" != "x$new_path"; then
41432    JT_HOME="$new_path"
41433    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41434$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41435  fi
41436
41437  # Save the first 10 bytes of this path to the storage, so fixpath can work.
41438  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41439
41440  else
41441    # We're on a posix platform. Hooray! :)
41442    path="$JT_HOME"
41443    has_space=`$ECHO "$path" | $GREP " "`
41444    if test "x$has_space" != x; then
41445      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41446$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41447      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
41448    fi
41449
41450    # Use eval to expand a potential ~
41451    eval path="$path"
41452    if test ! -f "$path" && test ! -d "$path"; then
41453      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
41454    fi
41455
41456    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
41457  fi
41458
41459
41460      # jtreg win32 script works for everybody
41461      JTREGEXE="$JT_HOME/win32/bin/jtreg"
41462
41463      if test ! -f "$JTREGEXE"; then
41464        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
41465      fi
41466
41467      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41468$as_echo "$JTREGEXE" >&6; }
41469    else
41470      # try to find jtreg on path
41471
41472
41473
41474  # Publish this variable in the help.
41475
41476
41477  if test "x$JTREGEXE" = x; then
41478    # The variable is not set by user, try to locate tool using the code snippet
41479    for ac_prog in jtreg
41480do
41481  # Extract the first word of "$ac_prog", so it can be a program name with args.
41482set dummy $ac_prog; ac_word=$2
41483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41484$as_echo_n "checking for $ac_word... " >&6; }
41485if ${ac_cv_path_JTREGEXE+:} false; then :
41486  $as_echo_n "(cached) " >&6
41487else
41488  case $JTREGEXE in
41489  [\\/]* | ?:[\\/]*)
41490  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41491  ;;
41492  *)
41493  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41494for as_dir in $PATH
41495do
41496  IFS=$as_save_IFS
41497  test -z "$as_dir" && as_dir=.
41498    for ac_exec_ext in '' $ac_executable_extensions; do
41499  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41500    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41501    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41502    break 2
41503  fi
41504done
41505  done
41506IFS=$as_save_IFS
41507
41508  ;;
41509esac
41510fi
41511JTREGEXE=$ac_cv_path_JTREGEXE
41512if test -n "$JTREGEXE"; then
41513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41514$as_echo "$JTREGEXE" >&6; }
41515else
41516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41517$as_echo "no" >&6; }
41518fi
41519
41520
41521  test -n "$JTREGEXE" && break
41522done
41523
41524  else
41525    # The variable is set, but is it from the command line or the environment?
41526
41527    # Try to remove the string !JTREGEXE! from our list.
41528    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
41529    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41530      # If it failed, the variable was not from the command line. Ignore it,
41531      # but warn the user (except for BASH, which is always set by the calling BASH).
41532      if test "xJTREGEXE" != xBASH; then
41533        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
41534$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
41535      fi
41536      # Try to locate tool using the code snippet
41537      for ac_prog in jtreg
41538do
41539  # Extract the first word of "$ac_prog", so it can be a program name with args.
41540set dummy $ac_prog; ac_word=$2
41541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41542$as_echo_n "checking for $ac_word... " >&6; }
41543if ${ac_cv_path_JTREGEXE+:} false; then :
41544  $as_echo_n "(cached) " >&6
41545else
41546  case $JTREGEXE in
41547  [\\/]* | ?:[\\/]*)
41548  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41549  ;;
41550  *)
41551  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41552for as_dir in $PATH
41553do
41554  IFS=$as_save_IFS
41555  test -z "$as_dir" && as_dir=.
41556    for ac_exec_ext in '' $ac_executable_extensions; do
41557  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41558    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41559    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41560    break 2
41561  fi
41562done
41563  done
41564IFS=$as_save_IFS
41565
41566  ;;
41567esac
41568fi
41569JTREGEXE=$ac_cv_path_JTREGEXE
41570if test -n "$JTREGEXE"; then
41571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41572$as_echo "$JTREGEXE" >&6; }
41573else
41574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41575$as_echo "no" >&6; }
41576fi
41577
41578
41579  test -n "$JTREGEXE" && break
41580done
41581
41582    else
41583      # If it succeeded, then it was overridden by the user. We will use it
41584      # for the tool.
41585
41586      # First remove it from the list of overridden variables, so we can test
41587      # for unknown variables in the end.
41588      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41589
41590      # Check if the provided tool contains a complete path.
41591      tool_specified="$JTREGEXE"
41592      tool_basename="${tool_specified##*/}"
41593      if test "x$tool_basename" = "x$tool_specified"; then
41594        # A command without a complete path is provided, search $PATH.
41595        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
41596$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
41597        # Extract the first word of "$tool_basename", so it can be a program name with args.
41598set dummy $tool_basename; ac_word=$2
41599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41600$as_echo_n "checking for $ac_word... " >&6; }
41601if ${ac_cv_path_JTREGEXE+:} false; then :
41602  $as_echo_n "(cached) " >&6
41603else
41604  case $JTREGEXE in
41605  [\\/]* | ?:[\\/]*)
41606  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41607  ;;
41608  *)
41609  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41610for as_dir in $PATH
41611do
41612  IFS=$as_save_IFS
41613  test -z "$as_dir" && as_dir=.
41614    for ac_exec_ext in '' $ac_executable_extensions; do
41615  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41616    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41617    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41618    break 2
41619  fi
41620done
41621  done
41622IFS=$as_save_IFS
41623
41624  ;;
41625esac
41626fi
41627JTREGEXE=$ac_cv_path_JTREGEXE
41628if test -n "$JTREGEXE"; then
41629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41630$as_echo "$JTREGEXE" >&6; }
41631else
41632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41633$as_echo "no" >&6; }
41634fi
41635
41636
41637        if test "x$JTREGEXE" = x; then
41638          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41639        fi
41640      else
41641        # Otherwise we believe it is a complete path. Use it as it is.
41642        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
41643$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
41644        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
41645$as_echo_n "checking for JTREGEXE... " >&6; }
41646        if test ! -x "$tool_specified"; then
41647          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41648$as_echo "not found" >&6; }
41649          as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
41650        fi
41651        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41652$as_echo "$tool_specified" >&6; }
41653      fi
41654    fi
41655  fi
41656
41657
41658
41659  if test "x$JTREGEXE" = x; then
41660    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
41661  fi
41662
41663
41664      JT_HOME="`$DIRNAME $JTREGEXE`"
41665    fi
41666  fi
41667
41668
41669
41670
41671
41672
41673  # Option used to tell the compiler whether to create 32- or 64-bit executables
41674  if test "x$TOOLCHAIN_TYPE" = xxlc; then
41675    COMPILER_TARGET_BITS_FLAG="-q"
41676  else
41677    COMPILER_TARGET_BITS_FLAG="-m"
41678  fi
41679
41680
41681  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
41682  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41683    ARFLAGS="-r"
41684  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41685    ARFLAGS="-X64"
41686  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
41687    # lib.exe is used as AR to create static libraries.
41688    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
41689  else
41690    ARFLAGS=""
41691  fi
41692
41693
41694  ## Setup strip.
41695  # FIXME: should this really be per platform, or should it be per toolchain type?
41696  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
41697  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
41698  if test "x$OPENJDK_TARGET_OS" = xlinux; then
41699    STRIPFLAGS="-g"
41700  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
41701    STRIPFLAGS="-x"
41702  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41703    STRIPFLAGS="-S"
41704  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41705    STRIPFLAGS="-X32_64"
41706  fi
41707
41708  if test "x$OPENJDK_TARGET_OS" != xwindows; then
41709    POST_STRIP_CMD="$STRIP $STRIPFLAGS"
41710  fi
41711
41712
41713  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41714    # FIXME: break out into MCSFLAGS
41715    POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
41716  fi
41717
41718
41719  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41720    CC_OUT_OPTION=-Fo
41721    EXE_OUT_OPTION=-out:
41722    LD_OUT_OPTION=-out:
41723    AR_OUT_OPTION=-out:
41724  else
41725    # The option used to specify the target .o,.a or .so file.
41726    # When compiling, how to specify the to be created object file.
41727    CC_OUT_OPTION='-o$(SPACE)'
41728    # When linking, how to specify the to be created executable.
41729    EXE_OUT_OPTION='-o$(SPACE)'
41730    # When linking, how to specify the to be created dynamically linkable library.
41731    LD_OUT_OPTION='-o$(SPACE)'
41732    # When archiving, how to specify the to be create static archive for object files.
41733    AR_OUT_OPTION='rcs$(SPACE)'
41734  fi
41735
41736
41737
41738
41739
41740  # On Windows, we need to set RC flags.
41741  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41742    RC_FLAGS="-nologo -l 0x409 -r"
41743    if test "x$VARIANT" = xOPT; then
41744      RC_FLAGS="$RC_FLAGS -d NDEBUG"
41745    fi
41746
41747    # The version variables used to create RC_FLAGS may be overridden
41748    # in a custom configure script, or possibly the command line.
41749    # Let those variables be expanded at make time in spec.gmk.
41750    # The \$ are escaped to the shell, and the $(...) variables
41751    # are evaluated by make.
41752    RC_FLAGS="$RC_FLAGS \
41753        -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
41754        -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
41755        -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
41756        -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
41757        -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
41758        -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
41759        -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
41760  fi
41761
41762
41763  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41764    # silence copyright notice and other headers.
41765    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
41766  fi
41767
41768  if test "x$SYSROOT" != "x"; then
41769    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41770      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41771        # Solaris Studio does not have a concept of sysroot. Instead we must
41772        # make sure the default include and lib dirs are appended to each
41773        # compile and link command line.
41774        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
41775        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
41776            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
41777            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
41778      fi
41779    elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41780      # Apple only wants -isysroot <path>, but we also need -iframework<path>/System/Library/Frameworks
41781      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\" -iframework\"$SYSROOT/System/Library/Frameworks\""
41782      SYSROOT_LDFLAGS=$SYSROOT_CFLAGS
41783    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
41784      SYSROOT_CFLAGS="--sysroot=\"$SYSROOT\""
41785      SYSROOT_LDFLAGS="--sysroot=\"$SYSROOT\""
41786    elif test "x$TOOLCHAIN_TYPE" = xclang; then
41787      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
41788      SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
41789    fi
41790    # Propagate the sysroot args to hotspot
41791    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
41792    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
41793    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
41794  fi
41795
41796  # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
41797  # set this here so it doesn't have to be peppered throughout the forest
41798  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41799    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41800    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41801  fi
41802
41803
41804
41805
41806
41807# FIXME: Currently we must test this after toolchain but before flags. Fix!
41808
41809# Now we can test some aspects on the target using configure macros.
41810
41811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
41812$as_echo_n "checking for ANSI C header files... " >&6; }
41813if ${ac_cv_header_stdc+:} false; then :
41814  $as_echo_n "(cached) " >&6
41815else
41816  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41817/* end confdefs.h.  */
41818#include <stdlib.h>
41819#include <stdarg.h>
41820#include <string.h>
41821#include <float.h>
41822
41823int
41824main ()
41825{
41826
41827  ;
41828  return 0;
41829}
41830_ACEOF
41831if ac_fn_cxx_try_compile "$LINENO"; then :
41832  ac_cv_header_stdc=yes
41833else
41834  ac_cv_header_stdc=no
41835fi
41836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41837
41838if test $ac_cv_header_stdc = yes; then
41839  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
41840  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41841/* end confdefs.h.  */
41842#include <string.h>
41843
41844_ACEOF
41845if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41846  $EGREP "memchr" >/dev/null 2>&1; then :
41847
41848else
41849  ac_cv_header_stdc=no
41850fi
41851rm -f conftest*
41852
41853fi
41854
41855if test $ac_cv_header_stdc = yes; then
41856  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
41857  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41858/* end confdefs.h.  */
41859#include <stdlib.h>
41860
41861_ACEOF
41862if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41863  $EGREP "free" >/dev/null 2>&1; then :
41864
41865else
41866  ac_cv_header_stdc=no
41867fi
41868rm -f conftest*
41869
41870fi
41871
41872if test $ac_cv_header_stdc = yes; then
41873  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
41874  if test "$cross_compiling" = yes; then :
41875  :
41876else
41877  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41878/* end confdefs.h.  */
41879#include <ctype.h>
41880#include <stdlib.h>
41881#if ((' ' & 0x0FF) == 0x020)
41882# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
41883# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
41884#else
41885# define ISLOWER(c) \
41886		   (('a' <= (c) && (c) <= 'i') \
41887		     || ('j' <= (c) && (c) <= 'r') \
41888		     || ('s' <= (c) && (c) <= 'z'))
41889# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
41890#endif
41891
41892#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
41893int
41894main ()
41895{
41896  int i;
41897  for (i = 0; i < 256; i++)
41898    if (XOR (islower (i), ISLOWER (i))
41899	|| toupper (i) != TOUPPER (i))
41900      return 2;
41901  return 0;
41902}
41903_ACEOF
41904if ac_fn_cxx_try_run "$LINENO"; then :
41905
41906else
41907  ac_cv_header_stdc=no
41908fi
41909rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41910  conftest.$ac_objext conftest.beam conftest.$ac_ext
41911fi
41912
41913fi
41914fi
41915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
41916$as_echo "$ac_cv_header_stdc" >&6; }
41917if test $ac_cv_header_stdc = yes; then
41918
41919$as_echo "#define STDC_HEADERS 1" >>confdefs.h
41920
41921fi
41922
41923# On IRIX 5.3, sys/types and inttypes.h are conflicting.
41924for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
41925		  inttypes.h stdint.h unistd.h
41926do :
41927  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
41928ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
41929"
41930if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
41931  cat >>confdefs.h <<_ACEOF
41932#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
41933_ACEOF
41934
41935fi
41936
41937done
41938
41939
41940
41941  ###############################################################################
41942  #
41943  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
41944  # (The JVM can use 32 or 64 bit Java pointers but that decision
41945  # is made at runtime.)
41946  #
41947
41948  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
41949    # Always specify -m flag on Solaris
41950    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
41951
41952  # When we add flags to the "official" CFLAGS etc, we need to
41953  # keep track of these additions in ADDED_CFLAGS etc. These
41954  # will later be checked to make sure only controlled additions
41955  # have been made to CFLAGS etc.
41956  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41957  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41958  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41959
41960  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41961  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41962  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41963
41964  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41965  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41966  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41967
41968  elif test "x$COMPILE_TYPE" = xreduced; then
41969    if test "x$OPENJDK_TARGET_OS" != xwindows; then
41970      # Specify -m if running reduced on other Posix platforms
41971
41972  # When we add flags to the "official" CFLAGS etc, we need to
41973  # keep track of these additions in ADDED_CFLAGS etc. These
41974  # will later be checked to make sure only controlled additions
41975  # have been made to CFLAGS etc.
41976  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41977  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41978  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41979
41980  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41981  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41982  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41983
41984  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41985  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41986  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41987
41988    fi
41989  fi
41990
41991  # Make compilation sanity check
41992  for ac_header in stdio.h
41993do :
41994  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
41995if test "x$ac_cv_header_stdio_h" = xyes; then :
41996  cat >>confdefs.h <<_ACEOF
41997#define HAVE_STDIO_H 1
41998_ACEOF
41999
42000else
42001
42002    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
42003$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
42004    if test "x$COMPILE_TYPE" = xreduced; then
42005      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
42006$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
42007    elif test "x$COMPILE_TYPE" = xcross; then
42008      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
42009$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
42010    fi
42011    as_fn_error $? "Cannot continue." "$LINENO" 5
42012
42013fi
42014
42015done
42016
42017
42018  # The cast to long int works around a bug in the HP C Compiler
42019# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
42020# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
42021# This bug is HP SR number 8606223364.
42022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
42023$as_echo_n "checking size of int *... " >&6; }
42024if ${ac_cv_sizeof_int_p+:} false; then :
42025  $as_echo_n "(cached) " >&6
42026else
42027  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
42028
42029else
42030  if test "$ac_cv_type_int_p" = yes; then
42031     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
42032$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
42033as_fn_error 77 "cannot compute sizeof (int *)
42034See \`config.log' for more details" "$LINENO" 5; }
42035   else
42036     ac_cv_sizeof_int_p=0
42037   fi
42038fi
42039
42040fi
42041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
42042$as_echo "$ac_cv_sizeof_int_p" >&6; }
42043
42044
42045
42046cat >>confdefs.h <<_ACEOF
42047#define SIZEOF_INT_P $ac_cv_sizeof_int_p
42048_ACEOF
42049
42050
42051
42052  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
42053  if test "x$ac_cv_sizeof_int_p" = x; then
42054    # The test failed, lets stick to the assumed value.
42055    { $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
42056$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
42057  else
42058    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
42059
42060    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
42061      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
42062      # Let's try to implicitely set the compilers target architecture and retry the test
42063      { $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
42064$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;}
42065      { $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
42066$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;}
42067
42068  # When we add flags to the "official" CFLAGS etc, we need to
42069  # keep track of these additions in ADDED_CFLAGS etc. These
42070  # will later be checked to make sure only controlled additions
42071  # have been made to CFLAGS etc.
42072  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42073  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42074  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42075
42076  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
42077  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
42078  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
42079
42080  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
42081  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
42082  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
42083
42084
42085      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
42086      unset ac_cv_sizeof_int_p
42087      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
42088      cat >>confdefs.h <<_ACEOF
42089#undef SIZEOF_INT_P
42090_ACEOF
42091
42092      # The cast to long int works around a bug in the HP C Compiler
42093# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
42094# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
42095# This bug is HP SR number 8606223364.
42096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
42097$as_echo_n "checking size of int *... " >&6; }
42098if ${ac_cv_sizeof_int_p+:} false; then :
42099  $as_echo_n "(cached) " >&6
42100else
42101  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
42102
42103else
42104  if test "$ac_cv_type_int_p" = yes; then
42105     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
42106$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
42107as_fn_error 77 "cannot compute sizeof (int *)
42108See \`config.log' for more details" "$LINENO" 5; }
42109   else
42110     ac_cv_sizeof_int_p=0
42111   fi
42112fi
42113
42114fi
42115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
42116$as_echo "$ac_cv_sizeof_int_p" >&6; }
42117
42118
42119
42120cat >>confdefs.h <<_ACEOF
42121#define SIZEOF_INT_P $ac_cv_sizeof_int_p
42122_ACEOF
42123
42124
42125
42126      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
42127
42128      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
42129        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
42130      fi
42131    fi
42132  fi
42133
42134  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
42135$as_echo_n "checking for target address size... " >&6; }
42136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
42137$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
42138
42139
42140  ###############################################################################
42141  #
42142  # Is the target little of big endian?
42143  #
42144   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
42145$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
42146if ${ac_cv_c_bigendian+:} false; then :
42147  $as_echo_n "(cached) " >&6
42148else
42149  ac_cv_c_bigendian=unknown
42150    # See if we're dealing with a universal compiler.
42151    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42152/* end confdefs.h.  */
42153#ifndef __APPLE_CC__
42154	       not a universal capable compiler
42155	     #endif
42156	     typedef int dummy;
42157
42158_ACEOF
42159if ac_fn_cxx_try_compile "$LINENO"; then :
42160
42161	# Check for potential -arch flags.  It is not universal unless
42162	# there are at least two -arch flags with different values.
42163	ac_arch=
42164	ac_prev=
42165	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
42166	 if test -n "$ac_prev"; then
42167	   case $ac_word in
42168	     i?86 | x86_64 | ppc | ppc64)
42169	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
42170		 ac_arch=$ac_word
42171	       else
42172		 ac_cv_c_bigendian=universal
42173		 break
42174	       fi
42175	       ;;
42176	   esac
42177	   ac_prev=
42178	 elif test "x$ac_word" = "x-arch"; then
42179	   ac_prev=arch
42180	 fi
42181       done
42182fi
42183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42184    if test $ac_cv_c_bigendian = unknown; then
42185      # See if sys/param.h defines the BYTE_ORDER macro.
42186      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42187/* end confdefs.h.  */
42188#include <sys/types.h>
42189	     #include <sys/param.h>
42190
42191int
42192main ()
42193{
42194#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
42195		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
42196		     && LITTLE_ENDIAN)
42197	      bogus endian macros
42198	     #endif
42199
42200  ;
42201  return 0;
42202}
42203_ACEOF
42204if ac_fn_cxx_try_compile "$LINENO"; then :
42205  # It does; now see whether it defined to BIG_ENDIAN or not.
42206	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42207/* end confdefs.h.  */
42208#include <sys/types.h>
42209		#include <sys/param.h>
42210
42211int
42212main ()
42213{
42214#if BYTE_ORDER != BIG_ENDIAN
42215		 not big endian
42216		#endif
42217
42218  ;
42219  return 0;
42220}
42221_ACEOF
42222if ac_fn_cxx_try_compile "$LINENO"; then :
42223  ac_cv_c_bigendian=yes
42224else
42225  ac_cv_c_bigendian=no
42226fi
42227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42228fi
42229rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42230    fi
42231    if test $ac_cv_c_bigendian = unknown; then
42232      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
42233      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42234/* end confdefs.h.  */
42235#include <limits.h>
42236
42237int
42238main ()
42239{
42240#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
42241	      bogus endian macros
42242	     #endif
42243
42244  ;
42245  return 0;
42246}
42247_ACEOF
42248if ac_fn_cxx_try_compile "$LINENO"; then :
42249  # It does; now see whether it defined to _BIG_ENDIAN or not.
42250	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42251/* end confdefs.h.  */
42252#include <limits.h>
42253
42254int
42255main ()
42256{
42257#ifndef _BIG_ENDIAN
42258		 not big endian
42259		#endif
42260
42261  ;
42262  return 0;
42263}
42264_ACEOF
42265if ac_fn_cxx_try_compile "$LINENO"; then :
42266  ac_cv_c_bigendian=yes
42267else
42268  ac_cv_c_bigendian=no
42269fi
42270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42271fi
42272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42273    fi
42274    if test $ac_cv_c_bigendian = unknown; then
42275      # Compile a test program.
42276      if test "$cross_compiling" = yes; then :
42277  # Try to guess by grepping values from an object file.
42278	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42279/* end confdefs.h.  */
42280short int ascii_mm[] =
42281		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
42282		short int ascii_ii[] =
42283		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
42284		int use_ascii (int i) {
42285		  return ascii_mm[i] + ascii_ii[i];
42286		}
42287		short int ebcdic_ii[] =
42288		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
42289		short int ebcdic_mm[] =
42290		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
42291		int use_ebcdic (int i) {
42292		  return ebcdic_mm[i] + ebcdic_ii[i];
42293		}
42294		extern int foo;
42295
42296int
42297main ()
42298{
42299return use_ascii (foo) == use_ebcdic (foo);
42300  ;
42301  return 0;
42302}
42303_ACEOF
42304if ac_fn_cxx_try_compile "$LINENO"; then :
42305  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
42306	      ac_cv_c_bigendian=yes
42307	    fi
42308	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
42309	      if test "$ac_cv_c_bigendian" = unknown; then
42310		ac_cv_c_bigendian=no
42311	      else
42312		# finding both strings is unlikely to happen, but who knows?
42313		ac_cv_c_bigendian=unknown
42314	      fi
42315	    fi
42316fi
42317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42318else
42319  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42320/* end confdefs.h.  */
42321$ac_includes_default
42322int
42323main ()
42324{
42325
42326	     /* Are we little or big endian?  From Harbison&Steele.  */
42327	     union
42328	     {
42329	       long int l;
42330	       char c[sizeof (long int)];
42331	     } u;
42332	     u.l = 1;
42333	     return u.c[sizeof (long int) - 1] == 1;
42334
42335  ;
42336  return 0;
42337}
42338_ACEOF
42339if ac_fn_cxx_try_run "$LINENO"; then :
42340  ac_cv_c_bigendian=no
42341else
42342  ac_cv_c_bigendian=yes
42343fi
42344rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42345  conftest.$ac_objext conftest.beam conftest.$ac_ext
42346fi
42347
42348    fi
42349fi
42350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
42351$as_echo "$ac_cv_c_bigendian" >&6; }
42352 case $ac_cv_c_bigendian in #(
42353   yes)
42354     ENDIAN="big";; #(
42355   no)
42356     ENDIAN="little" ;; #(
42357   universal)
42358     ENDIAN="universal_endianness"
42359     ;; #(
42360   *)
42361     ENDIAN="unknown" ;;
42362 esac
42363
42364
42365  if test "x$ENDIAN" = xuniversal_endianness; then
42366    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
42367  fi
42368  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
42369    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
42370  fi
42371
42372
42373# Configure flags for the tools
42374
42375  ###############################################################################
42376  #
42377  # How to compile shared libraries.
42378  #
42379
42380  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42381    PICFLAG="-fPIC"
42382    C_FLAG_REORDER=''
42383    CXX_FLAG_REORDER=''
42384
42385    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42386      # Linking is different on MacOSX
42387      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42388      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42389      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42390      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42391      SET_SHARED_LIBRARY_MAPFILE=''
42392    else
42393      # Default works for linux, might work on other platforms as well.
42394      SHARED_LIBRARY_FLAGS='-shared'
42395      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42396      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42397      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42398      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42399    fi
42400  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42401    PICFLAG=''
42402    C_FLAG_REORDER=''
42403    CXX_FLAG_REORDER=''
42404
42405    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42406      # Linking is different on MacOSX
42407      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42408      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42409      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42410      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42411      SET_SHARED_LIBRARY_MAPFILE=''
42412    else
42413      # Default works for linux, might work on other platforms as well.
42414      SHARED_LIBRARY_FLAGS='-shared'
42415      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42416      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42417      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42418      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42419    fi
42420  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42421    PICFLAG="-KPIC"
42422    C_FLAG_REORDER='-xF'
42423    CXX_FLAG_REORDER='-xF'
42424    SHARED_LIBRARY_FLAGS="-G"
42425    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
42426    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42427    SET_SHARED_LIBRARY_NAME=''
42428    SET_SHARED_LIBRARY_MAPFILE='-M$1'
42429  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42430    PICFLAG="-qpic=large"
42431    C_FLAG_REORDER=''
42432    CXX_FLAG_REORDER=''
42433    SHARED_LIBRARY_FLAGS="-qmkshrobj"
42434    SET_EXECUTABLE_ORIGIN=""
42435    SET_SHARED_LIBRARY_ORIGIN=''
42436    SET_SHARED_LIBRARY_NAME=''
42437    SET_SHARED_LIBRARY_MAPFILE=''
42438  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42439    PICFLAG=""
42440    C_FLAG_REORDER=''
42441    CXX_FLAG_REORDER=''
42442    SHARED_LIBRARY_FLAGS="-LD"
42443    SET_EXECUTABLE_ORIGIN=''
42444    SET_SHARED_LIBRARY_ORIGIN=''
42445    SET_SHARED_LIBRARY_NAME=''
42446    SET_SHARED_LIBRARY_MAPFILE=''
42447  fi
42448
42449
42450
42451
42452
42453
42454
42455
42456
42457  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42458    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
42459    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
42460    CFLAGS_JDKLIB_EXTRA='-xstrconst'
42461  fi
42462  # The (cross) compiler is now configured, we can now test capabilities
42463  # of the target platform.
42464
42465
42466
42467  ###############################################################################
42468  #
42469  # Setup the opt flags for different compilers
42470  # and different operating systems.
42471  #
42472
42473  # FIXME: this was indirectly the old default, but just inherited.
42474  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42475  #   C_FLAG_DEPS="-MMD -MF"
42476  # fi
42477
42478  # Generate make dependency files
42479  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42480    C_FLAG_DEPS="-MMD -MF"
42481  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42482    C_FLAG_DEPS="-MMD -MF"
42483  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42484    C_FLAG_DEPS="-xMMD -xMF"
42485  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42486    C_FLAG_DEPS="-qmakedep=gcc -MF"
42487  fi
42488  CXX_FLAG_DEPS="$C_FLAG_DEPS"
42489
42490
42491
42492  # Debug symbols
42493  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42494    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
42495      # reduce from default "-g2" option to save space
42496      CFLAGS_DEBUG_SYMBOLS="-g1"
42497      CXXFLAGS_DEBUG_SYMBOLS="-g1"
42498    else
42499      CFLAGS_DEBUG_SYMBOLS="-g"
42500      CXXFLAGS_DEBUG_SYMBOLS="-g"
42501    fi
42502  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42503    CFLAGS_DEBUG_SYMBOLS="-g"
42504    CXXFLAGS_DEBUG_SYMBOLS="-g"
42505  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42506    CFLAGS_DEBUG_SYMBOLS="-g -xs"
42507    # FIXME: likely a bug, this disables debug symbols rather than enables them
42508    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
42509  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42510    CFLAGS_DEBUG_SYMBOLS="-g"
42511    CXXFLAGS_DEBUG_SYMBOLS="-g"
42512  fi
42513
42514
42515
42516  # bounds, memory and behavior checking options
42517  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42518    case $DEBUG_LEVEL in
42519    release )
42520      # no adjustment
42521      ;;
42522    fastdebug )
42523      # no adjustment
42524      ;;
42525    slowdebug )
42526      # Add runtime stack smashing and undefined behavior checks
42527      CFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
42528      CXXFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
42529      if test "x$HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR" = "xtrue"; then
42530        CFLAGS_DEBUG_OPTIONS="$CFLAGS_DEBUG_OPTIONS  $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG"
42531        CXXFLAGS_DEBUG_OPTIONS="$CXXFLAGS_DEBUG_OPTIONS $CFLAG_DETECT_UNDEFINED_BEHAVIsOR_FLAG"
42532      fi
42533      ;;
42534    esac
42535  fi
42536
42537
42538
42539  # Optimization levels
42540  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42541    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
42542
42543    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
42544      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
42545      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
42546      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
42547      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
42548      C_O_FLAG_DEBUG="-xregs=no%frameptr"
42549      C_O_FLAG_NONE="-xregs=no%frameptr"
42550      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
42551      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
42552      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
42553      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
42554      CXX_O_FLAG_NONE="-xregs=no%frameptr"
42555      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42556        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
42557        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
42558      fi
42559    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42560      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
42561      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42562      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42563      C_O_FLAG_DEBUG=""
42564      C_O_FLAG_NONE=""
42565      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
42566      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42567      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42568      C_O_FLAG_DEBUG=""
42569      CXX_O_FLAG_NONE=""
42570    fi
42571  else
42572    # The remaining toolchains share opt flags between CC and CXX;
42573    # setup for C and duplicate afterwards.
42574    if test "x$TOOLCHAIN_TYPE" = xgcc; then
42575      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42576        # On MacOSX we optimize for size, something
42577        # we should do for all platforms?
42578        C_O_FLAG_HIGHEST="-Os"
42579        C_O_FLAG_HI="-Os"
42580        C_O_FLAG_NORM="-Os"
42581      else
42582        C_O_FLAG_HIGHEST="-O3"
42583        C_O_FLAG_HI="-O3"
42584        C_O_FLAG_NORM="-O2"
42585      fi
42586      C_O_FLAG_DEBUG="-O0"
42587      C_O_FLAG_NONE="-O0"
42588    elif test "x$TOOLCHAIN_TYPE" = xclang; then
42589      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42590        # On MacOSX we optimize for size, something
42591        # we should do for all platforms?
42592        C_O_FLAG_HIGHEST="-Os"
42593        C_O_FLAG_HI="-Os"
42594        C_O_FLAG_NORM="-Os"
42595      else
42596        C_O_FLAG_HIGHEST="-O3"
42597        C_O_FLAG_HI="-O3"
42598        C_O_FLAG_NORM="-O2"
42599      fi
42600      C_O_FLAG_DEBUG="-O0"
42601      C_O_FLAG_NONE="-O0"
42602    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42603      C_O_FLAG_HIGHEST="-O3"
42604      C_O_FLAG_HI="-O3 -qstrict"
42605      C_O_FLAG_NORM="-O2"
42606      C_O_FLAG_DEBUG="-qnoopt"
42607      C_O_FLAG_NONE="-qnoop"
42608    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42609      C_O_FLAG_HIGHEST="-O2"
42610      C_O_FLAG_HI="-O1"
42611      C_O_FLAG_NORM="-O1"
42612      C_O_FLAG_DEBUG="-Od"
42613      C_O_FLAG_NONE="-Od"
42614    fi
42615    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
42616    CXX_O_FLAG_HI="$C_O_FLAG_HI"
42617    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
42618    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
42619    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
42620  fi
42621
42622  # Adjust optimization flags according to debug level.
42623  case $DEBUG_LEVEL in
42624    release )
42625      # no adjustment
42626      ;;
42627    fastdebug )
42628      # Not quite so much optimization
42629      C_O_FLAG_HI="$C_O_FLAG_NORM"
42630      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
42631      ;;
42632    slowdebug )
42633      # Disable optimization
42634      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
42635      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
42636      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
42637      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
42638      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
42639      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
42640      ;;
42641  esac
42642
42643
42644
42645
42646
42647
42648
42649
42650
42651
42652
42653
42654
42655  # Special extras...
42656  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42657    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42658      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42659      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42660    fi
42661  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42662    LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
42663    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
42664    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
42665  fi
42666
42667  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
42668    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
42669$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
42670  fi
42671
42672  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
42673    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
42674$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
42675  fi
42676
42677  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
42678    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
42679$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
42680  fi
42681
42682
42683# Check whether --with-extra-cflags was given.
42684if test "${with_extra_cflags+set}" = set; then :
42685  withval=$with_extra_cflags;
42686fi
42687
42688
42689
42690# Check whether --with-extra-cxxflags was given.
42691if test "${with_extra_cxxflags+set}" = set; then :
42692  withval=$with_extra_cxxflags;
42693fi
42694
42695
42696
42697# Check whether --with-extra-ldflags was given.
42698if test "${with_extra_ldflags+set}" = set; then :
42699  withval=$with_extra_ldflags;
42700fi
42701
42702
42703  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
42704  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
42705  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
42706
42707  # Hotspot needs these set in their legacy form
42708  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
42709  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
42710  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
42711
42712
42713
42714
42715
42716  ###############################################################################
42717  #
42718  # Now setup the CFLAGS and LDFLAGS for the JDK build.
42719  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
42720  #
42721
42722  # Setup compiler/platform specific flags into
42723  #    CFLAGS_JDK    - C Compiler flags
42724  #    CXXFLAGS_JDK  - C++ Compiler flags
42725  #    COMMON_CCXXFLAGS_JDK - common to C and C++
42726  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42727    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wno-parentheses -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
42728        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
42729    case $OPENJDK_TARGET_CPU_ARCH in
42730      arm )
42731        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42732        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42733        ;;
42734      ppc )
42735        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42736        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42737        ;;
42738      * )
42739        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
42740        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42741        ;;
42742    esac
42743  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42744    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
42745    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
42746      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
42747      CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
42748    fi
42749
42750    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
42751    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
42752  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42753    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42754    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42755  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42756    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
42757    -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
42758    -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
42759    -DWIN32 -DIAL"
42760    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
42761      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
42762    else
42763      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
42764    fi
42765  fi
42766
42767  ###############################################################################
42768
42769  # Adjust flags according to debug level.
42770  case $DEBUG_LEVEL in
42771    fastdebug | slowdebug )
42772      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
42773      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
42774      JAVAC_FLAGS="$JAVAC_FLAGS -g"
42775      ;;
42776    release )
42777      ;;
42778    * )
42779      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42780      ;;
42781  esac
42782
42783  # Setup LP64
42784  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
42785
42786  # Set some common defines. These works for all compilers, but assume
42787  # -D is universally accepted.
42788
42789  # Setup endianness
42790  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
42791    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
42792    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
42793    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
42794    #   Note: -Dmacro         is the same as    #define macro 1
42795    #         -Dmacro=        is the same as    #define macro
42796    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42797      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
42798    else
42799      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
42800    fi
42801  else
42802    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
42803    # are defined in the system?
42804    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42805      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
42806    else
42807      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
42808    fi
42809  fi
42810
42811  # Setup target OS define. Use OS target name but in upper case.
42812  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
42813  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
42814
42815  # Setup target CPU
42816  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
42817
42818  # Setup debug/release defines
42819  if test "x$DEBUG_LEVEL" = xrelease; then
42820    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
42821    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42822      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
42823    fi
42824  else
42825    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
42826  fi
42827
42828  # Setup release name
42829  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
42830
42831
42832  # Set some additional per-OS defines.
42833  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42834    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
42835  elif test "x$OPENJDK_TARGET_OS" = xaix; then
42836    # FIXME: PPC64 should not be here.
42837    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
42838  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
42839    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
42840  fi
42841
42842  # Additional macosx handling
42843  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42844    # Setting these parameters makes it an error to link to macosx APIs that are
42845    # newer than the given OS version and makes the linked binaries compatible
42846    # even if built on a newer version of the OS.
42847    # The expected format is X.Y.Z
42848    MACOSX_VERSION_MIN=10.7.0
42849
42850
42851    # The macro takes the version with no dots, ex: 1070
42852    # Let the flags variables get resolved in make for easier override on make
42853    # command line.
42854    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42855    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42856  fi
42857
42858  # Setup some hard coded includes
42859  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42860      -I${JDK_TOPDIR}/src/java.base/share/native/include \
42861      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
42862      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_API_DIR/native/include"
42863
42864  # The shared libraries are compiled using the picflag.
42865  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42866  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
42867
42868  # Executable flags
42869  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42870  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42871
42872
42873
42874
42875
42876
42877  # Setup LDFLAGS et al.
42878  #
42879
42880  # Now this is odd. The JDK native libraries have to link against libjvm.so
42881  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
42882  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
42883  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
42884  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
42885  # libraries will link to whatever is in memory. Yuck.
42886  #
42887  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
42888  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42889    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
42890    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42891      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
42892    fi
42893    # TODO: make -debug optional "--disable-full-debug-symbols"
42894    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
42895  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42896    # If this is a --hash-style=gnu system, use --hash-style=both, why?
42897    # We have previously set HAS_GNU_HASH if this is the case
42898    if test -n "$HAS_GNU_HASH"; then
42899      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
42900    fi
42901    if test "x$OPENJDK_TARGET_OS" = xlinux; then
42902      # And since we now know that the linker is gnu, then add -z defs, to forbid
42903      # undefined symbols in object files.
42904      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
42905      case $DEBUG_LEVEL in
42906        release )
42907          # tell linker to optimize libraries.
42908          # Should this be supplied to the OSS linker as well?
42909          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
42910          ;;
42911        slowdebug )
42912          if test "x$HAS_LINKER_NOW" = "xtrue"; then
42913            # do relocations at load
42914            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
42915            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
42916          fi
42917          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42918            # mark relocations read only
42919            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42920            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42921          fi
42922          ;;
42923        fastdebug )
42924          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42925            # mark relocations read only
42926            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42927            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42928          fi
42929          ;;
42930        * )
42931          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42932          ;;
42933        esac
42934    fi
42935  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42936    LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
42937    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
42938  fi
42939
42940  if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
42941    # If undefined behaviour detection is enabled then we need to tell linker.
42942    case $DEBUG_LEVEL in
42943      release | fastdebug )
42944        ;;
42945      slowdebug )
42946        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR" >&5
42947$as_echo "$as_me: WARNING: $HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR" >&2;}
42948        if test "x$HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR" = "xtrue"; then
42949          # enable undefined behaviour checking
42950          LDFLAGS_JDK="$LDFLAGS_JDK `$ECHO -n $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG | sed -e "s/ *\(^ \+\)/ -Xlinker \1/g"`"
42951          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK `$ECHO -n $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG | sed -e "s/ *\(^ \+\)/ -Xlinker \1/g"`"
42952        fi
42953        ;;
42954      * )
42955        as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42956        ;;
42957    esac
42958  fi
42959
42960  # Customize LDFLAGS for executables
42961
42962  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
42963
42964  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42965    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
42966      LDFLAGS_STACK_SIZE=1048576
42967    else
42968      LDFLAGS_STACK_SIZE=327680
42969    fi
42970    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
42971  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
42972    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
42973  fi
42974
42975  # Customize LDFLAGS for libs
42976  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
42977
42978  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42979    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${JDK_OUTPUTDIR}/lib"
42980    LDFLAGS_JDKLIB_SUFFIX=""
42981  else
42982    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
42983        -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
42984
42985    # On some platforms (mac) the linker warns about non existing -L dirs.
42986    # Add server first if available. Linking aginst client does not always produce the same results.
42987    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
42988    # Default to server for other variants.
42989    if test "x$JVM_VARIANT_SERVER" = xtrue; then
42990      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
42991    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
42992      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
42993    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
42994      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
42995    else
42996      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
42997    fi
42998
42999    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
43000    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43001      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
43002    fi
43003  fi
43004
43005
43006
43007
43008
43009
43010
43011
43012  # Some Zero and Shark settings.
43013  # ZERO_ARCHFLAG tells the compiler which mode to build for
43014  case "${OPENJDK_TARGET_CPU}" in
43015    s390)
43016      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
43017      ;;
43018    *)
43019      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43020  esac
43021
43022  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
43023$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
43024  supports=yes
43025
43026  saved_cflags="$CFLAGS"
43027  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
43028  ac_ext=c
43029ac_cpp='$CPP $CPPFLAGS'
43030ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43031ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43032ac_compiler_gnu=$ac_cv_c_compiler_gnu
43033
43034  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43035/* end confdefs.h.  */
43036int i;
43037_ACEOF
43038if ac_fn_c_try_compile "$LINENO"; then :
43039
43040else
43041  supports=no
43042fi
43043rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43044  ac_ext=cpp
43045ac_cpp='$CXXCPP $CPPFLAGS'
43046ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43047ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43048ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43049
43050  CFLAGS="$saved_cflags"
43051
43052  saved_cxxflags="$CXXFLAGS"
43053  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
43054  ac_ext=cpp
43055ac_cpp='$CXXCPP $CPPFLAGS'
43056ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43057ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43058ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43059
43060  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43061/* end confdefs.h.  */
43062int i;
43063_ACEOF
43064if ac_fn_cxx_try_compile "$LINENO"; then :
43065
43066else
43067  supports=no
43068fi
43069rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43070  ac_ext=cpp
43071ac_cpp='$CXXCPP $CPPFLAGS'
43072ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43073ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43074ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43075
43076  CXXFLAGS="$saved_cxxflags"
43077
43078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43079$as_echo "$supports" >&6; }
43080  if test "x$supports" = "xyes" ; then
43081    :
43082  else
43083    ZERO_ARCHFLAG=""
43084  fi
43085
43086
43087
43088  # Check that the compiler supports -mX (or -qX on AIX) flags
43089  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
43090
43091  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
43092$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
43093  supports=yes
43094
43095  saved_cflags="$CFLAGS"
43096  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43097  ac_ext=c
43098ac_cpp='$CPP $CPPFLAGS'
43099ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43100ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43101ac_compiler_gnu=$ac_cv_c_compiler_gnu
43102
43103  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43104/* end confdefs.h.  */
43105int i;
43106_ACEOF
43107if ac_fn_c_try_compile "$LINENO"; then :
43108
43109else
43110  supports=no
43111fi
43112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43113  ac_ext=cpp
43114ac_cpp='$CXXCPP $CPPFLAGS'
43115ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43116ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43117ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43118
43119  CFLAGS="$saved_cflags"
43120
43121  saved_cxxflags="$CXXFLAGS"
43122  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43123  ac_ext=cpp
43124ac_cpp='$CXXCPP $CPPFLAGS'
43125ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43126ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43127ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43128
43129  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43130/* end confdefs.h.  */
43131int i;
43132_ACEOF
43133if ac_fn_cxx_try_compile "$LINENO"; then :
43134
43135else
43136  supports=no
43137fi
43138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43139  ac_ext=cpp
43140ac_cpp='$CXXCPP $CPPFLAGS'
43141ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43142ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43143ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43144
43145  CXXFLAGS="$saved_cxxflags"
43146
43147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43148$as_echo "$supports" >&6; }
43149  if test "x$supports" = "xyes" ; then
43150    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
43151  else
43152    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
43153  fi
43154
43155
43156
43157  case "${TOOLCHAIN_TYPE}" in
43158    microsoft)
43159      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
43160      ;;
43161    solstudio)
43162      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
43163      ;;
43164    gcc)
43165      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
43166      ;;
43167    clang)
43168      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
43169      ;;
43170  esac
43171
43172
43173
43174# Setup debug symbols (need objcopy from the toolchain for that)
43175
43176  #
43177  # ENABLE_DEBUG_SYMBOLS
43178  # This must be done after the toolchain is setup, since we're looking at objcopy.
43179  #
43180  # Check whether --enable-debug-symbols was given.
43181if test "${enable_debug_symbols+set}" = set; then :
43182  enableval=$enable_debug_symbols;
43183fi
43184
43185
43186  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
43187$as_echo_n "checking if we should generate debug symbols... " >&6; }
43188
43189  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
43190    # explicit enabling of enable-debug-symbols and can't find objcopy
43191    #   this is an error
43192    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
43193  fi
43194
43195  if test "x$enable_debug_symbols" = "xyes"; then
43196    ENABLE_DEBUG_SYMBOLS=true
43197  elif test "x$enable_debug_symbols" = "xno"; then
43198    ENABLE_DEBUG_SYMBOLS=false
43199  else
43200    # Default is on if objcopy is found
43201    if test "x$OBJCOPY" != x; then
43202      ENABLE_DEBUG_SYMBOLS=true
43203    # MacOS X and Windows don't use objcopy but default is on for those OSes
43204    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
43205      ENABLE_DEBUG_SYMBOLS=true
43206    else
43207      ENABLE_DEBUG_SYMBOLS=false
43208    fi
43209  fi
43210
43211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
43212$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
43213
43214  #
43215  # ZIP_DEBUGINFO_FILES
43216  #
43217  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
43218$as_echo_n "checking if we should zip debug-info files... " >&6; }
43219  # Check whether --enable-zip-debug-info was given.
43220if test "${enable_zip_debug_info+set}" = set; then :
43221  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
43222else
43223  enable_zip_debug_info="yes"
43224fi
43225
43226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
43227$as_echo "${enable_zip_debug_info}" >&6; }
43228
43229  if test "x${enable_zip_debug_info}" = "xno"; then
43230    ZIP_DEBUGINFO_FILES=false
43231  else
43232    ZIP_DEBUGINFO_FILES=true
43233  fi
43234
43235
43236
43237
43238
43239###############################################################################
43240#
43241# Check dependencies for external and internal libraries.
43242#
43243###############################################################################
43244
43245# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
43246
43247  # When using cygwin or msys, we need a wrapper binary that renames
43248  # /cygdrive/c/ arguments into c:/ arguments and peeks into
43249  # @files and rewrites these too! This wrapper binary is
43250  # called fixpath.
43251  FIXPATH=
43252  if test "x$OPENJDK_BUILD_OS" = xwindows; then
43253    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
43254$as_echo_n "checking if fixpath can be created... " >&6; }
43255    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
43256    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
43257    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
43258      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
43259      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
43260      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
43261      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
43262    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
43263      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
43264      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
43265
43266      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
43267      # @ was chosen as separator to minimize risk of other tools messing around with it
43268      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
43269      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
43270
43271      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
43272    fi
43273    rm -f $OUTPUT_ROOT/fixpath*
43274    cd $OUTPUT_ROOT
43275    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
43276    cd $CURDIR
43277
43278    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
43279      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43280$as_echo "no" >&6; }
43281      cat $OUTPUT_ROOT/fixpath1.log
43282      as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
43283    fi
43284    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43285$as_echo "yes" >&6; }
43286    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
43287$as_echo_n "checking if fixpath.exe works... " >&6; }
43288    cd $OUTPUT_ROOT
43289    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
43290    cd $CURDIR
43291    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
43292      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43293$as_echo "no" >&6; }
43294      cat $OUTPUT_ROOT/fixpath2.log
43295      as_fn_error $? "fixpath did not work!" "$LINENO" 5
43296    fi
43297    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43298$as_echo "yes" >&6; }
43299    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
43300  fi
43301
43302
43303
43304
43305
43306
43307  ###############################################################################
43308  #
43309  # OS specific settings that we never will need to probe.
43310  #
43311  if test "x$OPENJDK_TARGET_OS" = xlinux; then
43312    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
43313$as_echo_n "checking what is not needed on Linux?... " >&6; }
43314    PULSE_NOT_NEEDED=yes
43315    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
43316$as_echo "pulse" >&6; }
43317  fi
43318
43319  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43320    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
43321$as_echo_n "checking what is not needed on Solaris?... " >&6; }
43322    ALSA_NOT_NEEDED=yes
43323    PULSE_NOT_NEEDED=yes
43324    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43325$as_echo "alsa pulse" >&6; }
43326  fi
43327
43328  if test "x$OPENJDK_TARGET_OS" = xaix; then
43329    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
43330$as_echo_n "checking what is not needed on AIX?... " >&6; }
43331    ALSA_NOT_NEEDED=yes
43332    PULSE_NOT_NEEDED=yes
43333    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43334$as_echo "alsa pulse" >&6; }
43335  fi
43336
43337
43338  if test "x$OPENJDK_TARGET_OS" = xwindows; then
43339    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
43340$as_echo_n "checking what is not needed on Windows?... " >&6; }
43341    CUPS_NOT_NEEDED=yes
43342    ALSA_NOT_NEEDED=yes
43343    PULSE_NOT_NEEDED=yes
43344    X11_NOT_NEEDED=yes
43345    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
43346$as_echo "alsa cups pulse x11" >&6; }
43347  fi
43348
43349  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43350    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
43351$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
43352    ALSA_NOT_NEEDED=yes
43353    PULSE_NOT_NEEDED=yes
43354    X11_NOT_NEEDED=yes
43355    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
43356$as_echo "alsa pulse x11" >&6; }
43357  fi
43358
43359  if test "x$OPENJDK_TARGET_OS" = xbsd; then
43360    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
43361$as_echo_n "checking what is not needed on bsd?... " >&6; }
43362    ALSA_NOT_NEEDED=yes
43363    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
43364$as_echo "alsa" >&6; }
43365  fi
43366
43367  if test "x$OPENJDK" = "xfalse"; then
43368    FREETYPE_NOT_NEEDED=yes
43369  fi
43370
43371  if test "x$SUPPORT_HEADFUL" = xno; then
43372    X11_NOT_NEEDED=yes
43373  fi
43374
43375
43376
43377  ###############################################################################
43378  #
43379  # Check for X Windows
43380  #
43381
43382  # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
43383  # Make a simple check for the libraries at the sysroot, and setup --x-includes and
43384  # --x-libraries for the sysroot, if that seems to be correct.
43385  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
43386    if test "x$SYSROOT" != "x"; then
43387      if test "x$x_includes" = xNONE; then
43388        if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
43389          x_includes="$SYSROOT/usr/X11R6/include"
43390        elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
43391          x_includes="$SYSROOT/usr/include"
43392        fi
43393      fi
43394      if test "x$x_libraries" = xNONE; then
43395        if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
43396          x_libraries="$SYSROOT/usr/X11R6/lib"
43397        elif test "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
43398          x_libraries="$SYSROOT/usr/lib64"
43399        elif test -f "$SYSROOT/usr/lib/libX11.so"; then
43400          x_libraries="$SYSROOT/usr/lib"
43401        fi
43402      fi
43403    fi
43404  fi
43405
43406  # Now let autoconf do it's magic
43407  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
43408$as_echo_n "checking for X... " >&6; }
43409
43410
43411# Check whether --with-x was given.
43412if test "${with_x+set}" = set; then :
43413  withval=$with_x;
43414fi
43415
43416# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
43417if test "x$with_x" = xno; then
43418  # The user explicitly disabled X.
43419  have_x=disabled
43420else
43421  case $x_includes,$x_libraries in #(
43422    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
43423    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
43424  $as_echo_n "(cached) " >&6
43425else
43426  # One or both of the vars are not set, and there is no cached value.
43427ac_x_includes=no ac_x_libraries=no
43428rm -f -r conftest.dir
43429if mkdir conftest.dir; then
43430  cd conftest.dir
43431  cat >Imakefile <<'_ACEOF'
43432incroot:
43433	@echo incroot='${INCROOT}'
43434usrlibdir:
43435	@echo usrlibdir='${USRLIBDIR}'
43436libdir:
43437	@echo libdir='${LIBDIR}'
43438_ACEOF
43439  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
43440    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
43441    for ac_var in incroot usrlibdir libdir; do
43442      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
43443    done
43444    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
43445    for ac_extension in a so sl dylib la dll; do
43446      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
43447	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
43448	ac_im_usrlibdir=$ac_im_libdir; break
43449      fi
43450    done
43451    # Screen out bogus values from the imake configuration.  They are
43452    # bogus both because they are the default anyway, and because
43453    # using them would break gcc on systems where it needs fixed includes.
43454    case $ac_im_incroot in
43455	/usr/include) ac_x_includes= ;;
43456	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
43457    esac
43458    case $ac_im_usrlibdir in
43459	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
43460	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
43461    esac
43462  fi
43463  cd ..
43464  rm -f -r conftest.dir
43465fi
43466
43467# Standard set of common directories for X headers.
43468# Check X11 before X11Rn because it is often a symlink to the current release.
43469ac_x_header_dirs='
43470/usr/X11/include
43471/usr/X11R7/include
43472/usr/X11R6/include
43473/usr/X11R5/include
43474/usr/X11R4/include
43475
43476/usr/include/X11
43477/usr/include/X11R7
43478/usr/include/X11R6
43479/usr/include/X11R5
43480/usr/include/X11R4
43481
43482/usr/local/X11/include
43483/usr/local/X11R7/include
43484/usr/local/X11R6/include
43485/usr/local/X11R5/include
43486/usr/local/X11R4/include
43487
43488/usr/local/include/X11
43489/usr/local/include/X11R7
43490/usr/local/include/X11R6
43491/usr/local/include/X11R5
43492/usr/local/include/X11R4
43493
43494/usr/X386/include
43495/usr/x386/include
43496/usr/XFree86/include/X11
43497
43498/usr/include
43499/usr/local/include
43500/usr/unsupported/include
43501/usr/athena/include
43502/usr/local/x11r5/include
43503/usr/lpp/Xamples/include
43504
43505/usr/openwin/include
43506/usr/openwin/share/include'
43507
43508if test "$ac_x_includes" = no; then
43509  # Guess where to find include files, by looking for Xlib.h.
43510  # First, try using that file with no special directory specified.
43511  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43512/* end confdefs.h.  */
43513#include <X11/Xlib.h>
43514_ACEOF
43515if ac_fn_cxx_try_cpp "$LINENO"; then :
43516  # We can compile using X headers with no special include directory.
43517ac_x_includes=
43518else
43519  for ac_dir in $ac_x_header_dirs; do
43520  if test -r "$ac_dir/X11/Xlib.h"; then
43521    ac_x_includes=$ac_dir
43522    break
43523  fi
43524done
43525fi
43526rm -f conftest.err conftest.i conftest.$ac_ext
43527fi # $ac_x_includes = no
43528
43529if test "$ac_x_libraries" = no; then
43530  # Check for the libraries.
43531  # See if we find them without any special options.
43532  # Don't add to $LIBS permanently.
43533  ac_save_LIBS=$LIBS
43534  LIBS="-lX11 $LIBS"
43535  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43536/* end confdefs.h.  */
43537#include <X11/Xlib.h>
43538int
43539main ()
43540{
43541XrmInitialize ()
43542  ;
43543  return 0;
43544}
43545_ACEOF
43546if ac_fn_cxx_try_link "$LINENO"; then :
43547  LIBS=$ac_save_LIBS
43548# We can link X programs with no special library path.
43549ac_x_libraries=
43550else
43551  LIBS=$ac_save_LIBS
43552for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
43553do
43554  # Don't even attempt the hair of trying to link an X program!
43555  for ac_extension in a so sl dylib la dll; do
43556    if test -r "$ac_dir/libX11.$ac_extension"; then
43557      ac_x_libraries=$ac_dir
43558      break 2
43559    fi
43560  done
43561done
43562fi
43563rm -f core conftest.err conftest.$ac_objext \
43564    conftest$ac_exeext conftest.$ac_ext
43565fi # $ac_x_libraries = no
43566
43567case $ac_x_includes,$ac_x_libraries in #(
43568  no,* | *,no | *\'*)
43569    # Didn't find X, or a directory has "'" in its name.
43570    ac_cv_have_x="have_x=no";; #(
43571  *)
43572    # Record where we found X for the cache.
43573    ac_cv_have_x="have_x=yes\
43574	ac_x_includes='$ac_x_includes'\
43575	ac_x_libraries='$ac_x_libraries'"
43576esac
43577fi
43578;; #(
43579    *) have_x=yes;;
43580  esac
43581  eval "$ac_cv_have_x"
43582fi # $with_x != no
43583
43584if test "$have_x" != yes; then
43585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
43586$as_echo "$have_x" >&6; }
43587  no_x=yes
43588else
43589  # If each of the values was on the command line, it overrides each guess.
43590  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
43591  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
43592  # Update the cache value to reflect the command line values.
43593  ac_cv_have_x="have_x=yes\
43594	ac_x_includes='$x_includes'\
43595	ac_x_libraries='$x_libraries'"
43596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
43597$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
43598fi
43599
43600  if test "$no_x" = yes; then
43601  # Not all programs may use this symbol, but it does not hurt to define it.
43602
43603$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
43604
43605  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
43606else
43607  if test -n "$x_includes"; then
43608    X_CFLAGS="$X_CFLAGS -I$x_includes"
43609  fi
43610
43611  # It would also be nice to do this for all -L options, not just this one.
43612  if test -n "$x_libraries"; then
43613    X_LIBS="$X_LIBS -L$x_libraries"
43614    # For Solaris; some versions of Sun CC require a space after -R and
43615    # others require no space.  Words are not sufficient . . . .
43616    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
43617$as_echo_n "checking whether -R must be followed by a space... " >&6; }
43618    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
43619    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
43620    ac_cxx_werror_flag=yes
43621    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43622/* end confdefs.h.  */
43623
43624int
43625main ()
43626{
43627
43628  ;
43629  return 0;
43630}
43631_ACEOF
43632if ac_fn_cxx_try_link "$LINENO"; then :
43633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43634$as_echo "no" >&6; }
43635       X_LIBS="$X_LIBS -R$x_libraries"
43636else
43637  LIBS="$ac_xsave_LIBS -R $x_libraries"
43638       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43639/* end confdefs.h.  */
43640
43641int
43642main ()
43643{
43644
43645  ;
43646  return 0;
43647}
43648_ACEOF
43649if ac_fn_cxx_try_link "$LINENO"; then :
43650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43651$as_echo "yes" >&6; }
43652	  X_LIBS="$X_LIBS -R $x_libraries"
43653else
43654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
43655$as_echo "neither works" >&6; }
43656fi
43657rm -f core conftest.err conftest.$ac_objext \
43658    conftest$ac_exeext conftest.$ac_ext
43659fi
43660rm -f core conftest.err conftest.$ac_objext \
43661    conftest$ac_exeext conftest.$ac_ext
43662    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
43663    LIBS=$ac_xsave_LIBS
43664  fi
43665
43666  # Check for system-dependent libraries X programs must link with.
43667  # Do this before checking for the system-independent R6 libraries
43668  # (-lICE), since we may need -lsocket or whatever for X linking.
43669
43670  if test "$ISC" = yes; then
43671    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
43672  else
43673    # Martyn Johnson says this is needed for Ultrix, if the X
43674    # libraries were built with DECnet support.  And Karl Berry says
43675    # the Alpha needs dnet_stub (dnet does not exist).
43676    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
43677    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43678/* end confdefs.h.  */
43679
43680/* Override any GCC internal prototype to avoid an error.
43681   Use char because int might match the return type of a GCC
43682   builtin and then its argument prototype would still apply.  */
43683#ifdef __cplusplus
43684extern "C"
43685#endif
43686char XOpenDisplay ();
43687int
43688main ()
43689{
43690return XOpenDisplay ();
43691  ;
43692  return 0;
43693}
43694_ACEOF
43695if ac_fn_cxx_try_link "$LINENO"; then :
43696
43697else
43698  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
43699$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
43700if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
43701  $as_echo_n "(cached) " >&6
43702else
43703  ac_check_lib_save_LIBS=$LIBS
43704LIBS="-ldnet  $LIBS"
43705cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43706/* end confdefs.h.  */
43707
43708/* Override any GCC internal prototype to avoid an error.
43709   Use char because int might match the return type of a GCC
43710   builtin and then its argument prototype would still apply.  */
43711#ifdef __cplusplus
43712extern "C"
43713#endif
43714char dnet_ntoa ();
43715int
43716main ()
43717{
43718return dnet_ntoa ();
43719  ;
43720  return 0;
43721}
43722_ACEOF
43723if ac_fn_cxx_try_link "$LINENO"; then :
43724  ac_cv_lib_dnet_dnet_ntoa=yes
43725else
43726  ac_cv_lib_dnet_dnet_ntoa=no
43727fi
43728rm -f core conftest.err conftest.$ac_objext \
43729    conftest$ac_exeext conftest.$ac_ext
43730LIBS=$ac_check_lib_save_LIBS
43731fi
43732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
43733$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
43734if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
43735  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
43736fi
43737
43738    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
43739      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
43740$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
43741if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
43742  $as_echo_n "(cached) " >&6
43743else
43744  ac_check_lib_save_LIBS=$LIBS
43745LIBS="-ldnet_stub  $LIBS"
43746cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43747/* end confdefs.h.  */
43748
43749/* Override any GCC internal prototype to avoid an error.
43750   Use char because int might match the return type of a GCC
43751   builtin and then its argument prototype would still apply.  */
43752#ifdef __cplusplus
43753extern "C"
43754#endif
43755char dnet_ntoa ();
43756int
43757main ()
43758{
43759return dnet_ntoa ();
43760  ;
43761  return 0;
43762}
43763_ACEOF
43764if ac_fn_cxx_try_link "$LINENO"; then :
43765  ac_cv_lib_dnet_stub_dnet_ntoa=yes
43766else
43767  ac_cv_lib_dnet_stub_dnet_ntoa=no
43768fi
43769rm -f core conftest.err conftest.$ac_objext \
43770    conftest$ac_exeext conftest.$ac_ext
43771LIBS=$ac_check_lib_save_LIBS
43772fi
43773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
43774$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
43775if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
43776  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
43777fi
43778
43779    fi
43780fi
43781rm -f core conftest.err conftest.$ac_objext \
43782    conftest$ac_exeext conftest.$ac_ext
43783    LIBS="$ac_xsave_LIBS"
43784
43785    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
43786    # to get the SysV transport functions.
43787    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
43788    # needs -lnsl.
43789    # The nsl library prevents programs from opening the X display
43790    # on Irix 5.2, according to T.E. Dickey.
43791    # The functions gethostbyname, getservbyname, and inet_addr are
43792    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
43793    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
43794if test "x$ac_cv_func_gethostbyname" = xyes; then :
43795
43796fi
43797
43798    if test $ac_cv_func_gethostbyname = no; then
43799      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
43800$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
43801if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
43802  $as_echo_n "(cached) " >&6
43803else
43804  ac_check_lib_save_LIBS=$LIBS
43805LIBS="-lnsl  $LIBS"
43806cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43807/* end confdefs.h.  */
43808
43809/* Override any GCC internal prototype to avoid an error.
43810   Use char because int might match the return type of a GCC
43811   builtin and then its argument prototype would still apply.  */
43812#ifdef __cplusplus
43813extern "C"
43814#endif
43815char gethostbyname ();
43816int
43817main ()
43818{
43819return gethostbyname ();
43820  ;
43821  return 0;
43822}
43823_ACEOF
43824if ac_fn_cxx_try_link "$LINENO"; then :
43825  ac_cv_lib_nsl_gethostbyname=yes
43826else
43827  ac_cv_lib_nsl_gethostbyname=no
43828fi
43829rm -f core conftest.err conftest.$ac_objext \
43830    conftest$ac_exeext conftest.$ac_ext
43831LIBS=$ac_check_lib_save_LIBS
43832fi
43833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
43834$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
43835if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
43836  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
43837fi
43838
43839      if test $ac_cv_lib_nsl_gethostbyname = no; then
43840	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
43841$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
43842if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
43843  $as_echo_n "(cached) " >&6
43844else
43845  ac_check_lib_save_LIBS=$LIBS
43846LIBS="-lbsd  $LIBS"
43847cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43848/* end confdefs.h.  */
43849
43850/* Override any GCC internal prototype to avoid an error.
43851   Use char because int might match the return type of a GCC
43852   builtin and then its argument prototype would still apply.  */
43853#ifdef __cplusplus
43854extern "C"
43855#endif
43856char gethostbyname ();
43857int
43858main ()
43859{
43860return gethostbyname ();
43861  ;
43862  return 0;
43863}
43864_ACEOF
43865if ac_fn_cxx_try_link "$LINENO"; then :
43866  ac_cv_lib_bsd_gethostbyname=yes
43867else
43868  ac_cv_lib_bsd_gethostbyname=no
43869fi
43870rm -f core conftest.err conftest.$ac_objext \
43871    conftest$ac_exeext conftest.$ac_ext
43872LIBS=$ac_check_lib_save_LIBS
43873fi
43874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
43875$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
43876if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
43877  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
43878fi
43879
43880      fi
43881    fi
43882
43883    # lieder@skyler.mavd.honeywell.com says without -lsocket,
43884    # socket/setsockopt and other routines are undefined under SCO ODT
43885    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
43886    # on later versions), says Simon Leinen: it contains gethostby*
43887    # variants that don't use the name server (or something).  -lsocket
43888    # must be given before -lnsl if both are needed.  We assume that
43889    # if connect needs -lnsl, so does gethostbyname.
43890    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
43891if test "x$ac_cv_func_connect" = xyes; then :
43892
43893fi
43894
43895    if test $ac_cv_func_connect = no; then
43896      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
43897$as_echo_n "checking for connect in -lsocket... " >&6; }
43898if ${ac_cv_lib_socket_connect+:} false; then :
43899  $as_echo_n "(cached) " >&6
43900else
43901  ac_check_lib_save_LIBS=$LIBS
43902LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
43903cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43904/* end confdefs.h.  */
43905
43906/* Override any GCC internal prototype to avoid an error.
43907   Use char because int might match the return type of a GCC
43908   builtin and then its argument prototype would still apply.  */
43909#ifdef __cplusplus
43910extern "C"
43911#endif
43912char connect ();
43913int
43914main ()
43915{
43916return connect ();
43917  ;
43918  return 0;
43919}
43920_ACEOF
43921if ac_fn_cxx_try_link "$LINENO"; then :
43922  ac_cv_lib_socket_connect=yes
43923else
43924  ac_cv_lib_socket_connect=no
43925fi
43926rm -f core conftest.err conftest.$ac_objext \
43927    conftest$ac_exeext conftest.$ac_ext
43928LIBS=$ac_check_lib_save_LIBS
43929fi
43930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
43931$as_echo "$ac_cv_lib_socket_connect" >&6; }
43932if test "x$ac_cv_lib_socket_connect" = xyes; then :
43933  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
43934fi
43935
43936    fi
43937
43938    # Guillermo Gomez says -lposix is necessary on A/UX.
43939    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
43940if test "x$ac_cv_func_remove" = xyes; then :
43941
43942fi
43943
43944    if test $ac_cv_func_remove = no; then
43945      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
43946$as_echo_n "checking for remove in -lposix... " >&6; }
43947if ${ac_cv_lib_posix_remove+:} false; then :
43948  $as_echo_n "(cached) " >&6
43949else
43950  ac_check_lib_save_LIBS=$LIBS
43951LIBS="-lposix  $LIBS"
43952cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43953/* end confdefs.h.  */
43954
43955/* Override any GCC internal prototype to avoid an error.
43956   Use char because int might match the return type of a GCC
43957   builtin and then its argument prototype would still apply.  */
43958#ifdef __cplusplus
43959extern "C"
43960#endif
43961char remove ();
43962int
43963main ()
43964{
43965return remove ();
43966  ;
43967  return 0;
43968}
43969_ACEOF
43970if ac_fn_cxx_try_link "$LINENO"; then :
43971  ac_cv_lib_posix_remove=yes
43972else
43973  ac_cv_lib_posix_remove=no
43974fi
43975rm -f core conftest.err conftest.$ac_objext \
43976    conftest$ac_exeext conftest.$ac_ext
43977LIBS=$ac_check_lib_save_LIBS
43978fi
43979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
43980$as_echo "$ac_cv_lib_posix_remove" >&6; }
43981if test "x$ac_cv_lib_posix_remove" = xyes; then :
43982  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
43983fi
43984
43985    fi
43986
43987    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
43988    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
43989if test "x$ac_cv_func_shmat" = xyes; then :
43990
43991fi
43992
43993    if test $ac_cv_func_shmat = no; then
43994      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
43995$as_echo_n "checking for shmat in -lipc... " >&6; }
43996if ${ac_cv_lib_ipc_shmat+:} false; then :
43997  $as_echo_n "(cached) " >&6
43998else
43999  ac_check_lib_save_LIBS=$LIBS
44000LIBS="-lipc  $LIBS"
44001cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44002/* end confdefs.h.  */
44003
44004/* Override any GCC internal prototype to avoid an error.
44005   Use char because int might match the return type of a GCC
44006   builtin and then its argument prototype would still apply.  */
44007#ifdef __cplusplus
44008extern "C"
44009#endif
44010char shmat ();
44011int
44012main ()
44013{
44014return shmat ();
44015  ;
44016  return 0;
44017}
44018_ACEOF
44019if ac_fn_cxx_try_link "$LINENO"; then :
44020  ac_cv_lib_ipc_shmat=yes
44021else
44022  ac_cv_lib_ipc_shmat=no
44023fi
44024rm -f core conftest.err conftest.$ac_objext \
44025    conftest$ac_exeext conftest.$ac_ext
44026LIBS=$ac_check_lib_save_LIBS
44027fi
44028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
44029$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
44030if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
44031  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
44032fi
44033
44034    fi
44035  fi
44036
44037  # Check for libraries that X11R6 Xt/Xaw programs need.
44038  ac_save_LDFLAGS=$LDFLAGS
44039  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
44040  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
44041  # check for ICE first), but we must link in the order -lSM -lICE or
44042  # we get undefined symbols.  So assume we have SM if we have ICE.
44043  # These have to be linked with before -lX11, unlike the other
44044  # libraries we check for below, so use a different variable.
44045  # John Interrante, Karl Berry
44046  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
44047$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
44048if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
44049  $as_echo_n "(cached) " >&6
44050else
44051  ac_check_lib_save_LIBS=$LIBS
44052LIBS="-lICE $X_EXTRA_LIBS $LIBS"
44053cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44054/* end confdefs.h.  */
44055
44056/* Override any GCC internal prototype to avoid an error.
44057   Use char because int might match the return type of a GCC
44058   builtin and then its argument prototype would still apply.  */
44059#ifdef __cplusplus
44060extern "C"
44061#endif
44062char IceConnectionNumber ();
44063int
44064main ()
44065{
44066return IceConnectionNumber ();
44067  ;
44068  return 0;
44069}
44070_ACEOF
44071if ac_fn_cxx_try_link "$LINENO"; then :
44072  ac_cv_lib_ICE_IceConnectionNumber=yes
44073else
44074  ac_cv_lib_ICE_IceConnectionNumber=no
44075fi
44076rm -f core conftest.err conftest.$ac_objext \
44077    conftest$ac_exeext conftest.$ac_ext
44078LIBS=$ac_check_lib_save_LIBS
44079fi
44080{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
44081$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
44082if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
44083  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
44084fi
44085
44086  LDFLAGS=$ac_save_LDFLAGS
44087
44088fi
44089
44090
44091  # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
44092  # this doesn't make sense so we remove it.
44093  if test "x$COMPILE_TYPE" = xcross; then
44094    X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
44095  fi
44096
44097  if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
44098
44099  # Print a helpful message on how to acquire the necessary build dependency.
44100  # x11 is the help tag: freetype, cups, pulse, alsa etc
44101  MISSING_DEPENDENCY=x11
44102
44103  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44104    cygwin_help $MISSING_DEPENDENCY
44105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44106    msys_help $MISSING_DEPENDENCY
44107  else
44108    PKGHANDLER_COMMAND=
44109
44110    case $PKGHANDLER in
44111      apt-get)
44112        apt_help     $MISSING_DEPENDENCY ;;
44113      yum)
44114        yum_help     $MISSING_DEPENDENCY ;;
44115      port)
44116        port_help    $MISSING_DEPENDENCY ;;
44117      pkgutil)
44118        pkgutil_help $MISSING_DEPENDENCY ;;
44119      pkgadd)
44120        pkgadd_help  $MISSING_DEPENDENCY ;;
44121    esac
44122
44123    if test "x$PKGHANDLER_COMMAND" != x; then
44124      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44125    fi
44126  fi
44127
44128    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
44129  fi
44130
44131  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44132    OPENWIN_HOME="/usr/openwin"
44133    X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
44134    X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
44135        -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
44136        -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
44137        -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
44138  fi
44139
44140  #
44141  # Weird Sol10 something check...TODO change to try compile
44142  #
44143  if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
44144    if test "`uname -r`" = "5.10"; then
44145      if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
44146        X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
44147      fi
44148    fi
44149  fi
44150
44151  ac_ext=c
44152ac_cpp='$CPP $CPPFLAGS'
44153ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44154ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44155ac_compiler_gnu=$ac_cv_c_compiler_gnu
44156
44157  OLD_CFLAGS="$CFLAGS"
44158  CFLAGS="$CFLAGS $X_CFLAGS"
44159
44160  # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
44161  for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
44162do :
44163  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44164ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
44165        # include <X11/Xlib.h>
44166        # include <X11/Xutil.h>
44167
44168
44169"
44170if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44171  cat >>confdefs.h <<_ACEOF
44172#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44173_ACEOF
44174 X11_A_OK=yes
44175else
44176  X11_A_OK=no; break
44177fi
44178
44179done
44180
44181
44182  CFLAGS="$OLD_CFLAGS"
44183  ac_ext=cpp
44184ac_cpp='$CXXCPP $CPPFLAGS'
44185ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44186ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44187ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44188
44189
44190  if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
44191
44192  # Print a helpful message on how to acquire the necessary build dependency.
44193  # x11 is the help tag: freetype, cups, pulse, alsa etc
44194  MISSING_DEPENDENCY=x11
44195
44196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44197    cygwin_help $MISSING_DEPENDENCY
44198  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44199    msys_help $MISSING_DEPENDENCY
44200  else
44201    PKGHANDLER_COMMAND=
44202
44203    case $PKGHANDLER in
44204      apt-get)
44205        apt_help     $MISSING_DEPENDENCY ;;
44206      yum)
44207        yum_help     $MISSING_DEPENDENCY ;;
44208      port)
44209        port_help    $MISSING_DEPENDENCY ;;
44210      pkgutil)
44211        pkgutil_help $MISSING_DEPENDENCY ;;
44212      pkgadd)
44213        pkgadd_help  $MISSING_DEPENDENCY ;;
44214    esac
44215
44216    if test "x$PKGHANDLER_COMMAND" != x; then
44217      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44218    fi
44219  fi
44220
44221    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
44222  fi
44223
44224
44225
44226
44227
44228
44229  ###############################################################################
44230  #
44231  # The common unix printing system cups is used to print from java.
44232  #
44233
44234# Check whether --with-cups was given.
44235if test "${with_cups+set}" = set; then :
44236  withval=$with_cups;
44237fi
44238
44239
44240# Check whether --with-cups-include was given.
44241if test "${with_cups_include+set}" = set; then :
44242  withval=$with_cups_include;
44243fi
44244
44245
44246  if test "x$CUPS_NOT_NEEDED" = xyes; then
44247    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
44248      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
44249$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
44250    fi
44251    CUPS_CFLAGS=
44252  else
44253    CUPS_FOUND=no
44254
44255    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
44256      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
44257    fi
44258
44259    if test "x${with_cups}" != x; then
44260      CUPS_CFLAGS="-I${with_cups}/include"
44261      CUPS_FOUND=yes
44262    fi
44263    if test "x${with_cups_include}" != x; then
44264      CUPS_CFLAGS="-I${with_cups_include}"
44265      CUPS_FOUND=yes
44266    fi
44267    if test "x$CUPS_FOUND" = xno; then
44268
44269
44270  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
44271    # Source the builddeps file again, to make sure it uses the latest variables!
44272    . $builddepsfile
44273    # Look for a target and build machine specific resource!
44274    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
44275    if test "x$resource" = x; then
44276      # Ok, lets instead look for a target specific resource
44277      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
44278    fi
44279    if test "x$resource" = x; then
44280      # Ok, lets instead look for a build specific resource
44281      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
44282    fi
44283    if test "x$resource" = x; then
44284      # Ok, lets instead look for a generic resource
44285      # (The cups comes from M4 and not the shell, thus no need for eval here.)
44286      resource=${builddep_cups}
44287    fi
44288    if test "x$resource" != x; then
44289      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
44290$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
44291      # If the resource in the builddeps.conf file is an existing directory,
44292      # for example /java/linux/cups
44293      if test -d ${resource}; then
44294        depdir=${resource}
44295      else
44296
44297  # cups is for example mymodule
44298  # $resource is for example libs/general/libmymod_1_2_3.zip
44299  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
44300  # $with_builddeps_dir is for example /localhome/builddeps
44301  # depdir is the name of the variable into which we store the depdir, eg MYMOD
44302  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
44303  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
44304  filename=`basename $resource`
44305  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
44306  filebase=${filename%%.*}
44307  extension=${filename#*.}
44308  installdir=$with_builddeps_dir/$filebase
44309  if test ! -f $installdir/$filename.unpacked; then
44310    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
44311$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
44312    if test ! -d $installdir; then
44313      mkdir -p $installdir
44314    fi
44315    if test ! -d $installdir; then
44316      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
44317    fi
44318    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
44319    touch $tmpfile
44320    if test ! -f $tmpfile; then
44321      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
44322    fi
44323
44324  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
44325  # $tmpfile is the local file name for the downloaded file.
44326  VALID_TOOL=no
44327  if test "x$BDEPS_FTP" = xwget; then
44328    VALID_TOOL=yes
44329    wget -O $tmpfile $with_builddeps_server/$resource
44330  fi
44331  if test "x$BDEPS_FTP" = xlftp; then
44332    VALID_TOOL=yes
44333    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
44334  fi
44335  if test "x$BDEPS_FTP" = xftp; then
44336    VALID_TOOL=yes
44337    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
44338    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
44339    FTPUSERPWD=${FTPSERVER%%@*}
44340    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
44341      FTPUSER=${userpwd%%:*}
44342      FTPPWD=${userpwd#*@}
44343      FTPSERVER=${FTPSERVER#*@}
44344    else
44345      FTPUSER=ftp
44346      FTPPWD=ftp
44347    fi
44348    # the "pass" command does not work on some
44349    # ftp clients (read ftp.exe) but if it works,
44350    # passive mode is better!
44351    ( \
44352        echo "user $FTPUSER $FTPPWD"        ; \
44353        echo "pass"                         ; \
44354        echo "bin"                          ; \
44355        echo "get $FTPPATH $tmpfile"              ; \
44356    ) | ftp -in $FTPSERVER
44357  fi
44358  if test "x$VALID_TOOL" != xyes; then
44359    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
44360  fi
44361
44362    mv $tmpfile $installdir/$filename
44363    if test ! -s $installdir/$filename; then
44364      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
44365    fi
44366    case "$extension" in
44367      zip)  echo "Unzipping $installdir/$filename..."
44368        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
44369        ;;
44370      tar.gz) echo "Untaring $installdir/$filename..."
44371        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44372        ;;
44373      tgz) echo "Untaring $installdir/$filename..."
44374        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44375        ;;
44376      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
44377        ;;
44378    esac
44379  fi
44380  if test -f $installdir/$filename.unpacked; then
44381    depdir=$installdir
44382  fi
44383
44384      fi
44385      # Source the builddeps file again, because in the previous command, the depdir
44386      # was updated to point at the current build dependency install directory.
44387      . $builddepsfile
44388      # Now extract variables from the builddeps.conf files.
44389      theroot=${builddep_cups_ROOT}
44390      thecflags=${builddep_cups_CFLAGS}
44391      thelibs=${builddep_cups_LIBS}
44392      if test "x$depdir" = x; then
44393        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
44394      fi
44395      CUPS=$depdir
44396      if test "x$theroot" != x; then
44397        CUPS="$theroot"
44398      fi
44399      if test "x$thecflags" != x; then
44400        CUPS_CFLAGS="$thecflags"
44401      fi
44402      if test "x$thelibs" != x; then
44403        CUPS_LIBS="$thelibs"
44404      fi
44405      CUPS_FOUND=yes
44406
44407    fi
44408
44409  fi
44410
44411    fi
44412    if test "x$CUPS_FOUND" = xno; then
44413      # Are the cups headers installed in the default /usr/include location?
44414      for ac_header in cups/cups.h cups/ppd.h
44415do :
44416  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44417ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
44418if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44419  cat >>confdefs.h <<_ACEOF
44420#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44421_ACEOF
44422
44423            CUPS_FOUND=yes
44424            CUPS_CFLAGS=
44425            DEFAULT_CUPS=yes
44426
44427
44428fi
44429
44430done
44431
44432    fi
44433    if test "x$CUPS_FOUND" = xno; then
44434      # Getting nervous now? Lets poke around for standard Solaris third-party
44435      # package installation locations.
44436      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
44437$as_echo_n "checking for cups headers... " >&6; }
44438      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
44439        # An SFW package seems to be installed!
44440        CUPS_FOUND=yes
44441        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
44442      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
44443        # A CSW package seems to be installed!
44444        CUPS_FOUND=yes
44445        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
44446      fi
44447      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
44448$as_echo "$CUPS_FOUND" >&6; }
44449    fi
44450    if test "x$CUPS_FOUND" = xno; then
44451
44452  # Print a helpful message on how to acquire the necessary build dependency.
44453  # cups is the help tag: freetype, cups, pulse, alsa etc
44454  MISSING_DEPENDENCY=cups
44455
44456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44457    cygwin_help $MISSING_DEPENDENCY
44458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44459    msys_help $MISSING_DEPENDENCY
44460  else
44461    PKGHANDLER_COMMAND=
44462
44463    case $PKGHANDLER in
44464      apt-get)
44465        apt_help     $MISSING_DEPENDENCY ;;
44466      yum)
44467        yum_help     $MISSING_DEPENDENCY ;;
44468      port)
44469        port_help    $MISSING_DEPENDENCY ;;
44470      pkgutil)
44471        pkgutil_help $MISSING_DEPENDENCY ;;
44472      pkgadd)
44473        pkgadd_help  $MISSING_DEPENDENCY ;;
44474    esac
44475
44476    if test "x$PKGHANDLER_COMMAND" != x; then
44477      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44478    fi
44479  fi
44480
44481      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
44482    fi
44483  fi
44484
44485
44486
44487
44488
44489
44490  ###############################################################################
44491  #
44492  # The ubiquitous freetype library is used to render fonts.
44493  #
44494
44495# Check whether --with-freetype was given.
44496if test "${with_freetype+set}" = set; then :
44497  withval=$with_freetype;
44498fi
44499
44500
44501# Check whether --with-freetype-include was given.
44502if test "${with_freetype_include+set}" = set; then :
44503  withval=$with_freetype_include;
44504fi
44505
44506
44507# Check whether --with-freetype-lib was given.
44508if test "${with_freetype_lib+set}" = set; then :
44509  withval=$with_freetype_lib;
44510fi
44511
44512  # Check whether --enable-freetype-bundling was given.
44513if test "${enable_freetype_bundling+set}" = set; then :
44514  enableval=$enable_freetype_bundling;
44515fi
44516
44517
44518  FREETYPE_CFLAGS=
44519  FREETYPE_LIBS=
44520  FREETYPE_BUNDLE_LIB_PATH=
44521
44522  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
44523    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
44524      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
44525$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
44526    fi
44527    if test "x$enable_freetype_bundling" != x; then
44528      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
44529$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
44530    fi
44531  else
44532    # freetype is needed to build; go get it!
44533
44534    BUNDLE_FREETYPE="$enable_freetype_bundling"
44535
44536    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
44537      # User has specified settings
44538
44539      if test "x$BUNDLE_FREETYPE" = x; then
44540        # If not specified, default is to bundle freetype
44541        BUNDLE_FREETYPE=yes
44542      fi
44543
44544      if test "x$with_freetype" != x; then
44545        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
44546        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
44547      fi
44548
44549      # Allow --with-freetype-lib and --with-freetype-include to override
44550      if test "x$with_freetype_include" != x; then
44551        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
44552      fi
44553      if test "x$with_freetype_lib" != x; then
44554        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
44555      fi
44556
44557      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44558        # Okay, we got it. Check that it works.
44559
44560  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44561  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44562  METHOD="--with-freetype"
44563
44564  # First check if the files exists.
44565  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44566    # We found an arbitrary include file. That's a good sign.
44567    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44568$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44569    FOUND_FREETYPE=yes
44570
44571    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44572    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44573      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44574$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44575      FOUND_FREETYPE=no
44576    else
44577      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44578        # On Windows, we will need both .lib and .dll file.
44579        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44580          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44581$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44582          FOUND_FREETYPE=no
44583        fi
44584      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44585          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44586        # Found lib in isa dir, use that instead.
44587        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44588      fi
44589    fi
44590  fi
44591
44592  if test "x$FOUND_FREETYPE" = xyes; then
44593
44594  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44595
44596  # Input might be given as Windows format, start by converting to
44597  # unix format.
44598  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44599  new_path=`$CYGPATH -u "$path"`
44600
44601  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44602  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44603  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44604  # "foo.exe" is OK but "foo" is an error.
44605  #
44606  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44607  # It is also a way to make sure we got the proper file name for the real test later on.
44608  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44609  if test "x$test_shortpath" = x; then
44610    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44611$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44612    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44613  fi
44614
44615  # Call helper function which possibly converts this using DOS-style short mode.
44616  # If so, the updated path is stored in $new_path.
44617
44618  input_path="$new_path"
44619  # Check if we need to convert this using DOS-style short mode. If the path
44620  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44621  # take no chances and rewrite it.
44622  # Note: m4 eats our [], so we need to use [ and ] instead.
44623  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44624  if test "x$has_forbidden_chars" != x; then
44625    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44626    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44627    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44628    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44629      # Going to short mode and back again did indeed matter. Since short mode is
44630      # case insensitive, let's make it lowercase to improve readability.
44631      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44632      # Now convert it back to Unix-stile (cygpath)
44633      input_path=`$CYGPATH -u "$shortmode_path"`
44634      new_path="$input_path"
44635    fi
44636  fi
44637
44638  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44639  if test "x$test_cygdrive_prefix" = x; then
44640    # As a simple fix, exclude /usr/bin since it's not a real path.
44641    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44642      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44643      # a path prefixed by /cygdrive for fixpath to work.
44644      new_path="$CYGWIN_ROOT_PATH$input_path"
44645    fi
44646  fi
44647
44648
44649  if test "x$path" != "x$new_path"; then
44650    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44651    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44652$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44653  fi
44654
44655  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44656
44657  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44658  has_colon=`$ECHO $path | $GREP ^.:`
44659  new_path="$path"
44660  if test "x$has_colon" = x; then
44661    # Not in mixed or Windows style, start by that.
44662    new_path=`cmd //c echo $path`
44663  fi
44664
44665
44666  input_path="$new_path"
44667  # Check if we need to convert this using DOS-style short mode. If the path
44668  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44669  # take no chances and rewrite it.
44670  # Note: m4 eats our [], so we need to use [ and ] instead.
44671  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44672  if test "x$has_forbidden_chars" != x; then
44673    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44674    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44675  fi
44676
44677
44678  windows_path="$new_path"
44679  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44680    unix_path=`$CYGPATH -u "$windows_path"`
44681    new_path="$unix_path"
44682  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44683    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44684    new_path="$unix_path"
44685  fi
44686
44687  if test "x$path" != "x$new_path"; then
44688    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44689    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44690$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44691  fi
44692
44693  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44694  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44695
44696  else
44697    # We're on a posix platform. Hooray! :)
44698    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44699    has_space=`$ECHO "$path" | $GREP " "`
44700    if test "x$has_space" != x; then
44701      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44702$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44703      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44704    fi
44705
44706    # Use eval to expand a potential ~
44707    eval path="$path"
44708    if test ! -f "$path" && test ! -d "$path"; then
44709      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44710    fi
44711
44712    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44713  fi
44714
44715
44716  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44717
44718  # Input might be given as Windows format, start by converting to
44719  # unix format.
44720  path="$POTENTIAL_FREETYPE_LIB_PATH"
44721  new_path=`$CYGPATH -u "$path"`
44722
44723  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44724  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44725  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44726  # "foo.exe" is OK but "foo" is an error.
44727  #
44728  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44729  # It is also a way to make sure we got the proper file name for the real test later on.
44730  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44731  if test "x$test_shortpath" = x; then
44732    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44733$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44734    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44735  fi
44736
44737  # Call helper function which possibly converts this using DOS-style short mode.
44738  # If so, the updated path is stored in $new_path.
44739
44740  input_path="$new_path"
44741  # Check if we need to convert this using DOS-style short mode. If the path
44742  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44743  # take no chances and rewrite it.
44744  # Note: m4 eats our [], so we need to use [ and ] instead.
44745  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44746  if test "x$has_forbidden_chars" != x; then
44747    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44748    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44749    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44750    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44751      # Going to short mode and back again did indeed matter. Since short mode is
44752      # case insensitive, let's make it lowercase to improve readability.
44753      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44754      # Now convert it back to Unix-stile (cygpath)
44755      input_path=`$CYGPATH -u "$shortmode_path"`
44756      new_path="$input_path"
44757    fi
44758  fi
44759
44760  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44761  if test "x$test_cygdrive_prefix" = x; then
44762    # As a simple fix, exclude /usr/bin since it's not a real path.
44763    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44764      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44765      # a path prefixed by /cygdrive for fixpath to work.
44766      new_path="$CYGWIN_ROOT_PATH$input_path"
44767    fi
44768  fi
44769
44770
44771  if test "x$path" != "x$new_path"; then
44772    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44773    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44774$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44775  fi
44776
44777  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44778
44779  path="$POTENTIAL_FREETYPE_LIB_PATH"
44780  has_colon=`$ECHO $path | $GREP ^.:`
44781  new_path="$path"
44782  if test "x$has_colon" = x; then
44783    # Not in mixed or Windows style, start by that.
44784    new_path=`cmd //c echo $path`
44785  fi
44786
44787
44788  input_path="$new_path"
44789  # Check if we need to convert this using DOS-style short mode. If the path
44790  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44791  # take no chances and rewrite it.
44792  # Note: m4 eats our [], so we need to use [ and ] instead.
44793  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44794  if test "x$has_forbidden_chars" != x; then
44795    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44796    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44797  fi
44798
44799
44800  windows_path="$new_path"
44801  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44802    unix_path=`$CYGPATH -u "$windows_path"`
44803    new_path="$unix_path"
44804  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44805    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44806    new_path="$unix_path"
44807  fi
44808
44809  if test "x$path" != "x$new_path"; then
44810    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44811    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44812$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44813  fi
44814
44815  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44816  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44817
44818  else
44819    # We're on a posix platform. Hooray! :)
44820    path="$POTENTIAL_FREETYPE_LIB_PATH"
44821    has_space=`$ECHO "$path" | $GREP " "`
44822    if test "x$has_space" != x; then
44823      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44824$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44825      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44826    fi
44827
44828    # Use eval to expand a potential ~
44829    eval path="$path"
44830    if test ! -f "$path" && test ! -d "$path"; then
44831      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44832    fi
44833
44834    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44835  fi
44836
44837
44838    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44839    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44840$as_echo_n "checking for freetype includes... " >&6; }
44841    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44842$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44843    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44844    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44845$as_echo_n "checking for freetype libraries... " >&6; }
44846    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44847$as_echo "$FREETYPE_LIB_PATH" >&6; }
44848  fi
44849
44850        if test "x$FOUND_FREETYPE" != xyes; then
44851          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
44852        fi
44853      else
44854        # User specified only one of lib or include. This is an error.
44855        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
44856          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
44857$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
44858          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
44859        else
44860          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
44861$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
44862          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
44863        fi
44864      fi
44865    else
44866      # User did not specify settings, but we need freetype. Try to locate it.
44867
44868      if test "x$BUNDLE_FREETYPE" = x; then
44869        # If not specified, default is to bundle freetype only on windows
44870        if test "x$OPENJDK_TARGET_OS" = xwindows; then
44871          BUNDLE_FREETYPE=yes
44872        else
44873          BUNDLE_FREETYPE=no
44874        fi
44875      fi
44876
44877      if test "x$FOUND_FREETYPE" != xyes; then
44878        # Check builddeps
44879
44880
44881  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
44882    # Source the builddeps file again, to make sure it uses the latest variables!
44883    . $builddepsfile
44884    # Look for a target and build machine specific resource!
44885    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
44886    if test "x$resource" = x; then
44887      # Ok, lets instead look for a target specific resource
44888      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
44889    fi
44890    if test "x$resource" = x; then
44891      # Ok, lets instead look for a build specific resource
44892      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
44893    fi
44894    if test "x$resource" = x; then
44895      # Ok, lets instead look for a generic resource
44896      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
44897      resource=${builddep_freetype2}
44898    fi
44899    if test "x$resource" != x; then
44900      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
44901$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
44902      # If the resource in the builddeps.conf file is an existing directory,
44903      # for example /java/linux/cups
44904      if test -d ${resource}; then
44905        depdir=${resource}
44906      else
44907
44908  # freetype2 is for example mymodule
44909  # $resource is for example libs/general/libmymod_1_2_3.zip
44910  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
44911  # $with_builddeps_dir is for example /localhome/builddeps
44912  # depdir is the name of the variable into which we store the depdir, eg MYMOD
44913  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
44914  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
44915  filename=`basename $resource`
44916  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
44917  filebase=${filename%%.*}
44918  extension=${filename#*.}
44919  installdir=$with_builddeps_dir/$filebase
44920  if test ! -f $installdir/$filename.unpacked; then
44921    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
44922$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
44923    if test ! -d $installdir; then
44924      mkdir -p $installdir
44925    fi
44926    if test ! -d $installdir; then
44927      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
44928    fi
44929    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
44930    touch $tmpfile
44931    if test ! -f $tmpfile; then
44932      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
44933    fi
44934
44935  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
44936  # $tmpfile is the local file name for the downloaded file.
44937  VALID_TOOL=no
44938  if test "x$BDEPS_FTP" = xwget; then
44939    VALID_TOOL=yes
44940    wget -O $tmpfile $with_builddeps_server/$resource
44941  fi
44942  if test "x$BDEPS_FTP" = xlftp; then
44943    VALID_TOOL=yes
44944    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
44945  fi
44946  if test "x$BDEPS_FTP" = xftp; then
44947    VALID_TOOL=yes
44948    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
44949    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
44950    FTPUSERPWD=${FTPSERVER%%@*}
44951    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
44952      FTPUSER=${userpwd%%:*}
44953      FTPPWD=${userpwd#*@}
44954      FTPSERVER=${FTPSERVER#*@}
44955    else
44956      FTPUSER=ftp
44957      FTPPWD=ftp
44958    fi
44959    # the "pass" command does not work on some
44960    # ftp clients (read ftp.exe) but if it works,
44961    # passive mode is better!
44962    ( \
44963        echo "user $FTPUSER $FTPPWD"        ; \
44964        echo "pass"                         ; \
44965        echo "bin"                          ; \
44966        echo "get $FTPPATH $tmpfile"              ; \
44967    ) | ftp -in $FTPSERVER
44968  fi
44969  if test "x$VALID_TOOL" != xyes; then
44970    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
44971  fi
44972
44973    mv $tmpfile $installdir/$filename
44974    if test ! -s $installdir/$filename; then
44975      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
44976    fi
44977    case "$extension" in
44978      zip)  echo "Unzipping $installdir/$filename..."
44979        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
44980        ;;
44981      tar.gz) echo "Untaring $installdir/$filename..."
44982        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44983        ;;
44984      tgz) echo "Untaring $installdir/$filename..."
44985        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44986        ;;
44987      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
44988        ;;
44989    esac
44990  fi
44991  if test -f $installdir/$filename.unpacked; then
44992    depdir=$installdir
44993  fi
44994
44995      fi
44996      # Source the builddeps file again, because in the previous command, the depdir
44997      # was updated to point at the current build dependency install directory.
44998      . $builddepsfile
44999      # Now extract variables from the builddeps.conf files.
45000      theroot=${builddep_freetype2_ROOT}
45001      thecflags=${builddep_freetype2_CFLAGS}
45002      thelibs=${builddep_freetype2_LIBS}
45003      if test "x$depdir" = x; then
45004        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
45005      fi
45006      FREETYPE=$depdir
45007      if test "x$theroot" != x; then
45008        FREETYPE="$theroot"
45009      fi
45010      if test "x$thecflags" != x; then
45011        FREETYPE_CFLAGS="$thecflags"
45012      fi
45013      if test "x$thelibs" != x; then
45014        FREETYPE_LIBS="$thelibs"
45015      fi
45016      FOUND_FREETYPE=yes
45017      else FOUND_FREETYPE=no
45018
45019    fi
45020    else FOUND_FREETYPE=no
45021
45022  fi
45023
45024        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45025        if test "x$FOUND_FREETYPE" = xyes; then
45026          if test "x$BUNDLE_FREETYPE" = xyes; then
45027            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
45028$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
45029            FOUND_FREETYPE=no
45030          else
45031            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45032$as_echo_n "checking for freetype... " >&6; }
45033            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
45034$as_echo "yes (using builddeps)" >&6; }
45035          fi
45036        fi
45037      fi
45038
45039      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
45040      if test "x$SYSROOT" = x; then
45041        if test "x$FOUND_FREETYPE" != xyes; then
45042          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
45043          if test "x$PKG_CONFIG" != x; then
45044
45045pkg_failed=no
45046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
45047$as_echo_n "checking for FREETYPE... " >&6; }
45048
45049if test -n "$FREETYPE_CFLAGS"; then
45050    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
45051 elif test -n "$PKG_CONFIG"; then
45052    if test -n "$PKG_CONFIG" && \
45053    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45054  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45055  ac_status=$?
45056  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45057  test $ac_status = 0; }; then
45058  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
45059else
45060  pkg_failed=yes
45061fi
45062 else
45063    pkg_failed=untried
45064fi
45065if test -n "$FREETYPE_LIBS"; then
45066    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
45067 elif test -n "$PKG_CONFIG"; then
45068    if test -n "$PKG_CONFIG" && \
45069    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45070  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45071  ac_status=$?
45072  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45073  test $ac_status = 0; }; then
45074  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
45075else
45076  pkg_failed=yes
45077fi
45078 else
45079    pkg_failed=untried
45080fi
45081
45082
45083
45084if test $pkg_failed = yes; then
45085
45086if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
45087        _pkg_short_errors_supported=yes
45088else
45089        _pkg_short_errors_supported=no
45090fi
45091        if test $_pkg_short_errors_supported = yes; then
45092	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
45093        else
45094	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
45095        fi
45096	# Put the nasty error message in config.log where it belongs
45097	echo "$FREETYPE_PKG_ERRORS" >&5
45098
45099	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45100$as_echo "no" >&6; }
45101                FOUND_FREETYPE=no
45102elif test $pkg_failed = untried; then
45103	FOUND_FREETYPE=no
45104else
45105	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
45106	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
45107        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45108$as_echo "yes" >&6; }
45109	FOUND_FREETYPE=yes
45110fi
45111            if test "x$FOUND_FREETYPE" = xyes; then
45112              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
45113              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
45114              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
45115              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
45116                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
45117              fi
45118              # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45119              if test "x$BUNDLE_FREETYPE" = xyes; then
45120                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
45121$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
45122                FOUND_FREETYPE=no
45123              else
45124                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45125$as_echo_n "checking for freetype... " >&6; }
45126                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
45127$as_echo "yes (using pkg-config)" >&6; }
45128              fi
45129            fi
45130          fi
45131        fi
45132      fi
45133
45134      if test "x$FOUND_FREETYPE" != xyes; then
45135        # Check in well-known locations
45136        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45137          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
45138
45139  windows_path="$FREETYPE_BASE_DIR"
45140  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45141    unix_path=`$CYGPATH -u "$windows_path"`
45142    FREETYPE_BASE_DIR="$unix_path"
45143  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45144    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45145    FREETYPE_BASE_DIR="$unix_path"
45146  fi
45147
45148
45149  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45150  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45151  METHOD="well-known location"
45152
45153  # First check if the files exists.
45154  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45155    # We found an arbitrary include file. That's a good sign.
45156    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45157$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45158    FOUND_FREETYPE=yes
45159
45160    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45161    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45162      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45163$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45164      FOUND_FREETYPE=no
45165    else
45166      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45167        # On Windows, we will need both .lib and .dll file.
45168        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45169          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45170$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45171          FOUND_FREETYPE=no
45172        fi
45173      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45174          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45175        # Found lib in isa dir, use that instead.
45176        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45177      fi
45178    fi
45179  fi
45180
45181  if test "x$FOUND_FREETYPE" = xyes; then
45182
45183  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45184
45185  # Input might be given as Windows format, start by converting to
45186  # unix format.
45187  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45188  new_path=`$CYGPATH -u "$path"`
45189
45190  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45191  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45192  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45193  # "foo.exe" is OK but "foo" is an error.
45194  #
45195  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45196  # It is also a way to make sure we got the proper file name for the real test later on.
45197  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45198  if test "x$test_shortpath" = x; then
45199    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45200$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45201    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45202  fi
45203
45204  # Call helper function which possibly converts this using DOS-style short mode.
45205  # If so, the updated path is stored in $new_path.
45206
45207  input_path="$new_path"
45208  # Check if we need to convert this using DOS-style short mode. If the path
45209  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45210  # take no chances and rewrite it.
45211  # Note: m4 eats our [], so we need to use [ and ] instead.
45212  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45213  if test "x$has_forbidden_chars" != x; then
45214    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45215    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45216    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45217    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45218      # Going to short mode and back again did indeed matter. Since short mode is
45219      # case insensitive, let's make it lowercase to improve readability.
45220      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45221      # Now convert it back to Unix-stile (cygpath)
45222      input_path=`$CYGPATH -u "$shortmode_path"`
45223      new_path="$input_path"
45224    fi
45225  fi
45226
45227  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45228  if test "x$test_cygdrive_prefix" = x; then
45229    # As a simple fix, exclude /usr/bin since it's not a real path.
45230    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45231      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45232      # a path prefixed by /cygdrive for fixpath to work.
45233      new_path="$CYGWIN_ROOT_PATH$input_path"
45234    fi
45235  fi
45236
45237
45238  if test "x$path" != "x$new_path"; then
45239    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45240    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45241$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45242  fi
45243
45244  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45245
45246  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45247  has_colon=`$ECHO $path | $GREP ^.:`
45248  new_path="$path"
45249  if test "x$has_colon" = x; then
45250    # Not in mixed or Windows style, start by that.
45251    new_path=`cmd //c echo $path`
45252  fi
45253
45254
45255  input_path="$new_path"
45256  # Check if we need to convert this using DOS-style short mode. If the path
45257  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45258  # take no chances and rewrite it.
45259  # Note: m4 eats our [], so we need to use [ and ] instead.
45260  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45261  if test "x$has_forbidden_chars" != x; then
45262    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45263    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45264  fi
45265
45266
45267  windows_path="$new_path"
45268  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45269    unix_path=`$CYGPATH -u "$windows_path"`
45270    new_path="$unix_path"
45271  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45272    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45273    new_path="$unix_path"
45274  fi
45275
45276  if test "x$path" != "x$new_path"; then
45277    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45278    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45279$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45280  fi
45281
45282  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45283  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45284
45285  else
45286    # We're on a posix platform. Hooray! :)
45287    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45288    has_space=`$ECHO "$path" | $GREP " "`
45289    if test "x$has_space" != x; then
45290      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45291$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45292      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45293    fi
45294
45295    # Use eval to expand a potential ~
45296    eval path="$path"
45297    if test ! -f "$path" && test ! -d "$path"; then
45298      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45299    fi
45300
45301    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45302  fi
45303
45304
45305  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45306
45307  # Input might be given as Windows format, start by converting to
45308  # unix format.
45309  path="$POTENTIAL_FREETYPE_LIB_PATH"
45310  new_path=`$CYGPATH -u "$path"`
45311
45312  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45313  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45314  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45315  # "foo.exe" is OK but "foo" is an error.
45316  #
45317  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45318  # It is also a way to make sure we got the proper file name for the real test later on.
45319  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45320  if test "x$test_shortpath" = x; then
45321    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45322$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45323    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45324  fi
45325
45326  # Call helper function which possibly converts this using DOS-style short mode.
45327  # If so, the updated path is stored in $new_path.
45328
45329  input_path="$new_path"
45330  # Check if we need to convert this using DOS-style short mode. If the path
45331  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45332  # take no chances and rewrite it.
45333  # Note: m4 eats our [], so we need to use [ and ] instead.
45334  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45335  if test "x$has_forbidden_chars" != x; then
45336    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45337    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45338    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45339    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45340      # Going to short mode and back again did indeed matter. Since short mode is
45341      # case insensitive, let's make it lowercase to improve readability.
45342      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45343      # Now convert it back to Unix-stile (cygpath)
45344      input_path=`$CYGPATH -u "$shortmode_path"`
45345      new_path="$input_path"
45346    fi
45347  fi
45348
45349  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45350  if test "x$test_cygdrive_prefix" = x; then
45351    # As a simple fix, exclude /usr/bin since it's not a real path.
45352    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45353      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45354      # a path prefixed by /cygdrive for fixpath to work.
45355      new_path="$CYGWIN_ROOT_PATH$input_path"
45356    fi
45357  fi
45358
45359
45360  if test "x$path" != "x$new_path"; then
45361    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45362    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45363$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45364  fi
45365
45366  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45367
45368  path="$POTENTIAL_FREETYPE_LIB_PATH"
45369  has_colon=`$ECHO $path | $GREP ^.:`
45370  new_path="$path"
45371  if test "x$has_colon" = x; then
45372    # Not in mixed or Windows style, start by that.
45373    new_path=`cmd //c echo $path`
45374  fi
45375
45376
45377  input_path="$new_path"
45378  # Check if we need to convert this using DOS-style short mode. If the path
45379  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45380  # take no chances and rewrite it.
45381  # Note: m4 eats our [], so we need to use [ and ] instead.
45382  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45383  if test "x$has_forbidden_chars" != x; then
45384    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45385    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45386  fi
45387
45388
45389  windows_path="$new_path"
45390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45391    unix_path=`$CYGPATH -u "$windows_path"`
45392    new_path="$unix_path"
45393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45394    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45395    new_path="$unix_path"
45396  fi
45397
45398  if test "x$path" != "x$new_path"; then
45399    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45400    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45401$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45402  fi
45403
45404  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45405  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45406
45407  else
45408    # We're on a posix platform. Hooray! :)
45409    path="$POTENTIAL_FREETYPE_LIB_PATH"
45410    has_space=`$ECHO "$path" | $GREP " "`
45411    if test "x$has_space" != x; then
45412      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45413$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45414      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45415    fi
45416
45417    # Use eval to expand a potential ~
45418    eval path="$path"
45419    if test ! -f "$path" && test ! -d "$path"; then
45420      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45421    fi
45422
45423    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45424  fi
45425
45426
45427    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45428    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45429$as_echo_n "checking for freetype includes... " >&6; }
45430    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45431$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45432    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45433    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45434$as_echo_n "checking for freetype libraries... " >&6; }
45435    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45436$as_echo "$FREETYPE_LIB_PATH" >&6; }
45437  fi
45438
45439          if test "x$FOUND_FREETYPE" != xyes; then
45440            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
45441
45442  windows_path="$FREETYPE_BASE_DIR"
45443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45444    unix_path=`$CYGPATH -u "$windows_path"`
45445    FREETYPE_BASE_DIR="$unix_path"
45446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45447    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45448    FREETYPE_BASE_DIR="$unix_path"
45449  fi
45450
45451
45452  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45453  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45454  METHOD="well-known location"
45455
45456  # First check if the files exists.
45457  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45458    # We found an arbitrary include file. That's a good sign.
45459    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45460$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45461    FOUND_FREETYPE=yes
45462
45463    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45464    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45465      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45466$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45467      FOUND_FREETYPE=no
45468    else
45469      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45470        # On Windows, we will need both .lib and .dll file.
45471        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45472          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45473$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45474          FOUND_FREETYPE=no
45475        fi
45476      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45477          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45478        # Found lib in isa dir, use that instead.
45479        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45480      fi
45481    fi
45482  fi
45483
45484  if test "x$FOUND_FREETYPE" = xyes; then
45485
45486  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45487
45488  # Input might be given as Windows format, start by converting to
45489  # unix format.
45490  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45491  new_path=`$CYGPATH -u "$path"`
45492
45493  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45494  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45495  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45496  # "foo.exe" is OK but "foo" is an error.
45497  #
45498  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45499  # It is also a way to make sure we got the proper file name for the real test later on.
45500  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45501  if test "x$test_shortpath" = x; then
45502    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45503$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45504    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45505  fi
45506
45507  # Call helper function which possibly converts this using DOS-style short mode.
45508  # If so, the updated path is stored in $new_path.
45509
45510  input_path="$new_path"
45511  # Check if we need to convert this using DOS-style short mode. If the path
45512  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45513  # take no chances and rewrite it.
45514  # Note: m4 eats our [], so we need to use [ and ] instead.
45515  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45516  if test "x$has_forbidden_chars" != x; then
45517    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45518    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45519    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45520    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45521      # Going to short mode and back again did indeed matter. Since short mode is
45522      # case insensitive, let's make it lowercase to improve readability.
45523      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45524      # Now convert it back to Unix-stile (cygpath)
45525      input_path=`$CYGPATH -u "$shortmode_path"`
45526      new_path="$input_path"
45527    fi
45528  fi
45529
45530  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45531  if test "x$test_cygdrive_prefix" = x; then
45532    # As a simple fix, exclude /usr/bin since it's not a real path.
45533    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45534      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45535      # a path prefixed by /cygdrive for fixpath to work.
45536      new_path="$CYGWIN_ROOT_PATH$input_path"
45537    fi
45538  fi
45539
45540
45541  if test "x$path" != "x$new_path"; then
45542    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45543    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45544$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45545  fi
45546
45547  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45548
45549  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45550  has_colon=`$ECHO $path | $GREP ^.:`
45551  new_path="$path"
45552  if test "x$has_colon" = x; then
45553    # Not in mixed or Windows style, start by that.
45554    new_path=`cmd //c echo $path`
45555  fi
45556
45557
45558  input_path="$new_path"
45559  # Check if we need to convert this using DOS-style short mode. If the path
45560  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45561  # take no chances and rewrite it.
45562  # Note: m4 eats our [], so we need to use [ and ] instead.
45563  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45564  if test "x$has_forbidden_chars" != x; then
45565    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45566    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45567  fi
45568
45569
45570  windows_path="$new_path"
45571  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45572    unix_path=`$CYGPATH -u "$windows_path"`
45573    new_path="$unix_path"
45574  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45575    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45576    new_path="$unix_path"
45577  fi
45578
45579  if test "x$path" != "x$new_path"; then
45580    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45581    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45582$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45583  fi
45584
45585  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45586  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45587
45588  else
45589    # We're on a posix platform. Hooray! :)
45590    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45591    has_space=`$ECHO "$path" | $GREP " "`
45592    if test "x$has_space" != x; then
45593      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45594$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45595      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45596    fi
45597
45598    # Use eval to expand a potential ~
45599    eval path="$path"
45600    if test ! -f "$path" && test ! -d "$path"; then
45601      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45602    fi
45603
45604    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45605  fi
45606
45607
45608  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45609
45610  # Input might be given as Windows format, start by converting to
45611  # unix format.
45612  path="$POTENTIAL_FREETYPE_LIB_PATH"
45613  new_path=`$CYGPATH -u "$path"`
45614
45615  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45616  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45617  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45618  # "foo.exe" is OK but "foo" is an error.
45619  #
45620  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45621  # It is also a way to make sure we got the proper file name for the real test later on.
45622  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45623  if test "x$test_shortpath" = x; then
45624    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45625$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45626    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45627  fi
45628
45629  # Call helper function which possibly converts this using DOS-style short mode.
45630  # If so, the updated path is stored in $new_path.
45631
45632  input_path="$new_path"
45633  # Check if we need to convert this using DOS-style short mode. If the path
45634  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45635  # take no chances and rewrite it.
45636  # Note: m4 eats our [], so we need to use [ and ] instead.
45637  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45638  if test "x$has_forbidden_chars" != x; then
45639    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45640    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45641    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45642    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45643      # Going to short mode and back again did indeed matter. Since short mode is
45644      # case insensitive, let's make it lowercase to improve readability.
45645      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45646      # Now convert it back to Unix-stile (cygpath)
45647      input_path=`$CYGPATH -u "$shortmode_path"`
45648      new_path="$input_path"
45649    fi
45650  fi
45651
45652  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45653  if test "x$test_cygdrive_prefix" = x; then
45654    # As a simple fix, exclude /usr/bin since it's not a real path.
45655    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45656      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45657      # a path prefixed by /cygdrive for fixpath to work.
45658      new_path="$CYGWIN_ROOT_PATH$input_path"
45659    fi
45660  fi
45661
45662
45663  if test "x$path" != "x$new_path"; then
45664    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45665    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45666$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45667  fi
45668
45669  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45670
45671  path="$POTENTIAL_FREETYPE_LIB_PATH"
45672  has_colon=`$ECHO $path | $GREP ^.:`
45673  new_path="$path"
45674  if test "x$has_colon" = x; then
45675    # Not in mixed or Windows style, start by that.
45676    new_path=`cmd //c echo $path`
45677  fi
45678
45679
45680  input_path="$new_path"
45681  # Check if we need to convert this using DOS-style short mode. If the path
45682  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45683  # take no chances and rewrite it.
45684  # Note: m4 eats our [], so we need to use [ and ] instead.
45685  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45686  if test "x$has_forbidden_chars" != x; then
45687    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45688    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45689  fi
45690
45691
45692  windows_path="$new_path"
45693  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45694    unix_path=`$CYGPATH -u "$windows_path"`
45695    new_path="$unix_path"
45696  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45697    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45698    new_path="$unix_path"
45699  fi
45700
45701  if test "x$path" != "x$new_path"; then
45702    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45703    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45704$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45705  fi
45706
45707  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45708  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45709
45710  else
45711    # We're on a posix platform. Hooray! :)
45712    path="$POTENTIAL_FREETYPE_LIB_PATH"
45713    has_space=`$ECHO "$path" | $GREP " "`
45714    if test "x$has_space" != x; then
45715      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45716$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45717      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45718    fi
45719
45720    # Use eval to expand a potential ~
45721    eval path="$path"
45722    if test ! -f "$path" && test ! -d "$path"; then
45723      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45724    fi
45725
45726    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45727  fi
45728
45729
45730    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45731    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45732$as_echo_n "checking for freetype includes... " >&6; }
45733    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45734$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45735    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45736    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45737$as_echo_n "checking for freetype libraries... " >&6; }
45738    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45739$as_echo "$FREETYPE_LIB_PATH" >&6; }
45740  fi
45741
45742          fi
45743        else
45744          FREETYPE_BASE_DIR="$SYSROOT/usr"
45745
45746  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45747  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45748  METHOD="well-known location"
45749
45750  # First check if the files exists.
45751  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45752    # We found an arbitrary include file. That's a good sign.
45753    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45754$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45755    FOUND_FREETYPE=yes
45756
45757    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45758    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45759      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45760$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45761      FOUND_FREETYPE=no
45762    else
45763      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45764        # On Windows, we will need both .lib and .dll file.
45765        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45766          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45767$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45768          FOUND_FREETYPE=no
45769        fi
45770      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45771          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45772        # Found lib in isa dir, use that instead.
45773        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45774      fi
45775    fi
45776  fi
45777
45778  if test "x$FOUND_FREETYPE" = xyes; then
45779
45780  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45781
45782  # Input might be given as Windows format, start by converting to
45783  # unix format.
45784  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45785  new_path=`$CYGPATH -u "$path"`
45786
45787  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45788  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45789  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45790  # "foo.exe" is OK but "foo" is an error.
45791  #
45792  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45793  # It is also a way to make sure we got the proper file name for the real test later on.
45794  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45795  if test "x$test_shortpath" = x; then
45796    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45797$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45798    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45799  fi
45800
45801  # Call helper function which possibly converts this using DOS-style short mode.
45802  # If so, the updated path is stored in $new_path.
45803
45804  input_path="$new_path"
45805  # Check if we need to convert this using DOS-style short mode. If the path
45806  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45807  # take no chances and rewrite it.
45808  # Note: m4 eats our [], so we need to use [ and ] instead.
45809  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45810  if test "x$has_forbidden_chars" != x; then
45811    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45812    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45813    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45814    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45815      # Going to short mode and back again did indeed matter. Since short mode is
45816      # case insensitive, let's make it lowercase to improve readability.
45817      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45818      # Now convert it back to Unix-stile (cygpath)
45819      input_path=`$CYGPATH -u "$shortmode_path"`
45820      new_path="$input_path"
45821    fi
45822  fi
45823
45824  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45825  if test "x$test_cygdrive_prefix" = x; then
45826    # As a simple fix, exclude /usr/bin since it's not a real path.
45827    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45828      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45829      # a path prefixed by /cygdrive for fixpath to work.
45830      new_path="$CYGWIN_ROOT_PATH$input_path"
45831    fi
45832  fi
45833
45834
45835  if test "x$path" != "x$new_path"; then
45836    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45837    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45838$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45839  fi
45840
45841  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45842
45843  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45844  has_colon=`$ECHO $path | $GREP ^.:`
45845  new_path="$path"
45846  if test "x$has_colon" = x; then
45847    # Not in mixed or Windows style, start by that.
45848    new_path=`cmd //c echo $path`
45849  fi
45850
45851
45852  input_path="$new_path"
45853  # Check if we need to convert this using DOS-style short mode. If the path
45854  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45855  # take no chances and rewrite it.
45856  # Note: m4 eats our [], so we need to use [ and ] instead.
45857  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45858  if test "x$has_forbidden_chars" != x; then
45859    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45860    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45861  fi
45862
45863
45864  windows_path="$new_path"
45865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45866    unix_path=`$CYGPATH -u "$windows_path"`
45867    new_path="$unix_path"
45868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45869    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45870    new_path="$unix_path"
45871  fi
45872
45873  if test "x$path" != "x$new_path"; then
45874    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45875    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45876$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45877  fi
45878
45879  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45880  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45881
45882  else
45883    # We're on a posix platform. Hooray! :)
45884    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45885    has_space=`$ECHO "$path" | $GREP " "`
45886    if test "x$has_space" != x; then
45887      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45888$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45889      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45890    fi
45891
45892    # Use eval to expand a potential ~
45893    eval path="$path"
45894    if test ! -f "$path" && test ! -d "$path"; then
45895      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45896    fi
45897
45898    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45899  fi
45900
45901
45902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45903
45904  # Input might be given as Windows format, start by converting to
45905  # unix format.
45906  path="$POTENTIAL_FREETYPE_LIB_PATH"
45907  new_path=`$CYGPATH -u "$path"`
45908
45909  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45910  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45911  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45912  # "foo.exe" is OK but "foo" is an error.
45913  #
45914  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45915  # It is also a way to make sure we got the proper file name for the real test later on.
45916  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45917  if test "x$test_shortpath" = x; then
45918    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45919$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45920    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45921  fi
45922
45923  # Call helper function which possibly converts this using DOS-style short mode.
45924  # If so, the updated path is stored in $new_path.
45925
45926  input_path="$new_path"
45927  # Check if we need to convert this using DOS-style short mode. If the path
45928  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45929  # take no chances and rewrite it.
45930  # Note: m4 eats our [], so we need to use [ and ] instead.
45931  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45932  if test "x$has_forbidden_chars" != x; then
45933    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45934    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45935    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45936    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45937      # Going to short mode and back again did indeed matter. Since short mode is
45938      # case insensitive, let's make it lowercase to improve readability.
45939      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45940      # Now convert it back to Unix-stile (cygpath)
45941      input_path=`$CYGPATH -u "$shortmode_path"`
45942      new_path="$input_path"
45943    fi
45944  fi
45945
45946  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45947  if test "x$test_cygdrive_prefix" = x; then
45948    # As a simple fix, exclude /usr/bin since it's not a real path.
45949    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45950      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45951      # a path prefixed by /cygdrive for fixpath to work.
45952      new_path="$CYGWIN_ROOT_PATH$input_path"
45953    fi
45954  fi
45955
45956
45957  if test "x$path" != "x$new_path"; then
45958    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45959    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45960$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45961  fi
45962
45963  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45964
45965  path="$POTENTIAL_FREETYPE_LIB_PATH"
45966  has_colon=`$ECHO $path | $GREP ^.:`
45967  new_path="$path"
45968  if test "x$has_colon" = x; then
45969    # Not in mixed or Windows style, start by that.
45970    new_path=`cmd //c echo $path`
45971  fi
45972
45973
45974  input_path="$new_path"
45975  # Check if we need to convert this using DOS-style short mode. If the path
45976  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45977  # take no chances and rewrite it.
45978  # Note: m4 eats our [], so we need to use [ and ] instead.
45979  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45980  if test "x$has_forbidden_chars" != x; then
45981    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45982    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45983  fi
45984
45985
45986  windows_path="$new_path"
45987  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45988    unix_path=`$CYGPATH -u "$windows_path"`
45989    new_path="$unix_path"
45990  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45991    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45992    new_path="$unix_path"
45993  fi
45994
45995  if test "x$path" != "x$new_path"; then
45996    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45997    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45998$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45999  fi
46000
46001  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46002  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46003
46004  else
46005    # We're on a posix platform. Hooray! :)
46006    path="$POTENTIAL_FREETYPE_LIB_PATH"
46007    has_space=`$ECHO "$path" | $GREP " "`
46008    if test "x$has_space" != x; then
46009      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46010$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46011      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46012    fi
46013
46014    # Use eval to expand a potential ~
46015    eval path="$path"
46016    if test ! -f "$path" && test ! -d "$path"; then
46017      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46018    fi
46019
46020    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46021  fi
46022
46023
46024    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46025    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46026$as_echo_n "checking for freetype includes... " >&6; }
46027    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46028$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46029    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46030    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46031$as_echo_n "checking for freetype libraries... " >&6; }
46032    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46033$as_echo "$FREETYPE_LIB_PATH" >&6; }
46034  fi
46035
46036
46037          if test "x$FOUND_FREETYPE" != xyes; then
46038            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
46039
46040  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46041  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46042  METHOD="well-known location"
46043
46044  # First check if the files exists.
46045  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46046    # We found an arbitrary include file. That's a good sign.
46047    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46048$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46049    FOUND_FREETYPE=yes
46050
46051    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
46052    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46053      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46054$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46055      FOUND_FREETYPE=no
46056    else
46057      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46058        # On Windows, we will need both .lib and .dll file.
46059        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
46060          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
46061$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
46062          FOUND_FREETYPE=no
46063        fi
46064      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46065          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46066        # Found lib in isa dir, use that instead.
46067        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46068      fi
46069    fi
46070  fi
46071
46072  if test "x$FOUND_FREETYPE" = xyes; then
46073
46074  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46075
46076  # Input might be given as Windows format, start by converting to
46077  # unix format.
46078  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46079  new_path=`$CYGPATH -u "$path"`
46080
46081  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46082  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46083  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46084  # "foo.exe" is OK but "foo" is an error.
46085  #
46086  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46087  # It is also a way to make sure we got the proper file name for the real test later on.
46088  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46089  if test "x$test_shortpath" = x; then
46090    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46091$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46092    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46093  fi
46094
46095  # Call helper function which possibly converts this using DOS-style short mode.
46096  # If so, the updated path is stored in $new_path.
46097
46098  input_path="$new_path"
46099  # Check if we need to convert this using DOS-style short mode. If the path
46100  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46101  # take no chances and rewrite it.
46102  # Note: m4 eats our [], so we need to use [ and ] instead.
46103  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46104  if test "x$has_forbidden_chars" != x; then
46105    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46106    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46107    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46108    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46109      # Going to short mode and back again did indeed matter. Since short mode is
46110      # case insensitive, let's make it lowercase to improve readability.
46111      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46112      # Now convert it back to Unix-stile (cygpath)
46113      input_path=`$CYGPATH -u "$shortmode_path"`
46114      new_path="$input_path"
46115    fi
46116  fi
46117
46118  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46119  if test "x$test_cygdrive_prefix" = x; then
46120    # As a simple fix, exclude /usr/bin since it's not a real path.
46121    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46122      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46123      # a path prefixed by /cygdrive for fixpath to work.
46124      new_path="$CYGWIN_ROOT_PATH$input_path"
46125    fi
46126  fi
46127
46128
46129  if test "x$path" != "x$new_path"; then
46130    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46131    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46132$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46133  fi
46134
46135  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46136
46137  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46138  has_colon=`$ECHO $path | $GREP ^.:`
46139  new_path="$path"
46140  if test "x$has_colon" = x; then
46141    # Not in mixed or Windows style, start by that.
46142    new_path=`cmd //c echo $path`
46143  fi
46144
46145
46146  input_path="$new_path"
46147  # Check if we need to convert this using DOS-style short mode. If the path
46148  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46149  # take no chances and rewrite it.
46150  # Note: m4 eats our [], so we need to use [ and ] instead.
46151  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46152  if test "x$has_forbidden_chars" != x; then
46153    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46154    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46155  fi
46156
46157
46158  windows_path="$new_path"
46159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46160    unix_path=`$CYGPATH -u "$windows_path"`
46161    new_path="$unix_path"
46162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46163    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46164    new_path="$unix_path"
46165  fi
46166
46167  if test "x$path" != "x$new_path"; then
46168    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46169    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46170$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46171  fi
46172
46173  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46174  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46175
46176  else
46177    # We're on a posix platform. Hooray! :)
46178    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46179    has_space=`$ECHO "$path" | $GREP " "`
46180    if test "x$has_space" != x; then
46181      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46182$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46183      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46184    fi
46185
46186    # Use eval to expand a potential ~
46187    eval path="$path"
46188    if test ! -f "$path" && test ! -d "$path"; then
46189      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46190    fi
46191
46192    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46193  fi
46194
46195
46196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46197
46198  # Input might be given as Windows format, start by converting to
46199  # unix format.
46200  path="$POTENTIAL_FREETYPE_LIB_PATH"
46201  new_path=`$CYGPATH -u "$path"`
46202
46203  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46204  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46205  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46206  # "foo.exe" is OK but "foo" is an error.
46207  #
46208  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46209  # It is also a way to make sure we got the proper file name for the real test later on.
46210  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46211  if test "x$test_shortpath" = x; then
46212    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46213$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46214    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46215  fi
46216
46217  # Call helper function which possibly converts this using DOS-style short mode.
46218  # If so, the updated path is stored in $new_path.
46219
46220  input_path="$new_path"
46221  # Check if we need to convert this using DOS-style short mode. If the path
46222  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46223  # take no chances and rewrite it.
46224  # Note: m4 eats our [], so we need to use [ and ] instead.
46225  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46226  if test "x$has_forbidden_chars" != x; then
46227    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46228    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46229    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46230    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46231      # Going to short mode and back again did indeed matter. Since short mode is
46232      # case insensitive, let's make it lowercase to improve readability.
46233      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46234      # Now convert it back to Unix-stile (cygpath)
46235      input_path=`$CYGPATH -u "$shortmode_path"`
46236      new_path="$input_path"
46237    fi
46238  fi
46239
46240  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46241  if test "x$test_cygdrive_prefix" = x; then
46242    # As a simple fix, exclude /usr/bin since it's not a real path.
46243    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46244      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46245      # a path prefixed by /cygdrive for fixpath to work.
46246      new_path="$CYGWIN_ROOT_PATH$input_path"
46247    fi
46248  fi
46249
46250
46251  if test "x$path" != "x$new_path"; then
46252    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46253    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46254$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46255  fi
46256
46257  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46258
46259  path="$POTENTIAL_FREETYPE_LIB_PATH"
46260  has_colon=`$ECHO $path | $GREP ^.:`
46261  new_path="$path"
46262  if test "x$has_colon" = x; then
46263    # Not in mixed or Windows style, start by that.
46264    new_path=`cmd //c echo $path`
46265  fi
46266
46267
46268  input_path="$new_path"
46269  # Check if we need to convert this using DOS-style short mode. If the path
46270  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46271  # take no chances and rewrite it.
46272  # Note: m4 eats our [], so we need to use [ and ] instead.
46273  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46274  if test "x$has_forbidden_chars" != x; then
46275    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46276    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46277  fi
46278
46279
46280  windows_path="$new_path"
46281  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46282    unix_path=`$CYGPATH -u "$windows_path"`
46283    new_path="$unix_path"
46284  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46285    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46286    new_path="$unix_path"
46287  fi
46288
46289  if test "x$path" != "x$new_path"; then
46290    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46291    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46292$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46293  fi
46294
46295  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46296  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46297
46298  else
46299    # We're on a posix platform. Hooray! :)
46300    path="$POTENTIAL_FREETYPE_LIB_PATH"
46301    has_space=`$ECHO "$path" | $GREP " "`
46302    if test "x$has_space" != x; then
46303      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46304$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46305      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46306    fi
46307
46308    # Use eval to expand a potential ~
46309    eval path="$path"
46310    if test ! -f "$path" && test ! -d "$path"; then
46311      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46312    fi
46313
46314    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46315  fi
46316
46317
46318    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46319    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46320$as_echo_n "checking for freetype includes... " >&6; }
46321    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46322$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46323    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46324    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46325$as_echo_n "checking for freetype libraries... " >&6; }
46326    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46327$as_echo "$FREETYPE_LIB_PATH" >&6; }
46328  fi
46329
46330          fi
46331
46332          if test "x$FOUND_FREETYPE" != xyes; then
46333            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
46334
46335  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46336  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46337  METHOD="well-known location"
46338
46339  # First check if the files exists.
46340  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46341    # We found an arbitrary include file. That's a good sign.
46342    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46343$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46344    FOUND_FREETYPE=yes
46345
46346    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
46347    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46348      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46349$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46350      FOUND_FREETYPE=no
46351    else
46352      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46353        # On Windows, we will need both .lib and .dll file.
46354        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
46355          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
46356$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
46357          FOUND_FREETYPE=no
46358        fi
46359      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46360          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46361        # Found lib in isa dir, use that instead.
46362        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46363      fi
46364    fi
46365  fi
46366
46367  if test "x$FOUND_FREETYPE" = xyes; then
46368
46369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46370
46371  # Input might be given as Windows format, start by converting to
46372  # unix format.
46373  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46374  new_path=`$CYGPATH -u "$path"`
46375
46376  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46377  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46378  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46379  # "foo.exe" is OK but "foo" is an error.
46380  #
46381  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46382  # It is also a way to make sure we got the proper file name for the real test later on.
46383  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46384  if test "x$test_shortpath" = x; then
46385    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46386$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46387    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46388  fi
46389
46390  # Call helper function which possibly converts this using DOS-style short mode.
46391  # If so, the updated path is stored in $new_path.
46392
46393  input_path="$new_path"
46394  # Check if we need to convert this using DOS-style short mode. If the path
46395  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46396  # take no chances and rewrite it.
46397  # Note: m4 eats our [], so we need to use [ and ] instead.
46398  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46399  if test "x$has_forbidden_chars" != x; then
46400    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46401    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46402    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46403    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46404      # Going to short mode and back again did indeed matter. Since short mode is
46405      # case insensitive, let's make it lowercase to improve readability.
46406      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46407      # Now convert it back to Unix-stile (cygpath)
46408      input_path=`$CYGPATH -u "$shortmode_path"`
46409      new_path="$input_path"
46410    fi
46411  fi
46412
46413  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46414  if test "x$test_cygdrive_prefix" = x; then
46415    # As a simple fix, exclude /usr/bin since it's not a real path.
46416    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46417      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46418      # a path prefixed by /cygdrive for fixpath to work.
46419      new_path="$CYGWIN_ROOT_PATH$input_path"
46420    fi
46421  fi
46422
46423
46424  if test "x$path" != "x$new_path"; then
46425    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46426    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46427$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46428  fi
46429
46430  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46431
46432  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46433  has_colon=`$ECHO $path | $GREP ^.:`
46434  new_path="$path"
46435  if test "x$has_colon" = x; then
46436    # Not in mixed or Windows style, start by that.
46437    new_path=`cmd //c echo $path`
46438  fi
46439
46440
46441  input_path="$new_path"
46442  # Check if we need to convert this using DOS-style short mode. If the path
46443  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46444  # take no chances and rewrite it.
46445  # Note: m4 eats our [], so we need to use [ and ] instead.
46446  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46447  if test "x$has_forbidden_chars" != x; then
46448    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46449    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46450  fi
46451
46452
46453  windows_path="$new_path"
46454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46455    unix_path=`$CYGPATH -u "$windows_path"`
46456    new_path="$unix_path"
46457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46458    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46459    new_path="$unix_path"
46460  fi
46461
46462  if test "x$path" != "x$new_path"; then
46463    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46464    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46465$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46466  fi
46467
46468  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46469  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46470
46471  else
46472    # We're on a posix platform. Hooray! :)
46473    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46474    has_space=`$ECHO "$path" | $GREP " "`
46475    if test "x$has_space" != x; then
46476      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46477$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46478      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46479    fi
46480
46481    # Use eval to expand a potential ~
46482    eval path="$path"
46483    if test ! -f "$path" && test ! -d "$path"; then
46484      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46485    fi
46486
46487    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46488  fi
46489
46490
46491  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46492
46493  # Input might be given as Windows format, start by converting to
46494  # unix format.
46495  path="$POTENTIAL_FREETYPE_LIB_PATH"
46496  new_path=`$CYGPATH -u "$path"`
46497
46498  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46499  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46500  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46501  # "foo.exe" is OK but "foo" is an error.
46502  #
46503  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46504  # It is also a way to make sure we got the proper file name for the real test later on.
46505  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46506  if test "x$test_shortpath" = x; then
46507    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46508$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46509    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46510  fi
46511
46512  # Call helper function which possibly converts this using DOS-style short mode.
46513  # If so, the updated path is stored in $new_path.
46514
46515  input_path="$new_path"
46516  # Check if we need to convert this using DOS-style short mode. If the path
46517  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46518  # take no chances and rewrite it.
46519  # Note: m4 eats our [], so we need to use [ and ] instead.
46520  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46521  if test "x$has_forbidden_chars" != x; then
46522    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46523    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46524    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46525    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46526      # Going to short mode and back again did indeed matter. Since short mode is
46527      # case insensitive, let's make it lowercase to improve readability.
46528      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46529      # Now convert it back to Unix-stile (cygpath)
46530      input_path=`$CYGPATH -u "$shortmode_path"`
46531      new_path="$input_path"
46532    fi
46533  fi
46534
46535  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46536  if test "x$test_cygdrive_prefix" = x; then
46537    # As a simple fix, exclude /usr/bin since it's not a real path.
46538    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46539      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46540      # a path prefixed by /cygdrive for fixpath to work.
46541      new_path="$CYGWIN_ROOT_PATH$input_path"
46542    fi
46543  fi
46544
46545
46546  if test "x$path" != "x$new_path"; then
46547    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46548    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46549$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46550  fi
46551
46552  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46553
46554  path="$POTENTIAL_FREETYPE_LIB_PATH"
46555  has_colon=`$ECHO $path | $GREP ^.:`
46556  new_path="$path"
46557  if test "x$has_colon" = x; then
46558    # Not in mixed or Windows style, start by that.
46559    new_path=`cmd //c echo $path`
46560  fi
46561
46562
46563  input_path="$new_path"
46564  # Check if we need to convert this using DOS-style short mode. If the path
46565  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46566  # take no chances and rewrite it.
46567  # Note: m4 eats our [], so we need to use [ and ] instead.
46568  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46569  if test "x$has_forbidden_chars" != x; then
46570    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46571    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46572  fi
46573
46574
46575  windows_path="$new_path"
46576  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46577    unix_path=`$CYGPATH -u "$windows_path"`
46578    new_path="$unix_path"
46579  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46580    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46581    new_path="$unix_path"
46582  fi
46583
46584  if test "x$path" != "x$new_path"; then
46585    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46586    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46587$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46588  fi
46589
46590  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46591  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46592
46593  else
46594    # We're on a posix platform. Hooray! :)
46595    path="$POTENTIAL_FREETYPE_LIB_PATH"
46596    has_space=`$ECHO "$path" | $GREP " "`
46597    if test "x$has_space" != x; then
46598      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46599$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46600      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46601    fi
46602
46603    # Use eval to expand a potential ~
46604    eval path="$path"
46605    if test ! -f "$path" && test ! -d "$path"; then
46606      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46607    fi
46608
46609    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46610  fi
46611
46612
46613    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46614    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46615$as_echo_n "checking for freetype includes... " >&6; }
46616    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46617$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46618    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46619    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46620$as_echo_n "checking for freetype libraries... " >&6; }
46621    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46622$as_echo "$FREETYPE_LIB_PATH" >&6; }
46623  fi
46624
46625          fi
46626
46627          if test "x$FOUND_FREETYPE" != xyes; then
46628            FREETYPE_BASE_DIR="$SYSROOT/usr"
46629            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
46630
46631  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46632  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
46633  METHOD="well-known location"
46634
46635  # First check if the files exists.
46636  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46637    # We found an arbitrary include file. That's a good sign.
46638    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46639$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46640    FOUND_FREETYPE=yes
46641
46642    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
46643    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46644      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46645$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46646      FOUND_FREETYPE=no
46647    else
46648      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46649        # On Windows, we will need both .lib and .dll file.
46650        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
46651          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
46652$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
46653          FOUND_FREETYPE=no
46654        fi
46655      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46656          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46657        # Found lib in isa dir, use that instead.
46658        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46659      fi
46660    fi
46661  fi
46662
46663  if test "x$FOUND_FREETYPE" = xyes; then
46664
46665  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46666
46667  # Input might be given as Windows format, start by converting to
46668  # unix format.
46669  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46670  new_path=`$CYGPATH -u "$path"`
46671
46672  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46673  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46674  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46675  # "foo.exe" is OK but "foo" is an error.
46676  #
46677  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46678  # It is also a way to make sure we got the proper file name for the real test later on.
46679  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46680  if test "x$test_shortpath" = x; then
46681    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46682$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46683    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46684  fi
46685
46686  # Call helper function which possibly converts this using DOS-style short mode.
46687  # If so, the updated path is stored in $new_path.
46688
46689  input_path="$new_path"
46690  # Check if we need to convert this using DOS-style short mode. If the path
46691  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46692  # take no chances and rewrite it.
46693  # Note: m4 eats our [], so we need to use [ and ] instead.
46694  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46695  if test "x$has_forbidden_chars" != x; then
46696    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46697    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46698    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46699    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46700      # Going to short mode and back again did indeed matter. Since short mode is
46701      # case insensitive, let's make it lowercase to improve readability.
46702      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46703      # Now convert it back to Unix-stile (cygpath)
46704      input_path=`$CYGPATH -u "$shortmode_path"`
46705      new_path="$input_path"
46706    fi
46707  fi
46708
46709  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46710  if test "x$test_cygdrive_prefix" = x; then
46711    # As a simple fix, exclude /usr/bin since it's not a real path.
46712    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46713      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46714      # a path prefixed by /cygdrive for fixpath to work.
46715      new_path="$CYGWIN_ROOT_PATH$input_path"
46716    fi
46717  fi
46718
46719
46720  if test "x$path" != "x$new_path"; then
46721    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46722    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46723$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46724  fi
46725
46726  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46727
46728  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46729  has_colon=`$ECHO $path | $GREP ^.:`
46730  new_path="$path"
46731  if test "x$has_colon" = x; then
46732    # Not in mixed or Windows style, start by that.
46733    new_path=`cmd //c echo $path`
46734  fi
46735
46736
46737  input_path="$new_path"
46738  # Check if we need to convert this using DOS-style short mode. If the path
46739  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46740  # take no chances and rewrite it.
46741  # Note: m4 eats our [], so we need to use [ and ] instead.
46742  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46743  if test "x$has_forbidden_chars" != x; then
46744    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46745    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46746  fi
46747
46748
46749  windows_path="$new_path"
46750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46751    unix_path=`$CYGPATH -u "$windows_path"`
46752    new_path="$unix_path"
46753  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46754    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46755    new_path="$unix_path"
46756  fi
46757
46758  if test "x$path" != "x$new_path"; then
46759    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46760    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46761$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46762  fi
46763
46764  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46765  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46766
46767  else
46768    # We're on a posix platform. Hooray! :)
46769    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46770    has_space=`$ECHO "$path" | $GREP " "`
46771    if test "x$has_space" != x; then
46772      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46773$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46774      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46775    fi
46776
46777    # Use eval to expand a potential ~
46778    eval path="$path"
46779    if test ! -f "$path" && test ! -d "$path"; then
46780      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46781    fi
46782
46783    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46784  fi
46785
46786
46787  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46788
46789  # Input might be given as Windows format, start by converting to
46790  # unix format.
46791  path="$POTENTIAL_FREETYPE_LIB_PATH"
46792  new_path=`$CYGPATH -u "$path"`
46793
46794  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46795  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46796  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46797  # "foo.exe" is OK but "foo" is an error.
46798  #
46799  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46800  # It is also a way to make sure we got the proper file name for the real test later on.
46801  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46802  if test "x$test_shortpath" = x; then
46803    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46804$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46805    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46806  fi
46807
46808  # Call helper function which possibly converts this using DOS-style short mode.
46809  # If so, the updated path is stored in $new_path.
46810
46811  input_path="$new_path"
46812  # Check if we need to convert this using DOS-style short mode. If the path
46813  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46814  # take no chances and rewrite it.
46815  # Note: m4 eats our [], so we need to use [ and ] instead.
46816  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46817  if test "x$has_forbidden_chars" != x; then
46818    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46819    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46820    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46821    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46822      # Going to short mode and back again did indeed matter. Since short mode is
46823      # case insensitive, let's make it lowercase to improve readability.
46824      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46825      # Now convert it back to Unix-stile (cygpath)
46826      input_path=`$CYGPATH -u "$shortmode_path"`
46827      new_path="$input_path"
46828    fi
46829  fi
46830
46831  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46832  if test "x$test_cygdrive_prefix" = x; then
46833    # As a simple fix, exclude /usr/bin since it's not a real path.
46834    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46835      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46836      # a path prefixed by /cygdrive for fixpath to work.
46837      new_path="$CYGWIN_ROOT_PATH$input_path"
46838    fi
46839  fi
46840
46841
46842  if test "x$path" != "x$new_path"; then
46843    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46844    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46845$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46846  fi
46847
46848  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46849
46850  path="$POTENTIAL_FREETYPE_LIB_PATH"
46851  has_colon=`$ECHO $path | $GREP ^.:`
46852  new_path="$path"
46853  if test "x$has_colon" = x; then
46854    # Not in mixed or Windows style, start by that.
46855    new_path=`cmd //c echo $path`
46856  fi
46857
46858
46859  input_path="$new_path"
46860  # Check if we need to convert this using DOS-style short mode. If the path
46861  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46862  # take no chances and rewrite it.
46863  # Note: m4 eats our [], so we need to use [ and ] instead.
46864  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46865  if test "x$has_forbidden_chars" != x; then
46866    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46867    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46868  fi
46869
46870
46871  windows_path="$new_path"
46872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46873    unix_path=`$CYGPATH -u "$windows_path"`
46874    new_path="$unix_path"
46875  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46876    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46877    new_path="$unix_path"
46878  fi
46879
46880  if test "x$path" != "x$new_path"; then
46881    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46882    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46883$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46884  fi
46885
46886  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46887  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46888
46889  else
46890    # We're on a posix platform. Hooray! :)
46891    path="$POTENTIAL_FREETYPE_LIB_PATH"
46892    has_space=`$ECHO "$path" | $GREP " "`
46893    if test "x$has_space" != x; then
46894      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46895$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46896      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46897    fi
46898
46899    # Use eval to expand a potential ~
46900    eval path="$path"
46901    if test ! -f "$path" && test ! -d "$path"; then
46902      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46903    fi
46904
46905    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46906  fi
46907
46908
46909    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46910    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46911$as_echo_n "checking for freetype includes... " >&6; }
46912    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46913$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46914    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46915    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46916$as_echo_n "checking for freetype libraries... " >&6; }
46917    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46918$as_echo "$FREETYPE_LIB_PATH" >&6; }
46919  fi
46920
46921            else
46922
46923  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46924  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
46925  METHOD="well-known location"
46926
46927  # First check if the files exists.
46928  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46929    # We found an arbitrary include file. That's a good sign.
46930    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46931$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46932    FOUND_FREETYPE=yes
46933
46934    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
46935    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46936      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46937$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46938      FOUND_FREETYPE=no
46939    else
46940      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46941        # On Windows, we will need both .lib and .dll file.
46942        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
46943          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
46944$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
46945          FOUND_FREETYPE=no
46946        fi
46947      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46948          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46949        # Found lib in isa dir, use that instead.
46950        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46951      fi
46952    fi
46953  fi
46954
46955  if test "x$FOUND_FREETYPE" = xyes; then
46956
46957  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46958
46959  # Input might be given as Windows format, start by converting to
46960  # unix format.
46961  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46962  new_path=`$CYGPATH -u "$path"`
46963
46964  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46965  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46966  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46967  # "foo.exe" is OK but "foo" is an error.
46968  #
46969  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46970  # It is also a way to make sure we got the proper file name for the real test later on.
46971  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46972  if test "x$test_shortpath" = x; then
46973    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46974$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46975    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46976  fi
46977
46978  # Call helper function which possibly converts this using DOS-style short mode.
46979  # If so, the updated path is stored in $new_path.
46980
46981  input_path="$new_path"
46982  # Check if we need to convert this using DOS-style short mode. If the path
46983  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46984  # take no chances and rewrite it.
46985  # Note: m4 eats our [], so we need to use [ and ] instead.
46986  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46987  if test "x$has_forbidden_chars" != x; then
46988    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46989    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46990    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46991    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46992      # Going to short mode and back again did indeed matter. Since short mode is
46993      # case insensitive, let's make it lowercase to improve readability.
46994      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46995      # Now convert it back to Unix-stile (cygpath)
46996      input_path=`$CYGPATH -u "$shortmode_path"`
46997      new_path="$input_path"
46998    fi
46999  fi
47000
47001  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47002  if test "x$test_cygdrive_prefix" = x; then
47003    # As a simple fix, exclude /usr/bin since it's not a real path.
47004    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47005      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47006      # a path prefixed by /cygdrive for fixpath to work.
47007      new_path="$CYGWIN_ROOT_PATH$input_path"
47008    fi
47009  fi
47010
47011
47012  if test "x$path" != "x$new_path"; then
47013    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47014    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47015$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47016  fi
47017
47018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47019
47020  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47021  has_colon=`$ECHO $path | $GREP ^.:`
47022  new_path="$path"
47023  if test "x$has_colon" = x; then
47024    # Not in mixed or Windows style, start by that.
47025    new_path=`cmd //c echo $path`
47026  fi
47027
47028
47029  input_path="$new_path"
47030  # Check if we need to convert this using DOS-style short mode. If the path
47031  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47032  # take no chances and rewrite it.
47033  # Note: m4 eats our [], so we need to use [ and ] instead.
47034  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47035  if test "x$has_forbidden_chars" != x; then
47036    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47037    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47038  fi
47039
47040
47041  windows_path="$new_path"
47042  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47043    unix_path=`$CYGPATH -u "$windows_path"`
47044    new_path="$unix_path"
47045  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47046    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47047    new_path="$unix_path"
47048  fi
47049
47050  if test "x$path" != "x$new_path"; then
47051    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47052    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47053$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47054  fi
47055
47056  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47057  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47058
47059  else
47060    # We're on a posix platform. Hooray! :)
47061    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47062    has_space=`$ECHO "$path" | $GREP " "`
47063    if test "x$has_space" != x; then
47064      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47065$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47066      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47067    fi
47068
47069    # Use eval to expand a potential ~
47070    eval path="$path"
47071    if test ! -f "$path" && test ! -d "$path"; then
47072      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47073    fi
47074
47075    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47076  fi
47077
47078
47079  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47080
47081  # Input might be given as Windows format, start by converting to
47082  # unix format.
47083  path="$POTENTIAL_FREETYPE_LIB_PATH"
47084  new_path=`$CYGPATH -u "$path"`
47085
47086  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47087  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47088  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47089  # "foo.exe" is OK but "foo" is an error.
47090  #
47091  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47092  # It is also a way to make sure we got the proper file name for the real test later on.
47093  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47094  if test "x$test_shortpath" = x; then
47095    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47096$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47097    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47098  fi
47099
47100  # Call helper function which possibly converts this using DOS-style short mode.
47101  # If so, the updated path is stored in $new_path.
47102
47103  input_path="$new_path"
47104  # Check if we need to convert this using DOS-style short mode. If the path
47105  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47106  # take no chances and rewrite it.
47107  # Note: m4 eats our [], so we need to use [ and ] instead.
47108  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47109  if test "x$has_forbidden_chars" != x; then
47110    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47111    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47112    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47113    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47114      # Going to short mode and back again did indeed matter. Since short mode is
47115      # case insensitive, let's make it lowercase to improve readability.
47116      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47117      # Now convert it back to Unix-stile (cygpath)
47118      input_path=`$CYGPATH -u "$shortmode_path"`
47119      new_path="$input_path"
47120    fi
47121  fi
47122
47123  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47124  if test "x$test_cygdrive_prefix" = x; then
47125    # As a simple fix, exclude /usr/bin since it's not a real path.
47126    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47127      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47128      # a path prefixed by /cygdrive for fixpath to work.
47129      new_path="$CYGWIN_ROOT_PATH$input_path"
47130    fi
47131  fi
47132
47133
47134  if test "x$path" != "x$new_path"; then
47135    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47136    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47137$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47138  fi
47139
47140  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47141
47142  path="$POTENTIAL_FREETYPE_LIB_PATH"
47143  has_colon=`$ECHO $path | $GREP ^.:`
47144  new_path="$path"
47145  if test "x$has_colon" = x; then
47146    # Not in mixed or Windows style, start by that.
47147    new_path=`cmd //c echo $path`
47148  fi
47149
47150
47151  input_path="$new_path"
47152  # Check if we need to convert this using DOS-style short mode. If the path
47153  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47154  # take no chances and rewrite it.
47155  # Note: m4 eats our [], so we need to use [ and ] instead.
47156  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47157  if test "x$has_forbidden_chars" != x; then
47158    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47159    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47160  fi
47161
47162
47163  windows_path="$new_path"
47164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47165    unix_path=`$CYGPATH -u "$windows_path"`
47166    new_path="$unix_path"
47167  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47168    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47169    new_path="$unix_path"
47170  fi
47171
47172  if test "x$path" != "x$new_path"; then
47173    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47174    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47175$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47176  fi
47177
47178  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47179  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47180
47181  else
47182    # We're on a posix platform. Hooray! :)
47183    path="$POTENTIAL_FREETYPE_LIB_PATH"
47184    has_space=`$ECHO "$path" | $GREP " "`
47185    if test "x$has_space" != x; then
47186      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47187$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47188      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47189    fi
47190
47191    # Use eval to expand a potential ~
47192    eval path="$path"
47193    if test ! -f "$path" && test ! -d "$path"; then
47194      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47195    fi
47196
47197    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47198  fi
47199
47200
47201    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47202    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47203$as_echo_n "checking for freetype includes... " >&6; }
47204    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47205$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47206    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47207    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47208$as_echo_n "checking for freetype libraries... " >&6; }
47209    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47210$as_echo "$FREETYPE_LIB_PATH" >&6; }
47211  fi
47212
47213              if test "x$FOUND_FREETYPE" != xyes; then
47214
47215  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47216  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
47217  METHOD="well-known location"
47218
47219  # First check if the files exists.
47220  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47221    # We found an arbitrary include file. That's a good sign.
47222    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47223$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47224    FOUND_FREETYPE=yes
47225
47226    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
47227    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47228      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47229$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47230      FOUND_FREETYPE=no
47231    else
47232      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47233        # On Windows, we will need both .lib and .dll file.
47234        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
47235          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
47236$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
47237          FOUND_FREETYPE=no
47238        fi
47239      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47240          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47241        # Found lib in isa dir, use that instead.
47242        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47243      fi
47244    fi
47245  fi
47246
47247  if test "x$FOUND_FREETYPE" = xyes; then
47248
47249  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47250
47251  # Input might be given as Windows format, start by converting to
47252  # unix format.
47253  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47254  new_path=`$CYGPATH -u "$path"`
47255
47256  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47257  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47258  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47259  # "foo.exe" is OK but "foo" is an error.
47260  #
47261  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47262  # It is also a way to make sure we got the proper file name for the real test later on.
47263  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47264  if test "x$test_shortpath" = x; then
47265    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47266$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47267    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47268  fi
47269
47270  # Call helper function which possibly converts this using DOS-style short mode.
47271  # If so, the updated path is stored in $new_path.
47272
47273  input_path="$new_path"
47274  # Check if we need to convert this using DOS-style short mode. If the path
47275  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47276  # take no chances and rewrite it.
47277  # Note: m4 eats our [], so we need to use [ and ] instead.
47278  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47279  if test "x$has_forbidden_chars" != x; then
47280    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47281    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47282    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47283    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47284      # Going to short mode and back again did indeed matter. Since short mode is
47285      # case insensitive, let's make it lowercase to improve readability.
47286      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47287      # Now convert it back to Unix-stile (cygpath)
47288      input_path=`$CYGPATH -u "$shortmode_path"`
47289      new_path="$input_path"
47290    fi
47291  fi
47292
47293  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47294  if test "x$test_cygdrive_prefix" = x; then
47295    # As a simple fix, exclude /usr/bin since it's not a real path.
47296    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47297      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47298      # a path prefixed by /cygdrive for fixpath to work.
47299      new_path="$CYGWIN_ROOT_PATH$input_path"
47300    fi
47301  fi
47302
47303
47304  if test "x$path" != "x$new_path"; then
47305    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47306    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47307$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47308  fi
47309
47310  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47311
47312  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47313  has_colon=`$ECHO $path | $GREP ^.:`
47314  new_path="$path"
47315  if test "x$has_colon" = x; then
47316    # Not in mixed or Windows style, start by that.
47317    new_path=`cmd //c echo $path`
47318  fi
47319
47320
47321  input_path="$new_path"
47322  # Check if we need to convert this using DOS-style short mode. If the path
47323  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47324  # take no chances and rewrite it.
47325  # Note: m4 eats our [], so we need to use [ and ] instead.
47326  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47327  if test "x$has_forbidden_chars" != x; then
47328    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47329    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47330  fi
47331
47332
47333  windows_path="$new_path"
47334  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47335    unix_path=`$CYGPATH -u "$windows_path"`
47336    new_path="$unix_path"
47337  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47338    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47339    new_path="$unix_path"
47340  fi
47341
47342  if test "x$path" != "x$new_path"; then
47343    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47344    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47345$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47346  fi
47347
47348  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47349  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47350
47351  else
47352    # We're on a posix platform. Hooray! :)
47353    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47354    has_space=`$ECHO "$path" | $GREP " "`
47355    if test "x$has_space" != x; then
47356      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47357$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47358      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47359    fi
47360
47361    # Use eval to expand a potential ~
47362    eval path="$path"
47363    if test ! -f "$path" && test ! -d "$path"; then
47364      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47365    fi
47366
47367    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47368  fi
47369
47370
47371  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47372
47373  # Input might be given as Windows format, start by converting to
47374  # unix format.
47375  path="$POTENTIAL_FREETYPE_LIB_PATH"
47376  new_path=`$CYGPATH -u "$path"`
47377
47378  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47379  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47380  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47381  # "foo.exe" is OK but "foo" is an error.
47382  #
47383  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47384  # It is also a way to make sure we got the proper file name for the real test later on.
47385  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47386  if test "x$test_shortpath" = x; then
47387    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47388$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47389    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47390  fi
47391
47392  # Call helper function which possibly converts this using DOS-style short mode.
47393  # If so, the updated path is stored in $new_path.
47394
47395  input_path="$new_path"
47396  # Check if we need to convert this using DOS-style short mode. If the path
47397  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47398  # take no chances and rewrite it.
47399  # Note: m4 eats our [], so we need to use [ and ] instead.
47400  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47401  if test "x$has_forbidden_chars" != x; then
47402    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47403    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47404    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47405    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47406      # Going to short mode and back again did indeed matter. Since short mode is
47407      # case insensitive, let's make it lowercase to improve readability.
47408      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47409      # Now convert it back to Unix-stile (cygpath)
47410      input_path=`$CYGPATH -u "$shortmode_path"`
47411      new_path="$input_path"
47412    fi
47413  fi
47414
47415  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47416  if test "x$test_cygdrive_prefix" = x; then
47417    # As a simple fix, exclude /usr/bin since it's not a real path.
47418    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47419      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47420      # a path prefixed by /cygdrive for fixpath to work.
47421      new_path="$CYGWIN_ROOT_PATH$input_path"
47422    fi
47423  fi
47424
47425
47426  if test "x$path" != "x$new_path"; then
47427    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47428    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47429$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47430  fi
47431
47432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47433
47434  path="$POTENTIAL_FREETYPE_LIB_PATH"
47435  has_colon=`$ECHO $path | $GREP ^.:`
47436  new_path="$path"
47437  if test "x$has_colon" = x; then
47438    # Not in mixed or Windows style, start by that.
47439    new_path=`cmd //c echo $path`
47440  fi
47441
47442
47443  input_path="$new_path"
47444  # Check if we need to convert this using DOS-style short mode. If the path
47445  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47446  # take no chances and rewrite it.
47447  # Note: m4 eats our [], so we need to use [ and ] instead.
47448  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47449  if test "x$has_forbidden_chars" != x; then
47450    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47451    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47452  fi
47453
47454
47455  windows_path="$new_path"
47456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47457    unix_path=`$CYGPATH -u "$windows_path"`
47458    new_path="$unix_path"
47459  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47460    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47461    new_path="$unix_path"
47462  fi
47463
47464  if test "x$path" != "x$new_path"; then
47465    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47466    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47467$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47468  fi
47469
47470  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47471  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47472
47473  else
47474    # We're on a posix platform. Hooray! :)
47475    path="$POTENTIAL_FREETYPE_LIB_PATH"
47476    has_space=`$ECHO "$path" | $GREP " "`
47477    if test "x$has_space" != x; then
47478      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47479$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47480      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47481    fi
47482
47483    # Use eval to expand a potential ~
47484    eval path="$path"
47485    if test ! -f "$path" && test ! -d "$path"; then
47486      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47487    fi
47488
47489    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47490  fi
47491
47492
47493    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47494    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47495$as_echo_n "checking for freetype includes... " >&6; }
47496    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47497$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47498    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47499    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47500$as_echo_n "checking for freetype libraries... " >&6; }
47501    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47502$as_echo "$FREETYPE_LIB_PATH" >&6; }
47503  fi
47504
47505              fi
47506            fi
47507          fi
47508        fi
47509      fi # end check in well-known locations
47510
47511      if test "x$FOUND_FREETYPE" != xyes; then
47512
47513  # Print a helpful message on how to acquire the necessary build dependency.
47514  # freetype is the help tag: freetype, cups, pulse, alsa etc
47515  MISSING_DEPENDENCY=freetype
47516
47517  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47518    cygwin_help $MISSING_DEPENDENCY
47519  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47520    msys_help $MISSING_DEPENDENCY
47521  else
47522    PKGHANDLER_COMMAND=
47523
47524    case $PKGHANDLER in
47525      apt-get)
47526        apt_help     $MISSING_DEPENDENCY ;;
47527      yum)
47528        yum_help     $MISSING_DEPENDENCY ;;
47529      port)
47530        port_help    $MISSING_DEPENDENCY ;;
47531      pkgutil)
47532        pkgutil_help $MISSING_DEPENDENCY ;;
47533      pkgadd)
47534        pkgadd_help  $MISSING_DEPENDENCY ;;
47535    esac
47536
47537    if test "x$PKGHANDLER_COMMAND" != x; then
47538      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47539    fi
47540  fi
47541
47542        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
47543      fi
47544    fi # end user specified settings
47545
47546    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
47547    if test "x$FREETYPE_CFLAGS" = x; then
47548
47549  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47550
47551  # Input might be given as Windows format, start by converting to
47552  # unix format.
47553  path="$FREETYPE_INCLUDE_PATH"
47554  new_path=`$CYGPATH -u "$path"`
47555
47556  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47557  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47558  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47559  # "foo.exe" is OK but "foo" is an error.
47560  #
47561  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47562  # It is also a way to make sure we got the proper file name for the real test later on.
47563  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47564  if test "x$test_shortpath" = x; then
47565    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47566$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47567    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
47568  fi
47569
47570  # Call helper function which possibly converts this using DOS-style short mode.
47571  # If so, the updated path is stored in $new_path.
47572
47573  input_path="$new_path"
47574  # Check if we need to convert this using DOS-style short mode. If the path
47575  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47576  # take no chances and rewrite it.
47577  # Note: m4 eats our [], so we need to use [ and ] instead.
47578  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47579  if test "x$has_forbidden_chars" != x; then
47580    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47581    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47582    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47583    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47584      # Going to short mode and back again did indeed matter. Since short mode is
47585      # case insensitive, let's make it lowercase to improve readability.
47586      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47587      # Now convert it back to Unix-stile (cygpath)
47588      input_path=`$CYGPATH -u "$shortmode_path"`
47589      new_path="$input_path"
47590    fi
47591  fi
47592
47593  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47594  if test "x$test_cygdrive_prefix" = x; then
47595    # As a simple fix, exclude /usr/bin since it's not a real path.
47596    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47597      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47598      # a path prefixed by /cygdrive for fixpath to work.
47599      new_path="$CYGWIN_ROOT_PATH$input_path"
47600    fi
47601  fi
47602
47603
47604  if test "x$path" != "x$new_path"; then
47605    FREETYPE_INCLUDE_PATH="$new_path"
47606    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47607$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47608  fi
47609
47610  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47611
47612  path="$FREETYPE_INCLUDE_PATH"
47613  has_colon=`$ECHO $path | $GREP ^.:`
47614  new_path="$path"
47615  if test "x$has_colon" = x; then
47616    # Not in mixed or Windows style, start by that.
47617    new_path=`cmd //c echo $path`
47618  fi
47619
47620
47621  input_path="$new_path"
47622  # Check if we need to convert this using DOS-style short mode. If the path
47623  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47624  # take no chances and rewrite it.
47625  # Note: m4 eats our [], so we need to use [ and ] instead.
47626  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47627  if test "x$has_forbidden_chars" != x; then
47628    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47629    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47630  fi
47631
47632
47633  windows_path="$new_path"
47634  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47635    unix_path=`$CYGPATH -u "$windows_path"`
47636    new_path="$unix_path"
47637  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47638    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47639    new_path="$unix_path"
47640  fi
47641
47642  if test "x$path" != "x$new_path"; then
47643    FREETYPE_INCLUDE_PATH="$new_path"
47644    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47645$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47646  fi
47647
47648  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47649  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47650
47651  else
47652    # We're on a posix platform. Hooray! :)
47653    path="$FREETYPE_INCLUDE_PATH"
47654    has_space=`$ECHO "$path" | $GREP " "`
47655    if test "x$has_space" != x; then
47656      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47657$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47658      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47659    fi
47660
47661    # Use eval to expand a potential ~
47662    eval path="$path"
47663    if test ! -f "$path" && test ! -d "$path"; then
47664      as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47665    fi
47666
47667    FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47668  fi
47669
47670      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
47671        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
47672      else
47673        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
47674      fi
47675    fi
47676
47677    if test "x$FREETYPE_LIBS" = x; then
47678
47679  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47680
47681  # Input might be given as Windows format, start by converting to
47682  # unix format.
47683  path="$FREETYPE_LIB_PATH"
47684  new_path=`$CYGPATH -u "$path"`
47685
47686  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47687  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47688  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47689  # "foo.exe" is OK but "foo" is an error.
47690  #
47691  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47692  # It is also a way to make sure we got the proper file name for the real test later on.
47693  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47694  if test "x$test_shortpath" = x; then
47695    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47696$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47697    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
47698  fi
47699
47700  # Call helper function which possibly converts this using DOS-style short mode.
47701  # If so, the updated path is stored in $new_path.
47702
47703  input_path="$new_path"
47704  # Check if we need to convert this using DOS-style short mode. If the path
47705  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47706  # take no chances and rewrite it.
47707  # Note: m4 eats our [], so we need to use [ and ] instead.
47708  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47709  if test "x$has_forbidden_chars" != x; then
47710    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47711    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47712    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47713    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47714      # Going to short mode and back again did indeed matter. Since short mode is
47715      # case insensitive, let's make it lowercase to improve readability.
47716      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47717      # Now convert it back to Unix-stile (cygpath)
47718      input_path=`$CYGPATH -u "$shortmode_path"`
47719      new_path="$input_path"
47720    fi
47721  fi
47722
47723  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47724  if test "x$test_cygdrive_prefix" = x; then
47725    # As a simple fix, exclude /usr/bin since it's not a real path.
47726    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47727      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47728      # a path prefixed by /cygdrive for fixpath to work.
47729      new_path="$CYGWIN_ROOT_PATH$input_path"
47730    fi
47731  fi
47732
47733
47734  if test "x$path" != "x$new_path"; then
47735    FREETYPE_LIB_PATH="$new_path"
47736    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
47737$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47738  fi
47739
47740  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47741
47742  path="$FREETYPE_LIB_PATH"
47743  has_colon=`$ECHO $path | $GREP ^.:`
47744  new_path="$path"
47745  if test "x$has_colon" = x; then
47746    # Not in mixed or Windows style, start by that.
47747    new_path=`cmd //c echo $path`
47748  fi
47749
47750
47751  input_path="$new_path"
47752  # Check if we need to convert this using DOS-style short mode. If the path
47753  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47754  # take no chances and rewrite it.
47755  # Note: m4 eats our [], so we need to use [ and ] instead.
47756  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47757  if test "x$has_forbidden_chars" != x; then
47758    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47759    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47760  fi
47761
47762
47763  windows_path="$new_path"
47764  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47765    unix_path=`$CYGPATH -u "$windows_path"`
47766    new_path="$unix_path"
47767  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47768    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47769    new_path="$unix_path"
47770  fi
47771
47772  if test "x$path" != "x$new_path"; then
47773    FREETYPE_LIB_PATH="$new_path"
47774    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
47775$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47776  fi
47777
47778  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47779  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47780
47781  else
47782    # We're on a posix platform. Hooray! :)
47783    path="$FREETYPE_LIB_PATH"
47784    has_space=`$ECHO "$path" | $GREP " "`
47785    if test "x$has_space" != x; then
47786      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47787$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47788      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47789    fi
47790
47791    # Use eval to expand a potential ~
47792    eval path="$path"
47793    if test ! -f "$path" && test ! -d "$path"; then
47794      as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47795    fi
47796
47797    FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47798  fi
47799
47800      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47801        FREETYPE_LIBS="$FREETYPE_LIB_PATH/freetype.lib"
47802      else
47803        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -lfreetype"
47804      fi
47805    fi
47806
47807    # Try to compile it
47808    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
47809$as_echo_n "checking if we can compile and link with freetype... " >&6; }
47810    ac_ext=cpp
47811ac_cpp='$CXXCPP $CPPFLAGS'
47812ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47813ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47814ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47815
47816    PREV_CXXCFLAGS="$CXXFLAGS"
47817    PREV_LIBS="$LIBS"
47818    PREV_CXX="$CXX"
47819    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
47820    LIBS="$LIBS $FREETYPE_LIBS"
47821    CXX="$FIXPATH $CXX"
47822    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47823/* end confdefs.h.  */
47824
47825          #include<ft2build.h>
47826          #include FT_FREETYPE_H
47827          int main () {
47828            FT_Init_FreeType(NULL);
47829            return 0;
47830          }
47831
47832_ACEOF
47833if ac_fn_cxx_try_link "$LINENO"; then :
47834
47835          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47836$as_echo "yes" >&6; }
47837
47838else
47839
47840          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47841$as_echo "no" >&6; }
47842          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
47843$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
47844          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
47845$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
47846
47847
47848  # Print a helpful message on how to acquire the necessary build dependency.
47849  # freetype is the help tag: freetype, cups, pulse, alsa etc
47850  MISSING_DEPENDENCY=freetype
47851
47852  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47853    cygwin_help $MISSING_DEPENDENCY
47854  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47855    msys_help $MISSING_DEPENDENCY
47856  else
47857    PKGHANDLER_COMMAND=
47858
47859    case $PKGHANDLER in
47860      apt-get)
47861        apt_help     $MISSING_DEPENDENCY ;;
47862      yum)
47863        yum_help     $MISSING_DEPENDENCY ;;
47864      port)
47865        port_help    $MISSING_DEPENDENCY ;;
47866      pkgutil)
47867        pkgutil_help $MISSING_DEPENDENCY ;;
47868      pkgadd)
47869        pkgadd_help  $MISSING_DEPENDENCY ;;
47870    esac
47871
47872    if test "x$PKGHANDLER_COMMAND" != x; then
47873      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47874    fi
47875  fi
47876
47877
47878          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
47879
47880
47881fi
47882rm -f core conftest.err conftest.$ac_objext \
47883    conftest$ac_exeext conftest.$ac_ext
47884    CXXCFLAGS="$PREV_CXXFLAGS"
47885    LIBS="$PREV_LIBS"
47886    CXX="$PREV_CXX"
47887    ac_ext=cpp
47888ac_cpp='$CXXCPP $CPPFLAGS'
47889ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47890ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47891ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47892
47893
47894    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
47895$as_echo_n "checking if we should bundle freetype... " >&6; }
47896    if test "x$BUNDLE_FREETYPE" = xyes; then
47897      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
47898    fi
47899    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
47900$as_echo "$BUNDLE_FREETYPE" >&6; }
47901
47902  fi # end freetype needed
47903
47904
47905
47906
47907
47908
47909
47910  ###############################################################################
47911  #
47912  # Check for alsa headers and libraries. Used on Linux/GNU systems.
47913  #
47914
47915# Check whether --with-alsa was given.
47916if test "${with_alsa+set}" = set; then :
47917  withval=$with_alsa;
47918fi
47919
47920
47921# Check whether --with-alsa-include was given.
47922if test "${with_alsa_include+set}" = set; then :
47923  withval=$with_alsa_include;
47924fi
47925
47926
47927# Check whether --with-alsa-lib was given.
47928if test "${with_alsa_lib+set}" = set; then :
47929  withval=$with_alsa_lib;
47930fi
47931
47932
47933  if test "x$ALSA_NOT_NEEDED" = xyes; then
47934    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
47935      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
47936$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
47937    fi
47938    ALSA_CFLAGS=
47939    ALSA_LIBS=
47940  else
47941    ALSA_FOUND=no
47942
47943    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
47944      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
47945    fi
47946
47947    if test "x${with_alsa}" != x; then
47948      ALSA_LIBS="-L${with_alsa}/lib -lasound"
47949      ALSA_CFLAGS="-I${with_alsa}/include"
47950      ALSA_FOUND=yes
47951    fi
47952    if test "x${with_alsa_include}" != x; then
47953      ALSA_CFLAGS="-I${with_alsa_include}"
47954      ALSA_FOUND=yes
47955    fi
47956    if test "x${with_alsa_lib}" != x; then
47957      ALSA_LIBS="-L${with_alsa_lib} -lasound"
47958      ALSA_FOUND=yes
47959    fi
47960    if test "x$ALSA_FOUND" = xno; then
47961
47962
47963  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
47964    # Source the builddeps file again, to make sure it uses the latest variables!
47965    . $builddepsfile
47966    # Look for a target and build machine specific resource!
47967    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
47968    if test "x$resource" = x; then
47969      # Ok, lets instead look for a target specific resource
47970      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
47971    fi
47972    if test "x$resource" = x; then
47973      # Ok, lets instead look for a build specific resource
47974      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
47975    fi
47976    if test "x$resource" = x; then
47977      # Ok, lets instead look for a generic resource
47978      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
47979      resource=${builddep_alsa}
47980    fi
47981    if test "x$resource" != x; then
47982      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
47983$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
47984      # If the resource in the builddeps.conf file is an existing directory,
47985      # for example /java/linux/cups
47986      if test -d ${resource}; then
47987        depdir=${resource}
47988      else
47989
47990  # alsa is for example mymodule
47991  # $resource is for example libs/general/libmymod_1_2_3.zip
47992  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
47993  # $with_builddeps_dir is for example /localhome/builddeps
47994  # depdir is the name of the variable into which we store the depdir, eg MYMOD
47995  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
47996  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
47997  filename=`basename $resource`
47998  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
47999  filebase=${filename%%.*}
48000  extension=${filename#*.}
48001  installdir=$with_builddeps_dir/$filebase
48002  if test ! -f $installdir/$filename.unpacked; then
48003    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
48004$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
48005    if test ! -d $installdir; then
48006      mkdir -p $installdir
48007    fi
48008    if test ! -d $installdir; then
48009      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
48010    fi
48011    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
48012    touch $tmpfile
48013    if test ! -f $tmpfile; then
48014      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
48015    fi
48016
48017  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
48018  # $tmpfile is the local file name for the downloaded file.
48019  VALID_TOOL=no
48020  if test "x$BDEPS_FTP" = xwget; then
48021    VALID_TOOL=yes
48022    wget -O $tmpfile $with_builddeps_server/$resource
48023  fi
48024  if test "x$BDEPS_FTP" = xlftp; then
48025    VALID_TOOL=yes
48026    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
48027  fi
48028  if test "x$BDEPS_FTP" = xftp; then
48029    VALID_TOOL=yes
48030    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
48031    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
48032    FTPUSERPWD=${FTPSERVER%%@*}
48033    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
48034      FTPUSER=${userpwd%%:*}
48035      FTPPWD=${userpwd#*@}
48036      FTPSERVER=${FTPSERVER#*@}
48037    else
48038      FTPUSER=ftp
48039      FTPPWD=ftp
48040    fi
48041    # the "pass" command does not work on some
48042    # ftp clients (read ftp.exe) but if it works,
48043    # passive mode is better!
48044    ( \
48045        echo "user $FTPUSER $FTPPWD"        ; \
48046        echo "pass"                         ; \
48047        echo "bin"                          ; \
48048        echo "get $FTPPATH $tmpfile"              ; \
48049    ) | ftp -in $FTPSERVER
48050  fi
48051  if test "x$VALID_TOOL" != xyes; then
48052    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
48053  fi
48054
48055    mv $tmpfile $installdir/$filename
48056    if test ! -s $installdir/$filename; then
48057      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
48058    fi
48059    case "$extension" in
48060      zip)  echo "Unzipping $installdir/$filename..."
48061        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
48062        ;;
48063      tar.gz) echo "Untaring $installdir/$filename..."
48064        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48065        ;;
48066      tgz) echo "Untaring $installdir/$filename..."
48067        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48068        ;;
48069      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
48070        ;;
48071    esac
48072  fi
48073  if test -f $installdir/$filename.unpacked; then
48074    depdir=$installdir
48075  fi
48076
48077      fi
48078      # Source the builddeps file again, because in the previous command, the depdir
48079      # was updated to point at the current build dependency install directory.
48080      . $builddepsfile
48081      # Now extract variables from the builddeps.conf files.
48082      theroot=${builddep_alsa_ROOT}
48083      thecflags=${builddep_alsa_CFLAGS}
48084      thelibs=${builddep_alsa_LIBS}
48085      if test "x$depdir" = x; then
48086        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
48087      fi
48088      ALSA=$depdir
48089      if test "x$theroot" != x; then
48090        ALSA="$theroot"
48091      fi
48092      if test "x$thecflags" != x; then
48093        ALSA_CFLAGS="$thecflags"
48094      fi
48095      if test "x$thelibs" != x; then
48096        ALSA_LIBS="$thelibs"
48097      fi
48098      ALSA_FOUND=yes
48099      else ALSA_FOUND=no
48100
48101    fi
48102    else ALSA_FOUND=no
48103
48104  fi
48105
48106    fi
48107    # Do not try pkg-config if we have a sysroot set.
48108    if test "x$SYSROOT" = x; then
48109      if test "x$ALSA_FOUND" = xno; then
48110
48111pkg_failed=no
48112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
48113$as_echo_n "checking for ALSA... " >&6; }
48114
48115if test -n "$ALSA_CFLAGS"; then
48116    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
48117 elif test -n "$PKG_CONFIG"; then
48118    if test -n "$PKG_CONFIG" && \
48119    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48120  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48121  ac_status=$?
48122  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48123  test $ac_status = 0; }; then
48124  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
48125else
48126  pkg_failed=yes
48127fi
48128 else
48129    pkg_failed=untried
48130fi
48131if test -n "$ALSA_LIBS"; then
48132    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
48133 elif test -n "$PKG_CONFIG"; then
48134    if test -n "$PKG_CONFIG" && \
48135    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48136  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48137  ac_status=$?
48138  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48139  test $ac_status = 0; }; then
48140  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
48141else
48142  pkg_failed=yes
48143fi
48144 else
48145    pkg_failed=untried
48146fi
48147
48148
48149
48150if test $pkg_failed = yes; then
48151
48152if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48153        _pkg_short_errors_supported=yes
48154else
48155        _pkg_short_errors_supported=no
48156fi
48157        if test $_pkg_short_errors_supported = yes; then
48158	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
48159        else
48160	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
48161        fi
48162	# Put the nasty error message in config.log where it belongs
48163	echo "$ALSA_PKG_ERRORS" >&5
48164
48165	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48166$as_echo "no" >&6; }
48167                ALSA_FOUND=no
48168elif test $pkg_failed = untried; then
48169	ALSA_FOUND=no
48170else
48171	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
48172	ALSA_LIBS=$pkg_cv_ALSA_LIBS
48173        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48174$as_echo "yes" >&6; }
48175	ALSA_FOUND=yes
48176fi
48177      fi
48178    fi
48179    if test "x$ALSA_FOUND" = xno; then
48180      for ac_header in alsa/asoundlib.h
48181do :
48182  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
48183if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
48184  cat >>confdefs.h <<_ACEOF
48185#define HAVE_ALSA_ASOUNDLIB_H 1
48186_ACEOF
48187
48188            ALSA_FOUND=yes
48189            ALSA_CFLAGS=-Iignoreme
48190            ALSA_LIBS=-lasound
48191            DEFAULT_ALSA=yes
48192
48193else
48194  ALSA_FOUND=no
48195fi
48196
48197done
48198
48199    fi
48200    if test "x$ALSA_FOUND" = xno; then
48201
48202  # Print a helpful message on how to acquire the necessary build dependency.
48203  # alsa is the help tag: freetype, cups, pulse, alsa etc
48204  MISSING_DEPENDENCY=alsa
48205
48206  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48207    cygwin_help $MISSING_DEPENDENCY
48208  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48209    msys_help $MISSING_DEPENDENCY
48210  else
48211    PKGHANDLER_COMMAND=
48212
48213    case $PKGHANDLER in
48214      apt-get)
48215        apt_help     $MISSING_DEPENDENCY ;;
48216      yum)
48217        yum_help     $MISSING_DEPENDENCY ;;
48218      port)
48219        port_help    $MISSING_DEPENDENCY ;;
48220      pkgutil)
48221        pkgutil_help $MISSING_DEPENDENCY ;;
48222      pkgadd)
48223        pkgadd_help  $MISSING_DEPENDENCY ;;
48224    esac
48225
48226    if test "x$PKGHANDLER_COMMAND" != x; then
48227      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48228    fi
48229  fi
48230
48231      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
48232    fi
48233  fi
48234
48235
48236
48237
48238
48239
48240  ###############################################################################
48241  #
48242  # Check for the jpeg library
48243  #
48244
48245
48246# Check whether --with-libjpeg was given.
48247if test "${with_libjpeg+set}" = set; then :
48248  withval=$with_libjpeg;
48249fi
48250
48251
48252  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
48253$as_echo_n "checking for which libjpeg to use... " >&6; }
48254
48255  # default is bundled
48256  DEFAULT_LIBJPEG=bundled
48257
48258  #
48259  # if user didn't specify, use DEFAULT_LIBJPEG
48260  #
48261  if test "x${with_libjpeg}" = "x"; then
48262    with_libjpeg=${DEFAULT_LIBJPEG}
48263  fi
48264
48265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
48266$as_echo "${with_libjpeg}" >&6; }
48267
48268  if test "x${with_libjpeg}" = "xbundled"; then
48269    USE_EXTERNAL_LIBJPEG=false
48270  elif test "x${with_libjpeg}" = "xsystem"; then
48271    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
48272if test "x$ac_cv_header_jpeglib_h" = xyes; then :
48273
48274else
48275   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
48276fi
48277
48278
48279    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
48280$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
48281if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
48282  $as_echo_n "(cached) " >&6
48283else
48284  ac_check_lib_save_LIBS=$LIBS
48285LIBS="-ljpeg  $LIBS"
48286cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48287/* end confdefs.h.  */
48288
48289/* Override any GCC internal prototype to avoid an error.
48290   Use char because int might match the return type of a GCC
48291   builtin and then its argument prototype would still apply.  */
48292#ifdef __cplusplus
48293extern "C"
48294#endif
48295char jpeg_CreateDecompress ();
48296int
48297main ()
48298{
48299return jpeg_CreateDecompress ();
48300  ;
48301  return 0;
48302}
48303_ACEOF
48304if ac_fn_cxx_try_link "$LINENO"; then :
48305  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
48306else
48307  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
48308fi
48309rm -f core conftest.err conftest.$ac_objext \
48310    conftest$ac_exeext conftest.$ac_ext
48311LIBS=$ac_check_lib_save_LIBS
48312fi
48313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
48314$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
48315if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
48316  cat >>confdefs.h <<_ACEOF
48317#define HAVE_LIBJPEG 1
48318_ACEOF
48319
48320  LIBS="-ljpeg $LIBS"
48321
48322else
48323   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
48324fi
48325
48326
48327    USE_EXTERNAL_LIBJPEG=true
48328  else
48329    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
48330  fi
48331
48332
48333
48334  ###############################################################################
48335  #
48336  # Check for the gif library
48337  #
48338
48339
48340# Check whether --with-giflib was given.
48341if test "${with_giflib+set}" = set; then :
48342  withval=$with_giflib;
48343fi
48344
48345
48346
48347  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
48348$as_echo_n "checking for which giflib to use... " >&6; }
48349
48350  # default is bundled
48351  DEFAULT_GIFLIB=bundled
48352
48353  #
48354  # if user didn't specify, use DEFAULT_GIFLIB
48355  #
48356  if test "x${with_giflib}" = "x"; then
48357    with_giflib=${DEFAULT_GIFLIB}
48358  fi
48359
48360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
48361$as_echo "${with_giflib}" >&6; }
48362
48363  if test "x${with_giflib}" = "xbundled"; then
48364    USE_EXTERNAL_LIBGIF=false
48365  elif test "x${with_giflib}" = "xsystem"; then
48366    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
48367if test "x$ac_cv_header_gif_lib_h" = xyes; then :
48368
48369else
48370   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
48371fi
48372
48373
48374    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
48375$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
48376if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
48377  $as_echo_n "(cached) " >&6
48378else
48379  ac_check_lib_save_LIBS=$LIBS
48380LIBS="-lgif  $LIBS"
48381cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48382/* end confdefs.h.  */
48383
48384/* Override any GCC internal prototype to avoid an error.
48385   Use char because int might match the return type of a GCC
48386   builtin and then its argument prototype would still apply.  */
48387#ifdef __cplusplus
48388extern "C"
48389#endif
48390char DGifGetCode ();
48391int
48392main ()
48393{
48394return DGifGetCode ();
48395  ;
48396  return 0;
48397}
48398_ACEOF
48399if ac_fn_cxx_try_link "$LINENO"; then :
48400  ac_cv_lib_gif_DGifGetCode=yes
48401else
48402  ac_cv_lib_gif_DGifGetCode=no
48403fi
48404rm -f core conftest.err conftest.$ac_objext \
48405    conftest$ac_exeext conftest.$ac_ext
48406LIBS=$ac_check_lib_save_LIBS
48407fi
48408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
48409$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
48410if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
48411  cat >>confdefs.h <<_ACEOF
48412#define HAVE_LIBGIF 1
48413_ACEOF
48414
48415  LIBS="-lgif $LIBS"
48416
48417else
48418   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
48419fi
48420
48421
48422    USE_EXTERNAL_LIBGIF=true
48423  else
48424    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
48425  fi
48426
48427
48428  ###############################################################################
48429  #
48430  # Check for the lcms2 library
48431  #
48432
48433
48434# Check whether --with-lcms was given.
48435if test "${with_lcms+set}" = set; then :
48436  withval=$with_lcms;
48437fi
48438
48439
48440  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
48441$as_echo_n "checking for which lcms to use... " >&6; }
48442
48443  DEFAULT_LCMS=bundled
48444
48445  #
48446  # If user didn't specify, use DEFAULT_LCMS
48447  #
48448  if test "x${with_lcms}" = "x"; then
48449      with_lcms=${DEFAULT_LCMS}
48450  fi
48451
48452  if test "x${with_lcms}" = "xbundled"; then
48453    USE_EXTERNAL_LCMS=false
48454    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
48455$as_echo "bundled" >&6; }
48456  elif test "x${with_lcms}" = "xsystem"; then
48457    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
48458$as_echo "system" >&6; }
48459
48460pkg_failed=no
48461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
48462$as_echo_n "checking for LCMS... " >&6; }
48463
48464if test -n "$LCMS_CFLAGS"; then
48465    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
48466 elif test -n "$PKG_CONFIG"; then
48467    if test -n "$PKG_CONFIG" && \
48468    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
48469  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
48470  ac_status=$?
48471  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48472  test $ac_status = 0; }; then
48473  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
48474else
48475  pkg_failed=yes
48476fi
48477 else
48478    pkg_failed=untried
48479fi
48480if test -n "$LCMS_LIBS"; then
48481    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
48482 elif test -n "$PKG_CONFIG"; then
48483    if test -n "$PKG_CONFIG" && \
48484    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
48485  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
48486  ac_status=$?
48487  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48488  test $ac_status = 0; }; then
48489  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
48490else
48491  pkg_failed=yes
48492fi
48493 else
48494    pkg_failed=untried
48495fi
48496
48497
48498
48499if test $pkg_failed = yes; then
48500
48501if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48502        _pkg_short_errors_supported=yes
48503else
48504        _pkg_short_errors_supported=no
48505fi
48506        if test $_pkg_short_errors_supported = yes; then
48507	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
48508        else
48509	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
48510        fi
48511	# Put the nasty error message in config.log where it belongs
48512	echo "$LCMS_PKG_ERRORS" >&5
48513
48514	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48515$as_echo "no" >&6; }
48516                LCMS_FOUND=no
48517elif test $pkg_failed = untried; then
48518	LCMS_FOUND=no
48519else
48520	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
48521	LCMS_LIBS=$pkg_cv_LCMS_LIBS
48522        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48523$as_echo "yes" >&6; }
48524	LCMS_FOUND=yes
48525fi
48526    if test "x${LCMS_FOUND}" = "xyes"; then
48527      USE_EXTERNAL_LCMS=true
48528    else
48529      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
48530    fi
48531  else
48532    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
48533  fi
48534
48535
48536
48537  ###############################################################################
48538  #
48539  # Check for the png library
48540  #
48541
48542
48543# Check whether --with-libpng was given.
48544if test "${with_libpng+set}" = set; then :
48545  withval=$with_libpng;
48546fi
48547
48548
48549
48550  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
48551$as_echo_n "checking for which libpng to use... " >&6; }
48552
48553  # default is bundled
48554  DEFAULT_LIBPNG=bundled
48555
48556  #
48557  # if user didn't specify, use DEFAULT_LIBPNG
48558  #
48559  if test "x${with_libpng}" = "x"; then
48560      with_libpng=${DEFAULT_LIBPNG}
48561  fi
48562
48563  if test "x${with_libpng}" = "xbundled"; then
48564      USE_EXTERNAL_LIBPNG=false
48565      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
48566$as_echo "bundled" >&6; }
48567  elif test "x${with_libpng}" = "xsystem"; then
48568
48569pkg_failed=no
48570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
48571$as_echo_n "checking for PNG... " >&6; }
48572
48573if test -n "$PNG_CFLAGS"; then
48574    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
48575 elif test -n "$PKG_CONFIG"; then
48576    if test -n "$PKG_CONFIG" && \
48577    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
48578  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
48579  ac_status=$?
48580  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48581  test $ac_status = 0; }; then
48582  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
48583else
48584  pkg_failed=yes
48585fi
48586 else
48587    pkg_failed=untried
48588fi
48589if test -n "$PNG_LIBS"; then
48590    pkg_cv_PNG_LIBS="$PNG_LIBS"
48591 elif test -n "$PKG_CONFIG"; then
48592    if test -n "$PKG_CONFIG" && \
48593    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
48594  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
48595  ac_status=$?
48596  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48597  test $ac_status = 0; }; then
48598  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
48599else
48600  pkg_failed=yes
48601fi
48602 else
48603    pkg_failed=untried
48604fi
48605
48606
48607
48608if test $pkg_failed = yes; then
48609
48610if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48611        _pkg_short_errors_supported=yes
48612else
48613        _pkg_short_errors_supported=no
48614fi
48615        if test $_pkg_short_errors_supported = yes; then
48616	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
48617        else
48618	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
48619        fi
48620	# Put the nasty error message in config.log where it belongs
48621	echo "$PNG_PKG_ERRORS" >&5
48622
48623	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48624$as_echo "no" >&6; }
48625                 LIBPNG_FOUND=no
48626elif test $pkg_failed = untried; then
48627	 LIBPNG_FOUND=no
48628else
48629	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
48630	PNG_LIBS=$pkg_cv_PNG_LIBS
48631        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48632$as_echo "yes" >&6; }
48633	 LIBPNG_FOUND=yes
48634fi
48635      if test "x${LIBPNG_FOUND}" = "xyes"; then
48636          USE_EXTERNAL_LIBPNG=true
48637          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
48638$as_echo "system" >&6; }
48639      else
48640          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
48641$as_echo "system not found" >&6; }
48642          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
48643      fi
48644  else
48645      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
48646  fi
48647
48648
48649  ###############################################################################
48650  #
48651  # Check for the zlib library
48652  #
48653
48654
48655# Check whether --with-zlib was given.
48656if test "${with_zlib+set}" = set; then :
48657  withval=$with_zlib;
48658fi
48659
48660
48661  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
48662$as_echo_n "checking for compress in -lz... " >&6; }
48663if ${ac_cv_lib_z_compress+:} false; then :
48664  $as_echo_n "(cached) " >&6
48665else
48666  ac_check_lib_save_LIBS=$LIBS
48667LIBS="-lz  $LIBS"
48668cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48669/* end confdefs.h.  */
48670
48671/* Override any GCC internal prototype to avoid an error.
48672   Use char because int might match the return type of a GCC
48673   builtin and then its argument prototype would still apply.  */
48674#ifdef __cplusplus
48675extern "C"
48676#endif
48677char compress ();
48678int
48679main ()
48680{
48681return compress ();
48682  ;
48683  return 0;
48684}
48685_ACEOF
48686if ac_fn_cxx_try_link "$LINENO"; then :
48687  ac_cv_lib_z_compress=yes
48688else
48689  ac_cv_lib_z_compress=no
48690fi
48691rm -f core conftest.err conftest.$ac_objext \
48692    conftest$ac_exeext conftest.$ac_ext
48693LIBS=$ac_check_lib_save_LIBS
48694fi
48695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
48696$as_echo "$ac_cv_lib_z_compress" >&6; }
48697if test "x$ac_cv_lib_z_compress" = xyes; then :
48698   ZLIB_FOUND=yes
48699else
48700   ZLIB_FOUND=no
48701fi
48702
48703
48704  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
48705$as_echo_n "checking for which zlib to use... " >&6; }
48706
48707  DEFAULT_ZLIB=bundled
48708  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48709    #
48710    # On macosx default is system...on others default is
48711    #
48712    DEFAULT_ZLIB=system
48713  fi
48714
48715  if test "x${ZLIB_FOUND}" != "xyes"; then
48716    #
48717    # If we don't find any system...set default to bundled
48718    #
48719    DEFAULT_ZLIB=bundled
48720  fi
48721
48722  #
48723  # If user didn't specify, use DEFAULT_ZLIB
48724  #
48725  if test "x${with_zlib}" = "x"; then
48726    with_zlib=${DEFAULT_ZLIB}
48727  fi
48728
48729  if test "x${with_zlib}" = "xbundled"; then
48730    USE_EXTERNAL_LIBZ=false
48731    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
48732$as_echo "bundled" >&6; }
48733  elif test "x${with_zlib}" = "xsystem"; then
48734    if test "x${ZLIB_FOUND}" = "xyes"; then
48735      USE_EXTERNAL_LIBZ=true
48736      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
48737$as_echo "system" >&6; }
48738    else
48739      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
48740$as_echo "system not found" >&6; }
48741      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
48742    fi
48743  else
48744    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
48745  fi
48746
48747
48748
48749  ###############################################################################
48750  LIBZIP_CAN_USE_MMAP=true
48751
48752
48753
48754  ###############################################################################
48755  #
48756  # Check if altzone exists in time.h
48757  #
48758
48759  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48760/* end confdefs.h.  */
48761#include <time.h>
48762int
48763main ()
48764{
48765return (int)altzone;
48766  ;
48767  return 0;
48768}
48769_ACEOF
48770if ac_fn_cxx_try_link "$LINENO"; then :
48771  has_altzone=yes
48772else
48773  has_altzone=no
48774fi
48775rm -f core conftest.err conftest.$ac_objext \
48776    conftest$ac_exeext conftest.$ac_ext
48777  if test "x$has_altzone" = xyes; then
48778
48779$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
48780
48781  fi
48782
48783  ###############################################################################
48784  #
48785  # Check the maths library
48786  #
48787
48788  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
48789$as_echo_n "checking for cos in -lm... " >&6; }
48790if ${ac_cv_lib_m_cos+:} false; then :
48791  $as_echo_n "(cached) " >&6
48792else
48793  ac_check_lib_save_LIBS=$LIBS
48794LIBS="-lm  $LIBS"
48795cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48796/* end confdefs.h.  */
48797
48798/* Override any GCC internal prototype to avoid an error.
48799   Use char because int might match the return type of a GCC
48800   builtin and then its argument prototype would still apply.  */
48801#ifdef __cplusplus
48802extern "C"
48803#endif
48804char cos ();
48805int
48806main ()
48807{
48808return cos ();
48809  ;
48810  return 0;
48811}
48812_ACEOF
48813if ac_fn_cxx_try_link "$LINENO"; then :
48814  ac_cv_lib_m_cos=yes
48815else
48816  ac_cv_lib_m_cos=no
48817fi
48818rm -f core conftest.err conftest.$ac_objext \
48819    conftest$ac_exeext conftest.$ac_ext
48820LIBS=$ac_check_lib_save_LIBS
48821fi
48822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
48823$as_echo "$ac_cv_lib_m_cos" >&6; }
48824if test "x$ac_cv_lib_m_cos" = xyes; then :
48825  cat >>confdefs.h <<_ACEOF
48826#define HAVE_LIBM 1
48827_ACEOF
48828
48829  LIBS="-lm $LIBS"
48830
48831else
48832
48833        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
48834$as_echo "$as_me: Maths library was not found" >&6;}
48835
48836
48837fi
48838
48839
48840
48841  ###############################################################################
48842  #
48843  # Check for libdl.so
48844
48845  save_LIBS="$LIBS"
48846  LIBS=""
48847  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
48848$as_echo_n "checking for dlopen in -ldl... " >&6; }
48849if ${ac_cv_lib_dl_dlopen+:} false; then :
48850  $as_echo_n "(cached) " >&6
48851else
48852  ac_check_lib_save_LIBS=$LIBS
48853LIBS="-ldl  $LIBS"
48854cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48855/* end confdefs.h.  */
48856
48857/* Override any GCC internal prototype to avoid an error.
48858   Use char because int might match the return type of a GCC
48859   builtin and then its argument prototype would still apply.  */
48860#ifdef __cplusplus
48861extern "C"
48862#endif
48863char dlopen ();
48864int
48865main ()
48866{
48867return dlopen ();
48868  ;
48869  return 0;
48870}
48871_ACEOF
48872if ac_fn_cxx_try_link "$LINENO"; then :
48873  ac_cv_lib_dl_dlopen=yes
48874else
48875  ac_cv_lib_dl_dlopen=no
48876fi
48877rm -f core conftest.err conftest.$ac_objext \
48878    conftest$ac_exeext conftest.$ac_ext
48879LIBS=$ac_check_lib_save_LIBS
48880fi
48881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
48882$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
48883if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
48884  cat >>confdefs.h <<_ACEOF
48885#define HAVE_LIBDL 1
48886_ACEOF
48887
48888  LIBS="-ldl $LIBS"
48889
48890fi
48891
48892  LIBDL="$LIBS"
48893
48894  LIBS="$save_LIBS"
48895
48896
48897  ###############################################################################
48898  #
48899  # statically link libstdc++ before C++ ABI is stablized on Linux unless
48900  # dynamic build is configured on command line.
48901  #
48902
48903# Check whether --with-stdc++lib was given.
48904if test "${with_stdc__lib+set}" = set; then :
48905  withval=$with_stdc__lib;
48906        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
48907                && test "x$with_stdc__lib" != xdefault; then
48908          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
48909        fi
48910
48911else
48912  with_stdc__lib=default
48913
48914fi
48915
48916
48917  if test "x$OPENJDK_TARGET_OS" = xlinux; then
48918    # Test if -lstdc++ works.
48919    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
48920$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
48921    ac_ext=cpp
48922ac_cpp='$CXXCPP $CPPFLAGS'
48923ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48924ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48925ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48926
48927    OLD_CXXFLAGS="$CXXFLAGS"
48928    CXXFLAGS="$CXXFLAGS -lstdc++"
48929    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48930/* end confdefs.h.  */
48931
48932int
48933main ()
48934{
48935return 0;
48936  ;
48937  return 0;
48938}
48939_ACEOF
48940if ac_fn_cxx_try_link "$LINENO"; then :
48941  has_dynamic_libstdcxx=yes
48942else
48943  has_dynamic_libstdcxx=no
48944fi
48945rm -f core conftest.err conftest.$ac_objext \
48946    conftest$ac_exeext conftest.$ac_ext
48947    CXXFLAGS="$OLD_CXXFLAGS"
48948    ac_ext=cpp
48949ac_cpp='$CXXCPP $CPPFLAGS'
48950ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48951ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48952ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48953
48954    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
48955$as_echo "$has_dynamic_libstdcxx" >&6; }
48956
48957    # Test if stdc++ can be linked statically.
48958    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
48959$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
48960    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
48961    ac_ext=cpp
48962ac_cpp='$CXXCPP $CPPFLAGS'
48963ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48964ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48965ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48966
48967    OLD_LIBS="$LIBS"
48968    OLD_CXX="$CXX"
48969    LIBS="$STATIC_STDCXX_FLAGS"
48970    CXX="$CC"
48971    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48972/* end confdefs.h.  */
48973
48974int
48975main ()
48976{
48977return 0;
48978  ;
48979  return 0;
48980}
48981_ACEOF
48982if ac_fn_cxx_try_link "$LINENO"; then :
48983  has_static_libstdcxx=yes
48984else
48985  has_static_libstdcxx=no
48986fi
48987rm -f core conftest.err conftest.$ac_objext \
48988    conftest$ac_exeext conftest.$ac_ext
48989    LIBS="$OLD_LIBS"
48990    CXX="$OLD_CXX"
48991    ac_ext=cpp
48992ac_cpp='$CXXCPP $CPPFLAGS'
48993ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48994ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48995ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48996
48997    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
48998$as_echo "$has_static_libstdcxx" >&6; }
48999
49000    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
49001      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
49002    fi
49003
49004    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
49005      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
49006    fi
49007
49008    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
49009      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
49010    fi
49011
49012    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
49013$as_echo_n "checking how to link with libstdc++... " >&6; }
49014    # If dynamic was requested, it's available since it would fail above otherwise.
49015    # If dynamic wasn't requested, go with static unless it isn't available.
49016    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49017      LIBCXX="$LIBCXX -lstdc++"
49018      LDCXX="$CXX"
49019      STATIC_CXX_SETTING="STATIC_CXX=false"
49020      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
49021$as_echo "dynamic" >&6; }
49022    else
49023      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
49024      LDCXX="$CC"
49025      STATIC_CXX_SETTING="STATIC_CXX=true"
49026      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
49027$as_echo "static" >&6; }
49028    fi
49029  fi
49030
49031
49032  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49033    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
49034
49035pkg_failed=no
49036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
49037$as_echo_n "checking for LIBFFI... " >&6; }
49038
49039if test -n "$LIBFFI_CFLAGS"; then
49040    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
49041 elif test -n "$PKG_CONFIG"; then
49042    if test -n "$PKG_CONFIG" && \
49043    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49044  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49045  ac_status=$?
49046  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49047  test $ac_status = 0; }; then
49048  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
49049else
49050  pkg_failed=yes
49051fi
49052 else
49053    pkg_failed=untried
49054fi
49055if test -n "$LIBFFI_LIBS"; then
49056    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
49057 elif test -n "$PKG_CONFIG"; then
49058    if test -n "$PKG_CONFIG" && \
49059    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49060  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49061  ac_status=$?
49062  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49063  test $ac_status = 0; }; then
49064  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
49065else
49066  pkg_failed=yes
49067fi
49068 else
49069    pkg_failed=untried
49070fi
49071
49072
49073
49074if test $pkg_failed = yes; then
49075
49076if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49077        _pkg_short_errors_supported=yes
49078else
49079        _pkg_short_errors_supported=no
49080fi
49081        if test $_pkg_short_errors_supported = yes; then
49082	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
49083        else
49084	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
49085        fi
49086	# Put the nasty error message in config.log where it belongs
49087	echo "$LIBFFI_PKG_ERRORS" >&5
49088
49089	as_fn_error $? "Package requirements (libffi) were not met:
49090
49091$LIBFFI_PKG_ERRORS
49092
49093Consider adjusting the PKG_CONFIG_PATH environment variable if you
49094installed software in a non-standard prefix.
49095
49096Alternatively, you may set the environment variables LIBFFI_CFLAGS
49097and LIBFFI_LIBS to avoid the need to call pkg-config.
49098See the pkg-config man page for more details.
49099" "$LINENO" 5
49100elif test $pkg_failed = untried; then
49101	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49102$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49103as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
49104is in your PATH or set the PKG_CONFIG environment variable to the full
49105path to pkg-config.
49106
49107Alternatively, you may set the environment variables LIBFFI_CFLAGS
49108and LIBFFI_LIBS to avoid the need to call pkg-config.
49109See the pkg-config man page for more details.
49110
49111To get pkg-config, see <http://pkg-config.freedesktop.org/>.
49112See \`config.log' for more details" "$LINENO" 5; }
49113else
49114	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
49115	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
49116        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49117$as_echo "yes" >&6; }
49118	:
49119fi
49120
49121  fi
49122
49123  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49124    # Extract the first word of "llvm-config", so it can be a program name with args.
49125set dummy llvm-config; ac_word=$2
49126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49127$as_echo_n "checking for $ac_word... " >&6; }
49128if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
49129  $as_echo_n "(cached) " >&6
49130else
49131  if test -n "$LLVM_CONFIG"; then
49132  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
49133else
49134as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49135for as_dir in $PATH
49136do
49137  IFS=$as_save_IFS
49138  test -z "$as_dir" && as_dir=.
49139    for ac_exec_ext in '' $ac_executable_extensions; do
49140  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49141    ac_cv_prog_LLVM_CONFIG="llvm-config"
49142    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49143    break 2
49144  fi
49145done
49146  done
49147IFS=$as_save_IFS
49148
49149fi
49150fi
49151LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
49152if test -n "$LLVM_CONFIG"; then
49153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
49154$as_echo "$LLVM_CONFIG" >&6; }
49155else
49156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49157$as_echo "no" >&6; }
49158fi
49159
49160
49161
49162    if test "x$LLVM_CONFIG" != xllvm-config; then
49163      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
49164    fi
49165
49166    llvm_components="jit mcjit engine nativecodegen native"
49167    unset LLVM_CFLAGS
49168    for flag in $("$LLVM_CONFIG" --cxxflags); do
49169      if echo "${flag}" | grep -q '^-[ID]'; then
49170        if test "${flag}" != "-D_DEBUG" ; then
49171          if test "${LLVM_CFLAGS}" != "" ; then
49172            LLVM_CFLAGS="${LLVM_CFLAGS} "
49173          fi
49174          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
49175        fi
49176      fi
49177    done
49178    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
49179    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
49180
49181    unset LLVM_LDFLAGS
49182    for flag in $("${LLVM_CONFIG}" --ldflags); do
49183      if echo "${flag}" | grep -q '^-L'; then
49184        if test "${LLVM_LDFLAGS}" != ""; then
49185          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
49186        fi
49187        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
49188      fi
49189    done
49190
49191    unset LLVM_LIBS
49192    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
49193      if echo "${flag}" | grep -q '^-l'; then
49194        if test "${LLVM_LIBS}" != ""; then
49195          LLVM_LIBS="${LLVM_LIBS} "
49196        fi
49197        LLVM_LIBS="${LLVM_LIBS}${flag}"
49198      fi
49199    done
49200
49201
49202
49203
49204  fi
49205
49206  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
49207  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
49208    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
49209  fi
49210
49211  # TODO better (platform agnostic) test
49212  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
49213    LIBCXX="-lstdc++"
49214  fi
49215
49216
49217
49218
49219  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
49220
49221
49222# Check whether --with-msvcr-dll was given.
49223if test "${with_msvcr_dll+set}" = set; then :
49224  withval=$with_msvcr_dll;
49225fi
49226
49227
49228  if test "x$with_msvcr_dll" != x; then
49229    # If given explicitely by user, do not probe. If not present, fail directly.
49230
49231  POSSIBLE_MSVCR_DLL="$with_msvcr_dll"
49232  METHOD="--with-msvcr-dll"
49233  if test -e "$POSSIBLE_MSVCR_DLL"; then
49234    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49235$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49236
49237    # Need to check if the found msvcr is correct architecture
49238    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49239$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49240    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49241    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49242      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49243      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49244      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49245        CORRECT_MSVCR_ARCH="PE32 executable"
49246      else
49247        CORRECT_MSVCR_ARCH="PE32+ executable"
49248      fi
49249    else
49250      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49251        CORRECT_MSVCR_ARCH=386
49252      else
49253        CORRECT_MSVCR_ARCH=x86-64
49254      fi
49255    fi
49256    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49257      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49258$as_echo "ok" >&6; }
49259      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49260      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49261$as_echo_n "checking for msvcr100.dll... " >&6; }
49262      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49263$as_echo "$MSVCR_DLL" >&6; }
49264    else
49265      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49266$as_echo "incorrect, ignoring" >&6; }
49267      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49268$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49269    fi
49270  fi
49271
49272    if test "x$MSVCR_DLL" = x; then
49273      as_fn_error $? "Could not find a proper msvcr100.dll as specified by --with-msvcr-dll" "$LINENO" 5
49274    fi
49275  fi
49276
49277  if test "x$MSVCR_DLL" = x; then
49278    # Probe: Using well-known location from Visual Studio 10.0
49279    if test "x$VCINSTALLDIR" != x; then
49280      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
49281
49282  windows_path="$CYGWIN_VC_INSTALL_DIR"
49283  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49284    unix_path=`$CYGPATH -u "$windows_path"`
49285    CYGWIN_VC_INSTALL_DIR="$unix_path"
49286  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49287    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49288    CYGWIN_VC_INSTALL_DIR="$unix_path"
49289  fi
49290
49291      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49292        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll"
49293      else
49294        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll"
49295      fi
49296
49297  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49298  METHOD="well-known location in VCINSTALLDIR"
49299  if test -e "$POSSIBLE_MSVCR_DLL"; then
49300    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49301$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49302
49303    # Need to check if the found msvcr is correct architecture
49304    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49305$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49306    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49307    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49308      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49309      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49310      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49311        CORRECT_MSVCR_ARCH="PE32 executable"
49312      else
49313        CORRECT_MSVCR_ARCH="PE32+ executable"
49314      fi
49315    else
49316      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49317        CORRECT_MSVCR_ARCH=386
49318      else
49319        CORRECT_MSVCR_ARCH=x86-64
49320      fi
49321    fi
49322    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49323      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49324$as_echo "ok" >&6; }
49325      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49326      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49327$as_echo_n "checking for msvcr100.dll... " >&6; }
49328      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49329$as_echo "$MSVCR_DLL" >&6; }
49330    else
49331      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49332$as_echo "incorrect, ignoring" >&6; }
49333      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49334$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49335    fi
49336  fi
49337
49338    fi
49339  fi
49340
49341  if test "x$MSVCR_DLL" = x; then
49342    # Probe: Check in the Boot JDK directory.
49343    POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
49344
49345  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49346  METHOD="well-known location in Boot JDK"
49347  if test -e "$POSSIBLE_MSVCR_DLL"; then
49348    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49349$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49350
49351    # Need to check if the found msvcr is correct architecture
49352    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49353$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49354    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49355    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49356      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49357      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49358      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49359        CORRECT_MSVCR_ARCH="PE32 executable"
49360      else
49361        CORRECT_MSVCR_ARCH="PE32+ executable"
49362      fi
49363    else
49364      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49365        CORRECT_MSVCR_ARCH=386
49366      else
49367        CORRECT_MSVCR_ARCH=x86-64
49368      fi
49369    fi
49370    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49371      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49372$as_echo "ok" >&6; }
49373      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49374      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49375$as_echo_n "checking for msvcr100.dll... " >&6; }
49376      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49377$as_echo "$MSVCR_DLL" >&6; }
49378    else
49379      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49380$as_echo "incorrect, ignoring" >&6; }
49381      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49382$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49383    fi
49384  fi
49385
49386  fi
49387
49388  if test "x$MSVCR_DLL" = x; then
49389    # Probe: Look in the Windows system32 directory
49390    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
49391
49392  windows_path="$CYGWIN_SYSTEMROOT"
49393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49394    unix_path=`$CYGPATH -u "$windows_path"`
49395    CYGWIN_SYSTEMROOT="$unix_path"
49396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49397    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49398    CYGWIN_SYSTEMROOT="$unix_path"
49399  fi
49400
49401    POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
49402
49403  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49404  METHOD="well-known location in SYSTEMROOT"
49405  if test -e "$POSSIBLE_MSVCR_DLL"; then
49406    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49407$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49408
49409    # Need to check if the found msvcr is correct architecture
49410    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49411$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49412    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49413    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49414      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49415      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49416      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49417        CORRECT_MSVCR_ARCH="PE32 executable"
49418      else
49419        CORRECT_MSVCR_ARCH="PE32+ executable"
49420      fi
49421    else
49422      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49423        CORRECT_MSVCR_ARCH=386
49424      else
49425        CORRECT_MSVCR_ARCH=x86-64
49426      fi
49427    fi
49428    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49429      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49430$as_echo "ok" >&6; }
49431      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49432      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49433$as_echo_n "checking for msvcr100.dll... " >&6; }
49434      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49435$as_echo "$MSVCR_DLL" >&6; }
49436    else
49437      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49438$as_echo "incorrect, ignoring" >&6; }
49439      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49440$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49441    fi
49442  fi
49443
49444  fi
49445
49446  if test "x$MSVCR_DLL" = x; then
49447    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
49448    if test "x$VS100COMNTOOLS" != x; then
49449      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
49450
49451  windows_path="$CYGWIN_VS_TOOLS_DIR"
49452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49453    unix_path=`$CYGPATH -u "$windows_path"`
49454    CYGWIN_VS_TOOLS_DIR="$unix_path"
49455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49456    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49457    CYGWIN_VS_TOOLS_DIR="$unix_path"
49458  fi
49459
49460      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49461        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1`
49462      else
49463        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1`
49464      fi
49465
49466  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49467  METHOD="search of VS100COMNTOOLS"
49468  if test -e "$POSSIBLE_MSVCR_DLL"; then
49469    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49470$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49471
49472    # Need to check if the found msvcr is correct architecture
49473    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49474$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49475    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49476    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49477      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49478      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49479      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49480        CORRECT_MSVCR_ARCH="PE32 executable"
49481      else
49482        CORRECT_MSVCR_ARCH="PE32+ executable"
49483      fi
49484    else
49485      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49486        CORRECT_MSVCR_ARCH=386
49487      else
49488        CORRECT_MSVCR_ARCH=x86-64
49489      fi
49490    fi
49491    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49492      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49493$as_echo "ok" >&6; }
49494      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49495      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49496$as_echo_n "checking for msvcr100.dll... " >&6; }
49497      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49498$as_echo "$MSVCR_DLL" >&6; }
49499    else
49500      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49501$as_echo "incorrect, ignoring" >&6; }
49502      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49503$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49504    fi
49505  fi
49506
49507    fi
49508  fi
49509
49510  if test "x$MSVCR_DLL" = x; then
49511    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
49512    # (This was the original behaviour; kept since it might turn up something)
49513    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
49514      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49515        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1`
49516      else
49517        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
49518        if test "x$POSSIBLE_MSVCR_DLL" = x; then
49519          # We're grasping at straws now...
49520          POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
49521        fi
49522      fi
49523
49524
49525  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49526  METHOD="search of VCINSTALLDIR"
49527  if test -e "$POSSIBLE_MSVCR_DLL"; then
49528    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49529$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49530
49531    # Need to check if the found msvcr is correct architecture
49532    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49533$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49534    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49535    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49536      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49537      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49538      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49539        CORRECT_MSVCR_ARCH="PE32 executable"
49540      else
49541        CORRECT_MSVCR_ARCH="PE32+ executable"
49542      fi
49543    else
49544      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49545        CORRECT_MSVCR_ARCH=386
49546      else
49547        CORRECT_MSVCR_ARCH=x86-64
49548      fi
49549    fi
49550    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49551      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49552$as_echo "ok" >&6; }
49553      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49554      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49555$as_echo_n "checking for msvcr100.dll... " >&6; }
49556      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49557$as_echo "$MSVCR_DLL" >&6; }
49558    else
49559      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49560$as_echo "incorrect, ignoring" >&6; }
49561      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49562$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49563    fi
49564  fi
49565
49566    fi
49567  fi
49568
49569  if test "x$MSVCR_DLL" = x; then
49570    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49571$as_echo_n "checking for msvcr100.dll... " >&6; }
49572    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49573$as_echo "no" >&6; }
49574    as_fn_error $? "Could not find msvcr100.dll. Please specify using --with-msvcr-dll." "$LINENO" 5
49575  fi
49576
49577
49578  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49579
49580  # Input might be given as Windows format, start by converting to
49581  # unix format.
49582  path="$MSVCR_DLL"
49583  new_path=`$CYGPATH -u "$path"`
49584
49585  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49586  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49587  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49588  # "foo.exe" is OK but "foo" is an error.
49589  #
49590  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49591  # It is also a way to make sure we got the proper file name for the real test later on.
49592  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49593  if test "x$test_shortpath" = x; then
49594    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
49595$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
49596    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
49597  fi
49598
49599  # Call helper function which possibly converts this using DOS-style short mode.
49600  # If so, the updated path is stored in $new_path.
49601
49602  input_path="$new_path"
49603  # Check if we need to convert this using DOS-style short mode. If the path
49604  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49605  # take no chances and rewrite it.
49606  # Note: m4 eats our [], so we need to use [ and ] instead.
49607  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49608  if test "x$has_forbidden_chars" != x; then
49609    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49610    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49611    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49612    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49613      # Going to short mode and back again did indeed matter. Since short mode is
49614      # case insensitive, let's make it lowercase to improve readability.
49615      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49616      # Now convert it back to Unix-stile (cygpath)
49617      input_path=`$CYGPATH -u "$shortmode_path"`
49618      new_path="$input_path"
49619    fi
49620  fi
49621
49622  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49623  if test "x$test_cygdrive_prefix" = x; then
49624    # As a simple fix, exclude /usr/bin since it's not a real path.
49625    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49626      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49627      # a path prefixed by /cygdrive for fixpath to work.
49628      new_path="$CYGWIN_ROOT_PATH$input_path"
49629    fi
49630  fi
49631
49632
49633  if test "x$path" != "x$new_path"; then
49634    MSVCR_DLL="$new_path"
49635    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
49636$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
49637  fi
49638
49639  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49640
49641  path="$MSVCR_DLL"
49642  has_colon=`$ECHO $path | $GREP ^.:`
49643  new_path="$path"
49644  if test "x$has_colon" = x; then
49645    # Not in mixed or Windows style, start by that.
49646    new_path=`cmd //c echo $path`
49647  fi
49648
49649
49650  input_path="$new_path"
49651  # Check if we need to convert this using DOS-style short mode. If the path
49652  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49653  # take no chances and rewrite it.
49654  # Note: m4 eats our [], so we need to use [ and ] instead.
49655  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49656  if test "x$has_forbidden_chars" != x; then
49657    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49658    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49659  fi
49660
49661
49662  windows_path="$new_path"
49663  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49664    unix_path=`$CYGPATH -u "$windows_path"`
49665    new_path="$unix_path"
49666  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49667    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49668    new_path="$unix_path"
49669  fi
49670
49671  if test "x$path" != "x$new_path"; then
49672    MSVCR_DLL="$new_path"
49673    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
49674$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
49675  fi
49676
49677  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49678  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49679
49680  else
49681    # We're on a posix platform. Hooray! :)
49682    path="$MSVCR_DLL"
49683    has_space=`$ECHO "$path" | $GREP " "`
49684    if test "x$has_space" != x; then
49685      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
49686$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
49687      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49688    fi
49689
49690    # Use eval to expand a potential ~
49691    eval path="$path"
49692    if test ! -f "$path" && test ! -d "$path"; then
49693      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49694    fi
49695
49696    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
49697  fi
49698
49699
49700
49701
49702# Check whether --with-dxsdk was given.
49703if test "${with_dxsdk+set}" = set; then :
49704  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
49705$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
49706fi
49707
49708
49709
49710
49711# Check whether --with-dxsdk-lib was given.
49712if test "${with_dxsdk_lib+set}" = set; then :
49713  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
49714$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
49715fi
49716
49717
49718
49719
49720# Check whether --with-dxsdk-include was given.
49721if test "${with_dxsdk_include+set}" = set; then :
49722  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
49723$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
49724fi
49725
49726
49727  fi
49728
49729
49730
49731###############################################################################
49732#
49733# We need to do some final tweaking, when everything else is done.
49734#
49735###############################################################################
49736
49737
49738  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
49739
49740
49741  # The name of the Service Agent jar.
49742  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
49743  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
49744    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
49745  fi
49746
49747
49748
49749    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
49750$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
49751
49752    if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
49753      ENABLE_INTREE_EC=yes
49754      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49755$as_echo "yes" >&6; }
49756    else
49757      ENABLE_INTREE_EC=no
49758      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49759$as_echo "no" >&6; }
49760    fi
49761
49762
49763
49764
49765###############################################################################
49766#
49767# Configure parts of the build that only affect the build performance,
49768# not the result.
49769#
49770###############################################################################
49771
49772
49773  # How many cores do we have on this build system?
49774
49775# Check whether --with-num-cores was given.
49776if test "${with_num_cores+set}" = set; then :
49777  withval=$with_num_cores;
49778fi
49779
49780  if test "x$with_num_cores" = x; then
49781    # The number of cores were not specified, try to probe them.
49782
49783  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
49784$as_echo_n "checking for number of cores... " >&6; }
49785  NUM_CORES=1
49786  FOUND_CORES=no
49787
49788  if test -f /proc/cpuinfo; then
49789    # Looks like a Linux (or cygwin) system
49790    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
49791    FOUND_CORES=yes
49792  elif test -x /usr/sbin/psrinfo; then
49793    # Looks like a Solaris system
49794    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
49795    FOUND_CORES=yes
49796  elif test -x /usr/sbin/system_profiler; then
49797    # Looks like a MacOSX system
49798    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
49799    FOUND_CORES=yes
49800  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
49801    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
49802    FOUND_CORES=yes
49803  elif test -n "$NUMBER_OF_PROCESSORS"; then
49804    # On windows, look in the env
49805    NUM_CORES=$NUMBER_OF_PROCESSORS
49806    FOUND_CORES=yes
49807  fi
49808
49809  if test "x$FOUND_CORES" = xyes; then
49810    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
49811$as_echo "$NUM_CORES" >&6; }
49812  else
49813    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
49814$as_echo "could not detect number of cores, defaulting to 1" >&6; }
49815    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
49816$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
49817  fi
49818
49819  else
49820    NUM_CORES=$with_num_cores
49821  fi
49822
49823
49824
49825  # How much memory do we have on this build system?
49826
49827# Check whether --with-memory-size was given.
49828if test "${with_memory_size+set}" = set; then :
49829  withval=$with_memory_size;
49830fi
49831
49832  if test "x$with_memory_size" = x; then
49833    # The memory size was not specified, try to probe it.
49834
49835  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
49836$as_echo_n "checking for memory size... " >&6; }
49837  # Default to 1024 MB
49838  MEMORY_SIZE=1024
49839  FOUND_MEM=no
49840
49841  if test -f /proc/meminfo; then
49842    # Looks like a Linux (or cygwin) system
49843    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
49844    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
49845    FOUND_MEM=yes
49846  elif test -x /usr/sbin/prtconf; then
49847    # Looks like a Solaris or AIX system
49848    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
49849    FOUND_MEM=yes
49850  elif test -x /usr/sbin/system_profiler; then
49851    # Looks like a MacOSX system
49852    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
49853    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
49854    FOUND_MEM=yes
49855  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
49856    # Windows, but without cygwin
49857    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
49858    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
49859    FOUND_MEM=yes
49860  fi
49861
49862  if test "x$FOUND_MEM" = xyes; then
49863    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
49864$as_echo "$MEMORY_SIZE MB" >&6; }
49865  else
49866    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
49867$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
49868    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
49869$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
49870  fi
49871
49872  else
49873    MEMORY_SIZE=$with_memory_size
49874  fi
49875
49876
49877
49878  # Provide a decent default number of parallel jobs for make depending on
49879  # number of cores, amount of memory and machine architecture.
49880
49881# Check whether --with-jobs was given.
49882if test "${with_jobs+set}" = set; then :
49883  withval=$with_jobs;
49884fi
49885
49886  if test "x$with_jobs" = x; then
49887    # Number of jobs was not specified, calculate.
49888    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
49889$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
49890    # Approximate memory in GB, rounding up a bit.
49891    memory_gb=`expr $MEMORY_SIZE / 1100`
49892    # Pick the lowest of memory in gb and number of cores.
49893    if test "$memory_gb" -lt "$NUM_CORES"; then
49894      JOBS="$memory_gb"
49895    else
49896      JOBS="$NUM_CORES"
49897      # On bigger machines, leave some room for other processes to run
49898      if test "$JOBS" -gt "4"; then
49899        JOBS=`expr $JOBS '*' 90 / 100`
49900      fi
49901    fi
49902    # Cap number of jobs to 16
49903    if test "$JOBS" -gt "16"; then
49904      JOBS=16
49905    fi
49906    if test "$JOBS" -eq "0"; then
49907      JOBS=1
49908    fi
49909    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
49910$as_echo "$JOBS" >&6; }
49911  else
49912    JOBS=$with_jobs
49913  fi
49914
49915
49916
49917# Setup smart javac (after cores and memory have been setup)
49918
49919
49920# Check whether --with-sjavac-server-java was given.
49921if test "${with_sjavac_server_java+set}" = set; then :
49922  withval=$with_sjavac_server_java;
49923fi
49924
49925
49926  if test "x$with_sjavac_server_java" != x; then
49927    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
49928    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
49929    if test "x$FOUND_VERSION" = x; then
49930      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
49931    fi
49932  else
49933    SJAVAC_SERVER_JAVA=""
49934    # Hotspot specific options.
49935
49936  $ECHO "Check if jvm arg is ok: -verbosegc" >&5
49937  $ECHO "Command: $JAVA -verbosegc -version" >&5
49938  OUTPUT=`$JAVA -verbosegc -version 2>&1`
49939  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
49940  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
49941  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
49942    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
49943    JVM_ARG_OK=true
49944  else
49945    $ECHO "Arg failed:" >&5
49946    $ECHO "$OUTPUT" >&5
49947    JVM_ARG_OK=false
49948  fi
49949
49950    # JRockit specific options.
49951
49952  $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
49953  $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
49954  OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
49955  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
49956  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
49957  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
49958    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
49959    JVM_ARG_OK=true
49960  else
49961    $ECHO "Arg failed:" >&5
49962    $ECHO "$OUTPUT" >&5
49963    JVM_ARG_OK=false
49964  fi
49965
49966    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
49967  fi
49968
49969
49970  if test "$MEMORY_SIZE" -gt "2500"; then
49971
49972  $ECHO "Check if jvm arg is ok: -d64" >&5
49973  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
49974  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
49975  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
49976  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
49977  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
49978    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
49979    JVM_ARG_OK=true
49980  else
49981    $ECHO "Arg failed:" >&5
49982    $ECHO "$OUTPUT" >&5
49983    JVM_ARG_OK=false
49984  fi
49985
49986    if test "$JVM_ARG_OK" = true; then
49987      JVM_64BIT=true
49988      JVM_ARG_OK=false
49989    fi
49990  fi
49991
49992  if test "$JVM_64BIT" = true; then
49993    if test "$MEMORY_SIZE" -gt "17000"; then
49994
49995  $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
49996  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
49997  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
49998  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
49999  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50000  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50001    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
50002    JVM_ARG_OK=true
50003  else
50004    $ECHO "Arg failed:" >&5
50005    $ECHO "$OUTPUT" >&5
50006    JVM_ARG_OK=false
50007  fi
50008
50009    fi
50010    if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
50011
50012  $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
50013  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
50014  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
50015  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50016  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50017  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50018    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
50019    JVM_ARG_OK=true
50020  else
50021    $ECHO "Arg failed:" >&5
50022    $ECHO "$OUTPUT" >&5
50023    JVM_ARG_OK=false
50024  fi
50025
50026    fi
50027    if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
50028
50029  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
50030  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
50031  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
50032  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50033  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50034  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50035    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
50036    JVM_ARG_OK=true
50037  else
50038    $ECHO "Arg failed:" >&5
50039    $ECHO "$OUTPUT" >&5
50040    JVM_ARG_OK=false
50041  fi
50042
50043    fi
50044    if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
50045
50046  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
50047  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
50048  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
50049  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50050  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50051  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50052    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
50053    JVM_ARG_OK=true
50054  else
50055    $ECHO "Arg failed:" >&5
50056    $ECHO "$OUTPUT" >&5
50057    JVM_ARG_OK=false
50058  fi
50059
50060    fi
50061  fi
50062  if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
50063
50064  $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
50065  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
50066  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
50067  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50068  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50069  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50070    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
50071    JVM_ARG_OK=true
50072  else
50073    $ECHO "Arg failed:" >&5
50074    $ECHO "$OUTPUT" >&5
50075    JVM_ARG_OK=false
50076  fi
50077
50078  fi
50079  if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
50080
50081  $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
50082  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
50083  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
50084  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50085  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50086  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50087    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
50088    JVM_ARG_OK=true
50089  else
50090    $ECHO "Arg failed:" >&5
50091    $ECHO "$OUTPUT" >&5
50092    JVM_ARG_OK=false
50093  fi
50094
50095  fi
50096  if test "$JVM_ARG_OK" = false; then
50097
50098  $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
50099  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
50100  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
50101  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50102  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50103  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50104    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
50105    JVM_ARG_OK=true
50106  else
50107    $ECHO "Arg failed:" >&5
50108    $ECHO "$OUTPUT" >&5
50109    JVM_ARG_OK=false
50110  fi
50111
50112  fi
50113
50114  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
50115$as_echo_n "checking whether to use sjavac... " >&6; }
50116  # Check whether --enable-sjavac was given.
50117if test "${enable_sjavac+set}" = set; then :
50118  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
50119else
50120  ENABLE_SJAVAC='no'
50121fi
50122
50123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
50124$as_echo "$ENABLE_SJAVAC" >&6; }
50125
50126
50127  if test "x$ENABLE_SJAVAC" = xyes; then
50128    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
50129  else
50130    SJAVAC_SERVER_DIR=
50131  fi
50132
50133
50134
50135# Can the C/C++ compiler use precompiled headers?
50136
50137
50138  ###############################################################################
50139  #
50140  # Can the C/C++ compiler use precompiled headers?
50141  #
50142  # Check whether --enable-precompiled-headers was given.
50143if test "${enable_precompiled_headers+set}" = set; then :
50144  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
50145else
50146  ENABLE_PRECOMPH=yes
50147fi
50148
50149
50150  USE_PRECOMPILED_HEADER=1
50151  if test "x$ENABLE_PRECOMPH" = xno; then
50152    USE_PRECOMPILED_HEADER=0
50153  fi
50154
50155  if test "x$ENABLE_PRECOMPH" = xyes; then
50156    # Check that the compiler actually supports precomp headers.
50157    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50158      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
50159$as_echo_n "checking that precompiled headers work... " >&6; }
50160      echo "int alfa();" > conftest.h
50161      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
50162      if test ! -f conftest.hpp.gch; then
50163        USE_PRECOMPILED_HEADER=0
50164        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50165$as_echo "no" >&6; }
50166      else
50167        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50168$as_echo "yes" >&6; }
50169      fi
50170      rm -f conftest.h conftest.hpp.gch
50171    fi
50172  fi
50173
50174
50175
50176
50177# Setup use of ccache, if available
50178
50179  # Check whether --enable-ccache was given.
50180if test "${enable_ccache+set}" = set; then :
50181  enableval=$enable_ccache;
50182fi
50183
50184
50185  CCACHE=
50186  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
50187$as_echo_n "checking is ccache enabled... " >&6; }
50188  ENABLE_CCACHE=$enable_ccache
50189  if test "x$enable_ccache" = xyes; then
50190    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50191$as_echo "yes" >&6; }
50192    OLD_PATH="$PATH"
50193    if test "x$TOOLCHAIN_PATH" != x; then
50194      PATH=$TOOLCHAIN_PATH:$PATH
50195    fi
50196
50197
50198
50199  # Publish this variable in the help.
50200
50201
50202  if test "x$CCACHE" = x; then
50203    # The variable is not set by user, try to locate tool using the code snippet
50204    for ac_prog in ccache
50205do
50206  # Extract the first word of "$ac_prog", so it can be a program name with args.
50207set dummy $ac_prog; ac_word=$2
50208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
50209$as_echo_n "checking for $ac_word... " >&6; }
50210if ${ac_cv_path_CCACHE+:} false; then :
50211  $as_echo_n "(cached) " >&6
50212else
50213  case $CCACHE in
50214  [\\/]* | ?:[\\/]*)
50215  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
50216  ;;
50217  *)
50218  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50219for as_dir in $PATH
50220do
50221  IFS=$as_save_IFS
50222  test -z "$as_dir" && as_dir=.
50223    for ac_exec_ext in '' $ac_executable_extensions; do
50224  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
50225    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
50226    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
50227    break 2
50228  fi
50229done
50230  done
50231IFS=$as_save_IFS
50232
50233  ;;
50234esac
50235fi
50236CCACHE=$ac_cv_path_CCACHE
50237if test -n "$CCACHE"; then
50238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
50239$as_echo "$CCACHE" >&6; }
50240else
50241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50242$as_echo "no" >&6; }
50243fi
50244
50245
50246  test -n "$CCACHE" && break
50247done
50248
50249  else
50250    # The variable is set, but is it from the command line or the environment?
50251
50252    # Try to remove the string !CCACHE! from our list.
50253    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
50254    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
50255      # If it failed, the variable was not from the command line. Ignore it,
50256      # but warn the user (except for BASH, which is always set by the calling BASH).
50257      if test "xCCACHE" != xBASH; then
50258        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
50259$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
50260      fi
50261      # Try to locate tool using the code snippet
50262      for ac_prog in ccache
50263do
50264  # Extract the first word of "$ac_prog", so it can be a program name with args.
50265set dummy $ac_prog; ac_word=$2
50266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
50267$as_echo_n "checking for $ac_word... " >&6; }
50268if ${ac_cv_path_CCACHE+:} false; then :
50269  $as_echo_n "(cached) " >&6
50270else
50271  case $CCACHE in
50272  [\\/]* | ?:[\\/]*)
50273  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
50274  ;;
50275  *)
50276  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50277for as_dir in $PATH
50278do
50279  IFS=$as_save_IFS
50280  test -z "$as_dir" && as_dir=.
50281    for ac_exec_ext in '' $ac_executable_extensions; do
50282  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
50283    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
50284    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
50285    break 2
50286  fi
50287done
50288  done
50289IFS=$as_save_IFS
50290
50291  ;;
50292esac
50293fi
50294CCACHE=$ac_cv_path_CCACHE
50295if test -n "$CCACHE"; then
50296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
50297$as_echo "$CCACHE" >&6; }
50298else
50299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50300$as_echo "no" >&6; }
50301fi
50302
50303
50304  test -n "$CCACHE" && break
50305done
50306
50307    else
50308      # If it succeeded, then it was overridden by the user. We will use it
50309      # for the tool.
50310
50311      # First remove it from the list of overridden variables, so we can test
50312      # for unknown variables in the end.
50313      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
50314
50315      # Check if the provided tool contains a complete path.
50316      tool_specified="$CCACHE"
50317      tool_basename="${tool_specified##*/}"
50318      if test "x$tool_basename" = "x$tool_specified"; then
50319        # A command without a complete path is provided, search $PATH.
50320        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
50321$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
50322        # Extract the first word of "$tool_basename", so it can be a program name with args.
50323set dummy $tool_basename; ac_word=$2
50324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
50325$as_echo_n "checking for $ac_word... " >&6; }
50326if ${ac_cv_path_CCACHE+:} false; then :
50327  $as_echo_n "(cached) " >&6
50328else
50329  case $CCACHE in
50330  [\\/]* | ?:[\\/]*)
50331  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
50332  ;;
50333  *)
50334  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50335for as_dir in $PATH
50336do
50337  IFS=$as_save_IFS
50338  test -z "$as_dir" && as_dir=.
50339    for ac_exec_ext in '' $ac_executable_extensions; do
50340  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
50341    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
50342    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
50343    break 2
50344  fi
50345done
50346  done
50347IFS=$as_save_IFS
50348
50349  ;;
50350esac
50351fi
50352CCACHE=$ac_cv_path_CCACHE
50353if test -n "$CCACHE"; then
50354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
50355$as_echo "$CCACHE" >&6; }
50356else
50357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50358$as_echo "no" >&6; }
50359fi
50360
50361
50362        if test "x$CCACHE" = x; then
50363          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
50364        fi
50365      else
50366        # Otherwise we believe it is a complete path. Use it as it is.
50367        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
50368$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
50369        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
50370$as_echo_n "checking for CCACHE... " >&6; }
50371        if test ! -x "$tool_specified"; then
50372          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
50373$as_echo "not found" >&6; }
50374          as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
50375        fi
50376        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
50377$as_echo "$tool_specified" >&6; }
50378      fi
50379    fi
50380  fi
50381
50382
50383
50384  if test "x$CCACHE" = x; then
50385    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
50386  fi
50387
50388
50389    CCACHE_STATUS="enabled"
50390    PATH="$OLD_PATH"
50391  elif test "x$enable_ccache" = xno; then
50392    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
50393$as_echo "no, explicitly disabled" >&6; }
50394  elif test "x$enable_ccache" = x; then
50395    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50396$as_echo "no" >&6; }
50397  else
50398    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
50399$as_echo "unknown" >&6; }
50400    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
50401  fi
50402
50403
50404
50405# Check whether --with-ccache-dir was given.
50406if test "${with_ccache_dir+set}" = set; then :
50407  withval=$with_ccache_dir;
50408fi
50409
50410
50411  if test "x$with_ccache_dir" != x; then
50412    # When using a non home ccache directory, assume the use is to share ccache files
50413    # with other users. Thus change the umask.
50414    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
50415    if test "x$CCACHE" = x; then
50416      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
50417$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
50418    fi
50419  fi
50420
50421  if test "x$CCACHE" != x; then
50422
50423  if test "x$CCACHE" != x; then
50424    # Only use ccache if it is 3.1.4 or later, which supports
50425    # precompiled headers.
50426    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
50427$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
50428    HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
50429    if test "x$HAS_GOOD_CCACHE" = x; then
50430      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
50431$as_echo "no, disabling ccache" >&6; }
50432      CCACHE=
50433      CCACHE_STATUS="disabled"
50434    else
50435      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50436$as_echo "yes" >&6; }
50437      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
50438$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
50439      PUSHED_FLAGS="$CXXFLAGS"
50440      CXXFLAGS="-fpch-preprocess $CXXFLAGS"
50441      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50442/* end confdefs.h.  */
50443
50444int
50445main ()
50446{
50447
50448  ;
50449  return 0;
50450}
50451_ACEOF
50452if ac_fn_cxx_try_compile "$LINENO"; then :
50453  CC_KNOWS_CCACHE_TRICK=yes
50454else
50455  CC_KNOWS_CCACHE_TRICK=no
50456fi
50457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50458      CXXFLAGS="$PUSHED_FLAGS"
50459      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
50460        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50461$as_echo "yes" >&6; }
50462      else
50463        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
50464$as_echo "no, disabling ccaching of precompiled headers" >&6; }
50465        CCACHE=
50466        CCACHE_STATUS="disabled"
50467      fi
50468    fi
50469  fi
50470
50471  if test "x$CCACHE" != x; then
50472    CCACHE_SLOPPINESS=time_macros
50473    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
50474    CCACHE_FLAGS=-fpch-preprocess
50475
50476    if test "x$SET_CCACHE_DIR" != x; then
50477      mkdir -p $CCACHE_DIR > /dev/null 2>&1
50478      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
50479    fi
50480  fi
50481
50482  fi
50483
50484
50485###############################################################################
50486#
50487# And now the finish...
50488#
50489###############################################################################
50490
50491# Check for some common pitfalls
50492
50493  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50494    file_to_test="$SRC_ROOT/LICENSE"
50495    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
50496      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
50497    fi
50498  fi
50499
50500
50501  # Did user specify any unknown variables?
50502
50503  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
50504    # Replace the separating ! with spaces before presenting for end user.
50505    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
50506    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
50507$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
50508  fi
50509
50510
50511  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
50512$as_echo_n "checking if build directory is on local disk... " >&6; }
50513
50514  # df -l lists only local disks; if the given directory is not found then
50515  # a non-zero exit code is given
50516  if test "x$DF" = x; then
50517    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50518      # msys does not have df; use Windows "net use" instead.
50519      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
50520      if test "x$IS_NETWORK_DISK" = x; then
50521        OUTPUT_DIR_IS_LOCAL="yes"
50522      else
50523        OUTPUT_DIR_IS_LOCAL="no"
50524      fi
50525    else
50526      # No df here, say it's local
50527      OUTPUT_DIR_IS_LOCAL="yes"
50528    fi
50529  else
50530    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
50531      OUTPUT_DIR_IS_LOCAL="yes"
50532    else
50533      OUTPUT_DIR_IS_LOCAL="no"
50534    fi
50535  fi
50536
50537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
50538$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
50539
50540
50541
50542  # Check if the user has any old-style ALT_ variables set.
50543  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
50544
50545  # Before generating output files, test if they exist. If they do, this is a reconfigure.
50546  # Since we can't properly handle the dependencies for this, warn the user about the situation
50547  if test -e $OUTPUT_ROOT/spec.gmk; then
50548    IS_RECONFIGURE=yes
50549  else
50550    IS_RECONFIGURE=no
50551  fi
50552
50553
50554# At the end, call the custom hook. (Dummy macro if no custom sources available)
50555
50556
50557# We're messing a bit with internal autoconf variables to put the config.status
50558# in the output directory instead of the current directory.
50559CONFIG_STATUS="$OUTPUT_ROOT/config.status"
50560
50561# Create the actual output files. Now the main work of configure is done.
50562cat >confcache <<\_ACEOF
50563# This file is a shell script that caches the results of configure
50564# tests run on this system so they can be shared between configure
50565# scripts and configure runs, see configure's option --config-cache.
50566# It is not useful on other systems.  If it contains results you don't
50567# want to keep, you may remove or edit it.
50568#
50569# config.status only pays attention to the cache file if you give it
50570# the --recheck option to rerun configure.
50571#
50572# `ac_cv_env_foo' variables (set or unset) will be overridden when
50573# loading this file, other *unset* `ac_cv_foo' will be assigned the
50574# following values.
50575
50576_ACEOF
50577
50578# The following way of writing the cache mishandles newlines in values,
50579# but we know of no workaround that is simple, portable, and efficient.
50580# So, we kill variables containing newlines.
50581# Ultrix sh set writes to stderr and can't be redirected directly,
50582# and sets the high bit in the cache file unless we assign to the vars.
50583(
50584  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
50585    eval ac_val=\$$ac_var
50586    case $ac_val in #(
50587    *${as_nl}*)
50588      case $ac_var in #(
50589      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
50590$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
50591      esac
50592      case $ac_var in #(
50593      _ | IFS | as_nl) ;; #(
50594      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
50595      *) { eval $ac_var=; unset $ac_var;} ;;
50596      esac ;;
50597    esac
50598  done
50599
50600  (set) 2>&1 |
50601    case $as_nl`(ac_space=' '; set) 2>&1` in #(
50602    *${as_nl}ac_space=\ *)
50603      # `set' does not quote correctly, so add quotes: double-quote
50604      # substitution turns \\\\ into \\, and sed turns \\ into \.
50605      sed -n \
50606	"s/'/'\\\\''/g;
50607	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
50608      ;; #(
50609    *)
50610      # `set' quotes correctly as required by POSIX, so do not add quotes.
50611      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
50612      ;;
50613    esac |
50614    sort
50615) |
50616  sed '
50617     /^ac_cv_env_/b end
50618     t clear
50619     :clear
50620     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
50621     t end
50622     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
50623     :end' >>confcache
50624if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
50625  if test -w "$cache_file"; then
50626    if test "x$cache_file" != "x/dev/null"; then
50627      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
50628$as_echo "$as_me: updating cache $cache_file" >&6;}
50629      if test ! -f "$cache_file" || test -h "$cache_file"; then
50630	cat confcache >"$cache_file"
50631      else
50632        case $cache_file in #(
50633        */* | ?:*)
50634	  mv -f confcache "$cache_file"$$ &&
50635	  mv -f "$cache_file"$$ "$cache_file" ;; #(
50636        *)
50637	  mv -f confcache "$cache_file" ;;
50638	esac
50639      fi
50640    fi
50641  else
50642    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
50643$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
50644  fi
50645fi
50646rm -f confcache
50647
50648test "x$prefix" = xNONE && prefix=$ac_default_prefix
50649# Let make expand exec_prefix.
50650test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
50651
50652DEFS=-DHAVE_CONFIG_H
50653
50654ac_libobjs=
50655ac_ltlibobjs=
50656U=
50657for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
50658  # 1. Remove the extension, and $U if already installed.
50659  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
50660  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
50661  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
50662  #    will be set to the directory where LIBOBJS objects are built.
50663  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
50664  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
50665done
50666LIBOBJS=$ac_libobjs
50667
50668LTLIBOBJS=$ac_ltlibobjs
50669
50670
50671
50672: "${CONFIG_STATUS=./config.status}"
50673ac_write_fail=0
50674ac_clean_files_save=$ac_clean_files
50675ac_clean_files="$ac_clean_files $CONFIG_STATUS"
50676{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
50677$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
50678as_write_fail=0
50679cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
50680#! $SHELL
50681# Generated by $as_me.
50682# Run this file to recreate the current configuration.
50683# Compiler output produced by configure, useful for debugging
50684# configure, is in config.log if it exists.
50685
50686debug=false
50687ac_cs_recheck=false
50688ac_cs_silent=false
50689
50690SHELL=\${CONFIG_SHELL-$SHELL}
50691export SHELL
50692_ASEOF
50693cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
50694## -------------------- ##
50695## M4sh Initialization. ##
50696## -------------------- ##
50697
50698# Be more Bourne compatible
50699DUALCASE=1; export DUALCASE # for MKS sh
50700if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
50701  emulate sh
50702  NULLCMD=:
50703  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
50704  # is contrary to our usage.  Disable this feature.
50705  alias -g '${1+"$@"}'='"$@"'
50706  setopt NO_GLOB_SUBST
50707else
50708  case `(set -o) 2>/dev/null` in #(
50709  *posix*) :
50710    set -o posix ;; #(
50711  *) :
50712     ;;
50713esac
50714fi
50715
50716
50717as_nl='
50718'
50719export as_nl
50720# Printing a long string crashes Solaris 7 /usr/bin/printf.
50721as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
50722as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
50723as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
50724# Prefer a ksh shell builtin over an external printf program on Solaris,
50725# but without wasting forks for bash or zsh.
50726if test -z "$BASH_VERSION$ZSH_VERSION" \
50727    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
50728  as_echo='print -r --'
50729  as_echo_n='print -rn --'
50730elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50731  as_echo='printf %s\n'
50732  as_echo_n='printf %s'
50733else
50734  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
50735    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
50736    as_echo_n='/usr/ucb/echo -n'
50737  else
50738    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
50739    as_echo_n_body='eval
50740      arg=$1;
50741      case $arg in #(
50742      *"$as_nl"*)
50743	expr "X$arg" : "X\\(.*\\)$as_nl";
50744	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
50745      esac;
50746      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
50747    '
50748    export as_echo_n_body
50749    as_echo_n='sh -c $as_echo_n_body as_echo'
50750  fi
50751  export as_echo_body
50752  as_echo='sh -c $as_echo_body as_echo'
50753fi
50754
50755# The user is always right.
50756if test "${PATH_SEPARATOR+set}" != set; then
50757  PATH_SEPARATOR=:
50758  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
50759    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
50760      PATH_SEPARATOR=';'
50761  }
50762fi
50763
50764
50765# IFS
50766# We need space, tab and new line, in precisely that order.  Quoting is
50767# there to prevent editors from complaining about space-tab.
50768# (If _AS_PATH_WALK were called with IFS unset, it would disable word
50769# splitting by setting IFS to empty value.)
50770IFS=" ""	$as_nl"
50771
50772# Find who we are.  Look in the path if we contain no directory separator.
50773as_myself=
50774case $0 in #((
50775  *[\\/]* ) as_myself=$0 ;;
50776  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50777for as_dir in $PATH
50778do
50779  IFS=$as_save_IFS
50780  test -z "$as_dir" && as_dir=.
50781    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
50782  done
50783IFS=$as_save_IFS
50784
50785     ;;
50786esac
50787# We did not find ourselves, most probably we were run as `sh COMMAND'
50788# in which case we are not to be found in the path.
50789if test "x$as_myself" = x; then
50790  as_myself=$0
50791fi
50792if test ! -f "$as_myself"; then
50793  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
50794  exit 1
50795fi
50796
50797# Unset variables that we do not need and which cause bugs (e.g. in
50798# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
50799# suppresses any "Segmentation fault" message there.  '((' could
50800# trigger a bug in pdksh 5.2.14.
50801for as_var in BASH_ENV ENV MAIL MAILPATH
50802do eval test x\${$as_var+set} = xset \
50803  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
50804done
50805PS1='$ '
50806PS2='> '
50807PS4='+ '
50808
50809# NLS nuisances.
50810LC_ALL=C
50811export LC_ALL
50812LANGUAGE=C
50813export LANGUAGE
50814
50815# CDPATH.
50816(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
50817
50818
50819# as_fn_error STATUS ERROR [LINENO LOG_FD]
50820# ----------------------------------------
50821# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
50822# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
50823# script with STATUS, using 1 if that was 0.
50824as_fn_error ()
50825{
50826  as_status=$1; test $as_status -eq 0 && as_status=1
50827  if test "$4"; then
50828    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
50829    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
50830  fi
50831  $as_echo "$as_me: error: $2" >&2
50832  as_fn_exit $as_status
50833} # as_fn_error
50834
50835
50836# as_fn_set_status STATUS
50837# -----------------------
50838# Set $? to STATUS, without forking.
50839as_fn_set_status ()
50840{
50841  return $1
50842} # as_fn_set_status
50843
50844# as_fn_exit STATUS
50845# -----------------
50846# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
50847as_fn_exit ()
50848{
50849  set +e
50850  as_fn_set_status $1
50851  exit $1
50852} # as_fn_exit
50853
50854# as_fn_unset VAR
50855# ---------------
50856# Portably unset VAR.
50857as_fn_unset ()
50858{
50859  { eval $1=; unset $1;}
50860}
50861as_unset=as_fn_unset
50862# as_fn_append VAR VALUE
50863# ----------------------
50864# Append the text in VALUE to the end of the definition contained in VAR. Take
50865# advantage of any shell optimizations that allow amortized linear growth over
50866# repeated appends, instead of the typical quadratic growth present in naive
50867# implementations.
50868if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
50869  eval 'as_fn_append ()
50870  {
50871    eval $1+=\$2
50872  }'
50873else
50874  as_fn_append ()
50875  {
50876    eval $1=\$$1\$2
50877  }
50878fi # as_fn_append
50879
50880# as_fn_arith ARG...
50881# ------------------
50882# Perform arithmetic evaluation on the ARGs, and store the result in the
50883# global $as_val. Take advantage of shells that can avoid forks. The arguments
50884# must be portable across $(()) and expr.
50885if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
50886  eval 'as_fn_arith ()
50887  {
50888    as_val=$(( $* ))
50889  }'
50890else
50891  as_fn_arith ()
50892  {
50893    as_val=`expr "$@" || test $? -eq 1`
50894  }
50895fi # as_fn_arith
50896
50897
50898if expr a : '\(a\)' >/dev/null 2>&1 &&
50899   test "X`expr 00001 : '.*\(...\)'`" = X001; then
50900  as_expr=expr
50901else
50902  as_expr=false
50903fi
50904
50905if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
50906  as_basename=basename
50907else
50908  as_basename=false
50909fi
50910
50911if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
50912  as_dirname=dirname
50913else
50914  as_dirname=false
50915fi
50916
50917as_me=`$as_basename -- "$0" ||
50918$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
50919	 X"$0" : 'X\(//\)$' \| \
50920	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
50921$as_echo X/"$0" |
50922    sed '/^.*\/\([^/][^/]*\)\/*$/{
50923	    s//\1/
50924	    q
50925	  }
50926	  /^X\/\(\/\/\)$/{
50927	    s//\1/
50928	    q
50929	  }
50930	  /^X\/\(\/\).*/{
50931	    s//\1/
50932	    q
50933	  }
50934	  s/.*/./; q'`
50935
50936# Avoid depending upon Character Ranges.
50937as_cr_letters='abcdefghijklmnopqrstuvwxyz'
50938as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
50939as_cr_Letters=$as_cr_letters$as_cr_LETTERS
50940as_cr_digits='0123456789'
50941as_cr_alnum=$as_cr_Letters$as_cr_digits
50942
50943ECHO_C= ECHO_N= ECHO_T=
50944case `echo -n x` in #(((((
50945-n*)
50946  case `echo 'xy\c'` in
50947  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
50948  xy)  ECHO_C='\c';;
50949  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
50950       ECHO_T='	';;
50951  esac;;
50952*)
50953  ECHO_N='-n';;
50954esac
50955
50956rm -f conf$$ conf$$.exe conf$$.file
50957if test -d conf$$.dir; then
50958  rm -f conf$$.dir/conf$$.file
50959else
50960  rm -f conf$$.dir
50961  mkdir conf$$.dir 2>/dev/null
50962fi
50963if (echo >conf$$.file) 2>/dev/null; then
50964  if ln -s conf$$.file conf$$ 2>/dev/null; then
50965    as_ln_s='ln -s'
50966    # ... but there are two gotchas:
50967    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
50968    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
50969    # In both cases, we have to default to `cp -pR'.
50970    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
50971      as_ln_s='cp -pR'
50972  elif ln conf$$.file conf$$ 2>/dev/null; then
50973    as_ln_s=ln
50974  else
50975    as_ln_s='cp -pR'
50976  fi
50977else
50978  as_ln_s='cp -pR'
50979fi
50980rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
50981rmdir conf$$.dir 2>/dev/null
50982
50983
50984# as_fn_mkdir_p
50985# -------------
50986# Create "$as_dir" as a directory, including parents if necessary.
50987as_fn_mkdir_p ()
50988{
50989
50990  case $as_dir in #(
50991  -*) as_dir=./$as_dir;;
50992  esac
50993  test -d "$as_dir" || eval $as_mkdir_p || {
50994    as_dirs=
50995    while :; do
50996      case $as_dir in #(
50997      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
50998      *) as_qdir=$as_dir;;
50999      esac
51000      as_dirs="'$as_qdir' $as_dirs"
51001      as_dir=`$as_dirname -- "$as_dir" ||
51002$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
51003	 X"$as_dir" : 'X\(//\)[^/]' \| \
51004	 X"$as_dir" : 'X\(//\)$' \| \
51005	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
51006$as_echo X"$as_dir" |
51007    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
51008	    s//\1/
51009	    q
51010	  }
51011	  /^X\(\/\/\)[^/].*/{
51012	    s//\1/
51013	    q
51014	  }
51015	  /^X\(\/\/\)$/{
51016	    s//\1/
51017	    q
51018	  }
51019	  /^X\(\/\).*/{
51020	    s//\1/
51021	    q
51022	  }
51023	  s/.*/./; q'`
51024      test -d "$as_dir" && break
51025    done
51026    test -z "$as_dirs" || eval "mkdir $as_dirs"
51027  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
51028
51029
51030} # as_fn_mkdir_p
51031if mkdir -p . 2>/dev/null; then
51032  as_mkdir_p='mkdir -p "$as_dir"'
51033else
51034  test -d ./-p && rmdir ./-p
51035  as_mkdir_p=false
51036fi
51037
51038
51039# as_fn_executable_p FILE
51040# -----------------------
51041# Test if FILE is an executable regular file.
51042as_fn_executable_p ()
51043{
51044  test -f "$1" && test -x "$1"
51045} # as_fn_executable_p
51046as_test_x='test -x'
51047as_executable_p=as_fn_executable_p
51048
51049# Sed expression to map a string onto a valid CPP name.
51050as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
51051
51052# Sed expression to map a string onto a valid variable name.
51053as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
51054
51055
51056exec 6>&1
51057## ----------------------------------- ##
51058## Main body of $CONFIG_STATUS script. ##
51059## ----------------------------------- ##
51060_ASEOF
51061test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
51062
51063cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51064# Save the log message, to keep $0 and so on meaningful, and to
51065# report actual input values of CONFIG_FILES etc. instead of their
51066# values after options handling.
51067ac_log="
51068This file was extended by OpenJDK $as_me jdk9, which was
51069generated by GNU Autoconf 2.69.  Invocation command line was
51070
51071  CONFIG_FILES    = $CONFIG_FILES
51072  CONFIG_HEADERS  = $CONFIG_HEADERS
51073  CONFIG_LINKS    = $CONFIG_LINKS
51074  CONFIG_COMMANDS = $CONFIG_COMMANDS
51075  $ $0 $@
51076
51077on `(hostname || uname -n) 2>/dev/null | sed 1q`
51078"
51079
51080_ACEOF
51081
51082case $ac_config_files in *"
51083"*) set x $ac_config_files; shift; ac_config_files=$*;;
51084esac
51085
51086case $ac_config_headers in *"
51087"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
51088esac
51089
51090
51091cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51092# Files that config.status was made for.
51093config_files="$ac_config_files"
51094config_headers="$ac_config_headers"
51095
51096_ACEOF
51097
51098cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51099ac_cs_usage="\
51100\`$as_me' instantiates files and other configuration actions
51101from templates according to the current configuration.  Unless the files
51102and actions are specified as TAGs, all are instantiated by default.
51103
51104Usage: $0 [OPTION]... [TAG]...
51105
51106  -h, --help       print this help, then exit
51107  -V, --version    print version number and configuration settings, then exit
51108      --config     print configuration, then exit
51109  -q, --quiet, --silent
51110                   do not print progress messages
51111  -d, --debug      don't remove temporary files
51112      --recheck    update $as_me by reconfiguring in the same conditions
51113      --file=FILE[:TEMPLATE]
51114                   instantiate the configuration file FILE
51115      --header=FILE[:TEMPLATE]
51116                   instantiate the configuration header FILE
51117
51118Configuration files:
51119$config_files
51120
51121Configuration headers:
51122$config_headers
51123
51124Report bugs to <build-dev@openjdk.java.net>.
51125OpenJDK home page: <http://openjdk.java.net>."
51126
51127_ACEOF
51128cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51129ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
51130ac_cs_version="\\
51131OpenJDK config.status jdk9
51132configured by $0, generated by GNU Autoconf 2.69,
51133  with options \\"\$ac_cs_config\\"
51134
51135Copyright (C) 2012 Free Software Foundation, Inc.
51136This config.status script is free software; the Free Software Foundation
51137gives unlimited permission to copy, distribute and modify it."
51138
51139ac_pwd='$ac_pwd'
51140srcdir='$srcdir'
51141AWK='$AWK'
51142test -n "\$AWK" || AWK=awk
51143_ACEOF
51144
51145cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51146# The default lists apply if the user does not specify any file.
51147ac_need_defaults=:
51148while test $# != 0
51149do
51150  case $1 in
51151  --*=?*)
51152    ac_option=`expr "X$1" : 'X\([^=]*\)='`
51153    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
51154    ac_shift=:
51155    ;;
51156  --*=)
51157    ac_option=`expr "X$1" : 'X\([^=]*\)='`
51158    ac_optarg=
51159    ac_shift=:
51160    ;;
51161  *)
51162    ac_option=$1
51163    ac_optarg=$2
51164    ac_shift=shift
51165    ;;
51166  esac
51167
51168  case $ac_option in
51169  # Handling of the options.
51170  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
51171    ac_cs_recheck=: ;;
51172  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
51173    $as_echo "$ac_cs_version"; exit ;;
51174  --config | --confi | --conf | --con | --co | --c )
51175    $as_echo "$ac_cs_config"; exit ;;
51176  --debug | --debu | --deb | --de | --d | -d )
51177    debug=: ;;
51178  --file | --fil | --fi | --f )
51179    $ac_shift
51180    case $ac_optarg in
51181    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
51182    '') as_fn_error $? "missing file argument" ;;
51183    esac
51184    as_fn_append CONFIG_FILES " '$ac_optarg'"
51185    ac_need_defaults=false;;
51186  --header | --heade | --head | --hea )
51187    $ac_shift
51188    case $ac_optarg in
51189    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
51190    esac
51191    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
51192    ac_need_defaults=false;;
51193  --he | --h)
51194    # Conflict between --help and --header
51195    as_fn_error $? "ambiguous option: \`$1'
51196Try \`$0 --help' for more information.";;
51197  --help | --hel | -h )
51198    $as_echo "$ac_cs_usage"; exit ;;
51199  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
51200  | -silent | --silent | --silen | --sile | --sil | --si | --s)
51201    ac_cs_silent=: ;;
51202
51203  # This is an error.
51204  -*) as_fn_error $? "unrecognized option: \`$1'
51205Try \`$0 --help' for more information." ;;
51206
51207  *) as_fn_append ac_config_targets " $1"
51208     ac_need_defaults=false ;;
51209
51210  esac
51211  shift
51212done
51213
51214ac_configure_extra_args=
51215
51216if $ac_cs_silent; then
51217  exec 6>/dev/null
51218  ac_configure_extra_args="$ac_configure_extra_args --silent"
51219fi
51220
51221_ACEOF
51222cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51223if \$ac_cs_recheck; then
51224  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
51225  shift
51226  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
51227  CONFIG_SHELL='$SHELL'
51228  export CONFIG_SHELL
51229  exec "\$@"
51230fi
51231
51232_ACEOF
51233cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51234exec 5>>config.log
51235{
51236  echo
51237  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
51238## Running $as_me. ##
51239_ASBOX
51240  $as_echo "$ac_log"
51241} >&5
51242
51243_ACEOF
51244cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51245_ACEOF
51246
51247cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51248
51249# Handling of arguments.
51250for ac_config_target in $ac_config_targets
51251do
51252  case $ac_config_target in
51253    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
51254    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
51255    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
51256    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
51257    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
51258    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
51259    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
51260
51261  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
51262  esac
51263done
51264
51265
51266# If the user did not use the arguments to specify the items to instantiate,
51267# then the envvar interface is used.  Set only those that are not.
51268# We use the long form for the default assignment because of an extremely
51269# bizarre bug on SunOS 4.1.3.
51270if $ac_need_defaults; then
51271  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
51272  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
51273fi
51274
51275# Have a temporary directory for convenience.  Make it in the build tree
51276# simply because there is no reason against having it here, and in addition,
51277# creating and moving files from /tmp can sometimes cause problems.
51278# Hook for its removal unless debugging.
51279# Note that there is a small window in which the directory will not be cleaned:
51280# after its creation but before its name has been assigned to `$tmp'.
51281$debug ||
51282{
51283  tmp= ac_tmp=
51284  trap 'exit_status=$?
51285  : "${ac_tmp:=$tmp}"
51286  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
51287' 0
51288  trap 'as_fn_exit 1' 1 2 13 15
51289}
51290# Create a (secure) tmp directory for tmp files.
51291
51292{
51293  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
51294  test -d "$tmp"
51295}  ||
51296{
51297  tmp=./conf$$-$RANDOM
51298  (umask 077 && mkdir "$tmp")
51299} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
51300ac_tmp=$tmp
51301
51302# Set up the scripts for CONFIG_FILES section.
51303# No need to generate them if there are no CONFIG_FILES.
51304# This happens for instance with `./config.status config.h'.
51305if test -n "$CONFIG_FILES"; then
51306
51307
51308ac_cr=`echo X | tr X '\015'`
51309# On cygwin, bash can eat \r inside `` if the user requested igncr.
51310# But we know of no other shell where ac_cr would be empty at this
51311# point, so we can use a bashism as a fallback.
51312if test "x$ac_cr" = x; then
51313  eval ac_cr=\$\'\\r\'
51314fi
51315ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
51316if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
51317  ac_cs_awk_cr='\\r'
51318else
51319  ac_cs_awk_cr=$ac_cr
51320fi
51321
51322echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
51323_ACEOF
51324
51325
51326{
51327  echo "cat >conf$$subs.awk <<_ACEOF" &&
51328  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
51329  echo "_ACEOF"
51330} >conf$$subs.sh ||
51331  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
51332ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
51333ac_delim='%!_!# '
51334for ac_last_try in false false false false false :; do
51335  . ./conf$$subs.sh ||
51336    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
51337
51338  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
51339  if test $ac_delim_n = $ac_delim_num; then
51340    break
51341  elif $ac_last_try; then
51342    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
51343  else
51344    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
51345  fi
51346done
51347rm -f conf$$subs.sh
51348
51349cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51350cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
51351_ACEOF
51352sed -n '
51353h
51354s/^/S["/; s/!.*/"]=/
51355p
51356g
51357s/^[^!]*!//
51358:repl
51359t repl
51360s/'"$ac_delim"'$//
51361t delim
51362:nl
51363h
51364s/\(.\{148\}\)..*/\1/
51365t more1
51366s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
51367p
51368n
51369b repl
51370:more1
51371s/["\\]/\\&/g; s/^/"/; s/$/"\\/
51372p
51373g
51374s/.\{148\}//
51375t nl
51376:delim
51377h
51378s/\(.\{148\}\)..*/\1/
51379t more2
51380s/["\\]/\\&/g; s/^/"/; s/$/"/
51381p
51382b
51383:more2
51384s/["\\]/\\&/g; s/^/"/; s/$/"\\/
51385p
51386g
51387s/.\{148\}//
51388t delim
51389' <conf$$subs.awk | sed '
51390/^[^""]/{
51391  N
51392  s/\n//
51393}
51394' >>$CONFIG_STATUS || ac_write_fail=1
51395rm -f conf$$subs.awk
51396cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51397_ACAWK
51398cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
51399  for (key in S) S_is_set[key] = 1
51400  FS = ""
51401
51402}
51403{
51404  line = $ 0
51405  nfields = split(line, field, "@")
51406  substed = 0
51407  len = length(field[1])
51408  for (i = 2; i < nfields; i++) {
51409    key = field[i]
51410    keylen = length(key)
51411    if (S_is_set[key]) {
51412      value = S[key]
51413      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
51414      len += length(value) + length(field[++i])
51415      substed = 1
51416    } else
51417      len += 1 + keylen
51418  }
51419
51420  print line
51421}
51422
51423_ACAWK
51424_ACEOF
51425cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51426if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
51427  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
51428else
51429  cat
51430fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
51431  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
51432_ACEOF
51433
51434# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
51435# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
51436# trailing colons and then remove the whole line if VPATH becomes empty
51437# (actually we leave an empty line to preserve line numbers).
51438if test "x$srcdir" = x.; then
51439  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
51440h
51441s///
51442s/^/:/
51443s/[	 ]*$/:/
51444s/:\$(srcdir):/:/g
51445s/:\${srcdir}:/:/g
51446s/:@srcdir@:/:/g
51447s/^:*//
51448s/:*$//
51449x
51450s/\(=[	 ]*\).*/\1/
51451G
51452s/\n//
51453s/^[^=]*=[	 ]*$//
51454}'
51455fi
51456
51457cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51458fi # test -n "$CONFIG_FILES"
51459
51460# Set up the scripts for CONFIG_HEADERS section.
51461# No need to generate them if there are no CONFIG_HEADERS.
51462# This happens for instance with `./config.status Makefile'.
51463if test -n "$CONFIG_HEADERS"; then
51464cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
51465BEGIN {
51466_ACEOF
51467
51468# Transform confdefs.h into an awk script `defines.awk', embedded as
51469# here-document in config.status, that substitutes the proper values into
51470# config.h.in to produce config.h.
51471
51472# Create a delimiter string that does not exist in confdefs.h, to ease
51473# handling of long lines.
51474ac_delim='%!_!# '
51475for ac_last_try in false false :; do
51476  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
51477  if test -z "$ac_tt"; then
51478    break
51479  elif $ac_last_try; then
51480    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
51481  else
51482    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
51483  fi
51484done
51485
51486# For the awk script, D is an array of macro values keyed by name,
51487# likewise P contains macro parameters if any.  Preserve backslash
51488# newline sequences.
51489
51490ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
51491sed -n '
51492s/.\{148\}/&'"$ac_delim"'/g
51493t rset
51494:rset
51495s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
51496t def
51497d
51498:def
51499s/\\$//
51500t bsnl
51501s/["\\]/\\&/g
51502s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
51503D["\1"]=" \3"/p
51504s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
51505d
51506:bsnl
51507s/["\\]/\\&/g
51508s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
51509D["\1"]=" \3\\\\\\n"\\/p
51510t cont
51511s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
51512t cont
51513d
51514:cont
51515n
51516s/.\{148\}/&'"$ac_delim"'/g
51517t clear
51518:clear
51519s/\\$//
51520t bsnlc
51521s/["\\]/\\&/g; s/^/"/; s/$/"/p
51522d
51523:bsnlc
51524s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
51525b cont
51526' <confdefs.h | sed '
51527s/'"$ac_delim"'/"\\\
51528"/g' >>$CONFIG_STATUS || ac_write_fail=1
51529
51530cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51531  for (key in D) D_is_set[key] = 1
51532  FS = ""
51533}
51534/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
51535  line = \$ 0
51536  split(line, arg, " ")
51537  if (arg[1] == "#") {
51538    defundef = arg[2]
51539    mac1 = arg[3]
51540  } else {
51541    defundef = substr(arg[1], 2)
51542    mac1 = arg[2]
51543  }
51544  split(mac1, mac2, "(") #)
51545  macro = mac2[1]
51546  prefix = substr(line, 1, index(line, defundef) - 1)
51547  if (D_is_set[macro]) {
51548    # Preserve the white space surrounding the "#".
51549    print prefix "define", macro P[macro] D[macro]
51550    next
51551  } else {
51552    # Replace #undef with comments.  This is necessary, for example,
51553    # in the case of _POSIX_SOURCE, which is predefined and required
51554    # on some systems where configure will not decide to define it.
51555    if (defundef == "undef") {
51556      print "/*", prefix defundef, macro, "*/"
51557      next
51558    }
51559  }
51560}
51561{ print }
51562_ACAWK
51563_ACEOF
51564cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51565  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
51566fi # test -n "$CONFIG_HEADERS"
51567
51568
51569eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
51570shift
51571for ac_tag
51572do
51573  case $ac_tag in
51574  :[FHLC]) ac_mode=$ac_tag; continue;;
51575  esac
51576  case $ac_mode$ac_tag in
51577  :[FHL]*:*);;
51578  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
51579  :[FH]-) ac_tag=-:-;;
51580  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
51581  esac
51582  ac_save_IFS=$IFS
51583  IFS=:
51584  set x $ac_tag
51585  IFS=$ac_save_IFS
51586  shift
51587  ac_file=$1
51588  shift
51589
51590  case $ac_mode in
51591  :L) ac_source=$1;;
51592  :[FH])
51593    ac_file_inputs=
51594    for ac_f
51595    do
51596      case $ac_f in
51597      -) ac_f="$ac_tmp/stdin";;
51598      *) # Look for the file first in the build tree, then in the source tree
51599	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
51600	 # because $ac_f cannot contain `:'.
51601	 test -f "$ac_f" ||
51602	   case $ac_f in
51603	   [\\/$]*) false;;
51604	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
51605	   esac ||
51606	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
51607      esac
51608      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
51609      as_fn_append ac_file_inputs " '$ac_f'"
51610    done
51611
51612    # Let's still pretend it is `configure' which instantiates (i.e., don't
51613    # use $as_me), people would be surprised to read:
51614    #    /* config.h.  Generated by config.status.  */
51615    configure_input='Generated from '`
51616	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
51617	`' by configure.'
51618    if test x"$ac_file" != x-; then
51619      configure_input="$ac_file.  $configure_input"
51620      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
51621$as_echo "$as_me: creating $ac_file" >&6;}
51622    fi
51623    # Neutralize special characters interpreted by sed in replacement strings.
51624    case $configure_input in #(
51625    *\&* | *\|* | *\\* )
51626       ac_sed_conf_input=`$as_echo "$configure_input" |
51627       sed 's/[\\\\&|]/\\\\&/g'`;; #(
51628    *) ac_sed_conf_input=$configure_input;;
51629    esac
51630
51631    case $ac_tag in
51632    *:-:* | *:-) cat >"$ac_tmp/stdin" \
51633      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
51634    esac
51635    ;;
51636  esac
51637
51638  ac_dir=`$as_dirname -- "$ac_file" ||
51639$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
51640	 X"$ac_file" : 'X\(//\)[^/]' \| \
51641	 X"$ac_file" : 'X\(//\)$' \| \
51642	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
51643$as_echo X"$ac_file" |
51644    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
51645	    s//\1/
51646	    q
51647	  }
51648	  /^X\(\/\/\)[^/].*/{
51649	    s//\1/
51650	    q
51651	  }
51652	  /^X\(\/\/\)$/{
51653	    s//\1/
51654	    q
51655	  }
51656	  /^X\(\/\).*/{
51657	    s//\1/
51658	    q
51659	  }
51660	  s/.*/./; q'`
51661  as_dir="$ac_dir"; as_fn_mkdir_p
51662  ac_builddir=.
51663
51664case "$ac_dir" in
51665.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
51666*)
51667  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
51668  # A ".." for each directory in $ac_dir_suffix.
51669  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
51670  case $ac_top_builddir_sub in
51671  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
51672  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
51673  esac ;;
51674esac
51675ac_abs_top_builddir=$ac_pwd
51676ac_abs_builddir=$ac_pwd$ac_dir_suffix
51677# for backward compatibility:
51678ac_top_builddir=$ac_top_build_prefix
51679
51680case $srcdir in
51681  .)  # We are building in place.
51682    ac_srcdir=.
51683    ac_top_srcdir=$ac_top_builddir_sub
51684    ac_abs_top_srcdir=$ac_pwd ;;
51685  [\\/]* | ?:[\\/]* )  # Absolute name.
51686    ac_srcdir=$srcdir$ac_dir_suffix;
51687    ac_top_srcdir=$srcdir
51688    ac_abs_top_srcdir=$srcdir ;;
51689  *) # Relative name.
51690    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
51691    ac_top_srcdir=$ac_top_build_prefix$srcdir
51692    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
51693esac
51694ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
51695
51696
51697  case $ac_mode in
51698  :F)
51699  #
51700  # CONFIG_FILE
51701  #
51702
51703_ACEOF
51704
51705cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51706# If the template does not know about datarootdir, expand it.
51707# FIXME: This hack should be removed a few years after 2.60.
51708ac_datarootdir_hack=; ac_datarootdir_seen=
51709ac_sed_dataroot='
51710/datarootdir/ {
51711  p
51712  q
51713}
51714/@datadir@/p
51715/@docdir@/p
51716/@infodir@/p
51717/@localedir@/p
51718/@mandir@/p'
51719case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
51720*datarootdir*) ac_datarootdir_seen=yes;;
51721*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
51722  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
51723$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
51724_ACEOF
51725cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51726  ac_datarootdir_hack='
51727  s&@datadir@&$datadir&g
51728  s&@docdir@&$docdir&g
51729  s&@infodir@&$infodir&g
51730  s&@localedir@&$localedir&g
51731  s&@mandir@&$mandir&g
51732  s&\\\${datarootdir}&$datarootdir&g' ;;
51733esac
51734_ACEOF
51735
51736# Neutralize VPATH when `$srcdir' = `.'.
51737# Shell code in configure.ac might set extrasub.
51738# FIXME: do we really want to maintain this feature?
51739cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51740ac_sed_extra="$ac_vpsub
51741$extrasub
51742_ACEOF
51743cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51744:t
51745/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
51746s|@configure_input@|$ac_sed_conf_input|;t t
51747s&@top_builddir@&$ac_top_builddir_sub&;t t
51748s&@top_build_prefix@&$ac_top_build_prefix&;t t
51749s&@srcdir@&$ac_srcdir&;t t
51750s&@abs_srcdir@&$ac_abs_srcdir&;t t
51751s&@top_srcdir@&$ac_top_srcdir&;t t
51752s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
51753s&@builddir@&$ac_builddir&;t t
51754s&@abs_builddir@&$ac_abs_builddir&;t t
51755s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
51756$ac_datarootdir_hack
51757"
51758eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
51759  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
51760
51761test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
51762  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
51763  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
51764      "$ac_tmp/out"`; test -z "$ac_out"; } &&
51765  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
51766which seems to be undefined.  Please make sure it is defined" >&5
51767$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
51768which seems to be undefined.  Please make sure it is defined" >&2;}
51769
51770  rm -f "$ac_tmp/stdin"
51771  case $ac_file in
51772  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
51773  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
51774  esac \
51775  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
51776 ;;
51777  :H)
51778  #
51779  # CONFIG_HEADER
51780  #
51781  if test x"$ac_file" != x-; then
51782    {
51783      $as_echo "/* $configure_input  */" \
51784      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
51785    } >"$ac_tmp/config.h" \
51786      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
51787    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
51788      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
51789$as_echo "$as_me: $ac_file is unchanged" >&6;}
51790    else
51791      rm -f "$ac_file"
51792      mv "$ac_tmp/config.h" "$ac_file" \
51793	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
51794    fi
51795  else
51796    $as_echo "/* $configure_input  */" \
51797      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
51798      || as_fn_error $? "could not create -" "$LINENO" 5
51799  fi
51800 ;;
51801
51802
51803  esac
51804
51805done # for ac_tag
51806
51807
51808as_fn_exit 0
51809_ACEOF
51810ac_clean_files=$ac_clean_files_save
51811
51812test $ac_write_fail = 0 ||
51813  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
51814
51815
51816# configure is writing to config.log, and then calls config.status.
51817# config.status does its own redirection, appending to config.log.
51818# Unfortunately, on DOS this fails, as config.log is still kept open
51819# by configure, so config.status won't be able to write to it; its
51820# output is simply discarded.  So we exec the FD to /dev/null,
51821# effectively closing config.log, so it can be properly (re)opened and
51822# appended to by config.status.  When coming back to configure, we
51823# need to make the FD available again.
51824if test "$no_create" != yes; then
51825  ac_cs_success=:
51826  ac_config_status_args=
51827  test "$silent" = yes &&
51828    ac_config_status_args="$ac_config_status_args --quiet"
51829  exec 5>/dev/null
51830  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
51831  exec 5>>config.log
51832  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
51833  # would make configure fail if this is the last instruction.
51834  $ac_cs_success || as_fn_exit 1
51835fi
51836if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
51837  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
51838$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
51839fi
51840
51841
51842# Try to move the config.log file to the output directory.
51843if test -e ./config.log; then
51844  $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
51845fi
51846
51847# Make the compare script executable
51848$CHMOD +x $OUTPUT_ROOT/compare.sh
51849
51850# Finally output some useful information to the user
51851
51852  # Finally output some useful information to the user
51853
51854  printf "\n"
51855  printf "====================================================\n"
51856  if test "x$no_create" != "xyes"; then
51857    if test "x$IS_RECONFIGURE" != "xyes"; then
51858      printf "A new configuration has been successfully created in\n %s\n" "$OUTPUT_ROOT"
51859    else
51860      printf "The existing configuration has been successfully updated in\n %s\n" "$OUTPUT_ROOT"
51861    fi
51862  else
51863    if test "x$IS_RECONFIGURE" != "xyes"; then
51864      printf "A configuration has been successfully checked but not created\n"
51865    else
51866      printf "The existing configuration has been successfully checked in\n %s\n" "$OUTPUT_ROOT"
51867    fi
51868  fi
51869  if test "x$CONFIGURE_COMMAND_LINE" != x; then
51870    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
51871  else
51872    printf "using default settings.\n"
51873  fi
51874
51875  printf "\n"
51876  printf "Configuration summary:\n"
51877  printf "* Debug level:    $DEBUG_LEVEL\n"
51878  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
51879  printf "* JDK variant:    $JDK_VARIANT\n"
51880  printf "* JVM variants:   $with_jvm_variants\n"
51881  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
51882
51883  printf "\n"
51884  printf "Tools summary:\n"
51885  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
51886    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
51887  fi
51888  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
51889  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)\n"
51890  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
51891  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
51892
51893  printf "\n"
51894  printf "Build performance summary:\n"
51895  printf "* Cores to use:   $JOBS\n"
51896  printf "* Memory limit:   $MEMORY_SIZE MB\n"
51897  if test "x$CCACHE_STATUS" != "x"; then
51898    printf "* ccache status:  $CCACHE_STATUS\n"
51899  fi
51900  printf "\n"
51901
51902  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
51903    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
51904    printf "will result in longer build times.\n"
51905    printf "\n"
51906  fi
51907
51908  if test "x$FOUND_ALT_VARIABLES" != "x"; then
51909    printf "WARNING: You have old-style ALT_ environment variables set.\n"
51910    printf "These are not respected, and will be ignored. It is recommended\n"
51911    printf "that you clean your environment. The following variables are set:\n"
51912    printf "$FOUND_ALT_VARIABLES\n"
51913    printf "\n"
51914  fi
51915
51916  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
51917    printf "WARNING: Your build output directory is not on a local disk.\n"
51918    printf "This will severely degrade build performance!\n"
51919    printf "It is recommended that you create an output directory on a local disk,\n"
51920    printf "and run the configure script again from that directory.\n"
51921    printf "\n"
51922  fi
51923
51924  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
51925    printf "WARNING: The result of this configuration has overridden an older\n"
51926    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
51927    printf "proper build. Failure to do so might result in strange build problems.\n"
51928    printf "\n"
51929  fi
51930
51931  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
51932    printf "WARNING: The result of this configuration was not saved.\n"
51933    printf "You should run without '--no-create | -n' to create the configuration.\n"
51934    printf "\n"
51935  fi
51936
51937